-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
The smart_scraper_multi_graph method is too expensive #756
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
Conversation
…pes a list of URLs and merge the content first and finally generates answers to a given prompt. (Different from the SmartScraperMultiGraph is that in this case the content is merged before to be processed by the llm.)
…craper_multi_parse_merge_first_graph_openai_test.py
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please instead of creating a new graph modify the original one
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Modify the smart_scraper_multi_graph.py?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But original method, called the raptor method, is useful for deep extraction or in more complex situation.
My idea is to rename the original smart_scraper_multi_graph.py to smart_scraper_multi_abstract_graph.py, and then name my method smart_scraper_multi_graph.py.
What are your thoughts on this?
thx
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok it looks nice
please can you add in the examples of openai the configuration? |
and please can you call smart_scraper_multi_lite instead of that? |
…er_multi_graph,so delete this file
you mean rename my method name to smart_scraper_multi_lite? |
ok |
Yes please rename it |
The original smart_scraper_multi_graph keeps its original name? |
yes, just change your scraper name, in this way it will be more understandable at the first look |
Hi @shenghongtw, would you like to create more tests on the test folder in another pull request please? |
No problem. |
Hi @shenghongtw I will merge this pr now, when the tests will be ready I will be glad to merge it also them. |
🎉 This PR is included in version 1.27.0-beta.3 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
🎉 This PR is included in version 1.27.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
The smart_scraper_multi_graph method uses LLMs to answer questions both in the smart_scraper_graph and at the MergeAnswer node, which leads to higher costs. I created a new method called SmartScraperMultiParseMergeFirstGraph, which only uses LLMs at the MergeAnswer node. This reduces the cost by half for the same use case and achieve similar results, and the execution time is also shortened (as shown in the figure).


