Get Started
How it works
From a repository on disk to a streamed, grounded answer — the ingestion, retrieval and generation path.
The pipeline at a glance
text
┌──────────────────┐
│ Ollama (host) │
│ nomic-embed-text · qwen2.5-coder │
└──▲──────────────────────────▲────────┘
embeddings │ │ generation
repo ─► cgr ─► graph JSON ─► chunker ─► Weaviate ◄──┤
(Memgraph) (nodes+edges) (source+edges) (vectors) │
hybrid search + │
graph expansion │
user ─► FastAPI /chat ─ builds connected context ────────┘ ► SSEIngestion pipeline
Triggered by POST /instances/pipeline. Runs as a background job reporting stages cgr → chunk → describe → upsert → done.
- Graph extraction. code-graph-rag (
cgr) spins up an ephemeral Memgraph and emits a JSON graph of the repo — 4k+ nodes, 8k+ relationships for a medium backend. - Chunking. Each code entity (Class / Function / Method / Interface / Enum / Type) becomes one chunk containing a compact header, its graph relations and the actual source sliced from the file.
- Vectorization & storage. Chunks are written to Weaviate, which embeds them via Ollama. Each object gets a deterministic UUID from
(project, qualified_name), so re-ingestion upserts in place.
Retrieval
- Seeds. Hybrid search (vector + BM25) finds the entry points.
- Graph expansion. A breadth-first walk over the stored
qualified_nameedges pulls in callers/callees/definitions, scored with per-hop decay and hub-node protection so a popular utility doesn't flood the context. - Context assembly. Results are ranked and formatted with provenance (
SEEDvshop 1 · calls ← X) so the model understands the structure.
Generation
The connected context is injected into an audience-specific prompt and streamed from the local Ollama model over Server-Sent Events. See POST /chat for the event framing.