Generation:
->Retrieved chunks + question go into a prompt for a Groq-hosted LLM
->Upgraded the basic pipeline with source citations, confidence scores, query history, and optional summarization
Day 8 of learning Agentic AI
Took the RAG theory and built it as working code.
Ingestion -> Vector DB:
-> Loaders for PDF, TXT, CSV, Excel, Word, and JSON
-> RecursiveCharacterTextSplitter chunking (1000 chars, 200 overlap, so context isn't lost at chunk boundaries)
->Embeddings with all-MiniLM-L6-v2 (384 dimensions) ->Stored in ChromaDB
Retriever:
->Embeds the query, runs a similarity search, and filters by top_k and a score threshold
Retrieval Pipeline - using it at query time:
-> User query gets embedded into a vector
-> Similarity search against Vector DB finds the closest matching chunks
-> Retriever pulls that content
-> Context + original query get combined into a prompt
-> LLM generates the final output
Day 7 of learning Agentic AI
Today's topic: RAG (Retrieval Augmented Generation)
The core idea: optimize an LLM's output by grounding it in an authoritative knowledge base outside its training data - because an LLM's knowledge is frozen at training time
Data Ingestion Pipeline - building the knowledge base: -> Ingest raw sources (PDF, SQL DB, Excel, HTML)
-> Parse into structured data
-> Chunk it into pieces
-> Embed each chunk into vectors
-> Store in a Vector DB
-> MultiServerMCPClient connects to multiple MCP servers at once, regardless of transport
-> client.get_tools() pulls in all tools from every connected server into one list
MCP (Model Context Protocol)
-> Built separate MCP servers (one for math tools, a weather tool), each running independently, one over stdio, one over streamable_http
Also worked through a content-pipeline example to understand nodes/edges conceptually:
-> Input: a YouTube video URL
-> Node 1 extracts the transcript
-> Node 2 (Title Generator) takes the transcript generates a title
-> Node 3 (Content Generator) takes the title + transcript, generates the full content
-> All 3 nodes share access to the same state as it flows through the graph
while defining a node, you have to define what it does, the graph structure alone means nothing without node logic.
Built two graphs:
1. A basic chatbot
single LLM node, START -> chatbot -> END
2. A chatbot with tools
LLM bound to Tavily search + a custom function,
using ToolNode + tools_condition for automatic routing between the LLM and tool execution
Day 5 of learning Agentic AI
Moved from LangChain into LangGraph today
Core components:
-> Nodes (units of work)
-> Edges (control flow)
-> State (shared data across nodes)