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

verbose widget descriptions and tags #214

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from

Conversation

alcueca
Copy link

@alcueca alcueca commented Aug 2, 2023

Hopefully this will enable cacti to identify better the purpose and context of each widget, so that it can choose more accurately and be more self-aware.

@alcueca alcueca requested a review from sgzsh269 August 2, 2023 14:34
@@ -1,5 +1,10 @@
- _name_: display_transfer
description: Transfer a token from a user's wallet to another address
description: Tokens in Ethereum represent assets. They can be used to represent
Copy link
Collaborator

Choose a reason for hiding this comment

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

The PR generally is fine, trying to better understand the context behind updating the description to improve model performance.

This file is translated in 2 places:-

One factor to consider while adding more text in the description is the impact on model's context window length as that is limited.

Moreover, we also have a model evaluation framework to test the effectiveness of new changes implemented by
Harsh, so it would help to use that to objectively check if tweaking the descriptions lead to improvements.
@harshraj172 can you help review this and share how to test the changes

Copy link
Collaborator

Choose a reason for hiding this comment

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

Another point, providing background knowledge such as the following could be unnecessary as there's a good chance the GPT-4 model already knows about it from being pre-trained on internet data uptil 2021

NFTs are non-fungible tokens. They are unique and can be used to represent ownership of digital assets. Usually, they include some sort of image or other media and can be traded.

Copy link
Collaborator

@harshraj172 harshraj172 Aug 2, 2023

Choose a reason for hiding this comment

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

you can test the changes this description has by using eval framework # 3 here..

Copy link
Collaborator

Choose a reason for hiding this comment

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

Another thought: currently widgets.yaml is meant to be geared towards AI understanding and is not human-facing, i.e. it is an implementation detail (ideally hidden from user) for the app.

If we need to also expose these widgets/descriptions to a user, we should discuss the best way to approach that (i.e. possibly have a separate file or separate field just for displaying to the user, so as to not conflate the two purposes).

If we find that the model can't understand concepts like NFT, token, etc, such that a more verbose description is helpful, we might want a separate embeddings look-up step that injects short "explainers" for concepts relevant to the user query into the prompt. This way, there's no duplication happening when we have similar widgets. Or we have these explainers at each widget level but deduplicate them into their own section, potentially as part of the system prompt. But to Sagar's point, it will eat up the token budget of the context window.

@sgzsh269 sgzsh269 requested a review from harshraj172 August 2, 2023 15:22
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.

4 participants