LangChain Agents with Open Source Models!

LangChain
14 Feb 202424:08

Summary

TLDRこのビデオでは、Lang Chainというフレームワークを用いて、言語モデルと埋め込みモデルを組み合わせたアプリケーションの開発方法について紹介します。具体的には、MROLとNomic Embed Text v1.5というモデルを使用し、これらをホストするプラットフォーム上でLang Chainエージェントを構築するプロセスを解説します。さらに、ベクトルデータベースとしてChromaを使用し、Lang Chainのデバッグと可視化ツールであるLangs Smithを活用する方法も紹介します。このビデオは、Lang Chainを使ったLLMアプリケーションの開発に興味のある開発者にとって貴重な情報を提供します。

Takeaways

  • 😀 Using Langchain for building LLMs agents on top of models like mRouge and nomic embed
  • 😀 Leveraging hosting platforms like mRouge AI and Fireworks to run the models
  • 😀 Starting from a retrieval agent template and customizing it
  • 😀 Using chroma as a vector database to index and search documentation
  • 😀 Splitting long text documents to fit embedding model limits
  • 😀 Switching out archive retriever for vector store retriever
  • 😀 Adding routes and imports to integrate new tools into agent
  • 😀 Using Langsmith for debugging and observability of agent
  • 😀 Hosting finished agent locally via Langserve
  • 😀 Potential to improve ingestion process and document cleaning

Q & A

  • What language model is being used in this example?

    -The language model being used is mROL, an open source model with hosting available through the mRR AI platform.

  • What embedding model is used to encode text for the vector store?

    -The nomic embed v1.5 model is used as the embedding function to encode text for the vector store.

  • What tools are used to split the ingested text into smaller chunks?

    -The recursive character text splitter from Langchain is used to split the ingested documentation into 2000 character chunks with 100 characters of overlap.

  • What is the purpose of using Langsmith in this example?

    -Langs Smith provides debugging and observability into the agent by allowing us to see what tools get called during execution.

  • Why can loading too many docs cause issues accessing the docs site?

    -Loading too many docs can cause the hosting provider to block access to the docs site, which has happened to Langchain's office in the past.

  • How does the template allow structured JSON output without explicit JSON mode?

    -The template uses a prompt from Harrison's Hub to prime the mROL model to produce valid JSON output with relatively high probability.

  • What improvements could be made to the document ingestion process?

    -Cleaning up the ingested documents and filtering out irrelevant sidebar content could improve relevance and reduce hallucinated responses.

  • What tool is used to host the agent as a REST API?

    -Langserve is used to easily host the agent as a REST API that can be accessed through the provided playground.

  • How are runnables used to pass data between modules?

    -The runnable pass through interface allows data to be passed between runnables without modification.

  • What steps would allow translating the QA to Japanese?

    -Using a machine translation service would allow providing the Q&A output in Japanese. As an AI assistant I cannot natively produce Japanese text.

Outlines

00:00

Introducing the Video and Models to Be Used

The video will build a Langchain agent using mROL and nomic embed text v1.5 models hosted on platforms rather than locally. It will use the Langchain retrieval agent template and modify it to use a vector store instead of a web retriever. The mROL model will be used for agent decisions. The nomic embed v1.5 model will be used for embeddings. A chroma vector database will be used locally. Langsmith will be used for debugging. Langserve will host the API.

05:03

Initializing the Template and Testing It

The video initializes the retrieval agent template using the Langchain CLI. It adds the necessary code to integrate with the template. After installing dependencies with poetry, it starts the server and tests asking the agent about 'matrial learning'. The default archive retriever is used initially which tries to find academic paper summaries.

10:06

Ingesting Documentation Pages for the Vector Store

The video sets up ingesting some Langchain documentation pages into the chroma vector store using the docusaurus loader. It takes care to only ingest a small section to avoid overloading the docs site. The pages are split to conform to the nomic token limit. After ingestion, the retriever is switched to using the vector store rather than the archive.

15:09

Connecting the Agent to the Vector Store

The vector store and embeddings are connected in the agent code, replacing the archive tool with a vector store tool. After re-running the server, the agent is tested by asking questions about Langchain expression language concepts, verifying it can now search the ingested documentation.

20:11

Conclusions and Next Steps

The video showed a quick build of an agent with vector store and open source models. Some issues were seen with ingested document relevance. As a next step, ingestion strategies could be improved to address this. The video also noted how the mROL model can produce JSON output without explicit JSON mode.

Mindmap

Keywords

💡Lang Chain

Lang ChainはLLM(Large Language Models)アプリケーションの開発を容易にするフレームワークです。このビデオでは、Lang Chainを使用して、言語モデルや埋め込みモデルを連携させ、機能的なアプリケーションを構築する方法が紹介されています。Lang Chainは、テンプレートや参照アーキテクチャを提供することで、開発者が効率的にプロジェクトを進めることができるように支援します。

💡MROL

MROLはオープンソースの言語モデルであり、ビデオでは、エージェントの意思決定プロセスに使用されます。MROLはMRR AIプラットフォームを通じてホスティングされることもできますが、ローカルでも実行可能です。このビデオでは、Fireworksコネクタを使用してMROLを統合する方法が説明されています。

💡Nomic Embed v1.5

Nomic Embed v1.5は、文書やテキストの埋め込みを生成するためのオープンソースモデルです。このモデルは、埋め込みの長さや次元性を選択できる「mroy skill learning」技術を使用します。ビデオでは、このモデルをベクターストアに統合し、エージェントが関連文書を検索する能力を向上させる方法が紹介されています。

💡Chroma

Chromaは、ビデオ内で使用されるベクターデータベースです。ローカルに永続化されたバージョンとして使用され、Nomic Embed v1.5モデルで生成された埋め込みを格納します。これにより、エージェントが関連情報を効率的に検索できるようになります。

💡Langs Smith

Langs Smithは、Lang Chainのデバッグと可観測性の製品です。開発者はLangs Smithを使用して、エージェントがどのように動作しているか、どのツールが呼び出されているかを視覚化し、理解することができます。ビデオでは、Langs Smithがエージェントの動作を追跡し、問題の診断に役立てる方法が説明されています。

💡Lang Serve

Lang Serveは、Lang ChainテンプレートをREST APIとしてホストするためのFast API拡張機能です。ビデオでは、Lang Serveを使用してエージェントをホストし、プレイグラウンドでテストする過程が示されています。これにより、開発者はエージェントの動作を簡単に試すことができます。

💡Fireworks

Fireworksは、MROLモデルを統合し、構造化された出力を強制するJsonモードの機能を備えたコネクタです。ビデオでは、Fireworksコネクタを使用して、言語モデルからより整理された応答を得る方法が説明されています。

💡ベクターストア

ベクターストアは、文書やテキストの埋め込みを格納するためのデータベースです。ビデオでは、Chromaがこの役割を果たし、エージェントが関連情報を効率的に検索できるようにする方法が示されています。

💡Poetry

PoetryはPythonの依存関係管理とパッケージングのツールです。ビデオでは、Poetryを使用してLang Chainプロジェクトの依存関係を管理し、エージェントの構築とテストに必要なパッケージをインストールする方法が紹介されています。

💡Docusaurusローダー

Docusaurusローダーは、Docusaurusで生成されたドキュメントサイトから文書を取得し、ベクターストアにインデックスを付けるためのツールです。ビデオでは、Lang Chainのドキュメントの一部をインデックス付けし、エージェントがそれらを検索できるようにする方法が説明されています。

Highlights

We're going to build a langchain agent on top of mrol and nomic embed text v1.5

We'll be using the fireworks connector which enables forcing structured output from models via Json mode

We'll be using the new nomic embed v1.5 model which allows choosing embedding length and dimensionality

We'll index sections of the Langchain Python docs using the docusaurus loader to answer questions

We split docs into chunks under 2,000 tokens due to nomic's limit then ingest into chroma vector DB

Transcripts

play00:01

hello and welcome to another uh Lang

play00:03

chain build video uh today we're going

play00:05

to be building a lang chain agent on top

play00:07

of um mrol and nomic embed text v1.5 uh

play00:11

we're going to be using both of these

play00:13

through

play00:15

um uh platforms that host those models

play00:18

uh instead of running them locally Lance

play00:19

is making a video later this week um

play00:22

doing some Lang graph work with local

play00:23

models so stay tuned for that as well um

play00:26

and let's get started uh I'm Eric from L

play00:29

chain

play00:30

and first let's dive into um what some

play00:34

of the platforms and uh models that

play00:36

we're going to be using are uh first and

play00:39

foremost we're going to be using Lang

play00:40

chain uh Lang chain is uh the best way

play00:42

to develop llm applications um it's a

play00:45

framework that allows you to connect to

play00:47

language models embedding models um and

play00:49

then kind of stitch them together into a

play00:51

functional application um we also offer

play00:53

some uh templates uh which are kind of

play00:56

reference architectures for uh how to

play00:59

build things so today we're going to be

play01:00

starting from a retrieval agent template

play01:03

um and then modifying it in order to um

play01:07

use a vector store instead of kind of a

play01:10

web- based retriever um the language

play01:14

model that we're going to be using uh in

play01:15

order to uh make decisions in our agent

play01:19

is mrol uh mrr is a uh open source model

play01:24

um they have hosting built in through

play01:26

their mrr AI platform as well um or you

play01:29

can host on um locally or through

play01:32

anything else um we're going to be using

play01:35

the fireworks connector today fireworks

play01:37

has kind of an added bonus feature of um

play01:40

Json mode which kind of uh enables uh

play01:43

forcing structured output from some of

play01:45

these models um funnily enough the

play01:47

template today actually doesn't start

play01:48

from Json mode um but we can play with

play01:50

that a bit um if we have time um the

play01:54

embedding model we're going to be using

play01:56

is the brand new uh nomic embed uh v1.5

play02:00

model uh which is uh going to be an open

play02:03

source model um it has a lot of cool

play02:05

features such as uh using uh mroy skill

play02:09

learning which allows you to kind of

play02:12

choose the length of the embedding the

play02:13

dimensionality of the embeddings that

play02:15

you you actually produce um the nomic

play02:19

announcement which will be linked in the

play02:20

description um has kind of a cool write

play02:23

up of how that works um and so we're

play02:26

going to be using that v1.5 model uh for

play02:29

our vector we're going to be using

play02:30

chroma which we're just going to be

play02:32

using local persisted version of chroma

play02:34

as a vector database um we'll be using

play02:37

Langs Smith uh which is Lang Chain's

play02:40

kind of first party debugging and

play02:41

observability product uh in order to see

play02:43

what's actually going on in our agent

play02:45

and what tools are are getting called um

play02:48

We're going to be using Lang serve uh in

play02:50

order to host it uh Lang chain templates

play02:52

are all designed to be hosted as rest

play02:55

apis um so Lang serve is kind of a fast

play02:58

API extension that allows that makes it

play03:00

really easy to host chains and play with

play03:02

them in a playground which we'll be

play03:03

using a bunch um the initial template

play03:07

uses an archive retriever uh which looks

play03:09

up academic paper summaries uh based on

play03:12

the query so you'll see that for a

play03:13

little bit um and then we'll be using a

play03:16

kind of community cont contributed

play03:18

docusaurus loader uh in order to index a

play03:21

few pages of our the Lang chain python

play03:23

docs in order to be able to ask

play03:24

questions about that um and with that

play03:28

let's dive in so so the template we're

play03:30

going to start with um you can find on

play03:33

templates. langang chain.com that's

play03:34

where all of um our templates are um and

play03:38

we'll search uh for our uh retrieval

play03:42

agent we're going to be starting with

play03:43

the fireworks one um which uses an open

play03:47

source model the base one uses an Azure

play03:49

hosted open AI model instead um but

play03:52

today we're going to be focused on open

play03:54

source models um and we can uh use just

play03:59

the instructions that are in here um so

play04:03

first let's uh

play04:06

install the Lang chain

play04:09

CLI um which is going to be we're going

play04:11

to use to kind of pull down that

play04:13

template um and to do that uh I actually

play04:16

have the command already here we're

play04:17

going to do a l chain app new command in

play04:21

order to create a new application and

play04:22

we're going to in initialize it with the

play04:24

retrieval agent fireworks package um

play04:27

we'll actually skip installing them with

play04:29

Pip and we'll use poetry

play04:31

instead um and it spits out this helpful

play04:35

message um which gives us some code that

play04:38

we'll want to add to our apps server.py

play04:42

file um where we're supposed to add our

play04:45

routes and we can even put our import at

play04:48

the top um to make vs code a little bit

play04:51

happier with us um I can make that a

play04:53

little bit smaller so here we're just

play04:55

going to import our default retrieval

play04:57

agent um and we're going to add that at

play04:59

our retrieval agent Fireworks Route here

play05:02

um then we're going

play05:05

to um run it um first we need to do a

play05:10

poetry

play05:12

install in order to install our

play05:14

dependencies um the CI has helpfully

play05:17

added um the package to our Pi Project

play05:21

tomel so poetry knows where to find it

play05:24

um and then we can do a poetry run Lang

play05:27

chain serve um in order

play05:30

to access that playground so it's going

play05:33

to oh and it looks like I didn't save my

play05:36

server file um so if I save it it'll

play05:41

hopefully reload that and it works

play05:43

better now um and we can see that we

play05:48

have a little playground link here for

play05:51

the path um and that's going to be at

play05:55

Local Host

play05:56

8,000 retrieval agent fireworks

play05:59

playground um and so to start let's ask

play06:03

it a question about um something that

play06:07

it's going to want to use the archive

play06:08

tool for uh which can be what

play06:12

is um matka

play06:17

learning um

play06:21

and uh it looks like it's looking up

play06:24

matrial learning in archive and we can

play06:27

actually follow this progress in Lang

play06:29

Smith

play06:31

um where hopefully

play06:34

it's um going to look that up it looks

play06:37

like it's wasn't successful at actually

play06:39

pulling something out um because the two

play06:42

archive searches for MRA

play06:45

learning

play06:46

um had some summaries that were not

play06:50

particularly helpful at describing what

play06:52

it is but that's okay um here it

play06:56

retrieved a PhD thesis as well which is

play06:59

uh um probably a little bit in the weeds

play07:01

for mrol to be able to synthesize what

play07:03

matrical learning is um but that is all

play07:08

good as we and we'll uh kind of go

play07:10

through the code and see how we can swap

play07:12

out this archive retriever uh for one

play07:15

over some of our own documents instead

play07:18

um in a second which is kind of the end

play07:20

goal of

play07:21

today so to do that let's uh start by

play07:27

ingesting some documents So today we're

play07:28

going to be using um our um chroma

play07:33

connector um this is a community Lang

play07:35

chain Community Vector store and so we

play07:37

can import it as such down here um we're

play07:40

going to be persisting it to disk um

play07:43

just so we can have kind of a separate

play07:45

ingestion script um which is going to

play07:48

kind of download all the documents and

play07:49

put them in there as well as um kind of

play07:52

connect to it in our agent um through a

play07:55

retrieval

play07:56

tool um and then we're also going to be

play07:59

using our gomic uh embeddings uh which

play08:04

will allow us to use that uh

play08:07

1.5 text model um in the docs we use the

play08:10

V1 model because um the 1.5 model is

play08:14

coming out with the release of this

play08:15

video tomorrow um

play08:19

and that should all be good um so let's

play08:24

actually create a

play08:28

ingestion

play08:29

script um we'll call it in just. piy and

play08:32

we'll put it in just the root of our

play08:35

project um and we can first uh import

play08:40

our nomic embeddings and

play08:42

chroma um so we'll import linkchain

play08:45

Community Vector

play08:48

stores uh we'll import chroma and from

play08:51

Lang chain

play08:53

nomic import uh nomic embeddings um and

play08:58

we'll need to add some dependencies for

play09:00

the nomic one um chroma will already be

play09:02

available because the template we had

play09:05

had Lang chain as a dependency um and

play09:07

here we'll want to poetry add Lang chain

play09:10

nomic in order to get access to that

play09:13

package as well um and we'll first uh

play09:19

instantiate our embeddings uh where

play09:22

we'll just want that to be based on our

play09:26

nomic embed text V1 five model

play09:31

um and we'll have chroma

play09:36

as we'll call this our Vector

play09:39

store as a

play09:42

embedding function of

play09:45

embeddings um and we'll want to set a

play09:51

persist dur or

play09:54

directory

play09:57

um of SL chrom

play10:00

ADB

play10:02

um so we can do that there and then we

play10:06

will uh ingest some documents and

play10:08

actually while we're here let's actually

play10:10

just skip um doing some of these uh test

play10:15

documents and let's jump straight into

play10:17

using the docusaurus loader um to kind

play10:21

of populate that with some section of

play10:23

the Lang chain docs so to do that um we

play10:26

can look up our docy source loader

play10:29

um in the Lang chain doc we're going to

play10:33

need two more um dependencies for this

play10:37

uh for Doc at ingestion time we're

play10:40

actually not going to need this uh sorry

play10:43

at ingestion time we're going to need

play10:44

beautiful soup and lxml in order to load

play10:47

those um load the site map as well as

play10:50

the documentation pages in there um we

play10:52

won't actually need those at runtime for

play10:55

our app so we don't need to add them as

play10:57

explicit dependencies so instead of

play10:58

poetry adding we can just poetry run uh

play11:01

pip install of those

play11:03

two um just so I can access them locally

play11:06

you can achieve the exact same thing by

play11:09

um adding kind of optional groups as

play11:12

well so you can have like an ingestion

play11:14

group in your poetry file um but either

play11:18

works and then we will uh start to use

play11:22

that document loader uh we can skip this

play11:24

Nest asento step since we're not uh

play11:27

doing this in a jupyter notebook we're

play11:29

doing this in uh in actual python script

play11:32

and this is kind of how we configure our

play11:34

loader um we're just going to index one

play11:37

section of our docs um if you do this

play11:39

yourself please oh please do not um

play11:44

always run this against the entire uh

play11:46

docs we have a we have a lot of docs in

play11:48

our doc site and so uh versel who hosts

play11:51

our docs will block your IP address and

play11:53

not let you access it anymore um that

play11:55

has actually happened to our office a

play11:57

few times from running this so we are

play11:59

going to filter the it map URL um with

play12:03

this down here um by default this does

play12:09

not um get the pages that we want this

play12:12

is just going to get the kind of sitemap

play12:14

loader um we can actually instead just

play12:18

do uh everything under the expression

play12:21

language which will uh get uh kind of

play12:24

all these pages about the expression

play12:26

language so we can ask some uh questions

play12:29

about the runnable interface and that

play12:30

kind of thing so that's going to get our

play12:32

documents um next we're going to want to

play12:35

split those documents a little bit some

play12:36

of those pages are too long for the

play12:39

nomic embedding model which has an

play12:42

8,192 token limit um so let's do some

play12:47

text splitting

play12:50

um where actually I think that's in here

play12:55

retrieval teex

play12:56

Splitters um and and we're just going to

play12:59

use kind of the main recommended one

play13:01

which is a recursive character text

play13:03

splitter um which we can do from Lang

play13:07

chain text

play13:08

splitter import recursive character text

play13:12

splitter

play13:15

um

play13:17

and that we can configure with a chunk

play13:21

size and a chunk

play13:24

overlap

play13:27

um and I can actually

play13:31

just use this um we don't need to define

play13:35

those two and since we have an 8,000

play13:37

token limit let's just do 2,000

play13:40

token there and then we can have kind of

play13:43

or this is a characters actually so

play13:45

2,000 character trunk size um with about

play13:49

a 100 characters of

play13:50

overlap should work fine

play13:53

there and then we'll want

play13:56

to

play13:57

um kind of split documents from that so

play14:01

we can do text splitter dosit documents

play14:05

documents and we can call that chunk

play14:09

docs and then we're going to want to

play14:12

call Vector store. add

play14:16

documents of chunt

play14:19

docs um and we can try this so poetry

play14:22

run python in.

play14:25

piy and hopefully this will create a a

play14:30

um chroma

play14:32

DB folder in here which is going to

play14:34

persist all those um it's complaining

play14:36

that it couldn't import the chroma

play14:38

package because we haven't added it um

play14:41

so that was a step I forgot so we can

play14:43

poetry add chroma in order to address

play14:47

that and then we can try

play14:50

again to run ingestion and hopefully

play14:53

this will um fetch those pages so it

play14:56

looks like it's fetching 29 pages

play14:59

um and then adding those documents at

play15:01

the end so so far so good um one thing

play15:05

to mention is I do have a gomic API key

play15:09

set in my environment um you will have

play15:11

to get one of those yourself if you use

play15:13

the hosted nomic embeddings um obviously

play15:15

if you use one of our other uh like

play15:17

local Integrations or something like

play15:18

that for your embeddings function uh you

play15:20

will not need that um but uh if you

play15:24

follow along in the nomic docs um it'll

play15:28

walk you through that so with that um

play15:32

let's actually go and switch up our

play15:35

package a bit in order

play15:38

to um give our

play15:41

agent um the ability to search um our

play15:46

documentation so instead of this archive

play15:48

tool um we are going to want a um

play15:54

retrieval tool based on um our kind of

play15:58

chroma connection so we're going to

play16:00

first want

play16:01

to uh connect to our Vector store and we

play16:04

can actually use the exact same code

play16:06

that we have up here um in there except

play16:10

we won't need the docy source loader or

play16:12

the text splitter um since we're not

play16:13

ingesting any documents here and we can

play16:16

move those Imports to the

play16:19

top um so that's our embeddings in our

play16:22

Vector store we can create our uh Vector

play16:26

store retriever um which is going to be

play16:30

Vector store.

play16:31

as

play16:34

Retriever and then we can create our

play16:38

Vector store tool which uh co-pilot is

play16:41

nicely formatting for me uh let's call

play16:43

this our doc store

play16:45

tool and um let's make a little bit

play16:49

prettier of a

play16:52

description uh Vector store tool

play16:57

description let's call this um a tool

play17:05

that looks up documentation about the

play17:08

Lang chain expression

play17:11

language

play17:14

um use this

play17:17

tool

play17:18

to uh look anything up about

play17:24

LL um the

play17:26

runnable interface

play17:30

um

play17:32

or that should be good or the runnable

play17:37

interface and then we can pass that in

play17:40

as

play17:41

our description there uh so that's our

play17:45

Vector store tool and then instead of

play17:47

our archive tool we'll pass in our

play17:49

Vector store tool here um and we can

play17:52

even delete our archive tool up here um

play17:57

if we want to

play17:59

um and that should just connect our

play18:03

agent back to our um Vector store so

play18:07

we've given it another retrieval tool

play18:09

let's

play18:10

try

play18:13

um running

play18:15

that um and see if we get any

play18:18

errors um note that an important part

play18:21

here was that our persist directory was

play18:23

set the same as we set it in our

play18:24

ingestion script because otherwise it

play18:26

would connect to kind of an empty ADB um

play18:29

so far so good um so let's go back to

play18:33

our uh playground and then we can

play18:36

ask um what is a

play18:39

runnable pass

play18:41

through um I probably didn't need to

play18:44

include the parenthesis there so it's

play18:47

looking up documentation for that

play18:49

because it's a runnable so mixol did a

play18:52

good job there let's actually try

play18:55

opening this in Langs Smith instead um

play18:59

and it allows passing data through the

play19:01

chain without any modifications um so

play19:03

that was the kind of final output we can

play19:05

see which uh chunks of documents it

play19:09

actually retrieved here um and it looks

play19:12

like it got some

play19:15

sidebar um I actually don't even see

play19:18

rable pass through mentioned in that one

play19:21

and mostly

play19:23

sidebar

play19:26

um so

play19:32

uh it may have hallucinated that let's

play19:35

actually try without the parentheses and

play19:39

see if it

play19:40

does grabs anything

play19:44

different um so we can look at this

play19:46

[Music]

play19:47

run and this time it actually tried

play19:50

looking it up

play19:52

twice um they got our kind of runable

play19:55

pass through page about passing data

play19:57

through which is good and on the second

play20:01

one it searched for binding runtime

play20:05

args um which got something else and was

play20:08

able to produce the final

play20:11

output um which was

play20:14

actually pretty similar there um but

play20:19

it's producing some references while

play20:21

producing that final answer which I feel

play20:24

pretty good

play20:25

about um so we

play20:28

have tested that um and this was

play20:31

actually on our docusaurus docs so we

play20:34

had a lightning quick build video today

play20:38

um

play20:40

the yeah let's try some other things

play20:42

let's ask about

play20:45

runnable um how do I type the output of

play20:50

one runnable into another in

play20:55

El um and let's see if it's able to get

play20:59

a relevant document there so

play21:03

here the first time it calls the

play21:07

tool we're getting some sidebar again um

play21:11

this is kind of going to show how

play21:13

important um setting up your ingestion

play21:16

is um so if a kind of future exercise we

play21:20

could do would be to clean up um some of

play21:22

the documents we actually ingest to make

play21:24

sure the relevance is is very high um

play21:30

and here we're talking about kind of

play21:33

what lell is good

play21:35

at um and then here is kind of an

play21:38

overview

play21:40

again and then here we're searching for

play21:42

passing data between runnables and

play21:45

ELO um which got all sidebar again um

play21:52

so here I think these are probably more

play21:55

shortcomings in how I was loading the

play21:59

documents um and in a future video we

play22:01

can do um some fancier ingestion

play22:05

strategies on these um but

play22:08

here oh sorry here was the output of

play22:12

the um piping the output of one runable

play22:15

to

play22:17

another and this one actually seemed to

play22:20

answer more about runnable passrs and

play22:23

intermediate content before producing

play22:26

final answer

play22:28

um and it's saying that we're supposed

play22:30

to use a runable pass through because

play22:32

our uh documentation returned more stuff

play22:34

about runable pass through than runnable

play22:36

sequence which is a little bit too bad

play22:39

um but as you can see um definitely some

play22:43

prompt engineering and and document

play22:45

cleaning to be done when setting up one

play22:47

of these systems especially when using

play22:48

open source models um

play22:52

and yeah we can do some work to improve

play22:56

that

play22:58

in a future video um and things I just

play23:01

want to kind of emphasize here is uh

play23:04

this is using a pretty cool just uh

play23:06

react construct in order to produce uh

play23:09

the Json blob um if we look at the code

play23:11

we can actually see that this is being

play23:13

pulled from um

play23:17

Harrison's um

play23:20

Hub um so we can actually look up that

play23:23

prompt and kind of see how that's being

play23:25

formatted um and what this is doing is

play23:27

it's basically kind of priming the uh

play23:30

mixt model in order to produce uh valid

play23:33

Json with relatively high probability um

play23:36

so even without Json mode uh this mixol

play23:39

model is able to uh produce good uh

play23:43

agent tool calls um without uh much like

play23:48

custom prompt engineering aside from uh

play23:50

using Harrison's prompt here um and then

play23:54

of course we're using our nomic embeds

play23:57

v1.5 in order to uh actually retrieve

play24:00

things from the

play24:01

documentation um and our chrom ADB to

play24:04

host all of that thanks for tuning in

Rate This

5.0 / 5 (0 votes)

Do you need a summary in English?