How nikhileshnarkhede/portfolio-chatbot works
Portfolio Chatbot is a resume-grounded recruiter Q&A app, with an evaluation console for measuring and applying configuration changes. A user asks in the Streamlit chat; the graph expands the query, routes it, retrieves resume context, generates and sanitizes an answer, and may summarize older history. Ingestion prepares the searchable index. The console runs datasets through the same graph, scores retrieval, grounding, generation, safety, and performance, and supports gates, comparisons, ratings, calibration, noise measurement, and guarded application. Several internal relationships are documented or indexed; unsampled subsystem wiring is not inferred.
Main entry points: graph.py Graph workflow · panels.py Dashboard panels · runner.py Evaluation runner · build_index.py Index builder
Components 30
Chat pipeline
- Chat UI
ui/components/chat.py - Graph workflow
src/portfolio_chatbot/graph.py - Query expansion
src/portfolio_chatbot/nodes/expand_query.py - Question routing
src/portfolio_chatbot/nodes/route.py - Context retrieval
src/portfolio_chatbot/nodes/retrieve.py - Vector search
src/portfolio_chatbot/tools/retriever_tool.py - Answer generation
src/portfolio_chatbot/nodes/generate.py - Model provider
src/portfolio_chatbot/llm/provider.py - Link sanitization
src/portfolio_chatbot/nodes/sanitize.py - History summary
src/portfolio_chatbot/nodes/summarize.py - Turn state
src/portfolio_chatbot/state.py - Experiment config
src/portfolio_chatbot/config.py
Resume indexing
- Resume source
src/portfolio_chatbot/ingestion/parser.py - Index builder
src/portfolio_chatbot/ingestion/build_index.py - Resume chunking
src/portfolio_chatbot/ingestion/chunker.py - Text embeddings
src/portfolio_chatbot/ingestion/embedder.py - FAISS index
src/portfolio_chatbot/tools/retriever_tool.py
Evaluation
- Evaluation runner
eval/runner.py - Evaluation metrics
eval/metrics/retrieval.py - Threshold gate
eval/gate.py - Experiment comparison
eval/compare.py - Noise measurement
eval/noise.py - Judge calibration
eval/calibration.py - Human ratings
eval/ratings.py - Config application
eval/apply.py
Evaluation console
- Dashboard entry
ui/dashboard.py - Dashboard panels
ui/dash/panels.py - Dashboard state
ui/dash/state.py
Other components
- Recruiter
- Groq service
Connections 35
- Recruiter → Chat UI: asks
README.md - Chat UI → Graph workflow: invokes
ui/components/chat.py - Graph workflow → Query expansion: dispatches
src/portfolio_chatbot/graph.py - Graph workflow → Question routing: dispatches
src/portfolio_chatbot/graph.py - Graph workflow → Context retrieval: dispatches
src/portfolio_chatbot/graph.py - Graph workflow → Answer generation: dispatches
src/portfolio_chatbot/graph.py - Graph workflow → Link sanitization: dispatches
src/portfolio_chatbot/graph.py - Graph workflow → History summary: conditionally dispatches
src/portfolio_chatbot/graph.py - Context retrieval → Vector search: calls
src/portfolio_chatbot/nodes/retrieve.py - Vector search → FAISS index: searches
src/portfolio_chatbot/tools/retriever_tool.py - Answer generation → Model provider: calls
- Model provider → Groq service: requests completions
- Graph workflow → Turn state: uses state contract
src/portfolio_chatbot/graph.py - Graph workflow → Experiment config: configures workflow
src/portfolio_chatbot/graph.py - Index builder → Resume chunking: chunks
src/portfolio_chatbot/ingestion/build_index.py - Index builder → Text embeddings: embeds
src/portfolio_chatbot/ingestion/build_index.py - Index builder → FAISS index: builds index
- Resume source → Index builder: provides source
- Evaluation runner → Graph workflow: runs questions through
eval/runner.py - Evaluation runner → Evaluation metrics: scores turns
eval/runner.py - Evaluation runner → Threshold gate: gates report
- Experiment comparison → Evaluation runner: compares experiment results
- Noise measurement → Evaluation metrics: measures variance
eval/noise.py - Judge calibration → Threshold gate: validates judge threshold
- Config application → Experiment config: updates configuration
eval/apply.py - Dashboard entry → Dashboard panels: renders
ui/dashboard.py - Dashboard entry → Dashboard state: uses
ui/dashboard.py - Dashboard panels → Evaluation runner: starts evaluations
ui/dash/panels.py - Dashboard panels → Threshold gate: shows gate results
ui/dash/panels.py - Dashboard panels → Experiment comparison: shows comparisons
ui/dash/panels.py - Dashboard panels → Noise measurement: measures repeat noise
ui/dash/panels.py - Dashboard panels → Judge calibration: calibrates judge
ui/dash/panels.py - Dashboard panels → Human ratings: collects ratings
ui/dash/panels.py - Dashboard panels → Config application: applies decisions
ui/dash/panels.py - Chat UI → Human ratings: records field ratings
ui/components/chat.py