
Transform health claim pdfs into an intelligent application using an end-to-end RAG pipeline, AI agents, and ML data, covering extraction, embeddings, and a RAG dashboard.
Explore the architecture of a production-ready ai document intelligence project that turns unstructured claim pdfs into structured data using rag, embeddings, and a guarded, auditable agentic flow.
Explore how the readme anchors an end-to-end ai document intelligence project, detailing the RAG pipeline, ML data, guardrails, and the FastAPI and React UI.
Meet Rahul Sahay, a transformational leader and enterprise AI architect who leads a Bupa program from replatforming to modernization and shares expertise in data strategy and machine learning.
Explore the end-to-end pdf ingestion and document processing pipeline, including extracting claim IDs, combining documents per claim, cleaning noise, and preparing data for RAG and ML workflows.
Create a scalable project folder structure for an AI document intelligence workflow, organizing data, source modules, rag pipeline, and configuration files, including main.py, requirements.txt, and a .env file.
Create a Python project's requirements.txt, detailing core processing with pandas for tabular data, pdf processing, rag and llm pipelines with lang chain and chroma db, plus fastapi and uvicorn.
Create a Python virtual environment. Activate it and install dependencies from a requirements.txt using uv, highlighting its speed advantage over pip.
Explore how pdfs such as discharge summaries and hospital reports are ingested, text-extracted, and queried in a rag-driven pipeline to answer front desk hospital inquiries.
Combine claim texts from multiple files into a single, context-rich output per claim, organizing into processed and combined directories, reading UTF-8 text and adding structured headers.
Learn how a text cleaner performs pre-processing to remove noise from extracted PDF text by replacing old values with new text, addressing line breaks in the pipeline.
Create and orchestrate a Python main program to run a document processing pipeline: extract text from PDFs, combine claim texts, and clean the results, with structured logging.
Demonstrates end-to-end text extraction from PDFs, including data preparation, claim extraction, cleaning, and preparing inputs for a RAG pipeline in a document processing project.
Learn how to prepare rag-ready text by chunking and validating quality, generate embeddings, populate a vector database, and enable effective retrieval for document intelligence.
Build chunk records to attach metadata to each chunk, including claim ID, chunk ID, source file, and text length, enabling reliable retrieval and provenance tracking.
Validate chunk records before embedding into the vector DB by checking missing metadata, empty texts, and chunk length metrics, ensuring quality for reliable document intelligence.
Explore the document intelligence pipeline by loading chunks as embeddings into a chroma vector store, then search via cosine similarity to retrieve the most relevant chunks for queries.
Load chunk files and validate each chunk to ensure required fields, then build a chunk manifest for rag input. Save validated chunks to a vector db for rag search.
Load all chunks from the chunks directory, locate and validate chunk records from chunk json files, and return the collection of valid chunks while preparing the manifest.
Save the chunk manifest file by creating a rag inputs directory, validating chunks, and writing a JSON manifest with indentation and utf-8 encoding, while logging progress.
wire up the main file to load chunk json files as input for embeddings and vector store, save the chunk manifest, and handle the manifest path for rag chunk loading.
Fix the manifest creation issue by ensuring rag chunk validation returns the required fields, enabling processing of 99 valid claims and generating the chunkmanifest.json for the vector store pipeline.
Create a reusable app settings module, loading configuration from a settings file and environment values, and validate open ai settings for production-grade projects.
Explore how cosine similarity powers ai search by converting text to embeddings, comparing query vectors with stored chunks, and retrieving the top k most relevant results from a vector database.
Create an embedding client and a persistent chroma db vector store using LangChain OpenAI embeddings and cosine similarity to manage embeddings, metadata, and collections with environment settings.
Create helper methods to build chunk metadata, fetch existing vector IDs from chroma db, and verify that all chunk IDs exist in the vector store to skip redundant embeddings.
Leverage vector store search to implement a robust document retrieval pipeline using top-k queries, embedding clients, and chroma collections, returning documents, metadata, and distances for sanity testing.
Print the search results by validating the query, enumerating results, displaying indexed metadata and a 300-character preview, and gracefully handling no results.
Create an OpenAI API key, securely save secret, wire up the main file to build a vector store with embeddings in chroma DB, load settings, and run a sample query.
Explore vector store creation and restoration, validating chunks and cosine distance to generate accurate results. Demonstrate rag question answering and structured data extraction with an efficient indexing workflow.
Apply a retrieval augmented generation workflow by embedding chunks in a vector store, use an LLM to generate grounded answers, and cache results in a json file to save tokens.
Build a qa pipeline with a caching layer that normalizes questions for cache keys, loads cached answers, and uses vector store search when cache misses.
Build cache-backed rag workflows by generating cache responses and grounded references from metadata, creating audit-friendly sources with chunk indices and cosine distances, and an archival strategy.
Build a rag q&a with context by creating a question with context from search results, validating OpenAI settings, and using a chat model to generate a grounded answer with sources.
learn to print and validate a rag answer by handling rag responses, extracting questions, answers, and sources, and displaying chunk details and cosine distances for debugging.
Wire up the main file to integrate the rag pipeline and qa workflow, importing from source.rag and wiring print rag answers and save rag responses.
Fix the main file issue by correcting a bracket error, verify document context for total claim amount and policy details, and ground the llm to rely only on provided documents.
Ground the rag Q&A in a single claim document, extracting the total claim amount, diagnosis, and policy number while filtering by claim ID to prevent hallucination.
Transform unstructured pdfs and claim documents into a pdf-ready, structured data set via cleaning and chunking, then export rag chunks and rag answers to an ml-ready csv for mlops inference.
Implement get claim schema to return the json schema for the claim record model and save claim extraction as a json file to an output path using json.dumps with utf-8.
Wire up the main file to save the claim schema and import validation components, producing a claim is schema json and triggering the extraction pipeline for ml ready records.
Build a claim extractor that loads cached claim records and validates them against the claim schema. Create a structured extraction prompt that outputs JSON with nulls for missing fields.
Extract claim records from text and convert them to JSON for validation, then perform batch processing over cleaned claims with duplicate checks and structured record creation.
Save extracted claim records as JSON and convert them to a CSV for an MLOps pipeline, using output paths and pandas to create a tabular dataset.
Wire up the main file to extract and save claim records as an ml-ready csv dataset, exporting validated structured claim records for ml pipelines.
Validate claim records by extracting and examining each record, compiling a data quality summary with total, valid, and invalid counts and row-level issues to assess readiness for downstream ML workspace.
Wire up the save data quality report workflow by creating an output directory, saving the report as data_quality_report.json using JSON dumps with UTF-8 encoding, and returning the output path.
Create a data dictionary for a data set by detailing each field’s type and an example value, using claim records and helper methods to build and save the dictionary.
Create a data dictionary from claim records by building rows with field names, types, required status, and descriptions, then save as a csv to a specified output path.
Wire up the main file to create a data dictionary for ML ready CSV columns, export the data dictionary CSV, and reveal data quality checks.
Build a Python processing summary that captures total frames processed, data quality, ml readiness, valid and invalid records, and output file locations in JSON for the document intelligence pipeline.
Wire up the main step to save the final processing summary and related outputs, including claim records, data quality reports, and data dictionary path, for the MLOps pipeline.
Learn how rule-based and llm-based agents route requests, select tools like summarize pipeline outputs and query claim data set, and perform rag-based document lookups for fast, token-efficient request handling.
Explore ai document intelligence by building agentic tools that orchestrate rag pipelines, vector db retrieval, and claim processing with helper methods for data normalization and json loading.
Create robust document methods for an AI agent to fetch data quality reports, filter claims by status, load datasets, and return structured dictionaries of claim fields.
Create a generic query claim dataset that handles csv-based questions like top rejected claims and approved amounts. Leverage rag, rack pipeline, and LLM agents for document context and document-based processing.
Build a simple ai agent that uses intent detection to route requests to document tools for data quality, pipeline summaries, and status filtering in an ai document intelligence workflow.
Describe how to print and save agent responses by detecting intent, printing the response and the tool used, and saving the results to an agent responses.json file with utf-8 encoding.
Run a simple agentic workflow to process claim documents with a document agent, print and save agent responses, and orchestrate generated artifacts via an orchestration engine.
Demonstrates fixing a rule-based AI agent by switching to claim-id based retrieval (document ID) with a get claimed record by ID tool, and outlining processing, pipeline, and data quality steps.
Expose a fast api layer that connects PDF extraction, text cleaning, chunking, embedding, and the rag pipeline to a react dashboard for intelligent claims workflows.
Import and configure essential libraries and modules for a python app, including fastapi, path, json, and document tools, to load claim data and initialize LLM agents and a QA pipeline.
Create a fast api layer with schema driven dtos for rack question and agent question requests, validating with pedantic base models and returning a pipeline run response for ui integration.
Build a fast api app with middleware to enable cross-origin requests, implement helpers for json artifacts and output file status, and expose endpoints for rag answers and agent audit trails.
Create and test api methods for rag document intelligence, including post /agent/ask, loading claim data, get claims by id, and audit trail with entry counts.
Run the fast api with uvicorn on localhost:8001, view the swagger docs, test endpoints for claims and audit trail, and prepare for react app integration.
AI Document Intelligence: RAG, Agents & ML Data
Build a complete AI-powered Document Intelligence platform from scratch and learn how to transform unstructured PDFs into intelligent applications, structured datasets, AI agents, and ML-ready data.
Most AI courses stop at embeddings and question-answering. This course goes much further.
You will build an end-to-end healthcare claims intelligence platform that starts with raw PDF documents and evolves into a production-style system featuring RAG, AI Agents, FastAPI services, React applications, structured datasets, analytics-ready outputs, and machine learning pipelines.
Throughout the course, you will work on a realistic project and implement every major component yourself instead of relying on black-box frameworks.
What You Will Build
PDF ingestion and document processing pipeline
Automated text extraction from real-world documents
Data cleaning and preprocessing workflows
Intelligent document chunking strategies
Embedding generation and vector storage using ChromaDB
Retrieval-Augmented Generation (RAG) applications
AI Agents capable of selecting and executing tools
Structured claim datasets generated from unstructured documents
ML-ready datasets for analytics and machine learning
FastAPI backend services
Modern React frontend application
End-to-end AI Document Intelligence platform
What You Will Learn
Document Intelligence architecture and design patterns
RAG implementation from scratch
Vector databases and semantic search
ChromaDB integration
Prompt engineering for retrieval systems
Agentic AI workflows and tool usage
Dynamic query planning and execution
Structured data extraction from PDFs
Data quality validation and reporting
FastAPI API development
React application development
Building production-style AI applications
Preparing data for Machine Learning and MLOps workflows
Why This Course Is Different
Most courses teach RAG as an isolated concept.
This course demonstrates how RAG fits into a complete AI ecosystem where documents are processed, validated, transformed into structured data, queried through AI agents, exposed through APIs, visualized in modern web applications, and ultimately prepared for machine learning use cases.
You will understand not only how individual components work, but also how they fit together to create enterprise-grade AI solutions.
Course Statistics
11.5+ Hours of Content
91+ Lectures
End-to-End Project-Based Learning
Real-World Healthcare Claims Use Case
FastAPI + React Integration
RAG + Agents + ML Data Pipeline
Source Code Included
Who This Course Is For
AI Engineers
Machine Learning Engineers
Data Scientists
Python Developers
Full Stack Developers
Solution Architects
GenAI Practitioners
Students looking to build real-world AI applications
Prerequisites
Basic Python knowledge
Basic understanding of APIs
Curiosity to learn AI, RAG, Agents, and Document Intelligence
By the end of this course, you will have built a complete AI Document Intelligence platform capable of transforming raw PDFs into searchable knowledge, intelligent agent workflows, structured datasets, analytics-ready outputs, and ML-ready data pipelines.