Built an AI-powered document assistant that processes user queries and generates contextual responses or downloadable documents in PDF, Excel, and Word formats. The application combines LLMs, vector search, and AWS serverless services to provide a complete workflow from file upload to generated output.
Live Application: https://d339zj37v6sojw.cloudfront.net/
Serverless Backend: Built API endpoints using AWS Lambda and API Gateway, with AWS SAM for deployment.
Cloud File Processing: Integrated Amazon S3 and presigned URLs to upload files directly to cloud storage, avoiding the need to send large files through Lambda requests.
Retrieval-Augmented Generation (RAG): Used OpenAI's text-embedding-3-small model to generate embeddings and Pinecone to store and retrieve relevant information.
Intelligent Output Routing: Used Gemini to classify user requests and determine whether to return text or generate a PDF, Excel, or Word document.
Document Generation: Converted structured LLM responses into downloadable files using pdf-lib, exceljs, and docx.
PDF Text Extraction: Investigated and resolved compatibility issues with PDF parsing libraries in the Lambda environment.
Production Debugging: Used Amazon CloudWatch logs to investigate deployment failures, troubleshoot API errors, and resolve runtime issues.
Deployment Optimization: Replaced a large Hugging Face embedding dependency with the OpenAI Embeddings API to reduce deployment package size and simplify serverless deployment.
Backend: Node.js, JavaScript (ES Modules), AWS Lambda, API Gateway
AI/LLMs: OpenAI API, Gemini, Embeddings, Retrieval-Augmented Generation (RAG)
Vector Database: Pinecone
Cloud & Deployment: Amazon S3, Amazon CloudWatch, AWS SAM, Amazon CloudFront
Document Processing: pdf-lib, exceljs, docx
This project gave me hands-on experience building and deploying a serverless AI application. I learned how to integrate cloud storage with Lambda, implement vector-based retrieval, structure LLM outputs, generate documents programmatically, and debug real deployment issues using CloudWatch.
23 Oct 2025