How githyan/building_rag works
This is an educational RAG ingestion prototype: the demonstrated workflow reads Markdown files, splits them into chunks, requests Gemini embeddings, and writes chunk metadata and vectors to PostgreSQL. Markdown section parsing exists as a separate document-processing capability, but the shown entry point does not call it. The repository also documents PostgreSQL-backed knowledge storage, but no retrieval or answer-generation path is shown. The graph reflects the sampled call sites; the abstract repository interface has no demonstrated implementation connection.
Main entry points: main.py Ingestion entry point · parse_document.py Chunk and embed · files.py File loader · SQLInjection.py PostgreSQL writer
Components 10
Document ingestion
- Ingestion entry point
main.py - File loader
src/document_processing/files.py
Text processing
- Markdown section parser
src/document_processing/parse.py - Chunk and embed
src/repository/parse_document.py
Embedding and storage
- Repository interface
src/repository/interface.py - PostgreSQL writer
src/repository/SQLInjection.py
Other components
- Developer
- Markdown corpus
- Gemini embeddings
- PostgreSQL
Connections 8
- Developer → Ingestion entry point: runs
README.md - Markdown corpus → File loader: reads files
- Ingestion entry point → File loader: loads documents
main.py - File loader → Ingestion entry point: returns documents
main.py - Ingestion entry point → Chunk and embed: generates chunks
main.py - Chunk and embed → Gemini embeddings: requests embeddings
src/repository/parse_document.py - Chunk and embed → PostgreSQL writer: initializes and writes
src/repository/parse_document.py - PostgreSQL writer → PostgreSQL: executes SQL
src/repository/SQLInjection.py