Update README.md
Browse files
README.md
CHANGED
|
@@ -9,11 +9,15 @@ dataset_info:
|
|
| 9 |
num_examples: 8
|
| 10 |
download_size: 10712
|
| 11 |
dataset_size: 7112
|
|
|
|
| 12 |
configs:
|
| 13 |
- config_name: default
|
| 14 |
data_files:
|
| 15 |
- split: train
|
| 16 |
path: data/train-*
|
|
|
|
|
|
|
|
|
|
| 17 |
---
|
| 18 |
|
| 19 |
|
|
@@ -23,7 +27,7 @@ configs:
|
|
| 23 |
|
| 24 |
## Introducing
|
| 25 |
|
| 26 |
-
The **Augmented Generation Interface Guidebook** is a collection of guides to help you
|
| 27 |
|
| 28 |
## Example
|
| 29 |
|
|
@@ -418,4 +422,126 @@ The LLM answers something different and should keep doing so.
|
|
| 418 |
|
| 419 |
And so it becomes integral to collect carefully crafted guides to help your LLM as Agent (a.k.a your Assistant) to be more relevant to the User expectations.
|
| 420 |
|
| 421 |
-
Keeping the limits of the LLM, the RAG technique and vector databases in mind, the race to retrieve the most relevant guide in the book for the LLM to produce a desirable output at runtime is on!
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
num_examples: 8
|
| 10 |
download_size: 10712
|
| 11 |
dataset_size: 7112
|
| 12 |
+
url: https://github.com/wasertech/Augmented-Generation-Interface
|
| 13 |
configs:
|
| 14 |
- config_name: default
|
| 15 |
data_files:
|
| 16 |
- split: train
|
| 17 |
path: data/train-*
|
| 18 |
+
pretty_name: Augmented Generation Interface
|
| 19 |
+
size_categories:
|
| 20 |
+
- n<1K
|
| 21 |
---
|
| 22 |
|
| 23 |
|
|
|
|
| 27 |
|
| 28 |
## Introducing
|
| 29 |
|
| 30 |
+
The **Augmented Generation Interface Guidebook** is a collection of guides to help you steer your LLM towards success.
|
| 31 |
|
| 32 |
## Example
|
| 33 |
|
|
|
|
| 422 |
|
| 423 |
And so it becomes integral to collect carefully crafted guides to help your LLM as Agent (a.k.a your Assistant) to be more relevant to the User expectations.
|
| 424 |
|
| 425 |
+
Keeping the limits of the LLM, the RAG technique and vector databases in mind, the race to retrieve the most relevant guide in the book for the LLM to produce a desirable output at runtime is on!
|
| 426 |
+
|
| 427 |
+
## How does it work?
|
| 428 |
+
|
| 429 |
+
This project is composed of two parts:
|
| 430 |
+
- The Guidebook
|
| 431 |
+
- The Augmented Generation Interface Retrieval System
|
| 432 |
+
|
| 433 |
+
### The Guidebook
|
| 434 |
+
|
| 435 |
+
You can find the guidebook in raw markdown format under the `guidebook` directory. Its also available on HuggingFace Hub as a dataset: [`wasertech/AGI`](https://huggingface.co/datasets/wasertech/AGI).
|
| 436 |
+
|
| 437 |
+
The guidebook is a collection of guides meticulously crafted to help your LLM produce the most relevant output.
|
| 438 |
+
|
| 439 |
+
Each guide is composed of an action in the form of a title, a guide in the form of a description and a list of intent examples.
|
| 440 |
+
|
| 441 |
+
```
|
| 442 |
+
# Print files and directories
|
| 443 |
+
|
| 444 |
+
When the User ask for the files and directories of a parent directory to be printed, use the `shell` command `ls` to do it and then give an acknowledgment of your actions in your final answer (Your final answer should never contain a list of the files requested; the User can oberserve the shell, they see the files at the same time as you. Just acknowlege the fact that you have printed the list).
|
| 445 |
+
|
| 446 |
+
## Intent Examples
|
| 447 |
+
|
| 448 |
+
- "Print the files and directories of the current directory."
|
| 449 |
+
- "Print the files and directories of the parent directory."
|
| 450 |
+
- "Print the files and directories of the directory above."
|
| 451 |
+
- "Print the files and directories of the directory below."
|
| 452 |
+
- "List the files and directories"
|
| 453 |
+
- "What do we have here?"
|
| 454 |
+
- "What is in this directory?"
|
| 455 |
+
- "What is in the current directory?"
|
| 456 |
+
- "What is in the parent directory?"
|
| 457 |
+
- "List the files and directories of the current directory."
|
| 458 |
+
- "ls please"
|
| 459 |
+
- "ls"
|
| 460 |
+
- "ls -l"
|
| 461 |
+
- "ls -a"
|
| 462 |
+
- "ls -la"
|
| 463 |
+
- "ls -al"
|
| 464 |
+
- "ls -lh"
|
| 465 |
+
- "ls -hl"
|
| 466 |
+
- "ls -lha"
|
| 467 |
+
- "ls -lah"
|
| 468 |
+
- "ls -alh"
|
| 469 |
+
- "ls -ahl"
|
| 470 |
+
- "show me whats in the current directory"
|
| 471 |
+
```
|
| 472 |
+
|
| 473 |
+
Each guide is then loaded into the AGI Retrieval System where it will be processed and indexed for retrieval.
|
| 474 |
+
|
| 475 |
+
### The AGI Retrieval System
|
| 476 |
+
|
| 477 |
+
The AGI Retrieval System is a collection of tools to help you retrieve the most relevant guide at runtime.
|
| 478 |
+
|
| 479 |
+
First the AGI Retrieval System will process the guidebook and index it for retrieval.
|
| 480 |
+
|
| 481 |
+
This step is crutial to find the most relevant guide for the user query at runtime.
|
| 482 |
+
|
| 483 |
+
It will split the documents and keep a map of the guide, the action to perform and the intent examples.
|
| 484 |
+
|
| 485 |
+
```python
|
| 486 |
+
{
|
| 487 |
+
...
|
| 488 |
+
'Print files and directories': {
|
| 489 |
+
'guide': '# Print files and directories\n\nWhen the User ask for the files and directories of a parent directory to be printed, use the `shell` command `ls` to do it and then give an acknowledgment of your actions in your final answer (Your final answer should never contain a list of the files requested; the User can oberserve the shell, they see the files at the same time as you. Just acknowlege the fact that you have printed the list).',
|
| 490 |
+
'intent_examples': [
|
| 491 |
+
'Print the files and directories of the current directory.',
|
| 492 |
+
'Print the files and directories of the parent directory.',
|
| 493 |
+
'Print the files and directories of the directory above.',
|
| 494 |
+
'Print the files and directories of the directory below.',
|
| 495 |
+
'List the files and directories',
|
| 496 |
+
'What do we have here?',
|
| 497 |
+
'What is in this directory?',
|
| 498 |
+
'What is in the current directory?',
|
| 499 |
+
'What is in the parent directory?',
|
| 500 |
+
'List the files and directories of the current directory.',
|
| 501 |
+
'ls please',
|
| 502 |
+
'ls',
|
| 503 |
+
'ls -l',
|
| 504 |
+
'ls -a',
|
| 505 |
+
'ls -la',
|
| 506 |
+
'ls -al',
|
| 507 |
+
'ls -lh',
|
| 508 |
+
'ls -hl',
|
| 509 |
+
'ls -lha',
|
| 510 |
+
'ls -lah',
|
| 511 |
+
'ls -alh',
|
| 512 |
+
'ls -ahl',
|
| 513 |
+
'show me whats in the current directory'
|
| 514 |
+
]
|
| 515 |
+
},
|
| 516 |
+
...
|
| 517 |
+
}
|
| 518 |
+
```
|
| 519 |
+
|
| 520 |
+
Next it creates documents with metadata from the intent examples to create our retriver.
|
| 521 |
+
|
| 522 |
+
```python
|
| 523 |
+
...
|
| 524 |
+
Document(page_content='Print the files and directories of the current directory.', metadata={'action': 'Print files and directories', 'guide': '# Print files and directories\n\nWhen the User ask for the files and directories of a parent directory to be printed, use the `shell` command `ls` to do it and then give an acknowledgment of your actions in your final answer (Your final answer should never contain a list of the files requested; the User can oberserve the shell, they see the files at the same time as you. Just acknowlege the fact that you have printed the list).'}),
|
| 525 |
+
Document(page_content='Print the files and directories of the parent directory.', metadata={'action': 'Print files and directories', 'guide': '# Print files and directories\n\nWhen the User ask for the files and directories of a parent directory to be printed, use the `shell` command `ls` to do it and then give an acknowledgment of your actions in your final answer (Your final answer should never contain a list of the files requested; the User can oberserve the shell, they see the files at the same time as you. Just acknowlege the fact that you have printed the list).'}),
|
| 526 |
+
Document(page_content='Print the files and directories of the directory above.', metadata={'action': 'Print files and directories', 'guide': '# Print files and directories\n\nWhen the User ask for the files and directories of a parent directory to be printed, use the `shell` command `ls` to do it and then give an acknowledgment of your actions in your final answer (Your final answer should never contain a list of the files requested; the User can oberserve the shell, they see the files at the same time as you. Just acknowlege the fact that you have printed the list).'}),
|
| 527 |
+
Document(page_content='Print the files and directories of the directory below.', metadata={'action': 'Print files and directories', 'guide': '# Print files and directories\n\nWhen the User ask for the files and directories of a parent directory to be printed, use the `shell` command `ls` to do it and then give an acknowledgment of your actions in your final answer (Your final answer should never contain a list of the files requested; the User can oberserve the shell, they see the files at the same time as you. Just acknowlege the fact that you have printed the list).'}),
|
| 528 |
+
Document(page_content='List the files and directories', metadata={'action': 'Print files and directories', 'guide': '# Print files and directories\n\nWhen the User ask for the files and directories of a parent directory to be printed, use the `shell` command `ls` to do it and then give an acknowledgment of your actions in your final answer (Your final answer should never contain a list of the files requested; the User can oberserve the shell, they see the files at the same time as you. Just acknowlege the fact that you have printed the list).'}),
|
| 529 |
+
...
|
| 530 |
+
```
|
| 531 |
+
|
| 532 |
+
Finally, it will use the `RAG` technique to retrieve the most relevant guide for the user query at runtime.
|
| 533 |
+
|
| 534 |
+
```text
|
| 535 |
+
Hey give me the time please -> Tell Local Time
|
| 536 |
+
What date is it? -> Tell Local Date
|
| 537 |
+
List my files -> Print files and directories
|
| 538 |
+
Where are we? -> Tell Local Time
|
| 539 |
+
assistant -> Addressing the User by Name
|
| 540 |
+
the screen should be cleaned. -> Clearing the Screen or Starting Anew
|
| 541 |
+
```
|
| 542 |
+
|
| 543 |
+
Notice how it work nicely for most of the queries exept for 'Where are we?'. This is because the guidebook is not exhaustive and the guide for this intent does not contain a similiar intent example. This could easily be fixed by adding more intent examples for this aciton in the guidebook.
|
| 544 |
+
|
| 545 |
+
Our AGIRetriver will return the guide for the most similar intent example relative to the user query.
|
| 546 |
+
|
| 547 |
+
Allowing us to retrieve the most relevant guide for the user query at runtime.
|