How vappador/rag_pgvector works
This is a local code-repository RAG service: repositories are parsed and indexed, then users retrieve code or ask questions answered from cited snippets. The graph preserves both agent implementations, hybrid search and reranking, provenance-based synthesis, and the documented dependency-graph endpoints. Some internal agent and ingestion details are only partially sampled; arrows follow visible calls or README descriptions, and unsampled implementation links are omitted.
Main entry points: api.py FastAPI service · search.py Hybrid search · strands_agent.py Strands agent · 001_init.sql Postgres + pgvector
Components 17
Repository indexing
- Ingest pipeline
app/ingest.py - AST chunking
app/ingest.py - Embedding and indexing
app/ingest.py - Postgres + pgvector
db/migrations/001_init.sql
Retrieval and answers
- DB helpers
app/db.py - Hybrid search
app/search.py - Candidate rerankers
app/rerankers.py - Provenance synthesis
app/answering.py
API and graph analysis
- FastAPI service
app/api.py - Relations and impact
app/api.py
Question agents
- LangGraph agent
app/agent_graph.py - Strands agent
app/strands_agent.py - Agent observability
app/obs.py
Other components
- Code repositories
- API user
- Git hosting
- Ollama models
Connections 23
- Git hosting → Code repositories: hosts
README.md - Code repositories → Ingest pipeline: provides repositories
README.md - Ingest pipeline → AST chunking: parses and chunks
README.md - AST chunking → Embedding and indexing: produces chunks
README.md - Embedding and indexing → Ollama models: requests embeddings
README.md - Embedding and indexing → Postgres + pgvector: indexes chunks
README.md - Hybrid search → Postgres + pgvector: queries index
README.md - Hybrid search → Candidate rerankers: reranks candidates
README.md - Provenance synthesis → Candidate rerankers: uses candidates
app/answering.py - Provenance synthesis → Ollama models: optionally synthesizes
app/answering.py - FastAPI service → Hybrid search: runs retrieval
README.md - FastAPI service → Candidate rerankers: uses reranking
app/api.py - FastAPI service → LangGraph agent: dispatches asks
app/api.py - FastAPI service → Strands agent: dispatches asks
app/api.py - FastAPI service → Relations and impact: serves graph routes
README.md - Relations and impact → Postgres + pgvector: reads relations
README.md - API user → FastAPI service: requests results
README.md - LangGraph agent → Hybrid search: retrieves context
app/agent_graph.py - LangGraph agent → Ollama models: embeds and answers
app/agent_graph.py - Strands agent → Hybrid search: retrieves context
README.md - Strands agent → Ollama models: calls models
app/strands_agent.py - Strands agent → Agent observability: emits telemetry
app/strands_agent.py - DB helpers → Postgres + pgvector: connects to