Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update conversation > tools page with more information / examples #8113

Merged
merged 4 commits into from
Nov 21, 2024

Conversation

atierian
Copy link
Member

Description of changes:

Adds explanations and updates examples in Conversation > Tools page.

Related GitHub issue #, if available:

Instructions

If this PR should not be merged upon approval for any reason, please submit as a DRAFT

Which product(s) are affected by this PR (if applicable)?

  • amplify-cli
  • amplify-ui
  • amplify-studio
  • amplify-hosting
  • amplify-libraries

Which platform(s) are affected by this PR (if applicable)?

  • JS
  • Swift
  • Android
  • Flutter
  • React Native

Please add the product(s)/platform(s) affected to the PR title

Checks

  • Does this PR conform to the styleguide?

  • Does this PR include filetypes other than markdown or images? Please add or update unit tests accordingly.

  • Are any files being deleted with this PR? If so, have the needed redirects been created?

  • Are all links in MDX files using the MDX link syntax rather than HTML link syntax?

    ref: MDX: [link](https://docs.amplify.aws/)
    HTML: <a href="https://docs.amplify.aws/">link</a>

When this PR is ready to merge, please check the box below

  • Ready to merge

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@atierian atierian requested a review from a team as a code owner November 20, 2024 19:18
dbanksdesign
dbanksdesign previously approved these changes Nov 20, 2024

Tools allow LLMs to take action or query information so it can respond with up to date information. There are a few different ways to define LLM tools in the Amplify AI kit.
There are a few different ways to define LLM tools in the Amplify AI kit.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
There are a few different ways to define LLM tools in the Amplify AI kit.
There are three ways to define LLM tools in the Amplify AI kit.

a few feels too vague for documentation.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are actually four 🙈
The last one is client tools. Let's update this to four when we add the client tool docs.


1. Model tools
2. Query tools
3. Lambda tools

The easiest way you can define tools for the LLM to use is with data models and custom queries in your data schema. When you define tools in your data schema, Amplify will take care of all of the heavy lifting required to properly implement such as:
The easiest way to define tools for your conversation route is with `a.ai.dataTool()` for data models and custom queries in your data schema. When you define a tool for a conversation route, Amplify takes care of the heavy lifting:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The easiest way to define tools for your conversation route is with `a.ai.dataTool()` for data models and custom queries in your data schema. When you define a tool for a conversation route, Amplify takes care of the heavy lifting:
The easiest way to define tools for your conversation route is by using `a.ai.dataTool()` data tool. Data tools can use a model generated list query or a custom query.
Data tools are used with data models and custom queries in your data schema alongside with Amplify automatically handling the complex operations such as generating appropriate prompts, executing necessary database queries, and formatting results for the AI to utilize.

IMO this stil needed to be deeper. I rewrote but I am not sure about it.


## Model tools

You can give the LLM access to your data models by referencing them in an `a.ai.dataTool()` with a reference to a model in your data schema.
You can give the LLM access to your data models by referencing them in an `a.ai.dataTool()` with a reference to a model in your data schema. This requires that the model uses at least one of the following authorization strategies:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are missing a sentence about "Model tools". What I look for is something around "Model tools are xxxxx"

@atierian atierian enabled auto-merge (squash) November 20, 2024 21:35
@atierian atierian merged commit ff3feb8 into main Nov 21, 2024
12 checks passed
@atierian atierian deleted the custom-tool-inline-docs branch November 21, 2024 02:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants