Is this you? As a journalist, you can create a free Muck Rack account to customize your profile, list your contact preferences, and upload a portfolio of your best work.
Claim your profile
Articles by Runnable Passthrough
LangChain学习笔记07--底层代码解析之RunnableWithMessageHistory-CSDN博客
原创 于 2025-08-11 10:30:00 发布 · 336 阅读 · 8 · 1 · CC 4.0 BY-SA版权 版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。 文章标签: #前端 #服务器 #langchain RunnableWithMessageHistory 是 LangChain 中用于管理对话历史的核心组件, 它允许你将对话历史无缝集成到 Runnable 链中。源码描述如下: """Runnable that manages chat message history for another Runnable. A chat message history is a sequence of messages that represent a conversation.
Zero to AI: Deploying Language Models Without the Infrastructure Headache
Introduction You've finally found it! The perfect language model on Hugging Face that seems exactly what you need for your project. The model size is reasonable, the generation quality amazing, the community feedback is great and it handles your specific use case beautifully! Excited to start building but then reality hits. Where do you actually deploy this model?
Build a RAG application to learn Angular using langchhtain.js, nestjs, Htmx, and Gemma 2
In this blog post, I describe how to use Langchain, NestJS, and Gemma 2 to build an RAG application about an Angular book in PDF format. Then, the HTMX and Handlebar template engine render the responses in a list. The application uses Langchain and its built-in PDF loader to load the PDF book and split the document into chunks. Then, Langchain uses the Gemini embedding text model to represent the documents into vectors and persist the vectors into a vector database.
Efficient LLM Workflows with LangChain Expression Language
The advancements in LLM world is growing fast and the next chapter in AI application development is here. LangChain Expression Language (LCEL) isn’t just an upgrade—it’s a game-changer. Initially known for proof-of-concepts, LangChain has rapidly evolved into a powerhouse Python library for LLM interactions. With the introduction of LCEL in August 2023, it’s now easier than ever to turn ideas into robust, scalable applications.
Langchain教程 | langchain+OpenAI+PostgreSQL(PGVector) 实现全链路教程,简单易懂入门
前提: 在阅读本文前,建议要有一定的langchain基础,以及langchain中document loader和text spliter有相关的认知,不然会比较难理解文本内容。 如果是没有任何基础的同学建议看下这个专栏:人工智能 | 大模型 | 实战与教程 本文主要展示如何结合langchain使用Postgres矢量数据库,其他相关的基础内容,可以看专栏了解,都已经拆分好了,一步步食用即可,推荐线路:langchain基础、document loader加载器、text spliter文档拆分器等按顺序学习。 PGVector是一个开源向量相似性搜索Postgres 它支持:- 精确和近似最近邻搜索- L2距离,内积和余弦距离 基础库准备: # Pip install necessary package %pip install --upgrade --quiet pgvector %pip install --upgrade --quiet psycopg2-binary %pip install --upgrade --quiet tiktoken %pip...
【LangChain系列】8. 重要组件:如何用LCEL中的RunnableParallel和Passthrough?
公众号内文章一览 经过几次的LangChain实战,发现其中最常用的两个封装类:RunnableParallel 和 RunnablePassthrough。这是LangChain独有的表达式语言(LCEL)中最主要的组件。本文我们来深入学习下这两个组件的原理与使用。 0. 前置推荐阅读 LangChain实战系列: · 【AI大模型应用开发】【LangChain系列】实战案例1:用LangChain写Python代码并执行来生成答案 · 【AI大模型应用开发】【LangChain系列】实战案例2:通过URL加载网页内容 - LangChain对爬虫功能的封装 · 【AI大模型应用开发】【LangChain系列】实战案例3:深入源码,WebResearchRetriever与RAG联合的力量 · 【AI大模型应用开发】【LangChain系列】实战案例4:再战RAG问答,提取在线网页数据,并返回生成答案的来源 LangChain表达式语言(LCEL)介绍: · 【AI大模型应用开发】【LangChain系列】4. 从Chain到LCEL:探索和实战LangChain的巧妙设计 1.
使用langchain搭建本地知识库系统(新)_langchain 知识库-CSDN博客
使用langchain搭建自己的本地知识库系统(新) 前些时候字节上了自己的扣子,用来构建我们自己的 agent [AI 实战:手把手教你使用「扣子/coze」来搭建个人blog知识库 受到启发,想在本地或者自己的服务器上面搭建一个知识库,所以就有了本文。 RAG 是retrieval-augmented-generation的缩写,翻译为中文的意思就检索增强,以基于最新,最准确的数据建立LLM 的语料知识库。 我们知道 LLM 的知识库是通过现有的网络公开的数据作为数据源来训练的,现在公开的很多模型他们基于的训练数据会比我们现在网络上公开的数据早很多,那自然就会产生一种问题,网络上最新的数据和知识 LLM 是不知道。还有一种情况就是很多企业他们对自己的数据的安全做的很好,也就是私有化数据(这些数据是有价值的,也是企业的立足之本)。这些数据网络上肯定是不存在,那自然 LLM 也是不知道的。 我们在提问LLM 对于一些不知道的知识时候,LLM 很多时候是不知道如何回答问题的。甚至会对我们的问题进行胡诌随机回答,也就是瞎说。 那如何让 LLM 知道这些最新/私有的数据的知识呢❓...
LLM RAG系列 - charlieroro - 博客园
本文介绍了RAG以及RAG pipeline的整个流程,包括请求转换、路由和请求构造、索引和检索、生成和评估等,其中引用了大量有价值的论文。 参考Advanced RAG Series: Generation and Evaluation中的5篇文章,并丰富了相关内容。 请求转换 请求转换是为了提高查询结果的准确性而对用户请求进行重构、优化的过程。 为什么需要RAG? :LLMs并不了解你的数据,且无法获取与此相关的最新数据,它们是事先使用来自互联网的公共信息训练好的,因此并不是专有数据库的专家也不会针对该数据库进行更新。 问题2:上下文窗口-每个LLM都有一个tokens的最大限制(通常平均为100tokens,约75个单词),用于限制用户每次提交的tokens数据,这会导致丢失上下文窗口之外的上下文,进而影响准确性、产生检索问题和幻觉等。 问题3:中间遗失-即使LLMs可以一次性接收所有的数据,但它存在根据信息在文档中的位置来检索信息的问题。研究表明如果相关信息位于文档中间(而非开头或结尾时)时就会导致严重的性能降级。 因此,我们需要RAG。 请求分解...
Elasticsearch:BM25 及 使用 Elasticsearch 和 LangChain 的自查询检索器
本工作簿演示了 Elasticsearch 的自查询检索器将非结构化查询转换为结构化查询的示例,我们将其用于 BM25 示例。 在这个例子中: 我们将摄取 LangChain 之外的电影样本数据集 自定义 ElasticsearchStore 中的检索策略以仅使用 BM25 使用自查询检索将问题转换为结构化查询 使用文档和 RAG 策略来回答问题 安装 如果你还没有安装好自己的 Elasticsearch 及 Kibana,请参考文章: 如果你还没有安装好自己的 Elasticsearch 及 Kibana,那么请参考一下的文章来进行安装: 如何在 Linux,MacOS 及 Windows 上进行安装 Elasticsearch Kibana:如何在 Linux,MacOS 及 Windows 上安装 Elastic 栈中的 Kibana 在安装的时候,请选择 Elastic Stack 8.x 进行安装。在安装的时候,我们可以看到如下的安装信息: 我们需要安装 Python 版本 3.6 及以上版本。我们还需要安装如下的 Python 安装包: pip3 install...
Elasticsearch:带有自查询检索器的聊天机器人示例-CSDN博客
本工作簿演示了 Elasticsearch 的自查询检索器 (self-query retriever) 将问题转换为结构化查询并将结构化查询应用于 Elasticsearch 索引的示例。 在开始之前,我们首先使用 langchain 将文档分割成块,然后使用 ElasticsearchStore.from_documents 创建一个向量存储并将数据索引到 elasticsearch。 然后,我们将看到一些示例查询,展示了由 elasticsearch 驱动的自查询检索器的全部功能。 安装 如果你还没有安装好自己的 Elasticsearch 及 Kibana,请参考文章: 如果你还没有安装好自己的 Elasticsearch 及 Kibana,那么请参考一下的文章来进行安装: 如何在 Linux,MacOS 及 Windows 上进行安装 Elasticsearch Kibana:如何在 Linux,MacOS 及 Windows 上安装 Elastic 栈中的 Kibana 在安装的时候,请选择 Elastic Stack 8.x...
LangChain: una guía completa y un tutorial
En su centro, LangChain es un marco innovador diseñado para crear aplicaciones que aprovechan las capacidades de los modelos de lenguaje. Es un conjunto de herramientas diseñado para que los desarrolladores creen aplicaciones que tengan en cuenta el contexto y sean capaces de realizar un razonamiento sofisticado.
LangChain: A Complete Guide & Tutorial
V jedru, LangChain is an innovative framework tailored for crafting applications that leverage the capabilities of language models. It’s a toolkit designed for developers to create applications that are context-aware and capable of sophisticated reasoning. This means LangChain applications can understand the context, such as prompt instructions or content grounding responses and use language models for complex reasoning tasks, like deciding how to respond or what actions to take.
LangChain: A Complete Guide & Tutorial
At its core, LangChain is an innovative framework tailored for crafting applications that leverage the capabilities of language models. It’s a toolkit designed for developers to create applications that are context-aware and capable of sophisticated reasoning. This means LangChain applications can understand the context, such as prompt instructions or content grounding responses and use language models for complex reasoning tasks, like deciding how to respond or what actions to take.
Bridging Cloud and Conversational AI: LangChain and Oracle Cloud Infrastructure (OCI) Data Science Platform
Welcome to the cutting-edge world, where artificial intelligence (AI) isn’t just a buzzword but a tangible reality shaping the future of technology. Today, we’re venturing into an exciting journey that marries the versatility of LangChain, a powerful library for building language model applications, with the robustness of Oracle Cloud Infrastructure (OCI) Data Science, a fully managed and serverless platform for data science teams to build, train, and manage machine learning (ML) models.
Show More
loading
Actions
Is this you?
As a journalist, you can create a free Muck Rack account to customize your profile, list your contact preferences, and upload a portfolio of your best work.Get in touch with Runnable
Contact Runnable, search articles and posts on X, monitor coverage, and track replies from one place.
Learn more about Muck Rack