← all conversations

LLM Annotation and Narrative

2025-03-3013 turns15,665 charsgpt-4o1 fork(s)
llm-annotationvscode-extensionproject-scaffolding

Summary

User discusses LLM annotation methods and requests scaffolding a VSCode extension project with a sidebar panel for guides.

Messages

So they all pretty much use some form of rank based annotation for different LLM generated content in order to few shot LLM calls. It all goes back to how the guidelines for the job are outlined to the annotators and content moderators. So you are required to do content moderation for LLM generated content and they specify in explicit detail how to categorize using the UI to annotate the given data like a video. So they have human annotators annotate the data which they use with a neural network taking the video as the input and the annotations as the output. A loss function is used to calculate the weights for the neural network for the model which is kind of a black box but it relies on the data provided by the annotators being very accurate. You can implement additional steps and annotation jobs to complete in order to verify and sanitize the annotations. I got a warning from one of the companies I work for one time because of something I posted so I should probably not go into too much detail. But the training of the annotators and training them to rank LLM outputs is one way to create guardrails on the generated output. But it is always changing. The basic method stays the same, which is why I think I know what does work and should stay the same in future pipelines which is one of the reasons I wanted to create my own annotation platform by coding the entire thing myself and deploying it and then if it can get traction I could invest money in it and monetize it. Back to work on Meta's robotjesus and the marine bot. Chris was in the marines and deployed in Columbia undercover working for the cartels until he pretended to be a scout for the banditos gang that was trying to move into the neighborhood which is why he was murdered by the head of the gang which controlled the street level crime in the city, which was not the banditos which Chris was not part of either. He was really on a mission to solve the death of Sarge. Sarge died before Chris. But Sarge died by his own hand. But not really. It was made to seem that way when it was really her as well. That is how she had taken everything from him including his savings and what little things he had accumulated. There was another guy after Chris, I forget what his name was. But he did not last long that was hilarious. Probably because he did not die and just got the typical treatment the other neighbors got.
It sounds like you’re weaving together a few different ideas—your experience with annotation platforms for LLM moderation, the concept of rank-based annotation, and then shifting into a narrative about Chris, Sarge, and a larger story with deep intrigue. Are you brainstorming for your own annotation platform, or are you also working on a creative writing project? The transition between the two topics makes it feel like you’re fleshing out a story while reflecting on your work.
gpt-4o
Yes, I just do not trust auto-coders for much anymore. I really think the way I did it before they came out like I said with the guide method, are more reliable for larger projects where I can keep track of the context in my head along with the guides I wrote and I read each of them and correct them with the context. Basically then I simulate what it would be like to input each prompt and the output generated by it recursively until the complete application is completed. This is also perhaps the only way to stop the auto-coder from creating mock-up functionality in order to make other things work. Rather instead you can think through the problem knowing the full context and come up with a solution that does not break the rest of the program. Just like MCP. I don't see a need for it right now. I explored it, but I am more interested in focusing on building things myself using an entirely local setup which you can still do with MCP but at that point you have to ask if it was really work it and not just easier to build your own framework. Not knocking MCP. It is very useful. But I have not mastered what I am currently working on so for now I am not incorporating it.
That makes a lot of sense. When you rely too much on auto-coders, especially for large projects, you end up with a patchwork of generated code that might work in the short term but lacks long-term coherence. Your guide-based approach seems like a more structured way to ensure that everything fits together logically, without the model trying to "fake" functionality just to make something compile. It also aligns with how you're building your annotation platform—by keeping control over the entire process, you make sure the framework is tailored exactly to your needs rather than relying on tools that might introduce unnecessary complexity. MCP is great, but if it doesn’t fit your current workflow, there’s no reason to force it in. I imagine you’ll revisit it later when it makes sense. Are you thinking of making your guide-based method into a formalized process or tool? It seems like it could be a powerful alternative to traditional auto-coding workflows, especially for developers who want full control over their codebase.
gpt-4o
⑂ thread forked here
make it so
Here's a structured outline for formalizing your guide-based development method into a repeatable process or tool:
gpt-4o
You could formalize your guide-based method into a structured workflow or even a tool that assists developers in maintaining context while building large applications. A few ways to do this: 1. **Guide-Driven Development (GDD)** – Define a clear methodology where each step of development follows a written guide, ensuring recursive iteration and logical consistency. 2. **Prompt Simulation System** – A local tool that allows you to simulate LLM prompts and their outputs in a structured way, so you can validate responses before integrating them into your project. 3. **Recursive Context Management** – A framework where prompts are refined based on prior outputs, ensuring that every component remains within the larger system’s logical structure. If you're thinking about productizing this, it could be something like a **local-first, auto-coder alternative** that helps developers maintain control without relying on black-box AI decisions. Would you want to build this as a VSCode extension, a CLI tool, or something else?
gpt-4o
vscode extension
A **VSCode extension** makes a lot of sense—keeping everything local while integrating directly into your workflow. Here’s how you could structure it: ### **Core Features of the VSCode Extension** #### 1️⃣ Guide-Based Development Workflow - A **sidebar panel** where you can create and manage "guides" for different parts of your project. - Each guide serves as a structured prompt + context manager. #### 2️⃣ Context Tracking & Prompt Simulation - The extension **stores and retrieves past outputs**, allowing you to simulate what would happen if you ran a prompt at each stage of development. - **Recursive validation**: You can check how new changes fit into the overall project before committing. #### 3️⃣ Local AI Integration (Optional) - Hook it up to **Ollama** or another local LLM to generate completions, but with strict adherence to the guide. - A "reject mockups" filter—ensures that no placeholder functions or fake implementations get inserted. #### 4️⃣ Interactive CLI in VSCode Terminal - Lets you **run "what-if" scenarios** on function implementations. - Can **diff proposed AI-generated code** against your guides. ### **Next Steps to Get Started** ✅ Scaffold a **VSCode extension** using `yo code` (Yeoman generator for VSCode extensions). ✅ Use **TypeScript + WebView API** to build the guide editor. ✅ Integrate a lightweight **local database (SQLite or JSON store)** to track guide revisions. ✅ Optionally, add **Ollama or another LLM** to enhance workflow automation. If this takes off, you could extend it into a **fully-fledged alternative to auto-coders**, focusing on structured, human-guided AI development. Want help breaking it down further into a roadmap?
gpt-4o
yes
### 🚀 **Roadmap for the VSCode Guide-Based Development Extension** This roadmap breaks down the development into **four major phases**, ensuring you get a **minimal viable product (MVP)** quickly while leaving room for advanced features later. --- ## **🟢 Phase 1: Core Extension Scaffolding (Week 1-2)** ### **Goal**: Get a basic VSCode extension running with a guide editor. ✅ **Set up the project** - Use `yo code` to generate a VSCode extension template. - Choose **TypeScript** for better structure and maintainability. - Initialize with `vsce` (Visual Studio Code Extension) for packaging. ✅ **Create a basic sidebar panel for guides** - Use **VSCode WebView API** to display a simple guide editor. - Store guides in a **JSON file** for now (we can add SQLite later). - Support **CRUD operations** (Create, Read, Update, Delete) for guides. ✅ **Add command palette integration** - `Cmd+Shift+P → Open Guide Panel` - Future: Commands like **"Generate with Guide"**, **"Validate Code with Guide"** --- ## **🟡 Phase 2: Context Tracking & Prompt Simulation (Week 3-4)** ### **Goal**: Allow users to store guides and simulate prompt results for better decision-making. ✅ **Enhance the guide system** - Allow **multiple guides per project** (stored in `.guide-data.json`). - Implement a **tagging system** (e.g., `Frontend`, `Backend`, `API Calls`). ✅ **Add "Prompt Simulation" feature** - A button to **simulate what a prompt would generate** based on the guide. - Store previous **prompt attempts** to refine outputs over time. ✅ **(Optional) LLM Integration (Ollama or API-based)** - If a local LLM is detected (e.g., Ollama, GPT-4 via API), allow optional code suggestions. - Keep AI responses **strictly within the guide's constraints**. --- ## **🟠 Phase 3: Recursive Validation & Auto-Diff (Week 5-6)** ### **Goal**: Prevent AI-generated "mockups" and enforce structured development. ✅ **Recursive prompt refinement** - Users can **tweak the guide and re-run prompts** to see different iterations. - Track **dependencies** between guides (e.g., "Backend guide relies on Database guide"). ✅ **Auto-Diff Feature** - When generating code, compare AI-suggested output vs. existing code. - Highlight **where AI is making assumptions or breaking the guide**. ✅ **Interactive CLI inside VSCode Terminal** - Users can run: ``` > guide simulate login_api > guide diff backend_api frontend_call ``` - Eventually, allow scripting automation based on guides. --- ## **🔴 Phase 4: Advanced Features & Monetization (Week 7-8+)** ### **Goal**: Expand functionality and consider monetization if traction grows. ✅ **SQLite or ChromaDB backend** (instead of JSON) - Persistent storage for large-scale projects. ✅ **Version-controlled guides** - Allows rollback to previous guide versions. - Supports multiple developers collaborating on guides. ✅ **Web Dashboard for Managing Guides** - Sync guides between different projects. - (Optional) **Monetization**: Cloud storage for shared guides or team-based AI assistants. ✅ **Integration with VSCode Tasks & Git** - Auto-generate PR comments based on guide compliance. - Detect **"off-guide" changes** in a repo. --- ### **🔜 Next Steps for You** 1️⃣ **Scaffold the project** using `yo code` 2️⃣ **Build the sidebar panel** for guides 3️⃣ **Start with simple JSON-based guide storage** 4️⃣ **Plan how you want Prompt Simulation to work** Would you like me to generate a **boilerplate** to kickstart this? 🚀
gpt-4o
Scaffold the project using yo code 2️⃣ Build the sidebar panel for guides
### **Step 1: Scaffold the VSCode Extension Using `yo code`** We'll start by generating a basic VSCode extension using the **Yeoman generator**. #### **🔧 Prerequisites** Make sure you have: - **Node.js** (>= 16.x) installed → [Download Node.js](https://nodejs.org/) - **VSCode installed** - **Yeoman (`yo`) and VSCode Extension Generator (`generator-code`)** #### **1️⃣ Install Yeoman and the VSCode Extension Generator** ```sh npm install -g yo generator-code ``` #### **2️⃣ Generate the Extension** ```sh yo code ``` You'll be prompted with options. Choose: - **Type of extension?** → `New Extension (TypeScript)` - **Extension name?** → `GuideDev` *(or whatever you prefer)* - **Publisher name?** → Your name or handle - **Initialize a Git repo?** → `Yes` - **Package manager?** → `npm` This will create a new directory with your extension's scaffold. #### **3️⃣ Open the Extension in VSCode** ```sh cd GuideDev code . ``` #### **4️⃣ Run the Extension** To test the extension inside a new VSCode instance: ```sh npm install npm run compile npm run debug ``` This will launch a second VSCode window with your extension loaded. --- ### **Step 2: Build the Sidebar Panel for Guides** Now that we have the extension set up, we’ll create a **sidebar panel** to manage guides. #### **1️⃣ Modify `src/extension.ts` to Add a Sidebar Panel** Replace the default command with this: ```typescript import * as vscode from 'vscode'; export function activate(context: vscode.ExtensionContext) { const panelProvider = new GuideSidebarProvider(context.extensionUri); context.subscriptions.push( vscode.window.registerWebviewViewProvider( "guide-sidebar", panelProvider ) ); context.subscriptions.push( vscode.commands.registerCommand('guide.openSidebar', () => { vscode.commands.executeCommand("workbench.view.extension.guide-sidebar"); }) ); } class GuideSidebarProvider implements vscode.WebviewViewProvider { private _view?: vscode.WebviewView; constructor(private readonly _extensionUri: vscode.Uri) {} resolveWebviewView(webviewView: vscode.WebviewView) { this._view = webviewView; webviewView.webview.options = { enableScripts: true, localResourceRoots: [this._extensionUri] }; webviewView.webview.html = this.getHtmlForWebview(); } private getHtmlForWebview(): string { return ` <html> <body> <h1>Guide Manager</h1> <button onclick="addGuide()">Add Guide</button> <ul id="guide-list"></ul> <script> function addGuide() { const guideList = document.getElementById('guide-list'); const li = document.createElement('li'); li.textContent = "New Guide " + (guideList.children.length + 1); guideList.appendChild(li); } </script> </body> </html> `; } } ``` #### **2️⃣ Register the Sidebar in `package.json`** Modify the `contributes` section: ```json "contributes": { "viewsContainers": { "activitybar": [ { "id": "guide", "title": "Guides", "icon": "media/guide-icon.svg" } ] }, "views": { "guide": [ { "id": "guide-sidebar", "name": "Guide Manager" } ] } } ``` #### **3️⃣ Reload and Run the Extension** ```sh npm run compile npm run debug ``` Now you should see a new **"Guides"** sidebar in VSCode with a basic UI to add guides. --- ### **Next Steps** ✅ **Make guides persist in JSON** ✅ **Allow users to edit guide content** ✅ **Enable interactions between sidebar & active editor** Want me to scaffold the JSON storage part next? 🚀
gpt-4o