-
Notifications
You must be signed in to change notification settings - Fork 126
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: ✨ add LLM agent concepts and PR descriptors
- Loading branch information
Showing
6 changed files
with
238 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
--- | ||
layout: two-cols-header | ||
--- | ||
|
||
# Agent Tool = nested LLM + Tools | ||
|
||
- **Agent orchestration left to the LLM** | ||
- Agent tool description augment with nested tool description (not id!) | ||
|
||
::left:: | ||
|
||
```mermaid {scale: 0.8} | ||
flowchart LR | ||
query(["summarize changes in the current branch"]) --> LLM((LLM)) | ||
LLM --> |"get changes in current branch"| agent_git | ||
agent_git --> |"diff +main.ts -main.ts...+ new code"| LLM | ||
subgraph agent_git ["agent git"] | ||
agent_git_LLM((LLM)) <--> git_tools["git branch, git diff"] | ||
end | ||
``` | ||
|
||
::right:: | ||
|
||
- definition | ||
|
||
```js | ||
defTool( | ||
"agent_git", | ||
"Agent that can query git", | ||
{ query: { type: "string" } }, | ||
async ({ query }) => | ||
prompt`You are a git god. Answer ${query}.`.options({ | ||
tools: ["git_branch", "git_diff"], | ||
}) | ||
) | ||
``` | ||
|
||
- usage | ||
|
||
```js | ||
script({ tools: ["agent_git"]}) | ||
... | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
--- | ||
layout: two-cols-header | ||
--- | ||
|
||
# Agent Memory | ||
|
||
- Top level LLM "forgets" to give details \*\*\* | ||
- Share findings with memory (LLM RAG log of agent query-answer pairs using SLM) | ||
|
||
- store | ||
|
||
```mermaid | ||
flowchart LR | ||
query(["summarize changes in the current branch"]) --> LLM((LLM)) | ||
LLM --> |"query the last failed run"| agent_github | ||
agent_github["agent github"] --> |"commit failed_sha is responsible"| LLM | ||
memory[(agent memory)] | ||
agent_github --> |"remember failed_run, failed_sha"| memory | ||
``` | ||
|
||
- retreive | ||
|
||
```mermaid | ||
flowchart LR | ||
LLM((LLM)) | ||
memory[(agent memory)] | ||
LLM --> |"get changes in current branch"| agent_git | ||
agent_git["agent git"] --> |"diff +main.ts -main.ts...+ new code"| LLM | ||
memory ---> |"failed_sha"| agent_git | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Multiple Agents | ||
|
||
```mermaid | ||
flowchart LR | ||
query(["summarize changes in the current branch"]) --> LLM((LLM)) | ||
LLM --> |"get changes in current branch"| agent_git | ||
agent_git["agent git (LLM, git diff, git branch)"] --> |"diff +main.ts -main.ts...+ new code"| LLM | ||
LLM --> |"query the last failed run"| agent_github | ||
agent_github["agent github (LLM, list workflow runs, list jobs, diff job logs)"] --> |"commit failed_sha is responsible"| LLM | ||
``` | ||
|
||
|
||
```js | ||
defAgent("git", "query git", "You are a git god.", { | ||
tools: ["git_branch", "git_diff"], | ||
}) | ||
``` | ||
|
||
```js | ||
defAgent("github", "query github", "You are a github god.", { | ||
tools: ["github_pulls", "github_job_log"], | ||
}) | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
--- | ||
layout: two-cols-header | ||
--- | ||
|
||
# Pull Request Descriptor | ||
|
||
Generate a pull request description from the current branch. | ||
|
||
::left:: | ||
|
||
|
||
<v-click> | ||
|
||
```js | ||
|
||
$`Update the pull request description` | ||
``` | ||
|
||
</v-click> | ||
|
||
<v-click> | ||
|
||
```js | ||
|
||
$`for the changes` | ||
``` | ||
|
||
</v-click> | ||
|
||
|
||
<v-click> | ||
|
||
```js | ||
$`in the current branch` | ||
``` | ||
|
||
</v-click> | ||
|
||
|
||
::right:: | ||
|
||
# | ||
|
||
# | ||
|
||
<v-click at="1"> | ||
|
||
What is the current pull request? | ||
|
||
</v-click> | ||
|
||
<v-click at="2"> | ||
|
||
What are the current changes? | ||
|
||
</v-click> | ||
|
||
<v-click at="3"> | ||
|
||
What is the current branch? | ||
|
||
</v-click> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
--- | ||
# try also 'default' to start simple | ||
theme: default | ||
title: GenAIScript | ||
titleTemplate: '%s' | ||
#colorSchema: dark | ||
favicon: 'https://microsoft.github.io/genaiscript/images/favicon.svg' | ||
info: | | ||
## GenAIScript | ||
Scripting for Generative AI.<br/> | ||
[Docs](https://microsoft.github.io/genaiscript/) | [GitHub](https://github.com/microsoft/genaiscript/) | ||
class: text-center | ||
# https://sli.dev/custom/highlighters.html | ||
highlighter: shiki | ||
# https://sli.dev/guide/drawing | ||
drawings: | ||
persist: false | ||
# slide transition: https://sli.dev/guide/animations#slide-transitions | ||
#transition: slide-left | ||
# enable MDC Syntax: https://sli.dev/guide/syntax#mdc-syntax | ||
mdc: true | ||
layout: center | ||
--- | ||
|
||
![](https://microsoft.github.io/genaiscript/images/favicon.svg){ style="width: 12rem; margin:auto;" } | ||
|
||
# GenAIScript | ||
|
||
## LLM Agents | ||
|
||
<br/> | ||
<br/> | ||
|
||
https://microsoft.github.io/genaiscript/ | ||
|
||
|
||
--- | ||
src: pages/script.md | ||
--- | ||
|
||
--- | ||
src: pages/tools.md | ||
--- | ||
|
||
--- | ||
src: pages/agents-concept.md | ||
--- | ||
|
||
--- | ||
src: pages/agents-multi.md | ||
--- | ||
|
||
--- | ||
src: pages/agents-memory.md | ||
--- | ||
|
||
--- | ||
src: pages/agents-prd.md | ||
--- |