| Node type | What it captures |
|---|---|
File | Path, imports, exports, and the definitions it contains |
Function / Method | Name, parameters, return type, line number, and containing file |
Class | Name, methods, fields, and containing file |
Each node receives a fully qualified name such as
auth/service.py:AuthService.validate_token, making it referenceable across the entire graph.How files are read
Definitions
Potpie extracts every definition in the file and turns it into a node. Each node stores its source text, file path, and line numbers.
References
Potpie extracts every reference and turns it into an edge pointing back to the definition it uses. Two edge types connect nodes.
| Edge type | What it represents |
|---|---|
CONTAINS | A file holding a function or class |
REFERENCES | One definition referencing another |
Scoring
PageRank scores each node by how frequently other nodes reference it. These scored nodes then pass to inference, which gives each one a semantic meaning.

