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

🌎 Pass source metadata through content refresher agent #1185

Merged
merged 7 commits into from
Aug 4, 2023
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
fix source listing
  • Loading branch information
shahrishabh7 committed Aug 3, 2023
commit 605f8a2de7d416b874a86b88572806bec38e3213
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 161,7 @@ async def find_new_info(target: str, source: tuple[str, str, str]) -> str:

# Claude: info mentioned in source that is not mentioned in target
prompt = HumanAssistantPrompt(
human_prompt=f"Below is the TARGET article:\n{target}\n----------------\nBelow is the SOURCE article:\n{source_content}\n----------------\nIn a bullet point list, identify all facts, figures, or ideas that are mentioned in the SOURCE article but not in the TARGET article.\n----------------\nAt the top of the list, include a source citation (you MUST include the url AND full source/article title). Source information: \n{source_info}",
human_prompt=f"Below is the TARGET article:\n{target}\n----------------\nBelow is the SOURCE article:\n{source_content}\n----------------\nIn a bullet point list, identify all facts, figures, or ideas that are mentioned in the SOURCE article but not in the TARGET article. Under the list, write a source citation (you MUST include the url AND full source title provided below: \n{source_info}",
assistant_prompt="Here is a list of claims in the SOURCE that are not in the TARGET:",
)

Expand All @@ -177,7 177,7 @@ async def find_new_info(target: str, source: tuple[str, str, str]) -> str:
async def add_info(target: str, info: str) -> str:
# Claude: rewrite target to include the info
prompt = HumanAssistantPrompt(
human_prompt=f"Below are notes from some SOURCE articles:\n{info}\n----------------\nBelow is the TARGET article:\n{target}\n----------------\nPlease rewrite the TARGET article to include the information from the SOURCE articles. Maintain the format of the TARGET article. At the end of the article, include a list of source references (source url, title, and any additional information) ONLY for added information from SOURCE articles using the following example format: 'Source: https://www.wisnerbaum.com/prescription-drugs/gardasil-lawsuit/, Gardasil Vaccine Lawsuit Update August 2023 - Wisner Baum' Do not add citations for any info in the TARGET article.",
human_prompt=f"Below are notes from some SOURCE articles:\n{info}\n----------------\nBelow is the TARGET article:\n{target}\n----------------\nPlease rewrite the TARGET article to include the information from the SOURCE articles. Maintain the format of the TARGET article. At the end of the article, include a list of sources (source url, title, and any additional information) ONLY for added information from SOURCE articles using the following example format: 'Source: https://www.wisnerbaum.com/prescription-drugs/gardasil-lawsuit/, Gardasil Vaccine Lawsuit Update August 2023 - Wisner Baum' Do not add citations for any info in the TARGET article.",
shahrishabh7 marked this conversation as resolved.
Show resolved Hide resolved
assistant_prompt="Here is a rewritten version of the target article that incorporates relevant information from the source articles:",
)

Expand Down