RAGscope is an offline-first Visual Studio Code developer tool for engineers building LLM applications, prompt pipelines, and RAG architectures. It provides real-time token budgeting directly inside the code editor and an interactive visual playground to inspect how documents get sliced for vector databases—without sending your code or prompts to external servers.
Key Features
In-Editor Token Budgeting (CodeLens): Automatically detects prompt templates, multi-line strings, and system instructions in Python, TypeScript, and JavaScript files, displaying real-time token counts and cost estimates above the definition.
Interactive Chunking Playground: Visualizes document chunking inside a dedicated sidebar webview. Adjust chunk size and overlap parameters in real time.
Bidirectional Text Highlighting: Click any chunk card in the sidebar to highlight that exact chunk boundary and its overlap directly inside the active editor buffer.
100% Offline & Zero Runtime Dependencies: Built using pure TypeScript and js-tiktoken. Operates completely locally without requiring Python runtimes, external API keys, or Node-gyp native builds.
Open any .py, .ts, or .js file and declare a prompt string or multiline template:
prompt_system = """
You are an expert retrieval assistant. Extract key financial metrics
from the provided filing and return structured JSON output.
"""