[{"data":1,"prerenderedAt":103},["ShallowReactive",2],{"glossary-en-embedding":3},{"id":4,"title":5,"body":6,"description":91,"extension":92,"meta":93,"navigation":98,"path":99,"seo":100,"stem":101,"__hash__":102},"en_glossary\u002Fen\u002Fglossary\u002Fembedding.md","What are Embeddings and Vector Search?",{"type":7,"value":8,"toc":81},"minimark",[9,14,23,28,35,39,48,52,74],[10,11,13],"h2",{"id":12},"what-is-an-embedding","What is an Embedding?",[15,16,17,18,22],"p",{},"An ",[19,20,21],"strong",{},"embedding"," turns a piece of text, an image or a signal into a fixed-length sequence of numbers (a vector). The conversion preserves meaning: two sentences with similar meaning end up with vectors close to each other.",[24,25,27],"h3",{"id":26},"vector-search","Vector Search",[15,29,30,31,34],{},"The question is also turned into an embedding, and the document chunks with the closest vectors are retrieved. Closeness is usually measured with ",[19,32,33],{},"cosine similarity",". Unlike keyword search, a question about \"leaves turning yellow\" can also find a paragraph titled \"symptoms of chlorosis\".",[24,36,38],{"id":37},"its-role-in-rag","Its Role in RAG",[15,40,41,42,47],{},"In ",[43,44,46],"a",{"href":45},"\u002Fen\u002Fglossary\u002Frag","RAG"," systems, embeddings are the step that chooses the context given to the language model. If the wrong chunks are chosen, even the best language model answers wrongly.",[24,49,51],{"id":50},"practical-notes","Practical Notes",[53,54,55,62,68],"ul",{},[56,57,58,61],"li",{},[19,59,60],{},"Multilingual models",": a multilingual embedding model such as bge-m3 can keep Turkish and English sources in one index.",[56,63,64,67],{},[19,65,66],{},"Chunk size",": chunks that are too small lose context; ones that are too large carry irrelevant text.",[56,69,70,73],{},[19,71,72],{},"Corpus selection",": adding unrelated documents lowers accuracy; more documents is not always better.",[15,75,76,77],{},"Worked example: ",[43,78,80],{"href":79},"\u002Fen\u002Fblog\u002Flocal-llm-rag-agronomy-assistant","A Local LLM and RAG Agronomy Assistant",{"title":82,"searchDepth":83,"depth":83,"links":84},"",2,[85],{"id":12,"depth":83,"text":13,"children":86},[87,89,90],{"id":26,"depth":88,"text":27},3,{"id":37,"depth":88,"text":38},{"id":50,"depth":88,"text":51},"Turning text, images or signals into number sequences that preserve meaning, and finding similar content in RAG systems.","md",{"tags":94},[95,27,46,96,97],"Embedding","LLM","Industrial AI",true,"\u002Fen\u002Fglossary\u002Fembedding",{"title":5,"description":91},"en\u002Fglossary\u002Fembedding","jcwpNmfUXGqxyuwdg6RGcE86vtddMLlLz7Z052ZzYDg",1793875325077]