Skip to content

Semantic Retrieval & Context Ranking

How Forge ranks repository files by prompt relevance and prunes symbols with tree-sitter before launching your AI tool.

Last updated: 16 Aug 2026Concepts

What replaced the knowledge graph?

Forge no longer builds a ForgeGraph or Graphify knowledge graph. Repository intelligence now uses shared symbol and dependency extraction plus semantic ranking — the same path wrappers and MCP use.

How ranking works

When you run a wrapper or MCP tool:

  1. Scan: Collect source files, symbols (classes/functions), and import relationships.
  2. Rank: Score files against your prompt with TF-IDF-style semantic ranking and dependency centrality.
  3. Prune: Use tree-sitter to keep only symbols relevant to the task, then compress and cache the payload.

Why this is better for most workflows

There is no separate graph CLI or external graphify install. Context preparation stays local, fast, and aligned with PromptForge / ResponseForge rulesets.