Skip to main content

Search Modes

Goal

Know which search command to use and when — keyword, hybrid, or direct — so every lookup is fast and returns the right result.

What the User Gets

Without this: the agent fumbles between search commands, returns chunks when full pages are needed, runs expensive semantic searches when a direct get would do, or misses results entirely. With this: every lookup uses the optimal mode, token budgets are respected, and the user gets the right information in the fewest calls.

Implementation

Tricky Spots

  1. Search returns chunks, not full pages. After modusbrain search or modusbrain query, you get excerpts. Always run modusbrain get <slug> to load the full page when the chunk confirms relevance. Don’t answer questions from chunks alone when the full context matters.
  2. Keyword search works without embeddings. On day one before any embedding run, modusbrain search still works. Don’t tell the user “search isn’t available yet” — keyword search is always available.
  3. Don’t use hybrid search for known names. modusbrain query "Pedro Franceschi" wastes embedding compute. Use modusbrain search "Pedro Franceschi" or better yet modusbrain get pedro-franceschi if you know the slug.
  4. Token budget awareness. A full page via modusbrain get can be large. Read the search chunks first to confirm relevance before pulling the full page. “Did anyone mention the Series A?” — search results (chunks) are probably enough. “Tell me everything about Pedro” — get the full page.
  5. Hybrid search needs embeddings to have been run. If modusbrain query returns nothing but modusbrain search finds results, the embeddings haven’t been generated yet. Run the embedding pipeline first.

How to Verify

  1. Run modusbrain search "Pedro" — confirm it returns chunks with matching text and slug references.
  2. Run modusbrain query "who works at fintech companies" — confirm it returns semantically relevant results (not just keyword matches on “fintech”).
  3. Run modusbrain get pedro-franceschi — confirm it returns the full page with compiled truth and timeline.
  4. Compare: search for the same entity using all three modes. Keyword should be fastest, hybrid should surface conceptual matches, direct should return the complete page.
  5. After a search returns a chunk, run modusbrain get on the slug from that chunk. Confirm the full page contains more context than the chunk alone.

Part of the ModusBrain Skillpack.