Files
msty-docs/content/1.features/knowledge-stack/2.embeddings.md
T
2025-02-07 19:24:52 -05:00

2.5 KiB

title, description, navTruncate
title description navTruncate
Understanding Embeddings Learn how Msty makes your documents searchable false

Embeddings are what make Knowledge Stacks "smarter" than a regular search. They help Msty understand the meaning behind your words, not just match exact phrases.

What Makes it Special?

Think about how you'd search for a recipe:

  • Regular search looks for exact words like "chocolate cake"
  • Msty understands that "dessert with cocoa" means the same thing
  • It can even find recipes that never use the exact words you typed

::image-plain{src="/how-to/create-knowledge-stack/search-settings-interface.webp" alt="Search settings showing similarity controls"} ::

How Embeddings Work

Imagine translating colors into numbers:

  • Red = [255, 0, 0]
  • Blue = [0, 0, 255]
  • Purple = [128, 0, 128]

Embeddings do the same thing with words and ideas:

  • "happy" and "joyful" get similar numbers
  • "bank" (money) and "bank" (river) get different numbers
  • "I'm freezing" and "it's cold" get similar numbers

Embedding Models

::image-plain{src="/how-to/create-knowledge-stack/chunk-settings-interface.webp" alt="Embedding model selection"} ::

1. Local Embeddings

  • Completely private - nothing leaves your computer
  • Free to use forever
  • Works offline
  • ⚠️ Slightly less accurate
  • ⚠️ Uses more CPU power

2. Remote Embeddings (via OpenAI)

  • More accurate understanding
  • Less CPU usage
  • ⚠️ Requires API key
  • ⚠️ Small cost per use
  • ⚠️ Sends text to external service

::alert{type="tip" icon="tabler:bulb"} Start with local embeddings - they work great for most uses! Switch to remote only if you need extra accuracy. ::

Similarity Settings

Control how strictly Msty matches content:

  1. Similarity Threshold

    • Low: Broader matches, more results
    • Medium: Balanced relevance
    • High: Stricter matching
    • Highest: Only very close matches
  2. Number of Chunks

    • Default: 15 chunks
    • Adjust based on needs:
      • More chunks → broader context
      • Fewer chunks → focused answers

::alert{type="info" icon="tabler:info-circle"} These settings can be adjusted per chat session in the Knowledge Stack selector! ::

Getting Started

  1. Create a new Knowledge Stack
  2. Click the gear icon
  3. Choose your embedding model
  4. Adjust similarity settings as needed

::alert{type="tip" icon="tabler:bulb"} Want to fine-tune your results? Check out our guide on Advanced Knowledge Stack Settings. ::