{"id":753,"date":"2024-06-13T12:01:04","date_gmt":"2024-06-13T01:01:04","guid":{"rendered":"https:\/\/spectdata.com\/?p=753"},"modified":"2024-06-13T12:01:20","modified_gmt":"2024-06-13T01:01:20","slug":"practical-reranker-tips-for-rag-applications","status":"publish","type":"post","link":"https:\/\/spectdata.com\/index.php\/2024\/06\/13\/practical-reranker-tips-for-rag-applications\/","title":{"rendered":"Practical Reranker Tips for RAG Applications"},"content":{"rendered":"\n<p>When building RAG applications, it&#8217;s crucial to consider the limitations of the initial embedding. The retrieved documents are pulled using cosine-similarity with the vector created from the question, which can restrict the context based on the quality of the vector and the archived vectors. However, there&#8217;s a better way. In my experience, widening the cosine similarity filter, bringing in more context, and using a reranker (such as the one from Cohere), can generate better responses and make us less limited by the initial embedding. A model, after all, should be more powerful than a scaled dot-product. <\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"886\" src=\"https:\/\/spectdata.com\/wp-content\/uploads\/2024\/06\/she.jpg\" alt=\"\" class=\"wp-image-754\" srcset=\"https:\/\/spectdata.com\/wp-content\/uploads\/2024\/06\/she.jpg 800w, https:\/\/spectdata.com\/wp-content\/uploads\/2024\/06\/she-271x300.jpg 271w, https:\/\/spectdata.com\/wp-content\/uploads\/2024\/06\/she-768x851.jpg 768w, https:\/\/spectdata.com\/wp-content\/uploads\/2024\/06\/she-648x718.jpg 648w, https:\/\/spectdata.com\/wp-content\/uploads\/2024\/06\/she-173x192.jpg 173w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" \/><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>When building RAG applications, it&#8217;s crucial to consider the limitations of the initial embedding. The retrieved documents are pulled using cosine-similarity with the vector created from the question, which can restrict the context based on the quality of the vector and the archived vectors. However, there&#8217;s a better way. In my experience, widening the cosine &hellip; <a href=\"https:\/\/spectdata.com\/index.php\/2024\/06\/13\/practical-reranker-tips-for-rag-applications\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Practical Reranker Tips for RAG Applications<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[1],"tags":[],"class_list":["post-753","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p9PSm6-c9","_links":{"self":[{"href":"https:\/\/spectdata.com\/index.php\/wp-json\/wp\/v2\/posts\/753","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/spectdata.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/spectdata.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/spectdata.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/spectdata.com\/index.php\/wp-json\/wp\/v2\/comments?post=753"}],"version-history":[{"count":1,"href":"https:\/\/spectdata.com\/index.php\/wp-json\/wp\/v2\/posts\/753\/revisions"}],"predecessor-version":[{"id":755,"href":"https:\/\/spectdata.com\/index.php\/wp-json\/wp\/v2\/posts\/753\/revisions\/755"}],"wp:attachment":[{"href":"https:\/\/spectdata.com\/index.php\/wp-json\/wp\/v2\/media?parent=753"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/spectdata.com\/index.php\/wp-json\/wp\/v2\/categories?post=753"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/spectdata.com\/index.php\/wp-json\/wp\/v2\/tags?post=753"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}