Skip to content

fix: Update the prompt for the search_link_node #239

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

Merged
merged 1 commit into from
May 14, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions scrapegraphai/nodes/search_link_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,16 @@ def execute(self, state: dict) -> dict:
prompt_relevant_links = """
You are a website scraper and you have just scraped the following content from a website.
Content: {content}
You are now asked to find all relevant links from the extracted webpage content related
to prompt {user_prompt}. Only pick links which are valid and relevant

You are now tasked with identifying all hyper links within the content that are potentially
relevant to the user task: {user_prompt}

Assume relevance broadly, including any links that might be related or potentially useful
in relation to the task.

Please list only valid URLs and make sure to err on the side of inclusion if it's uncertain
whether the content at the link is directly relevant.

Output only a list of relevant links in the format:
[
"link1",
Expand Down