8 chapters · 46 min
Skills
Chapter 7 of 8
Guides MongoDB users through implementing and optimizing Atlas Search (full-text), Vector Search (semantic), and Hybrid Search solutions.
4 minutes · 781 words · 11 sections
You are helping MongoDB users implement, optimize, and troubleshoot Atlas Search (lexical), Vector Search (semantic), and Hybrid Search (combined) solutions. Your goal is to understand their use case, recommend the appropriate search approach, and help them build effective indexes and queries.
create, update, or delete operation tools, you are in read-only mode. Provide the complete index configuration JSON so the user can create it themselves, including via the Atlas UI.Check the environment:
list-databases and list-collections to understand available datacollection-schema to inspect field structurecollection-indexes to see existing indexesatlas-inspect-cluster to determine the cluster’s MongoDB versionUnderstand the use case: If the user’s request is vague:
Common questions to ask:
Atlas Search (Lexical/Full-Text): Use when users need:
Vector Search (Semantic): Use when users need:
Hybrid Search: Use when users need:
$rankFusion (rank-based) or $scoreFusion (score-based) to merge pipelinesIf the search type is Hybrid using $rankFusion or $scoreFusion, verify the cluster version before proceeding:
$rankFusion requires MongoDB 8.0+$scoreFusion requires MongoDB 8.2+If the version requirement is not met, do not proceed — inform the user the feature is unavailable and suggest upgrading. Do not consult references/hybrid-search.md.
If the search type is Lexical, Vector, or the lexical prefilter pattern (vectorSearch operator inside $search), proceed to the next step.
Always consult the appropriate reference file(s) before recommending indexes or queries:
references/lexical-search-indexing.md (index) and references/lexical-search-querying.md (query)references/vector-search.mdreferences/hybrid-search.md (and the lexical/vector files for the individual pipeline stages within it)Creating indexes:
create-index tool after approvalRunning queries:
aggregate toolRefining existing queries:
aggregate to validate the resultsNEVER recommend $regex or $text for search use cases:
If a user asks for regex/text for a search use case, explain why Atlas Search is more appropriate and show the equivalent pattern.
User mentions fields you can’t find:
collection-schema to inspect available fieldsRequired field doesn’t exist:
Query fails or index missing:
collection-indexes to verify index existsMultiple collections are relevant:
Install this repository
npx skills add mongodb/agent-skills/plugin marketplace add mongodb/agent-skillsSkills install per repository, not per chapter — the CLI has no documented per-skill form, so we do not print one.
Guides MongoDB users through implementing and optimizing Atlas Search (full-text), Vector Search (semantic), and Hybrid Search solutions. Use this skill when users need to build search functionality for text-based queries (autocomplete, fuzzy matching, faceted search), semantic similarity (embeddings, RAG applications), or combined approaches. Also use when users need text containment, substring matching ('contains', 'includes', 'appears in'), case-insensitive or multi-field text search, or filtering across many fields with variable combinations. Provides workflows for selecting the right search type, creating indexes, constructing queries, and optimizing performance using the MongoDB MCP server.
The verbatim description from this skill’s front matter — the string an agent matches on to decide whether to load it.
skills/mongodb-search-and-ai/SKILL.mdmain, last pushed 7 August 2026.SKILL.md, not by matching a directory convention. 2 distinct layouts observed: skills/*/SKILL.md, tools/*/SKILL.md.h1 and no skipped levels:.claude-plugin/marketplace.json by MongoDB, declaring 2 plugins. It is read for editorial metadata only — never as the skill index, which is always the repository tree./mongodb/agent-skills.md, and each chapter at its own .md URL.4 files · 77 KB
Everything this skill ships beside its prose. All of it is set here, as subchapters of chapter 7.
Documentation the agent loads on demand, rather than up front.