Skip to content

Commit

Permalink
update rag_notebook
Browse files Browse the repository at this point in the history
  • Loading branch information
qingzhong1 committed Jan 2, 2024
1 parent 1c4a582 commit 5b9349d
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@
"from erniebot_agent.extensions.langchain.embeddings import ErnieEmbeddings\n",
"from sklearn.metrics.pairwise import cosine_similarity\n",
"from erniebot_agent.tools import RemoteToolkit\n",
"\n",
"os.environ[\"EB_AGENT_ACCESS_TOKEN\"] = \"your access token\""
]
},
Expand Down Expand Up @@ -148,7 +147,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## 3.2 构建FaissSearch\n",
"## 3.3 构建FaissSearch\n",
"这段代码定义了一个名为 FaissSearch 的类,用于在一个数据库中执行相似性搜索。这个类的主要功能是使用 FAISS (Facebook AI Similarity Search) 库或类似技术,对文档数据库进行高效的相似性搜索。它首先找到与查询最相似的文档,然后计算每个文档与查询的余弦相似度,最后返回包含内容、相似度得分和文档标题的搜索结果。"
]
},
Expand Down

0 comments on commit 5b9349d

Please sign in to comment.