Course Wiki
Chat App — LLM Zoomcamp Module 5
--- video_url: 'https://www.youtube.com/watch?v=JCB4JZlMsIQ&list=PL3MmuxUbc_hLZFNgSad56pDBKK8KO0XIv' --- # Chat App
Related Pages
LLM Zoomcamp › Module 5: Monitoring › Chat App
Notes
video_url: “https://www.youtube.com/watch?v=JCB4JZlMsIQ&list=PL3MmuxUbc_hLZFNgSad56pDBKK8KO0XIv”
Chat App
The command line works, but we want something closer to how a person would actually talk to the assistant. So we wrap it in a small web interface. We use Streamlit, a Python framework for building front ends with almost no code.
This isn’t the final product, and it isn’t meant to be pretty. I kept it deliberately simple so there’s nothing to explain. If you want a nicer interface, hand it to a coding assistant like Claude Code or Codex. Ask it to improve the layout. For now, plain is fine.
Add Streamlit to your project:
uv add streamlit
Create app.py:
import streamlit as st
from assistant import create_assistant
assistant = create_assistant()
st.title("Course Assistant")
user_input = st.text_input("Enter your question:")
if st.button("Ask"):
with st.spinner("Processing..."):
answer = assistant.rag(user_input)
st.success("Completed!")
st.write(answer)
Run the app:
uv run streamlit run app.py
That’s another long command, so it goes into the Makefile too:
chat:
uv run streamlit run app.py
Now we can run:
make chat
If you’re in GitHub Codespaces, it detects the port and forwards it for you. Open the link and you get a web interface. Ask a question like “How do I join the course?” and the answer comes back.
The RAG works, but right now we track nothing about it: no response time, no token usage, no cost. That’s exactly the visibility monitoring is supposed to give us, so that’s what we add next.
Key concepts
Related notes
- llmz-m01-agents
- llmz-m01-data-ingestion
- llmz-m01-function-calling
- llmz-m01-introduction
- llmz-m01-other-frameworks
- llmz-m01-quick-rag-revision-optional
- llmz-m01-rag
- llmz-m01-rag-helper
- llmz-m01-search
- llmz-m01-the-course-faq-dataset
- llmz-m01-the-llm
- llmz-m01-wrap-up-of-part-1
- llmz-m02-next-steps
- llmz-m02-rag-with-vector-search
- llmz-m02-vector-search
- llmz-m02-vector-search-with-minsearch
- llmz-m02-vector-search-with-pgvector
- llmz-m02-vector-search-with-sqlitesearch
- llmz-m03-ai-agents
- llmz-m03-ai-orchestration
- llmz-m03-best-practices
- llmz-m03-next-steps
- llmz-m03-retrieval-augmented-generation
- llmz-m04-agent-evaluation
- llmz-m04-evaluation
- llmz-m04-generating-rag-answers
- llmz-m04-llm-as-a-judge
- llmz-m04-next-steps
- llmz-m04-rag-and-agent-evaluation
- llmz-m04-search-evaluation
- llmz-m04-search-parameter-tuning
- llmz-m05-assistant
- llmz-m05-built-in-judge
- llmz-m05-capturing-metrics
- llmz-m05-docker-compose
- llmz-m05-feedback-dashboard
- llmz-m05-grafana-dashboards
- llmz-m05-monitoring
- llmz-m05-next-steps
- llmz-m05-querying-data
- llmz-m05-storing-data-in-postgresql
- llmz-m05-streamlit-dashboard
- llmz-m05-synthetic-data-generation
- llmz-m05-user-feedback
- llmz-m06-best-practices-for-rag
- llmz-m06-next-steps
- llmz-m07-chunking-for-longer-texts
- llmz-m07-content-processing-cases-and-steps
- llmz-m07-end-to-end-project-example
- llmz-m07-evaluating-rag
- llmz-m07-evaluating-retrieval
- llmz-m07-interface-and-ingestion-pipeline
- llmz-m07-monitoring-and-containerization
- llmz-m07-summary-and-closing-remarks