
{"id":3762,"date":"2024-12-09T00:38:04","date_gmt":"2024-12-08T16:38:04","guid":{"rendered":"https:\/\/infernews.com\/?p=3762"},"modified":"2025-03-17T01:25:47","modified_gmt":"2025-03-16T17:25:47","slug":"prefixing-%e6%8f%90%e5%8d%87-rag-%e6%ba%96%e7%a2%ba%e5%ba%a6","status":"publish","type":"post","link":"https:\/\/infernews.com\/blog\/prefixing-%e6%8f%90%e5%8d%87-rag-%e6%ba%96%e7%a2%ba%e5%ba%a6\/","title":{"rendered":"Prefixing &#8211; \u7c21\u6613\u63d0\u5347 RAG \u6e96\u78ba\u5ea6"},"content":{"rendered":"\n<p>\u5728\u5411\u91cf\u6578\u64da\u5eab\u61c9\u7528\u4e2d\uff0c\u300cprefixes\u300d\u6307\u7684\u662f\u5728\u6587\u672c\u584a\u8f38\u5165\u5d4c\u5165\u6a21\u578b\u4e4b\u524d\uff0c\u5728\u6587\u672c\u584a\u524d\u63d2\u5165\u4e00\u6bb5\u63cf\u8ff0\u5176\u76ee\u7684\u7684\u6587\u672c\u3002\u300cprefixes\u300d\u662f\u4e00\u500b\u7c21\u55ae\u4f46\u6709\u6548\u7684\u6280\u8853\uff0c\u53ef\u4ee5\u986f\u8457\u63d0\u9ad8\u5411\u91cf\u6578\u64da\u5eab\u61c9\u7528\u7684\u6e96\u78ba\u6027\u9054 200%\u3002<\/p>\n\n\n\n<p>\u5728 Olama \u5b98\u65b9\u5eab\u4e2d\u7684\u4e94\u500b\u5d4c\u5165\u6a21\u578b\u4e2d\uff0c\u53ea\u6709\u4e09\u500b\u652f\u6301\u300cprefixes\u300d\uff0cNomic\u3001Snowflake Arctic \u548c Mixed Bread \u7b49\u3002<\/p>\n\n\n\n<p>\u5118\u7ba1\u50b3\u7d71\u7684 LLM \u53ef\u80fd\u66f4\u5927\uff0c\u4f46\u5b83\u5011\u4e0d\u9069\u5408\u751f\u6210\u5d4c\u5165\u3002\u5d4c\u5165\u6a21\u578b\u5c08\u70ba\u751f\u6210\u5d4c\u5165\u800c\u8a2d\u8a08\uff0c\u5b83\u5011\u7684\u901f\u5ea6\u8981\u5feb\u5f97\u591a\uff0c\u4e26\u4e14\u53ef\u4ee5\u7522\u751f\u66f4\u597d\u7684\u7d50\u679c\u3002Prefixing\u300d\u5605\u7c21\u55ae\u6280\u5de7\u5d4c\u5165\u6280\u5de7\u3002<\/p>\n\n\n<figure class=\"wp-block-embed-youtube wp-block-embed is-type-video is-provider-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"lyte-wrapper\" title=\"Don&rsquo;t Embed Wrong!\" style=\"width:853px;max-width:100%;margin:5px auto;\"><div class=\"lyMe\" id=\"WYL_76EIC_RaDNw\" itemprop=\"video\" itemscope itemtype=\"https:\/\/schema.org\/VideoObject\"><div><meta itemprop=\"thumbnailUrl\" content=\"https:\/\/infernews.com\/blog\/wp-content\/plugins\/wp-youtube-lyte\/lyteCache.php?origThumbUrl=https%3A%2F%2Fi.ytimg.com%2Fvi%2F76EIC_RaDNw%2Fhqdefault.jpg\" \/><meta itemprop=\"embedURL\" content=\"https:\/\/www.youtube.com\/embed\/76EIC_RaDNw\" \/><meta itemprop=\"duration\" content=\"PT11M42S\" \/><meta itemprop=\"uploadDate\" content=\"2024-10-31T22:43:21Z\" \/><\/div><meta itemprop=\"accessibilityFeature\" content=\"captions\" \/><div id=\"lyte_76EIC_RaDNw\" data-src=\"https:\/\/infernews.com\/blog\/wp-content\/plugins\/wp-youtube-lyte\/lyteCache.php?origThumbUrl=https%3A%2F%2Fi.ytimg.com%2Fvi%2F76EIC_RaDNw%2Fhqdefault.jpg\" class=\"pL\"><div class=\"tC\"><div class=\"tT\" itemprop=\"name\">Don\u2019t Embed Wrong!<\/div><\/div><div class=\"play\"><\/div><div class=\"ctrl\"><div class=\"Lctrl\"><\/div><div class=\"Rctrl\"><\/div><\/div><\/div><noscript><a href=\"https:\/\/youtu.be\/76EIC_RaDNw\" rel=\"nofollow\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/infernews.com\/blog\/wp-content\/plugins\/wp-youtube-lyte\/lyteCache.php?origThumbUrl=https%3A%2F%2Fi.ytimg.com%2Fvi%2F76EIC_RaDNw%2F0.jpg\" alt=\"Don&rsquo;t Embed Wrong!\" width=\"853\" height=\"460\" \/><br \/>Watch this video on YouTube<\/a><\/noscript><meta itemprop=\"description\" content=\"As a founding member of the Ollama team, I discovered I&#039;ve been doing embeddings wrong all along - and you probably are too. In this eye-opening video, I reveal how a simple technique called &quot;prefixing&quot; can dramatically improve your RAG application&#039;s accuracy by up to 2x. Learn about: \u2022 What prefixes are and how they work \u2022 The 3 embedding models that support prefixes \u2022 Detailed performance comparisons across different models \u2022 Real-world testing results and implications \u2022 Why traditional LLMs shouldn&#039;t be used for embeddings I&#039;ve conducted extensive testing comparing 5 different embedding models, with and without prefixes, across multiple scenarios. The results will surprise you - they certainly surprised me! \ud83d\udd17 Full source code and test results available in the GitHub repo: https:\/\/github.com\/technovangelist\/videoprojects\/tree\/main\/2024-10-29-embeddings Whether you&#039;re building RAG applications or working with vector databases, this video will transform how you approach embeddings. Don&#039;t miss this crucial technique that even experienced AI developers often overlook! #AI #MachineLearning #Ollama #RAG #Embeddings #Programming #TechTutorial The shirt: VATPAVE Mens Casual Hawaiian... https:\/\/geni.us\/mhawaii1 &#36;27 on Amazon My Links \ud83d\udd17 \ud83d\udc49\ud83c\udffb Subscribe (free): https:\/\/www.youtube.com\/technovangelist \ud83d\udc49\ud83c\udffb Join and Support: https:\/\/www.youtube.com\/channel\/UCHaF9kM2wn8C3CLRwLkC2GQ\/join \ud83d\udc49\ud83c\udffb Newsletter: https:\/\/technovangelist.substack.com\/subscribe \ud83d\udc49\ud83c\udffb Twitter: https:\/\/www.twitter.com\/technovangelist \ud83d\udc49\ud83c\udffb Discord: https:\/\/discord.gg\/uS4gJMCRH2 \ud83d\udc49\ud83c\udffb Patreon: https:\/\/patreon.com\/technovangelist \ud83d\udc49\ud83c\udffb Instagram: https:\/\/www.instagram.com\/technovangelist\/ \ud83d\udc49\ud83c\udffb Threads: https:\/\/www.threads.net\/@technovangelist?xmt=AQGzoMzVWwEq8qrkEGV8xEpbZ1FIcTl8Dhx9VpF1bkSBQp4 \ud83d\udc49\ud83c\udffb LinkedIn: https:\/\/www.linkedin.com\/in\/technovangelist\/ \ud83d\udc49\ud83c\udffb All Source Code: https:\/\/github.com\/technovangelist\/videoprojects Want to sponsor this channel? Let me know what your plans are here: https:\/\/www.technovangelist.com\/sponsor\"><\/div><\/div><div class=\"lL\" style=\"max-width:100%;width:853px;margin:5px auto;\"><\/div><figcaption><\/figcaption><\/figure>","protected":false},"excerpt":{"rendered":"<p>\u5728\u5411\u91cf\u6578\u64da\u5eab\u61c9\u7528\u4e2d\uff0c\u300cprefixes\u300d\u6307\u7684\u662f\u5728\u6587\u672c\u584a\u8f38\u5165\u5d4c\u5165\u6a21\u578b\u4e4b\u524d\uff0c\u5728\u6587\u672c\u584a\u524d\u63d2\u5165\u4e00\u6bb5\u63cf\u8ff0\u5176\u76ee\u7684\u7684\u6587\u672c\u3002\u300cprefixes\u300d\u662f\u4e00\u500b\u7c21\u55ae\u4f46\u6709\u6548\u7684\u6280\u8853\uff0c\u53ef\u4ee5\u986f\u8457\u63d0\u9ad8\u5411\u91cf\u6578\u64da\u5eab\u61c9\u7528\u7684\u6e96\u78ba\u6027\u9054 200%\u3002 \u5728 Olama \u5b98\u65b9\u5eab\u4e2d\u7684\u4e94\u500b\u5d4c\u5165\u6a21\u578b\u4e2d\uff0c\u53ea\u6709\u4e09\u500b\u652f\u6301\u300cprefixes\u300d\uff0cNomic\u3001Snowflake Arctic \u548c Mixed Bread \u7b49\u3002 \u5118\u7ba1\u50b3\u7d71\u7684 LLM \u53ef\u80fd\u66f4\u5927\uff0c\u4f46\u5b83\u5011\u4e0d\u9069\u5408\u751f\u6210\u5d4c\u5165\u3002\u5d4c\u5165\u6a21\u578b\u5c08\u70ba\u751f\u6210\u5d4c\u5165\u800c\u8a2d\u8a08\uff0c\u5b83\u5011\u7684\u901f\u5ea6\u8981\u5feb\u5f97\u591a\uff0c\u4e26\u4e14\u53ef\u4ee5\u7522\u751f\u66f4\u597d\u7684\u7d50\u679c\u3002Prefixing\u300d\u5605\u7c21\u55ae\u6280\u5de7\u5d4c\u5165\u6280\u5de7\u3002<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"googlesitekit_rrm_CAowvqSiDA:productID":"","footnotes":""},"categories":[38,109,27,76,127],"tags":[],"class_list":["post-3762","post","type-post","status-publish","format-standard","hentry","category-38","category-rag","category-paper","category-76","category-127"],"_links":{"self":[{"href":"https:\/\/infernews.com\/blog\/wp-json\/wp\/v2\/posts\/3762","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/infernews.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/infernews.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/infernews.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/infernews.com\/blog\/wp-json\/wp\/v2\/comments?post=3762"}],"version-history":[{"count":0,"href":"https:\/\/infernews.com\/blog\/wp-json\/wp\/v2\/posts\/3762\/revisions"}],"wp:attachment":[{"href":"https:\/\/infernews.com\/blog\/wp-json\/wp\/v2\/media?parent=3762"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/infernews.com\/blog\/wp-json\/wp\/v2\/categories?post=3762"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/infernews.com\/blog\/wp-json\/wp\/v2\/tags?post=3762"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}