【全网最丝滑的LangChain教程】一、LangChain介绍

【适合初学者的LangChain教程】一、LangChain介绍

1 LangChain是什么

1.1 官方介绍

LangChain is a framework for developing applications powered by language models. It enables applications that:

  • Are context-aware : connect a language model to sources of context (prompt instructions, few shot examples, content to ground its response in, etc.)
  • Reason : rely on a language model to reason (about how to answer based on provided context, what actions to take, etc.)

This framework consists of several parts.

  • LangChain Libraries : The Python and JavaScript libraries. Contains interfaces and integrations for a myriad of components, a basic run time for combining these components into chains and agents, and off-the-shelf implementations of chains and agents.
  • LangChain Templates : A collection of easily deployable reference architectures for a wide variety of tasks.
  • LangServe : A library for deploying LangChain chains as a REST API.
  • LangSmith : A developer platform that lets you debug, test, evaluate, and monitor chains built on any LLM framework and seamlessly integrates with LangChain.
  • LangGraph : LangGraph is a library for building stateful, multi-actor applications with LLMs, built on top of (and intended to be used with) LangChain. It extends the LangChain Expression Language with the ability to coordinate multiple chains (or actors) across multiple steps of computation in a cyclic manner.

The LangChain libraries themselves are made up of several different packages.

  • langchain-core : Base abstractions and LangChain Expression Language.
  • langchain-community : Third party integrations.
  • langchain : Chains, agents, and retrieval strategies that make up an application’s cognitive architecture.

1.2 个人理解

LangChain Libraries 是一个整合了各种Prompt的工具包 。使用这个工具包,开发者能更专注于业务逻辑和业务实现。

langchain与LLM.png

除此之外,LangChain Templates、LangServer、LangSmith、LangGraph 算是LangChain锦上添花之作,有替代方案,也不是这个系列文章的重点,所以后续不会做分析与演示。

2 我们可以用LangChain构建什么?

2.1 Q&A with RAG

RAG,全称为Retrieval-Augmented Generation,中文翻译为检索增强生成。它是一种为大模型提供外部知识源的策略,使得大模型在回答问题之前,可以先利用一个知识库来获取候选的知识,再由大模型来生成答案。这种方式可以有效地减少模型幻觉问题,即大模型胡说八道的情况,同时也能避免由于数据不及时或未更新而导致的答案不准确的问题。RAG技术在企业不同的领域中有非常宽广的应用领域,可以解决由于数据不及时或未更新而导致的答案不准确的问题。

使用LangChain可以让大模型基于本地知识库进行问答,适用场景:智能客服

2.2 Analyzing structured data

分析结构化数据(这了各位同学应该先了解什么是结构化数据!!!)适用场景:数据分析、数据洞察等等

2.3 Chatbots

聊天机器人的特点是它们可以长时间运行,有状态对话,并可以使用相关信息回答用户问题。

2.4 更多的使用场景

从外部数据中结构化提取信息、对文档做总结、代码理解、工具使用、读取网页信息、访问SQL数据库等等

AI大模型应用怎么学?

这年头AI技术跑得比高铁还快,“早学会AI的碾压同行,晚入门的还能喝口汤,完全不懂的等着被卷成渣”!技术代差带来的生存压力从未如此真实。
兄弟们如果想入门AI大模型应用,没必要到处扒拉零碎教程,我整了套干货大礼包:从入门到精通的思维导图、超详细的实战手册,还有模块化的视频教程!现在无偿分享。

1.学习思维导图

AI大模型应用所有方向的技术点做的整理,形成各个领域的知识点汇总,它的用处就在于,你可以按照下面的知识点去找对应的学习资源,保证自己学得较为全面。

2.从入门到精通全套视频教程

网上虽然也有很多的学习资源,但基本上都残缺不全的,这是我自己整理的大模型视频教程,上面路线图的每一个知识点,我都有配套的视频讲解。

3.技术文档和电子书

整理了行业内PDF书籍、行业报告、文档,涵盖了AI大模型的理论研究、技术实现、行业应用等多个方面。无论您是科研人员、工程师,还是对AI大模型感兴趣的爱好者,这套报告合集都将为您提供宝贵的信息和启示。

朋友们如果有需要全套资料包,可以点下面卡片获取,无偿分享!

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值