Skip to content

LAVYA255/docuquery-rag

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DocuQuery RAG

Name: Lavya Tanotra Roll No: 24BCS10124

An intelligent document Q&A system built on Retrieval-Augmented Generation — upload any document and have an AI-powered conversation with it.

System Overview

The application follows a four-stage RAG pipeline:

  1. Ingest — User selects a file (PDF, TXT, or CSV) for upload
  2. Parse & Chunk — The document is broken into page-level segments using LangChain's document loaders (one chunk per page)
  3. Embed & Store — Each chunk is converted into a vector using Gemini's embedding model and stored in a Qdrant collection
  4. Retrieve & Answer — The user's query is embedded, the top 5 closest chunks are fetched, and Gemini generates an answer strictly from that context

Chunking Approach

Documents are split at the page boundary. Each page becomes an independent chunk, which preserves the natural layout of the source material, keeps related content together, and makes it straightforward to trace answers back to their page of origin.

Getting Started

Requirements

  • Node.js 18 or higher
  • A running Qdrant instance (local or hosted)
  • Google Gemini API key

Installation

npm install

Environment Setup

Create a .env file in the root:

GEMINI_API_KEY=your_key_here
QDRANT_URL=http://localhost:6333
QDRANT_API_KEY=your_qdrant_key

Running Qdrant via Docker

docker run -p 6333:6333 qdrant/qdrant

Starting the Server

npm start

Visit http://localhost:3000 in your browser.

Technology Stack

Layer Technology
Backend Express.js (Node.js)
Embeddings Gemini embedding-001
Vector Store Qdrant
LLM Gemini 2.5 Flash Lite
Frontend HTML / CSS / Vanilla JS

About

DocuQuery - chat with your documents via a full RAG pipeline (ingest to embed to retrieve to grounded answer). Supports PDF, TXT, and CSV.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors