スキル一覧に戻る
FullFran

mongodb

by FullFran

0🍴 0📅 2026年1月23日
GitHubで見るManusで実行

SKILL.md


name: mongodb description: Expert guidance on MongoDB implementation for RAG, including aggregation pipelines and search patterns.

MongoDB Expert Skill

This skill provides patterns for implementing RAG logic with MongoDB Atlas.

📂 Storage Pattern

  • Two-Collection Pattern:
    • documents: Stores source document text and global metadata.
    • chunks: Stores text fragments, embeddings (list[float]), and a foreign key (document_id) to the source document.
  • Score Meta: Use {"$meta": "vectorSearchScore"} for semantic scores and {"$meta": "searchScore"} for text scores.

🔍 Search Patterns

  • Semantic Search: Use $vectorSearch aggregation. Default numCandidates: 100.
  • Text Search: Use $search (Atlas Search) in chunks collection.
  • Hybrid Search: Currently implemented via manual Reciprocal Rank Fusion (RRF) in RAGService by merging results from semantic and text search.
  • Joins: Always use $lookup to fetch document metadata (title, source) when returning search results.

🛠️ Code Standards

  • Async First: Use motor (AsyncIOMotorClient) for all database operations.
  • List Embeddings: Embeddings MUST be stored and queried as Python lists of floats (e.g., 1536 dims for OpenAI).
  • ID Handling: Convert string IDs to bson.ObjectId where necessary.
  • Graceful Failure: Handle missing search indexes (code 291) with clear error messages.

スコア

総合スコア

50/100

リポジトリの品質指標に基づく評価

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

0/10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

レビュー

💬

レビュー機能は近日公開予定です