Last active
April 24, 2025 00:33
-
-
Save Elijas/d7c4004904f394f87265447f40baf83b to your computer and use it in GitHub Desktop.
brainstorm-fundamental-building-blocks-for-ai-systems.txt
This file contains hidden or 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
LEGEND | |
<processing> | |
[data] | |
+ binary operator for structurally separable data | |
& binary operator for structurally inseparable data | |
(e.g. data and instructions in prompts are mixed up) | |
█ lines are the parts that are FUNCTION IMPLEMENTATION | |
| lines are the parts that are just scaffolding/definitions | |
BAML provides all scaffolding to create LLM FUNCTIONS | |
how does a good scaffolding AGENT FUNCTION look like | |
/======= FUNCTION =======\ # Actions are also FUNCTIONS | |
| | |
█ <processing> | |
| | |
| [structuredOutput] | |
| | |
\========================/ | |
/=========== LLM FUNCTION ==========\ | |
| | |
█ <llmRequestBuilder> | |
█ | |
█ [ llmId | |
+ modelParams | |
+ instruction | |
& instructionContext | |
& structuredOutputDescr ] | |
| | |
| <llm> # baml sends request | |
| | |
| [completion] | |
| | |
| <parser> # baml parses completion | |
| | |
| [structuredOutput] | |
| | |
\====================================/ | |
/===== LOOP STATE MANAGER FUNCTION ===\ | |
| | |
| loop { | |
| | |
█ <loop state builder> | |
█ | |
█ [ functionId | |
+ task | |
+ taskContext | |
+ workingMemory | |
+ actionsWithParamsDescr ] | |
| | |
| | |
| <function> # action routing AND action param filling | |
# usually this will be a single LLM FUNCTION | |
# but doesn't (!) HAVE to be | |
| | |
| | |
| [actionWithParams] | |
| | |
| | |
| <runner> | |
| | |
| } | |
| | |
| [structuredOutput] # also external effects of the actions taken | |
| | |
\====================================/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment