Your guide to an unfamiliar codebase.

DRAG connects to your GitHub repositories, builds a semantic index of the code, and retrieves the most relevant implementation when you ask a question. Every answer is grounded in cited source.

drag-preview — yravnit/drag
How does the retriever rank chunks for a question?
Ranking runs two passes — pgvector cosine similarity and a PostgreSQL full-text scan — then retrieveChunks() merges them with reciprocal rank fusion 1. The fused fuseHybridResults() ranking is what reaches the model 2.
[1]src/lib/retrieval/retriever.ts:L202
[2]src/lib/retrieval/fusion.ts:L18
0D
Embedding Dimensions
Up to0
Files per Repository
Up to1 GB
Repository Size Limit
< 500ms
Incremental Sync Speed

Start where the questions begin.

???{ }/src/coremodels/

Students learning new codebases

Learn how real production architectures are structured, without getting lost in thousands of files.

Contributing to open source

Find where your contribution belongs. Locate entry points, provider interfaces, and test suites without guesswork.

GATEWAYAUTHDB/SQLJWT

New recruits onboarding company

Get productive on day one. Understand service boundaries, legacy flows, and auth systems fast.

Understand a codebase in minutes, not hours.

01Connect
02Understand
03Explore
04Verify & Stay Current
Connect

Connect your repository with zero friction

Sign in with GitHub and choose the repository you want to explore. DRAG securely connects using your existing repository access permissions, with no personal access tokens or complex configurations to manage.

github.com/repositories
next.js(vercel)
publicReady
internal-api(acme-corp)
privateReady
design-system(acme-corp)
publicReady
3 repositories discovered via OAuthrepo, read:org scope
Understand

Parse syntax & generate deep embeddings

DRAG parses your code into syntax-aware chunks and builds a searchable semantic index of the implementation. Functions, classes, types, and related code stay connected instead of being treated as isolated text.

drag-core — parse & vector-embed
AST Chunking & Tokenization1,204 / 1,204 files
✓ 8,391 syntax chunks
✓ 768-dim embeddings
✓ pgvector HNSW index
✓ AST symbol boundaries
// Indexed in 4.2s · Ready for sub-second semantic retrieval
Explore

Ask about the codebase and get grounded answers

Ask questions in natural language. DRAG retrieves the most relevant implementation chunks through hybrid semantic and keyword search, then generates precise answers strictly grounded in the code.

drag-explore — query, retrieval & grounded answer
// 1. Hybrid retrievalpgvector + FTS · topK: 5
>“How does a question become ranked code chunks?”
[1]src/lib/retrieval/retriever.tsretrieveChunks()
match0.94
[2]src/lib/retrieval/fusion.tsfuseHybridResults()
match0.89
A question is embedded and also matched against PostgreSQL full text, then both rankings are merged with reciprocal rank fusion 1. Only the top chunks belonging to that one repository are ever handed to the model 2.
Verify & Stay Current

Verify against the source while the index stays up to date

Every response provides interactive citations pointing to the exact file, symbol, and line range. When the repository changes, paid plans re-index only the modified files in milliseconds.

drag-verify — source inspection & incremental sync
[1]src/lib/auth/accessMode.ts·L25–31
parseGitHubScopes()
12: if !rawScope) return [];
13: return rawScope
14: .split(/[,\s]+/)
15: .map((s) => s.trim().toLowerCase())
16: }
Git HEAD:a3f9c21→b71e004
+4 files changed
4 files re-indexed · 1,847 cached380ms sync

See how the codebase fits together.

Ask DRAG to turn unfamiliar code into a visual map of the system.

DRAG analyzes the relevant code and generates a Mermaid diagram that you can inspect directly alongside the answer.

Ask questions like:

“Show me how a request flows from the API to the database.”
“How do the authentication services interact?”
mermaid — live diagram synthesis
```mermaid
erDiagram
customers ||--o{ orders : "places"
orders ||--o{ order_items : "contains"
```
Entity relationship diagram of a foreign repositorycustomersplacesordersorderscontainsorder_items

Built for private codebases.

DRAG only stores what it strictly needs to compute embeddings and answer your questions.

What's Stored

Files are chunked and stored as 768D numerical vectors alongside the source of that chunk, so a citation can be opened and read.

What's Never Stored

OAuth tokens are AES-256 encrypted at rest. DRAG never writes commits, opens pull requests, or shares vectors across accounts.

Access Mirroring

Every repository query is checked against your live GitHub permissions. Revoke access on GitHub and DRAG drops it within the hour.

Disconnect Anytime

Disconnecting a repository deletes your chat histories immediately. Indexed files and embeddings are purged once the last connected account disconnects.

Stop guessing. Start citing.

Connect your GitHub repository and start asking real questions over your codebase in under five minutes.