-
Notifications
You must be signed in to change notification settings - Fork 56
/
LangChain进阶.km
1 lines (1 loc) · 4.42 KB
/
LangChain进阶.km
1
{"root":{"data":{"id":"811b96bc6311","created":1706514699,"text":"LangChain进阶"},"children":[{"data":{"id":"cyr0zdcntxs0","created":1706514723708,"text":"多查询检索器","expandState":"collapse"},"children":[{"data":{"id":"cyr0zwbrt480","created":1706514765014,"text":"自动化提示调优:MultiQueryRetriever 通过使用大\n型语言模型(LLM)自动化。它根据给定的用户输入查\n询,生成多个从不同视角出发的查询。\n检索并合并结果:对于每个生成的查询,系统检索一组\n相关文档,并对所有查询的结果进行合并,取它们的独\n特并集。这样做可以获得一个更大、可能更相关的文档\n集合。\n克服限制,丰富结果:通过从同一个问题的多个视角生\n成查询,MultiQueryRetriever 可能能够克服基于距\n离的检索的某些限制,并获得更丰富的结果集。","font-weight":"bold","expandState":"expand"},"children":[{"data":{"id":"cyr11i6lqy00","created":1706514890954,"text":"分支主题","image":"https://kityminder-img.gz.bcebos.com/819e8f7f0c6ffceb24282c30e7a25b960ba3cd3f","imageTitle":"","imageSize":{"width":200,"height":88}},"children":[]}]}]},{"data":{"id":"cyr0zf1eoy80","created":1706514727382,"text":"上下文压缩","expandState":"collapse"},"children":[{"data":{"id":"cyr17whs4aw0","created":1706515392290,"text":"上下文压缩:不要立即按原样返回检索到的文档,而是\n可以使用给定查询的上下文对其进行压缩,以便仅返回\n相关信息。这里的“压缩”既指对单个文档内容进行压\n缩,也指整体上滤除文档。","layout_right_offset":{"x":6.666666401757141,"y":0},"font-weight":"bold"},"children":[{"data":{"id":"cyr1b8y1a3c0","created":1706515654487,"text":"分支主题","image":"https://kityminder-img.gz.bcebos.com/86c778697174348c615d74601469a3c17e939569","imageTitle":"","imageSize":{"width":200,"height":69}},"children":[]}]}]},{"data":{"id":"cyr0zjladu00","created":1706514737291,"text":"集成检索器","expandState":"collapse"},"children":[{"data":{"id":"cyr0zkgm6cg0","created":1706514739185,"text":" 采用多个检索器(retrievers)作为输入,并结合它们\n的 get_relevant_documents() 方法所返回的结果。\n然后,进行重排。最常见的模式是将稀疏检索器(如\n BM25)与密集检索器(如基于嵌入的相似性)结合\n起来,因为它们的优势互补。这种结合也被称为“混\n合搜索”(hybrid search)","font-weight":"bold"},"children":[{"data":{"id":"cyr1iu2p89s0","created":1706516249031,"text":"分支主题","image":"https://kityminder-img.gz.bcebos.com/7bda24dbc4f27799f897c416c90f1729c91a6e09","imageTitle":"","imageSize":{"width":200,"height":85}},"children":[]}]}]},{"data":{"id":"cyr0zltbu6w0","created":1706514742130,"text":"长上下文重排","expandState":"collapse"},"children":[{"data":{"id":"cyr1jfq6rso0","created":1706516296163,"text":"当模型需要处理超过 10 份+检索到的文档时,通常会\n出现性能下降的问题。由于文档tokens过多,即使文\n档中包含了相关信息,模型也可能因为信息量过大而无\n法有效地利用这些信息。为了避免这种性能下降,可以\n在检索后对文档进行重新排序。这样做的目的是将最\n相关的信息放在模型更容易“看到”或处理的位置。","font-weight":"bold"},"children":[{"data":{"id":"cyr259fdy600","created":1706518006461,"text":"分支主题","image":"https://kityminder-img.gz.bcebos.com/da8b4c7eddcb3ae7793b7f908602c5a210b36062","imageTitle":"","imageSize":{"width":200,"height":83}},"children":[]}]}]},{"data":{"id":"cyr0zmuzqa80","created":1706514744408,"text":"父文档检索","expandState":"collapse"},"children":[{"data":{"id":"cyr1o2yi8tc0","created":1706516660189,"text":"文档分割的冲突需求\n需求小型文档:可以更准确地反映它们的含义。如果文\n档太长,其嵌入可能会失去意义。\n需求足够长的文档:你希望文档足够长,以保留完整的\n每个块的上下文。\n在检索过程中,它首先获取这些小块,然后查找这些块\n的父ID,并返回那些较大的文档。","font-weight":"bold"},"children":[{"data":{"id":"cyr25kzvzmo0","created":1706518031645,"text":"分支主题","image":"https://kityminder-img.gz.bcebos.com/d44f94b7a352432b7fdaf31ec17802157775d09d","imageTitle":"","imageSize":{"width":200,"height":106}},"children":[]}]}]}]},"template":"right","theme":"fresh-blue","version":"1.4.43"}