AI[SYS_ID: AI-DOCUMENT-ASSISTANT]

AI Document Assistant

RAG document assistant that ingests business documents and generates grounded answers with citations linked to retrieved source content.

01. Overview

RAG document assistant that ingests business documents and generates grounded answers with citations linked to retrieved source content.

02. Interface / Screenshots

AI Document Assistant
AI Document Assistant project preview
[VISUAL_PLACEHOLDER]

No dedicated project screenshot is currently in the repository; this preview uses the shared visual placeholder.

03. Architecture

Interactive Architecture Walkthrough — a visualization of the implemented architecture/workflow.

Interactive Architecture Walkthrough

A document path from upload and ingestion through retrieval, grounded generation and citation-backed streaming. [Visualization of the implemented document workflow.]

Speed:
Next.js Interface
FastAPI Service
Authentication and Scope
Document Ingestion
Embedding Generation
Chroma Retrieval Store
PostgreSQL Records
Filtered Retrieval
Grounded Model Response
Answer and Source Citations
Active Pipeline Stage
Launch simulation to view stage details.
Transition Example
Start the walkthrough to view a sample transition.
Console Logs
|
>Ready to trace workflow pipelines...

04. Problem

Teams need grounded answers from internal documents without manually searching through source files.

05. Solution

Built a Next.js and FastAPI RAG chatbot that processes uploaded documents, stores embeddings in Chroma, and returns citation-backed answers tied to source passages.

Backend focus

  • -FastAPI service with PostgreSQL persistence for organizations, users, documents, chats, and messages
  • -Background ingestion pipeline for extraction, chunking, embedding, and vector upsert
  • -Streaming chat events for tokens, citations, and completion over SSE
  • -12 backend tests recorded in the repository verification log across auth, tenant isolation, retrieval, grounding, uploads, and rate limits

AI focus

  • -History-aware retrieval query construction
  • -OpenAI-compatible embeddings and optional chat generation
  • -Grounded answer generation from Chroma matches
  • -Traceable citations with source document, page, snippet, and score

06. Key Features

  • >PDF, DOCX, TXT, and Markdown ingestion
  • >JWT access and refresh authentication
  • >Organization-scoped documents and chats
  • >Background extraction, chunking, and indexing
  • >Embedding generation and storage in Chroma
  • >Citation-backed SSE responses
  • >Chat history and resumable conversations
  • >Document, folder, tag, and date filters
  • >Grounding checks and explicit fallback answers
  • >Request IDs, rate limits, and upload validation

07. Engineering Challenges

Keeping answers grounded in source material

Added retrieval filters and explicit grounding checks before response generation.

Making source traces easy to verify

Returned citation-backed snippets with the answer payload.

08. Outcome

Created a document-question-answering workflow where responses can be traced back to retrieved source passages rather than presented as unsupported model output.

09. Technology

FastAPINext.jsLangChainChromaOpenAIPostgreSQLDocker
[PROJECT_SPECIFICATIONS]
ROLE:
Backend & AI Engineer
CATEGORY:
AI
TECHNOLOGY STACK:
FastAPINext.jsLangChainChromaOpenAIPostgreSQLDocker
OUTCOME:
Created a document-question-answering workflow where responses can be traced back to retrieved source passages rather than presented as unsupported model output.