How afreenshehanaaz/aws-agentic-rag-chatbot works
This is an AWS documentation RAG assistant: PDFs are loaded, chunked, and stored; a Databricks-hosted retrieval-and-generation chain answers questions; and a Streamlit chat UI sends requests to its serving endpoint. The notebook also defines document-search, source-lookup, acronym, and topic tools, plus tracing and chat-memory features. The README is empty, and notebook excerpts omit some setup and wiring, so uncertain connections are left unasserted or marked dashed.
Main entry points: 02_rag_chatbot.py Tool-calling agent · 01_chunk_pdfs.py PDF loader and chunker · app.py Streamlit chat UI
Components 20
Document ingestion
- PDF loader and chunker
01_chunk_pdfs.py - Chunk Delta table
01_chunk_pdfs.py - Vector Search index
Retrieval and answers
- Document retriever
02_rag_chatbot.py - Context formatter
02_rag_chatbot.py - RAG prompt
02_rag_chatbot.py - Hosted chat model
02_rag_chatbot.py - Serving RAG chain
02_rag_chatbot.py
Serving and chat
- MLflow model registry
- Databricks serving endpoint
- Streamlit chat UI
chatbot_app/app.py
Tools and observability
- AWS document search
02_rag_chatbot.py - Source lookup
02_rag_chatbot.py - Acronym expansion
02_rag_chatbot.py - Topic listing
02_rag_chatbot.py - Tool-calling agent
02_rag_chatbot.py - Conversation memory
02_rag_chatbot.py - MLflow tracing
02_rag_chatbot.py
Other components
- AWS questioner
- AWS PDF documents
Connections 19
- AWS PDF documents → PDF loader and chunker: loads pages
01_chunk_pdfs.py - PDF loader and chunker → Chunk Delta table: writes chunks
01_chunk_pdfs.py - Chunk Delta table → Vector Search index: indexes chunks
- Vector Search index → Document retriever: retrieves documents
- Document retriever → Context formatter: formats context
02_rag_chatbot.py - Context formatter → RAG prompt: provides context
02_rag_chatbot.py - RAG prompt → Hosted chat model: prompts model
02_rag_chatbot.py - Hosted chat model → Serving RAG chain: generates answers
02_rag_chatbot.py - AWS questioner → Streamlit chat UI: asks question
chatbot_app/app.py - Streamlit chat UI → Databricks serving endpoint: posts invocation
chatbot_app/app.py - Databricks serving endpoint → Serving RAG chain: invokes model
- Serving RAG chain → MLflow model registry: logs model
02_rag_chatbot.py - Tool-calling agent → AWS document search: calls tool
02_rag_chatbot.py - Tool-calling agent → Source lookup: calls tool
02_rag_chatbot.py - Tool-calling agent → Acronym expansion: calls tool
02_rag_chatbot.py - Tool-calling agent → Topic listing: calls tool
02_rag_chatbot.py - Tool-calling agent → Conversation memory: uses history
02_rag_chatbot.py - Document retriever → MLflow tracing: logs retrieval
02_rag_chatbot.py - Serving RAG chain → MLflow tracing: logs metrics
02_rag_chatbot.py