How kubaperkowski22/jakub-perkowski-portfolio works
AI Portfolio Assistant is a bilingual portfolio website with a RAG chatbot. A visitor reaches portfolio pages or submits a chat question; the API applies request limits, uses recent conversation context for retrieval, searches language-filtered knowledge chunks, generates a structured answer, validates citations, and returns sources (including through SSE). A separate ingestion path turns curated Markdown into a rebuildable vector index. The graph also preserves portfolio content and page rendering. Connections for unsampled page templates and browser JavaScript are limited to what the README or shown application entry point supports.
Main entry points: ingest.py Knowledge Ingestion · chat.py Chat API · main.py Web Application · retrieval.py Vector Retrieval
Components 21
Portfolio Web
- Web Application
main.py - Page Templates
templates - Browser UI
static/js - Portfolio Content
data
Chat Answering
- Chat API
api/chat.py - Rate Limiter
api/rate_limit.py - Provider Dependencies
api/dependencies.py - Source Anchors
api/source_links.py - RAG Answer Service
rag/service.py - Structured Generation
rag/llm.py
Knowledge Index
- Vector Retrieval
rag/retrieval.py - Embedding Provider
rag/embeddings.py - Knowledge Ingestion
rag/ingest.py - Markdown Loader
rag/loader.py - Document Chunker
rag/chunker.py - Knowledge Models
rag/models.py - Chunk Schema
rag/schema.py - Curated Knowledge
knowledge_base
External Services
- PostgreSQL pgvector
- OpenAI API
Other components
- Visitor
Connections 26
- Visitor → Web Application: requests pages
README.md - Web Application → Chat API: registers routes
main.py - Web Application → Page Templates: renders templates
main.py - Web Application → Portfolio Content: loads content
main.py - Web Application → Browser UI: serves static files
main.py - Visitor → Browser UI: uses chat
README.md - Chat API → Rate Limiter: enforces limits
api/chat.py - Chat API → Provider Dependencies: resolves providers
api/chat.py - Chat API → RAG Answer Service: answers question
api/chat.py - Chat API → Source Anchors: maps source anchors
api/chat.py - Chat API → Visitor: streams validated result
README.md - RAG Answer Service → Vector Retrieval: searches chunks
rag/service.py - RAG Answer Service → Structured Generation: generates answer
rag/service.py - Vector Retrieval → Embedding Provider: embeds query
rag/retrieval.py - Vector Retrieval → Chunk Schema: queries chunk table
rag/retrieval.py - Vector Retrieval → PostgreSQL pgvector: reads vectors
rag/retrieval.py - Structured Generation → OpenAI API: requests generation
rag/llm.py - Embedding Provider → OpenAI API: requests embeddings
rag/embeddings.py - Knowledge Ingestion → Curated Knowledge: loads documents
rag/ingest.py - Knowledge Ingestion → Markdown Loader: loads documents
rag/ingest.py - Knowledge Ingestion → Document Chunker: chunks documents
rag/ingest.py - Knowledge Ingestion → Embedding Provider: embeds chunks
rag/ingest.py - Knowledge Ingestion → Chunk Schema: writes chunk rows
rag/ingest.py - Knowledge Ingestion → PostgreSQL pgvector: rebuilds index
rag/ingest.py - Markdown Loader → Knowledge Models: validates documents
rag/loader.py - Document Chunker → Knowledge Models: creates chunks
rag/chunker.py