RagDocs is a Retrieval-Augmented Generation (RAG) platform for document-centric querying, semantic retrieval, and contextual AI inference. It provides a unified workspace for ingesting, indexing, and interacting with structured and unstructured datasets, including PDFs and CSV files.
The system combines vector search, embedding pipelines, and LLM-based reasoning to generate context-grounded responses with citation tracing.
-
Document-Centric RAG Pipeline
Supports ingestion of PDF and CSV documents. Uploaded files are parsed, segmented into semantic chunks, embedded using transformer-based embedding models, and indexed in Qdrant for low-latency vector retrieval. -
Context-Grounded Response Generation
Integrates OpenRouter and LangChain to generate responses constrained to retrieved document context. Outputs include source attribution for traceability and hallucination reduction. -
Semantic Retrieval Layer
Uses dense vector similarity search through Qdrant to retrieve high-relevance context segments for downstream LLM inference. -
Corrective RAG Enhancements
Improves retrieval quality using query rewriting, multi-query expansion, HyDE, frequency-based re-ranking, and LLM-based relevance judging. -
Session-Aware Conversational Interface
Maintains conversational continuity while prioritizing document exploration and query resolution workflows. -
Cross-Platform Runtime
Built with Expo and React Native, enabling deployment across Web, Android, and iOS from a shared codebase. -
Interactive Visualization Layer
Includes graph-based knowledge visualization, animated UI transitions, and structured navigation components for document interaction workflows.
Built using React Native and Expo with a modular component-driven architecture.
- Framework: Expo, Expo Router
- UI Layer: React Native
- Styling System: NativeWind
- Animation Runtime: React Native Reanimated
- Icon System: Lucide React Native
- Networking: Axios
- File upload interface
- Conversational query interface
- Citation rendering
- Knowledge graph visualization
- Cross-platform state management and navigation
Node.js-based backend responsible for ingestion, embedding generation, retrieval orchestration, and inference routing.
- Runtime Framework: Express.js
- Vector Database: Qdrant
(@qdrant/js-client-rest,@langchain/qdrant) - LLM Gateway: OpenRouter
- Embedding Provider: OpenAI Embeddings
(@langchain/openai) - Document Parsing:
pdf-parse,csv-parse - Orchestration Layer: LangChain
- Document parsing and preprocessing
- Text chunking and segmentation
- Embedding generation
- Vector indexing and retrieval
- Retrieval-augmented prompt construction
- Citation-aware response generation
- Query rewriting, multi-query expansion, and relevance judging for corrective RAG
- Document upload
- Content extraction and parsing
- Semantic chunk generation
- Embedding vector creation
- Qdrant vector indexing
- Similarity-based retrieval
- Context injection into LLM prompts
- Citation-grounded response generation
- Corrective RAG loop (rewrite, multi-query expansion, re-rank, and judge)
- Node.js
v18+ - A running Qdrant instance (local or cloud)
- OpenRouter API credentials
Navigate to the backend directory:
cd BackendInstall dependencies:
npm installCreate a .env file inside Backend:
PORT=5000
QDRANT_URL=your_qdrant_cluster_url
QDRANT_API_KEY=your_qdrant_api_key
OPENROUTER_API_KEY=your_openrouter_api_key
MODEL=your_preferred_openrouter_modelExample model:
MODEL=openai/gpt-4o-miniStart the development server:
npm run devBackend service will run at:
http://localhost:5000Navigate to the frontend directory:
cd FrontendInstall dependencies:
npm installCreate a .env file inside Frontend:
EXPO_PUBLIC_API_URL=http://localhost:5000Start the Expo development server:
npm startPlatform targets:
- Web:
w - iOS Simulator:
i - Android Emulator:
a
Upload a PDF or CSV file through the frontend interface.
You can also index a public URL via the backend endpoint:
POST /api/upload/url
{
"url": "https://example.com/your-article"
}The backend performs:
- File parsing
- Semantic chunking
- Embedding generation
- Vector indexing into Qdrant
Submit natural language queries through the chat interface.
The system:
- Retrieves semantically relevant chunks
- Constructs a context-grounded prompt
- Generates responses using the configured LLM
- Returns citation-linked outputs derived from retrieved context
- CSV
- Web URLs (basic HTML text extraction)
- Web
- Android
- iOS