Newgen RAG Assistant
A VS Code extension that brings local document Q&A capabilities directly into your editor. Upload PDFs or DOCX files, ask questions, and get instant answers with source citations—all running locally without any API keys.
Features
✨ Document Upload - Upload PDF and DOCX files (TXT coming soon)
🔍 Intelligent Search - Query your documents with natural language
📍 Source Citations - Get exact page, section, and chunk references
⚡ Blazing Fast - Local processing, no cloud dependencies
🔒 Privacy First - Your documents never leave your machine
🎯 Integrated Sidebar - Access directly from VS Code without context switching
Getting Started
Prerequisites
- VS Code 1.85 or later
- Python 3.8+ with FastAPI and uvicorn
- pip dependencies:
fastapi, uvicorn, pypdf, python-docx, langchain
Installation
From VS Code Marketplace (soon):
- Open VS Code Extensions (
Ctrl+Shift+X)
- Search for "Newgen RAG Assistant"
- Click Install
From .vsix file (manual):
- Download the latest
.vsix file from releases
- In VS Code, run:
Extensions: Install from VSIX
- Select the downloaded file
From Source (development):
git clone https://github.com/your-org/newgen-rag-project
cd vscode-extension
npm install # if needed
code .
F5 # Launch Extension Development Host
Usage
Open the Extension
- The RAG Assistant sidebar appears automatically when you start VS Code
- Click the ⬆ Upload button to select a document
Upload a Document
- Choose a PDF or DOCX file
- Wait for processing (status shows "READY" when done)
- Sidebar displays: filename, page count, and chunk count
Ask Questions
- Click the ❓ Ask button
- Type your question
- Click Send to get instant answers
- Answers include source citations with exact locations
Architecture
┌─────────────────────┐
│ VS Code Sidebar │
│ (HTML/CSS/JS UI) │
└──────────┬──────────┘
│ HTTP
▼
┌─────────────────────┐
│ FastAPI Backend │
│ (port 8001) │
└──────────┬──────────┘
│
▼
┌─────────────────────┐
│ Document Processor │
│ (PDF/DOCX Parser) │
└──────────┬──────────┘
│
▼
┌─────────────────────┐
│ Vector DB/Cache │
│ (In-Memory) │
└─────────────────────┘
Configuration
The extension auto-starts the FastAPI backend on port 8001. To customize:
- Edit
app.py to change ports or processing settings
- Edit
extension.js line 5 to change APP_URL
Troubleshooting
Extension won't load?
- Check VS Code version (requires 1.85+)
- Look for errors in Extension Host console (
Help > Toggle Developer Tools)
Backend won't start?
- Verify Python 3.8+ is installed:
python --version
- Install dependencies:
pip install -r requirements.txt
- Check if port 8001 is in use:
netstat -an | findstr 8001
Upload fails?
- File size limits depend on available RAM
- Supported formats: PDF, DOCX, TXT
- Check backend console for processing errors
No answers returned?
- Ensure document is fully processed (status = "READY")
- Try simpler questions first
- Check document quality (text must be extractable)
Development
Building the Extension
# Install vsce (VS Code Extension CLI)
npm install -g vsce
# Package into .vsix
cd vscode-extension
vsce package
# Result: newgen-rag-assistant-1.0.0.vsix
Publishing to VS Code Marketplace
# Create Azure DevOps account and personal access token
# Then:
vsce publish -p <YOUR_PAT>
See VS Code Extension Publishing Guide
License
MIT - See LICENSE file
Support
For issues, feature requests, or questions:
Made with ❤️ for developers who value privacy and speed.