[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"sanity-QKOq3eNUxfnWBb-Ckop6A9yE3oIaUv46hk5FvKBLXe4":3,"sanity-0tO0hho0hgBCBVE9TRE-K5AiQzbMq3Yk7b9h4DA-ylQ":267},{"data":4,"sourceMap":-1},{"latestPodcast":5,"latestReleases":14,"post":39,"recent":242},[6],{"_id":7,"publishedAt":8,"slug":9,"sponsored":12,"title":13},"7ebd76d2-cebc-4b88-82f9-3dfb2c8bc5ca","2026-07-08T04:40:00.000Z",{"_type":10,"current":11},"slug","what-s-left-for-infrastructure-as-code-after-ai-moves-in",true,"What's left for infrastructure-as-code after AI moves in?",[15,21,27,33],{"_id":16,"publishedAt":17,"slug":18,"title":20},"eb5b66eb-9410-4329-83bb-22bbff39402a","2026-04-28T13:00:00.000Z",{"_type":10,"current":19},"turn-scattered-knowledge-into-trusted-intelligence","Turning scattered knowledge into trusted intelligence: Stack Internal 2026.3",{"_id":22,"publishedAt":23,"slug":24,"title":26},"369c2401-b62e-4a37-8ff8-bf603023ecad","2026-03-02T15:03:00.988Z",{"_type":10,"current":25},"what-s-new-at-stack-overflow-march-2026","What’s new at Stack Overflow: March 2026",{"_id":28,"publishedAt":29,"slug":30,"title":32},"5e9053a4-07ea-447c-91ea-29e0b6228537","2026-02-02T15:00:00.000Z",{"_type":10,"current":31},"what-s-new-at-stack-overflow-february-2026","What’s new at Stack Overflow: February 2026",{"_id":34,"publishedAt":35,"slug":36,"title":38},"a1b538eb-a8a6-46d0-80a1-ac70ec9bb935","2026-01-05T10:00:00.000-05:00",{"_type":10,"current":37},"what-s-new-at-stack-overflow-january-2026","What’s new at Stack Overflow: January 2026",{"_createdAt":40,"_id":41,"_rev":42,"_system":43,"_type":46,"_updatedAt":47,"author":48,"body":65,"comments":12,"dateUrl":209,"excerpt":210,"image":211,"product":119,"publishedAt":215,"slug":216,"sponsored":119,"tags":218,"title":241,"visible":12},"2024-12-04T19:06:24Z","8dcc8bcc-2220-4803-b6a3-2b9aaf72e598","Bqj3l3jZyXV24sfjnsdxYZ",{"base":44},{"id":41,"rev":45},"vn3UzGZJyacwgllS8WlvdO","blogPost","2026-05-11T17:05:41Z",[49],{"_createdAt":50,"_id":51,"_rev":52,"_type":53,"_updatedAt":50,"avatar":54,"bio":59,"employee":60,"name":61,"role":62,"slug":63},"2024-04-04T14:34:48Z","12169ed9-78d5-4f82-adb4-e956348db389","l85YFb2NNiT2L5SEvOgP0n","blogAuthor",{"_type":55,"asset":56},"image",{"_ref":57,"_type":58},"image-7c75ba835850e53201ea979015e8b8f449e126da-400x400-png","reference","I’m currently the Director of AI at Rebuy, a personalized search and recommendations platform for D2C e-commerce brands. Prior to Rebuy, I was a Research Scientist at Alegion. Additionally, I worked for Salesforce Commerce Cloud for two years. ","none","Cameron R. Wolfe, PhD","Director of AI at Rebuy",{"_type":10,"current":64},"cameron-r-wolfe-phd",[66,77,85,122,129,141,148,160,167,179,186,198,205],{"_key":67,"_type":68,"children":69,"markDefs":75,"style":76},"4ee12a183f8c","block",[70],{"_key":71,"_type":72,"marks":73,"text":74},"7453ee06084a0","span",[],"Trying to create a language model that understands your own custom data? Here are four techniques you can use to create a specialized LLM, ordered in terms of the amount of complexity\u002Fcompute involved.",[],"normal",{"_key":78,"_type":68,"children":79,"markDefs":84,"style":76},"b194f2078070",[80],{"_key":81,"_type":72,"marks":82,"text":83},"fd6ebd940c760",[],"",[],{"_key":86,"_type":68,"children":87,"markDefs":115,"style":76},"e8e5e0f352e2",[88,93,97,102,106,111],{"_key":89,"_type":72,"marks":90,"text":92},"39739b72f8ff0",[91],"strong","TL;DR:",{"_key":94,"_type":72,"marks":95,"text":96},"39739b72f8ff1",[]," When trying to solve problems with language models, we should start simple and only introduce complexity as needed. Along these lines, we can just try to prompt the model first, then try a ",{"_key":98,"_type":72,"marks":99,"text":101},"39739b72f8ff2",[100],"3f9d90ea4d35","RAG approach",{"_key":103,"_type":72,"marks":104,"text":105},"39739b72f8ff3",[],". If this doesn’t work, we can then ",{"_key":107,"_type":72,"marks":108,"text":110},"39739b72f8ff4",[109],"84be60ab2989","finetune",{"_key":112,"_type":72,"marks":113,"text":114},"39739b72f8ff5",[]," the model, starting with LoRA (i.e., a much cheaper finetuning approach) instead of end-to-end finetuning.",[116,120],{"_key":100,"_type":117,"href":118,"reference":119},"link","https:\u002F\u002Fstackoverflow.blog\u002F2024\u002F08\u002F15\u002Fpractical-tips-for-retrieval-augmented-generation-rag\u002F",null,{"_key":109,"_type":117,"href":121,"reference":119},"https:\u002F\u002Fstackoverflow.blog\u002F2024\u002F10\u002F31\u002Fa-brief-summary-of-language-model-finetuning\u002F",{"_key":123,"_type":68,"children":124,"markDefs":128,"style":76},"1dfc13d8023d",[125],{"_key":126,"_type":72,"marks":127,"text":83},"bcb16b82f97e0",[],[],{"_key":130,"_type":68,"children":131,"markDefs":140,"style":76},"be4d319e9606",[132,136],{"_key":133,"_type":72,"marks":134,"text":135},"a35fcfcf5c000",[91],"(1) Prompting: ",{"_key":137,"_type":72,"marks":138,"text":139},"a35fcfcf5c001",[],"The first step in attempting to solve a problem with an LLM is just writing a prompt! Start with a simple prompt, try adding few-shot exemplars, test different instructions, and potentially even use a more complex prompting approach (e.g., chain of thought prompting). If your desired application can be solved via prompting, this is the easiest approach in terms of time\u002Feffort.",[],{"_key":142,"_type":68,"children":143,"markDefs":147,"style":76},"90938105360e",[144],{"_key":145,"_type":72,"marks":146,"text":83},"850ce9b323840",[],[],{"_key":149,"_type":68,"children":150,"markDefs":159,"style":76},"c065e8a04062",[151,155],{"_key":152,"_type":72,"marks":153,"text":154},"6e6da0c882ca0",[91],"(2) Retrieval Augmented Generation (RAG)",{"_key":156,"_type":72,"marks":157,"text":158},"6e6da0c882ca1",[]," is still just a form of prompting. However, we retrieve extra context to include in the language model’s prompt. First, we take all of the domain-specific data we have, split it into chunks and index\u002Fstore these chunks for search (i.e., a reverse index and\u002For a vector database). Then, we can retrieve relevant data to include in the model’s prompt when generating output to reduce hallucinations.",[],{"_key":161,"_type":68,"children":162,"markDefs":166,"style":76},"41a600131ee0",[163],{"_key":164,"_type":72,"marks":165,"text":83},"b1391009633a",[],[],{"_key":168,"_type":68,"children":169,"markDefs":178,"style":76},"532b96c981e7",[170,174],{"_key":171,"_type":72,"marks":172,"text":173},"9b6bb3423fc70",[91],"(3) LoRA",{"_key":175,"_type":72,"marks":176,"text":177},"9b6bb3423fc71",[]," is a parameter-efficient finetuning technique that decomposes the weight update derived from finetuning into a low rank decomposition. By doing this, we minimize the number of trainable parameters during finetuning, thus drastically reducing memory overhead. However, we can achieve comparable performance to full finetuning and add no extra inference latency because this low rank weight update can be “baked in” to the existing weight matrix.",[],{"_key":180,"_type":68,"children":181,"markDefs":185,"style":76},"e7a21523b057",[182],{"_key":183,"_type":72,"marks":184,"text":83},"11e1284cbead",[],[],{"_key":187,"_type":68,"children":188,"markDefs":197,"style":76},"ded54cefce42",[189,193],{"_key":190,"_type":72,"marks":191,"text":192},"238b226827070",[91],"(4) Full Finetuning:",{"_key":194,"_type":72,"marks":195,"text":196},"238b226827071",[]," If none of the above techniques work, one of the last strategies that we can try is finetuning the language model end-to-end. To make this successful, we want to curate a large corpus of data that contains useful knowledge relevant to problems that we are trying to solve. Then, we can further train the full model using a next token prediction strategy that is similar to pretraining, thus specializing the model over the specific domain of knowledge contained in the finetuning corpus.",[],{"_key":199,"_type":68,"children":200,"markDefs":204,"style":76},"fd556a1f3571",[201],{"_key":202,"_type":72,"marks":203,"text":83},"9ccfaf9d1ea8",[],[],{"_key":206,"_type":55,"asset":207,"markDefs":119},"e9ae5c7abdff",{"_ref":208,"_type":58},"image-f146e2effe0240b66dfec5e8f28dde5c98bf88ce-2400x1348-jpg","2024\u002F12\u002F05","Wondering how to go about creating an LLM that understands your custom data? Start here. ",{"_type":55,"asset":212,"attribution":214},{"_ref":213,"_type":58},"image-1842af09277124c00aa4c015f2852dba5b225e1a-3000x1575-jpg","Alexandra Francis","2024-12-05T17:00:00.000Z",{"_type":10,"current":217},"four-approaches-to-creating-a-specialized-llm",[219,226,230,234],{"_createdAt":220,"_id":221,"_rev":222,"_type":223,"_updatedAt":220,"slug":224,"title":225},"2023-05-23T16:43:21Z","wp-tagcat-se-tech","9HpbCsT2tq0xwozQfkc4ih","blogTag",{"current":225},"se-tech",{"_createdAt":220,"_id":227,"_rev":222,"_type":223,"_updatedAt":220,"slug":228,"title":229},"wp-tagcat-se-stackoverflow",{"current":229},"se-stackoverflow",{"_createdAt":220,"_id":231,"_rev":222,"_type":223,"_updatedAt":220,"slug":232,"title":233},"wp-tagcat-llm",{"current":233},"llm",{"_createdAt":220,"_id":235,"_rev":236,"_type":223,"_updatedAt":237,"slug":238,"title":240},"wp-tagcat-ai","fpDTFQqIDjNJIbHDKPBGpV","2025-01-30T16:19:01Z",{"current":239},"ai","AI","Four approaches to creating a specialized LLM",[243,249,255,261],{"_id":244,"publishedAt":245,"slug":246,"sponsored":119,"title":248},"76c9771b-34e6-4d98-8641-ecefc711f0ef","2026-07-06T15:23:34.559Z",{"_type":10,"current":247},"when-the-sensor-starts-thinking-snortml-agentic-ai-and-the-evolving-architecture-of-intrusion-detection","When the sensor starts thinking: SnortML, agentic AI, and the evolving architecture of intrusion detection",{"_id":250,"publishedAt":251,"slug":252,"sponsored":119,"title":254},"28e560af-f0aa-4d46-bd90-f435ad604aa7","2026-06-26T14:00:27.102Z",{"_type":10,"current":253},"paging-charity-how-can-engineering-leaders-avoid-becoming-bond-villains","Paging Charity! How can engineering leaders avoid becoming Bond villains?",{"_id":256,"publishedAt":257,"slug":258,"sponsored":119,"title":260},"4b22c2a3-3779-4966-93eb-5230391dbdce","2026-06-23T14:08:58.595Z",{"_type":10,"current":259},"your-ai-shipped-a-backend-that-boots-that-is-the-whole-problem","Your AI shipped a backend that boots. That is the whole problem.",{"_id":262,"publishedAt":263,"slug":264,"sponsored":119,"title":266},"5cf362e1-fe7b-45af-b69c-914731c6a052","2026-06-23T14:00:00.000Z",{"_type":10,"current":265},"the-2026-developer-survey-is-now-open-for-human-developers-only","The 2026 Developer Survey is now open (for human developers only)!",{"data":268,"sourceMap":-1},{"count":269,"lastTimestamp":270},2,"2024-12-10T16:16:42Z"]