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

Enhancements and New Feature Implementation: Fix rag and new tools #188

Merged
merged 35 commits into from
Mar 26, 2024

Conversation

moarshy
Copy link
Contributor

@moarshy moarshy commented Mar 12, 2024

This PR encompasses the following updates:

  1. Bug Fixes for Prediction-Request RAG Tool: We've identified and resolved several issues affecting the prediction-request RAG tool, enhancing its stability and performance. These fixes address bugs that were impacting the tool's accuracy.

  2. Conversion of Market Reasoning Tool: The market reasoning tool has been doing very well on the benchmark. We have converted that into a tool for the trader under prediciton_request_reasoning.

  3. New Tool: Chain of Thought Document Analysis: We have had some success with a new tool implementing COT on document/article retrieved from single URL. If a prediction is not reached, we will use the next url. This tool also performs well in the benchmark. This is under prediction_url_cot. On benchmark it scored 0.68.

All can be found under napthaai.

Please review the changes and let us know if there is anything.

Copy link
Collaborator

@Adamantios Adamantios left a comment

Choose a reason for hiding this comment

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

LGTM, can you link the benchmark's results for prediction_url_cot in the description for reference?

@moarshy
Copy link
Contributor Author

moarshy commented Mar 13, 2024

@Adamantios @jmoreira-valory I have also changed the default temp for prediction_request, prediciton_request_sme and claude to 0.


results = result_dict
results = json.dumps(results)
return results, prediction_prompt, None, counter_callback
Copy link
Collaborator

Choose a reason for hiding this comment

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

Fix to match the interface.

Copy link
Collaborator

@jmoreira-valory jmoreira-valory left a comment

Choose a reason for hiding this comment

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

Please, fix the interface of run methods according to https://github.com/valory-xyz/mech/blob/main/README.md#build-your-own, both at definition, and at any return statement within.

Note that second output value is an Optional[Dict[str, Any]], and most times it is wrongly output a string.

A few instances have been marked in the review, but please, verify to cover all of them.

"gpt-4": 8192,
}
ALLOWED_TOOLS = [
"prediction-request-rag",
]
TOOL_TO_ENGINE = {tool: "gpt-3.5-turbo" for tool in ALLOWED_TOOLS}
TOOL_TO_ENGINE = {tool: "gpt-3.5-turbo-0125" for tool in ALLOWED_TOOLS}
Copy link
Collaborator

Choose a reason for hiding this comment

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

When running this tool, we get the following error:

ValueError: Model gpt-3.5-turbo-0125 not supported.

ALLOWED_TOOLS = [
"prediction-request-reasoning",
]
TOOL_TO_ENGINE = {tool: "gpt-4-0125-preview" for tool in ALLOWED_TOOLS}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Same issue here:

ValueError: Model gpt-4-0125-preview not supported.

Copy link
Collaborator

@0xArdi 0xArdi left a comment

Choose a reason for hiding this comment

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

There are issues with the new models introduced in this PR. They don't seem to be supported by either the OpenAI library we are using, or the OpenAI API Key we have.

@richardblythman
Copy link
Contributor

I think this should fix the issue @0xArdi

@0xArdi 0xArdi merged commit 443ffe9 into main Mar 26, 2024
6 checks passed
@0xArdi 0xArdi deleted the chore/fix-rag branch March 26, 2024 08:48
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.

6 participants