AskDocs v1
Full-stack RAG application for semantic PDF retrieval and AI-powered question answering
A document question-answering system combining PDF processing, vector-based semantic search, and AI responses grounded in retrieved content.
- Role
- Software Engineer — Full-Stack & GenAI
- Year
- 2025
Technologies
Technical context
Finding specific information across PDF documents often involves repetitive searching and manual reading. Combining semantic retrieval with language models provides a way to access document knowledge through natural-language questions.
Problem
Build an end-to-end document retrieval system that transforms unstructured PDFs into searchable vector representations and uses relevant document passages to generate context-aware answers.
Project overview
AskDocs processes uploaded PDFs through LangChain's PDFLoader and RecursiveCharacterTextSplitter, producing overlapping text chunks that are embedded and stored in Supabase PostgreSQL with pgvector. Document metadata preserves source filenames for indexed-file management.
When a user submits a question, the backend retrieves the six most relevant chunks and assembles them into a prompt for an OpenAI chat model. A Next.js interface connects document uploads, file management, and conversational question answering through a NestJS REST API.
Technical approach
- Implement PDF text extraction and overlapping character-based chunking
- Generate OpenAI embeddings and index document content in Supabase
- Retrieve relevant passages through pgvector similarity search
- Construct context-grounded prompts using LangChain and OpenAI models
- Develop a full-stack interface for document upload, management, and question answering
Technical focus
- Retrieval-Augmented Generation and semantic search
- PDF text extraction and document preprocessing
- Vector embeddings and similarity-based retrieval
- LLM orchestration and context-grounded prompting
- REST API development and full-stack integration
Architecture notes
- Next.js frontend communicating with a modular NestJS REST backend
- LangChain ingestion pipeline using PDFLoader and 1,000-character chunks with 200-character overlap
- Supabase vector store backed by PostgreSQL, pgvector, and the match_documents function
- Similarity search retrieving six document chunks for prompt construction
- Backend endpoints for PDF ingestion, question answering, document listing, and deletion
Engineering highlights
- End-to-end PDF ingestion and semantic retrieval workflow
- Supabase-backed vector indexing with document-source metadata
- Natural-language question answering using retrieved document context
- Prompt-based handling of questions without sufficient supporting information
- Integrated document management and chat interface
Outcome
Implemented a complete RAG application workflow covering PDF ingestion, vector indexing, semantic retrieval, and AI-generated answers. The application also provides document listing and deletion through dedicated backend APIs.