<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>shwld</author_name>
  <author_url>https://blog.hatena.ne.jp/shwld/</author_url>
  <blog_title>もふもふ技術部</blog_title>
  <blog_url>https://www.mof-mof.co.jp/tech-blog/</blog_url>
  <categories>
    <anon>Prisma</anon>
    <anon>AI</anon>
  </categories>
  <description>こんにちは エンジニアのshwldです。 「LIKE検索で引っかからないような検索ワードでも関連性が高いなら検索結果に出したい」 このようなニーズは多くあると思いますが、実装するのは結構大変です。 mofmofが提供しているMy-opeでは、チャットボットに質問すると質問と関連性の高いドキュメントを提示してくれますが、内部ではPythonを用いたコサイン類似度検索を行っています。 Elasticsearchでも行なえますが、学習も導入も管理もコストが掛かります。 今回はコサイン類似度検索をLangChain等を使うことで手軽に実装する方法について書きます。 コサイン類似度検索とは? 2つのベク…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fwww.mof-mof.co.jp%2Ftech-blog%2Fpgvector-similarity-search&quot; title=&quot;LangChainとpgvector(Postgres)を用いて関連性の高いドキュメントを手軽に検索する - もふもふ技術部&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url>https://cdn-ak.f.st-hatena.com/images/fotolife/m/mofmof-inc/20240128/20240128201821.png</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2023-09-15 00:00:00</published>
  <title>LangChainとpgvector(Postgres)を用いて関連性の高いドキュメントを手軽に検索する</title>
  <type>rich</type>
  <url>https://www.mof-mof.co.jp/tech-blog/pgvector-similarity-search</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
