{"id":861,"date":"2025-07-24T14:24:18","date_gmt":"2025-07-24T21:24:18","guid":{"rendered":"https:\/\/sysprogs.com\/tutorials\/?p=861"},"modified":"2025-07-24T14:31:11","modified_gmt":"2025-07-24T21:31:11","slug":"context-fine-tuning","status":"publish","type":"post","link":"https:\/\/sysprogs.com\/CodeVROOM\/documentation\/concepts\/context\/","title":{"rendered":"Context Fine-Tuning"},"content":{"rendered":"<p>CodeVROOM is designed for ultra-fast incremental edits to large projects. This is achieved by aggressively trimming down what goes into the context window, so the actual AI models can work with smaller chunks of code, make fewer mistakes and produce results exceptionally fast. There are several ways of controlling what exactly goes into the context window, and this page provides an overview of them.<\/p>\n<h1>Initial Context<\/h1>\n<p>The easiest way to begin an AI-powered editing session is to click the CodeJumps link on top of the symbol you want to edit:<a href=\"https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2025\/07\/begin.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-862\" src=\"https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2025\/07\/begin.png\" alt=\"\" width=\"979\" height=\"100\" srcset=\"https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2025\/07\/begin.png 979w, https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2025\/07\/begin-300x31.png 300w, https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2025\/07\/begin-768x78.png 768w\" sizes=\"(max-width: 979px) 100vw, 979px\" \/><\/a><\/p>\n<p>This will pull the selected symbol into the context window and will display a drop-down list of options (e.g. whether to include the #include\/using statements or an outline of the outer class, if any):<a href=\"https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2025\/07\/config.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-863\" src=\"https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2025\/07\/config.png\" alt=\"\" width=\"720\" height=\"153\" srcset=\"https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2025\/07\/config.png 720w, https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2025\/07\/config-300x64.png 300w\" sizes=\"(max-width: 720px) 100vw, 720px\" \/><\/a>Note that clicking on the link automatically focuses on the <strong>AI Session<\/strong> window, so you can just ignore the drop-down if you are not planning to change anything. Or, hold shift while clicking to not show it in the first place.<\/p>\n<p>The rest of the source file will be trimmed down, so the AI won&#8217;t spend any time or tokens trying to make sense of irrelevant parts. Note that this is not very useful unless you actually pull the relevant parts into the context window, and the next sections explain that in detail.<\/p>\n<h1>Automatic Context Discovery<\/h1>\n<p>The easiest way to get the relevant symbols into the context window is to check the &#8220;Discover additional symbols&#8221; checkbox in the bottom left corner of the AI Session window:<\/p>\n<p><a href=\"https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2025\/07\/discover-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-865\" src=\"https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2025\/07\/discover-1.png\" alt=\"\" width=\"806\" height=\"206\" srcset=\"https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2025\/07\/discover-1.png 806w, https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2025\/07\/discover-1-300x77.png 300w, https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2025\/07\/discover-1-768x196.png 768w\" sizes=\"(max-width: 806px) 100vw, 806px\" \/><\/a>CodeVROOM will then run a separate temporary conversation, asking the model what else is relevant given your editing instructions and the code it already has seen. Once the model responds, CodeVROOM will pull these symbols into the context window, and ask the model to do the actual edit, taking them into account.<\/p>\n<h1>Referencing Symbols Manually<\/h1>\n<p>You can always reference a symbol, file or a techinque manually using the @-syntax in the context window:<a href=\"https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2025\/07\/at.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-866\" src=\"https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2025\/07\/at.png\" alt=\"\" width=\"1243\" height=\"490\" srcset=\"https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2025\/07\/at.png 1243w, https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2025\/07\/at-300x118.png 300w, https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2025\/07\/at-1024x404.png 1024w, https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2025\/07\/at-768x303.png 768w\" sizes=\"(max-width: 1243px) 100vw, 1243px\" \/><\/a>CodeVROOM will show a suggestion popup with all matching items, as if it was completing an identifier in the code editor.<\/p>\n<h1>Referencing Symbols via Code<\/h1>\n<p>Often you know exactly what code the AI model should be looking at. Particular struct it should use, particular functions it should call, particular algorithm implemented elsewhere it should adapt. You can pull these into the context window by clicking the links above the symbols:<a href=\"https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2025\/07\/add.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-867\" src=\"https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2025\/07\/add.png\" alt=\"\" width=\"1230\" height=\"210\" srcset=\"https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2025\/07\/add.png 1230w, https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2025\/07\/add-300x51.png 300w, https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2025\/07\/add-1024x175.png 1024w, https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2025\/07\/add-768x131.png 768w\" sizes=\"(max-width: 1230px) 100vw, 1230px\" \/><\/a>You can specify whether a symbol should be included as an outline (glasses icon) or a full copy (pencil icon):<a href=\"https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2025\/07\/pull.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-868\" src=\"https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2025\/07\/pull.png\" alt=\"\" width=\"1177\" height=\"284\" srcset=\"https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2025\/07\/pull.png 1177w, https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2025\/07\/pull-300x72.png 300w, https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2025\/07\/pull-1024x247.png 1024w, https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2025\/07\/pull-768x185.png 768w\" sizes=\"(max-width: 1177px) 100vw, 1177px\" \/><\/a>Including symbols as outline will save a <strong>lot of tokens<\/strong> and some processing time. Outline means no function bodies, e.g.:<\/p>\n<pre>class Vector\r\n{\r\n    public readonly double X, Y;\r\n\r\n    Vector(double x, double y);\r\n    double Abs();\r\n}<\/pre>\n<p>Use it for large classes or functions that the AI should use, but not edit.<\/p>\n<p>Note that if the model decides to add another method to <strong>Vector<\/strong> between the constructor and <strong>Abs()<\/strong>, CodeVROOM will understand it, and will insert it into the original class. It won&#8217;t change any existing members though.<br \/>\n<a name=\"finetuning\"><\/a><\/p>\n<h1>Reviewing Referenced Symbols<\/h1>\n<p>At any point during the editing session, you can view what symbols are included in the context window via the <strong>AI Context<\/strong> window:<a href=\"https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2025\/07\/ctx.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-869\" src=\"https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2025\/07\/ctx.png\" alt=\"\" width=\"386\" height=\"553\" srcset=\"https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2025\/07\/ctx.png 386w, https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2025\/07\/ctx-209x300.png 209w\" sizes=\"(max-width: 386px) 100vw, 386px\" \/><\/a>You can open it via the <strong>AI-&gt;Window<\/strong> menu or by clicking the fine-tuning button in the top right corner of the AI Session window. Note that rolling back an AI editing step that added some symbols will remove these symbols from the context window. Stepping forward will insert them back.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>CodeVROOM is designed for ultra-fast incremental edits to large projects. This is achieved by aggressively trimming down what goes into<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[65],"tags":[],"_links":{"self":[{"href":"https:\/\/sysprogs.com\/tutorials\/wp-json\/wp\/v2\/posts\/861"}],"collection":[{"href":"https:\/\/sysprogs.com\/tutorials\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sysprogs.com\/tutorials\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sysprogs.com\/tutorials\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/sysprogs.com\/tutorials\/wp-json\/wp\/v2\/comments?post=861"}],"version-history":[{"count":4,"href":"https:\/\/sysprogs.com\/tutorials\/wp-json\/wp\/v2\/posts\/861\/revisions"}],"predecessor-version":[{"id":873,"href":"https:\/\/sysprogs.com\/tutorials\/wp-json\/wp\/v2\/posts\/861\/revisions\/873"}],"wp:attachment":[{"href":"https:\/\/sysprogs.com\/tutorials\/wp-json\/wp\/v2\/media?parent=861"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sysprogs.com\/tutorials\/wp-json\/wp\/v2\/categories?post=861"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sysprogs.com\/tutorials\/wp-json\/wp\/v2\/tags?post=861"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}