WhoBuilt

How Codeium Breaks Through the Ceiling for Retrieval

Jul 31, 2024· 19 min· 23K views·Watch on YouTube

Speaker

Kevin Hou of Codeium explains at AI Engineer how the company approaches code retrieval for AI coding tools.

Why code generation needs context

Kevin says context awareness helps Codeium tailor code generation to a developer’s codebase. A contact form, for example, should use existing buttons and inputs, follow the project’s styling, and draw on relevant local or external documentation.

Limits of existing retrieval approaches

Kevin compares long context, fine-tuning, and embeddings. Long-context prompts can add latency and cost: he says Gemini took 36 seconds to ingest 325,000 tokens, while even a small repository can exceed one million tokens. Fine-tuning requires ongoing updates and customer-specific models, while embeddings are inexpensive but struggle to rank multiple relevant items.

Evaluate retrieval against real code work

Kevin argues that common benchmarks focus on finding one relevant item, while code generation often needs several files or documents at once. Codeium uses Recall@50 to measure how much of a relevant set appears among the top 50 results. Its evaluation dataset maps pull request commit messages to the files changed, aiming to reflect production coding requests.

M-Query applies model reasoning to items

Kevin describes M-Query as making parallel model calls to assess individual codebase items, then combining those rankings with signals such as active files, nearby directories, recent commits, and the current ticket. He says Codeium’s own models and infrastructure make this compute affordable, and that the system can assess thousands of files while results stream within seconds.

Ship, measure, and iterate

Kevin says Codeium evaluates M-Query with users by tracking feedback, accepted generations, and how much code the product writes for them. He presents product data, evaluation, and rapid rollout as a recurring iteration cycle. He compares the approach to autonomous driving, where more available compute enabled larger models to use more data.

Takeaways

  • Measure retrieval against the full set of context a task needs, not just one relevant result.
  • Build evaluation data from real product activity, such as commit messages and changed files.
  • Combine model-based relevance judgments with practical signals like active files and recent commits.
  • Balance retrieval quality with latency and serving cost when choosing how much compute to use.
  • Use production feedback to guide repeated evaluation and product changes.

Mentioned in this talk

Search inside this talk

What was claimed 8

  • works at
    Head of Product Engineering; founding team member
    Verified4 sources· Talk, Web· archived
  • metric
    Windsurf: Downloaded over 1.5 million times
    “we’ve been downloaded over a million and a half times”
    YouTube
    Unverified1 source· Talk
  • feature
    Windsurf: Offers free, unlimited autocomplete, chat, and search across 70 languages and 40 IDEs
    “free, unlimited autocomplete, chat, and search across 70 different languages and 40 different IDEs”
    YouTube
    Unverified1 source· Talk
  • feature
    Windsurf: Trains its own models and builds custom infrastructure
    “we train our own models”
    YouTube
    Unverified1 source· Talk
  • built
    “something that we call M-Query”
    YouTube
    Unverified1 source· Talk
  • feature
    M-Query: Makes parallel LLM calls to reason over codebase items and rank relevant context
    “making parallel calls to an LLM to reason over each one of those items”
    YouTube
    Unverified1 source· Talk
  • metric
    Windsurf: Users get 100 times the compute they would on another product
    “our customers and users get 100 times the compute”
    YouTube
    Unverified1 source· Talk
  • metric
    Windsurf: M-Query computation costs one hundredth of competitors’ costs
    “our computation is one hundredth the cost of our competitors’”
    YouTube
    Unverified1 source· Talk

Related talks