LangGraph Engineer

LangChain
9 Aug 202406:22

Summary

TLDR「Lang graph Engineer」というプロジェクトについて紹介しています。これは、L graphを用いた開発の際に、アプリケーションの骨組みを自動生成するツールです。ユーザーからの要件をもとに、ノードやエッジの構成を提案し、ビジネスロジックの実装を促します。L graph Studio上で公開されているため、公開リンクから試してみることができます。このツールは、開発者がL graphの基礎的な構造を考えることなく、ビジネスロジックに集中できるように設計されています。

Takeaways

  • 🚀 プロジェクト「Lang Graph Engineer」は、L-graphアプリケーションの骨組みを自動生成するサイドプロジェクトです。
  • 🤖 Lang Graph Engineerは、ユーザーからの要件を収集し、L-graphアプリケーションの骨組みを作成するエージェントです。
  • 📝 骨組みにはノードとエッジが含まれていますが、ノードやエッジの中身はユーザーが自分で記述する必要があります。
  • 🛠️ Lang Graph Studioが新機能として、公開リンクを通じてL-graphデプロイメントを共有できるようになりました。
  • 🔍 「gather requirements」ノードは、アプリケーションの要件を収集するための対話型のノードです。
  • 📝 「draft answer」ノードは、収集された情報をもとにL-graphアプリケーションのドラフトを作成します。
  • 🔄 「check node」は、生成されたマークダウンにPythonスニペットが含まれているかを基本的なチェックを行います。
  • 📑 「critique node」は、LLM(Large Language Model)を使用して生成されたPythonコードを評価します。
  • 🔧 Lang Graph Engineerはオープンソースで、各ノードに対応するPythonファイルがリポジトリにあります。
  • 📚 ユニットテストファイルがAPIの説明役として機能しており、生成されたコードの質向上に役立っています。
  • 🔄 チェックに合格すると「critique node」へ、不合格の場合は「draft answer」ノードに戻り再生成が行われます。
  • 💻 最終的なコードはLang Graph Studioで確認・テストでき、必要に応じてビジネスロジックを実装することができます。

Q & A

  • プロジェクトの名前は何ですか?

    -プロジェクトの名前はLang Graph Engineerです。

  • Lang Graph Engineerの目的は何ですか?

    -Lang Graph Engineerの目的は、Lang Graphアプリケーションのスキャフォルディングを構築するのを支援することです。

  • このプロジェクトの主な機能は何ですか?

    -このプロジェクトの主な機能は、要求を取得し、それに基づいてLang Graphアプリケーションの基本的な構造を生成することです。

  • 生成されたグラフのノードとエッジの内容はどうなりますか?

    -生成されたグラフのノードとエッジの内容はユーザーが記述する必要があり、プロジェクトはその構造だけを提供します。

  • Lang Graph Engineerが提供する具体的なノードの例を挙げてください。

    -具体的なノードの例として、要求を収集するノード(gather requirements node)や、ドラフトを生成するノード(draft answer node)があります。

  • チェックノードは何をしますか?

    -チェックノードは生成されたドラフトがPythonのスニペットを含むMarkdownを生成したかを確認します。

  • 生成されたコードの品質を評価するために使用される方法は何ですか?

    -生成されたコードの品質を評価するために、プログラムチェックとLLM(大規模言語モデル)によるチェックの2つの方法が使用されます。

  • Lang Graph Engineerのコードはどこで確認できますか?

    -Lang Graph Engineerのコードはオープンソースリポジトリで確認できます。

  • プロジェクトの公開リンクはどこで確認できますか?

    -プロジェクトの公開リンクは動画の説明欄に記載されています。

  • 今後の改善点として考えられているものは何ですか?

    -今後の改善点として、追加のチェックやプロンプトの改善、Lang Graph Studioへの統合などが考えられています。

Outlines

00:00

🛠️ L-Graphエンジニアの紹介

L-Graphエンジニアは、L-Graphアプリケーションの骨組みを自動生成するサイドプロジェクトです。このツールは、開発者がL-Graphを用いた開発を効率化し、ビジネスロジックに集中できるように設計されています。L-Graphエンジニアは、ユーザーからの要件を収集し、ノードとエッジの構成を自動生成しますが、ノードやエッジの内容はユーザーが自分で記述する必要があります。このプロセスは、L-Graph Studio上で公開されているベータ機能として公開されており、誰でも試すことができます。

05:00

🔍 L-Graphエンジニアの動作確認

L-Graphエンジニアの動作を確認するために、ビデオスクリプトでは、ツールに「rag app」の生成を要求します。ツールは、要件を収集し、草稿を作成し、チェックを行い、批判的なフィードバックを元に修正を繰り返します。生成されたコードは、プログラミング的チェックとLLMによる批判的チェックを通過し、最終的にユーザーが確認できる形で提供されます。このプロセスでは、L-GraphのAPIの使い方をユニットテストから得た情報に基づいてコードを生成し、ユーザーはビジネスロジックを実装する部分に焦点を当てることができます。

Mindmap

Keywords

💡L-graph

L-graphは、ビデオの主題であるグラフベースのアプリケーション開発プラットフォームです。このプラットフォームを使用することで、開発者はグラフ構造を活用して複雑なビジネスロジックを構築することができます。ビデオでは、L-graphを使用してサイドプロジェクトとしてLang graph Engineerを開発し、そのプロセスと成果物を紹介しています。

💡Lang graph Engineer

Lang graph Engineerは、ビデオで紹介されたL-graphアプリケーションの一つで、開発者がL-graphアプリケーションのスキャフォールディングを構築するのに役立つツールです。このツールは、開発者がグラフのノードやエッジの正確な構造を考える必要はなく、ビジネスロジックに集中できるように設計されています。

💡スキャフォールディング

スキャフォールディングとは、ソフトウェア開発において、アプリケーションの基本構造やテンプレートを指します。ビデオでは、Lang graph Engineerが自動的にL-graphアプリケーションのスキャフォールディングを作成し、開発者がビジネスロジックを実装する部分に焦点を当てられるように支援する機能を有しています。

💡ノード

ノードは、グラフ理論において、情報を保持する基本的な構成要素であり、L-graphアプリケーションでは、特定の機能や処理を表します。ビデオでは、Lang graph Engineerが自動的にノードを作成し、開発者がそれらにビジネスロジックを実装するように促します。

💡エッジ

エッジは、グラフ理論において、ノード同士を繋ぐ線であり、L-graphアプリケーションでは、ノード間のデータフローや処理の順序を表します。ビデオでは、エッジが正しく設定されることで、アプリケーションのフローが確立されることが重要だと強調されています。

💡ビジネスロジック

ビジネスロジックとは、アプリケーションがビジネスの目的を果たすためのルールや手続きを意味します。ビデオでは、Lang graph Engineerがスキャフォールディングを作成する一方で、開発者はビジネスロジックを実装することに重点を置く必要があると示唆しています。

💡ユニットテスト

ユニットテストは、ソフトウェア開発において、個々の部品や機能を分離して検証するテスト手法です。ビデオでは、L-graphのユニットテストがAPIの動作を正確に記述しており、Lang graph Engineerがユニットテストを参考にコードを生成することができると紹介されています。

💡LLM (Large Language Model)

LLMは、ビデオで言及された大規模な言語モデルの略称で、自然言語処理分野で使用される高度なアルゴリズムです。ビデオでは、Lang graph EngineerがLLMを使用して生成されたPythonコードを評価し、合理性と品質をチェックする機能を持っていると説明されています。

💡チェックノード

チェックノードは、ビデオで紹介されたLang graph Engineerの機能の一つで、生成されたコードの基本的な整合性を検証する役割を果たします。ビデオでは、チェックノードが生成されたMarkdownにPythonスニペットが含まれているかを確認するプロセスが示されています。

💡クリティックノード

クリティックノードは、Lang graph Engineer内の機能で、LLMを利用して生成されたコードの品質と合理性を評価します。ビデオでは、クリティックノードがLLMのフィードバックを基にコードの改善を提案し、より高品質の結果を生み出すプロセスが説明されています。

💡オープンソース

オープンソースとは、ソフトウェアのソースコードが公開され、誰でも自由に使用・改変できるという特性を持つソフトウェア開発のアプローチです。ビデオでは、Lang graph Engineerのコードがオープンソースとして公開されており、開発者が自由にアクセス・貢献できると紹介されています。

Highlights

Introduction to a side project called Lang Graph Engineer, designed to assist in building scaffolding for L graph applications.

Lang Graph Engineer aims to automate the creation of the structural framework for L graph apps, leaving the user to focus on business logic.

The project is showcased using Lang Graph Studio, deployed on Lang Graph Cloud, demonstrating a new beta feature of public sharing.

Explanation of the workflow involving different nodes such as 'gather requirements', 'draft answer', 'check node', and 'critique node'.

The 'gather requirements' node initiates a conversation to understand the user's needs for the L graph application.

The 'draft answer' node generates a preliminary version of the L graph application based on the gathered requirements.

The 'check node' performs basic checks to ensure the draft contains a Python snippet, with plans for more comprehensive checks in the future.

The 'critique node' uses an LLM to evaluate the generated Python code for reasonableness, adding an AI-based review process.

If the critique node approves, the process concludes; if not, it loops back to the 'draft answer' for revisions.

Lang Graph Engineer is an open-source repository, allowing users to view and contribute to the codebase.

Inside the repository, each node has a corresponding Python file, demonstrating the modularity of the project.

The 'draft' node uses a simple prompt and unit test file to generate code, leveraging L graph's API for accuracy.

The 'agentp' file defines the agent's behavior, central to the Lang Graph Engineer's functionality.

A live demonstration of the application generating an L graph app, starting with vague input and refining through interaction.

The output includes a new feature in Lang Graph Studio that allows easy viewing of the desired output types.

The generated code is tested in a notebook, showing that it runs correctly with the correct imports and structure.

The inner workings of the 'retrieve documents' and 'generate answer' nodes are left for the user to implement with their business logic.

The video concludes with an invitation to try out the publicly available Lang Graph Engineer and an offer for feedback.

Transcripts

play00:01

hello today I want to talk a little bit

play00:04

about a project that we've been working

play00:05

on kind of as a side project but we're

play00:07

excited to share it both one as an

play00:10

example of what you can build with L

play00:12

graph but then also two as something

play00:15

that's hopefully useful when you're

play00:17

developing with L graph so it's called

play00:18

Lang graph engineer and the idea is that

play00:21

it will help you build the scaffolding

play00:23

for your L graph

play00:25

applications so the idea is that we have

play00:27

this graph this agent which you can talk

play00:30

to it will get requirements from you and

play00:32

then it will create the scaffolding of a

play00:34

lingraph app and what does that mean

play00:36

that means that it will try to get all

play00:38

the nodes and edges correct but it won't

play00:40

try to necessarily fill in the contents

play00:42

of the nodes or edges we'll leave that

play00:44

to you and the logic that that you write

play00:47

I think this is helpful because you

play00:49

shouldn't have to think deeply about

play00:52

Lang graph constructs in order to build

play00:54

an agent but you should have to think

play00:56

about your business logic and so that's

play00:58

kind of like the line that we're trying

play00:59

to draw here we'll try to write the lane

play01:02

graph boiler plate for you but you'll

play01:04

have to write the business logic that

play01:05

lives inside the nodes and edges of your

play01:08

graph so this is the Lang graph

play01:11

application that we've created that

play01:12

represents Lang graph engineer and what

play01:14

you're seeing right now is Lang graph

play01:16

Studio it's deployed on Lang graph cloud

play01:18

and it's deployed publicly so this is a

play01:20

new beta feature we're testing where you

play01:22

can share public links to a langra

play01:24

deployment and so in the link down below

play01:27

where you can try this out you'll you'll

play01:29

see the public link to try it

play01:31

out so here is roughly what the langra

play01:35

engineer app is doing so there's a few

play01:37

different nodes so there's this gather

play01:39

requirements node which can go to either

play01:42

draft answer or to the end what this

play01:45

node does is it tries to talk to you and

play01:48

gather requirements for the application

play01:50

so it tries to get more information from

play01:52

you about what exactly you want to

play01:55

do once it has enough information it

play01:57

will call this draft answer node and

play01:59

this will go to a separate agent this

play02:01

agent is focused on writing the laying

play02:03

graph application for you so it will

play02:06

generate a full graph and then it will

play02:09

go to this check Noe this check node is

play02:12

a very basic check to make sure that the

play02:14

draft node generated some markdown that

play02:18

contains a python

play02:20

snippet in the future we'll add other

play02:22

checks in here like making sure that all

play02:24

import statements are correct or even

play02:25

trying to run the

play02:28

code after we run these checks which are

play02:30

programmatic checks if it passes we'll

play02:33

go onto a critique node if it fails

play02:35

we'll feed that back into the draft

play02:37

answer node and it will try

play02:39

again what does the critique node do the

play02:41

critique node uses an llm to critique

play02:44

the outputs so it will pass the

play02:46

generated python code into an llm and

play02:48

say hey does this look reasonable so

play02:50

we're running two different types of

play02:51

checks here one are programmatic checks

play02:55

the others using an llm if the critique

play02:58

node thinks it's good then it will go go

play03:00

to the end and it will

play03:01

finish you can find all the code for

play03:04

this in Lang graph

play03:06

engineer so this is an open source repo

play03:08

and if we look inside this folder we can

play03:10

see that there's a python file roughly

play03:12

for each of of the nodes so let's look

play03:15

inside the draft node because this is

play03:16

doing a lot of the heavy lifting so we

play03:19

can see that it's a pretty simple prompt

play03:22

it's

play03:23

basically some brief description about

play03:26

what Lang graph is a path to a unit test

play03:29

file so I'll talk more about this later

play03:32

and then it has some more

play03:34

instructions some of these instructions

play03:36

include how to generate things and then

play03:38

others include the specific format so to

play03:40

use this python markdown

play03:42

syntax we pass in a unit test file

play03:45

because we actually have a lot of pretty

play03:47

good unit test coverage in L graph and

play03:49

these unit tests are actually a really

play03:50

good way of describing the API of what

play03:53

Lang graph should do and how you should

play03:55

invoke it so actually we found that by

play03:58

passing this in it's able to generate

play04:00

pretty reasonable looking

play04:02

results there's other files here for

play04:04

other nodes and you can check those out

play04:06

agentp is another great file to look at

play04:09

this is where the agent is actually

play04:11

defined so let's try it out let's ask it

play04:15

to generate a rag app

play04:18

please so this is pretty vague it's not

play04:21

entirely sure what uh you know it should

play04:24

do and so it asks some kind of like

play04:25

follow-up questions um do I have any

play04:28

specific steps um

play04:31

um

play04:32

retrieve documents first then generate

play04:42

answer um it's pretty

play04:51

straightforward so now it's calling the

play04:53

draft answer because it has enough

play04:54

information

play05:00

this is the draft node

play05:02

responding we can see that is writing

play05:04

some code it did the check pretty fast

play05:07

because the checks deterministic and now

play05:09

the critique node and so the critique

play05:11

node seems good so it's finished if we

play05:14

want to look at the output we can click

play05:16

this button here and we can see the full

play05:17

output so this is a new thing we've

play05:19

added to Lang graph Studio to make it

play05:21

easy to see the desired types of

play05:24

output so let's copy this

play05:27

code let's put it in a notebook see if

play05:30

it actually

play05:31

runs so it actually runs so it it got

play05:34

kind of like the ability to define a uh

play05:37

workflow a graph it got all the Imports

play05:41

correct now if you notice here the the

play05:44

innards of the retrieve documents node

play05:46

and the generate answer node they're

play05:48

still completely mocked out you got to

play05:50

put your logic here and that's the idea

play05:52

you'll put your business logic will help

play05:54

create the

play05:57

scaffolding that's it for this video

play06:00

as I mentioned this is publicly

play06:01

available so you can try it out um we'll

play06:04

be improving it uh over the next few

play06:06

weeks so we'll be adding in some more

play06:08

checks we'll be improving the prompts

play06:10

maybe adding in some other critique

play06:12

steps maybe integrating it into langra

play06:14

studio so it can run

play06:15

locally thank you all for watching and

play06:18

please reach out if any questions

Rate This

5.0 / 5 (0 votes)

Ähnliche Tags
L-graph開発ツールアプリケーションスキャフォールディングビジネスロジックグラフエンジンプログラミングコード生成オープンソースAIクリティック
Benötigen Sie eine Zusammenfassung auf Englisch?