Skip to main content
Search code using natural language queries. Two-stage retrieval: vector search (fast, broad) + GPU reranking (precise). Semantic Search
Push your code with morph.git.push() first (see Repo Storage). Embedding takes 3-8 seconds in background.

Installation

Quick Start

How It Works

Two-stage retrieval (~1000ms total):
  1. Vector search (~240ms) - Embed query, HNSW index retrieves top 50 candidates
  2. GPU rerank (~630ms) - morph-rerank-v3 scores for precision
  3. Returns top 10 most relevant
Why two stages? Vector search is fast but imprecise. Reranking is slow but accurate. Together = fast + accurate.

Direct Usage

Search Tips

Good queries:
  • “Where is JWT validation implemented?”
  • “Show database error handling”
  • “Find the login flow”
Avoid:
  • Single words (“auth”)
  • Too vague (“code”)
  • Too broad (“everything”)

Searching Specific Branches or Commits

By default, semantic search uses the latest commit on main. You can search specific branches or exact commits:
Priority: commitHash (if provided) > branch (if provided) > main (default)

API

Input:
Returns: