Skip to content
Snippets Groups Projects
Commit 0b500b9d authored by Chris Zubak-Skees's avatar Chris Zubak-Skees
Browse files

Merge branch 'update-analysis-support-for-gulf-futures' into 'main'

Update Analysis Support for Gulf Futures

Closes ots/clients/lfc/torque-tracker#374

See merge request !194
parents f3c9c259 bdaad252
No related branches found
No related tags found
1 merge request!194Update Analysis Support for Gulf Futures
title: LLM LFC Analysis
prompts:
- title: Project Overview
prompt: |
Please summarize in 3 bullet points the key
details of the proposal in the following areas: The Challenge, The
Solution and The Plan.
prompts:
- title: The Challenge
prompt: |
Please summarize in 2-3 sentences the challenge the proposal
tackles. This should only include facts and no analysis.
blocks:
- the_problem
- title: The Solution
prompt: |
Please summarize in 2-3 sentences describing the solution and
impact. This should include what, how, and with whom. This
should only include facts and no analysis.
blocks:
- the_solution
- title: The Plan
prompt: |
Please summarize in 2-3 sentences how the award will be used
and what will be achieved. This should only include facts from
the application and no analysis.
Include the following, if available a breakdown of the award
e.g., How much is earmarked for staff, the solution, DEI,
evaluation, etc. What are the targets, outcomes, and results?
Expected direct and/or indirect reach of key stakeholder
groups.
- title: Strength of Approach
prompt: |
Please summarize in 3 bullet points
the key strengths of the proposal in the following areas:
People, Solution and Process.
prompts:
- title: People
prompt: |
Please summarize in 2-4 sentences the strengths, assets, and
experience the named leaders and any partners bring to this
project. How has the organization
involved stakeholders in solution development? How are
diversity, equity, and inclusion embedded in the solution and
lead organization? Please use evidence and name why this
matters, is unique or uncommon.
- title: Solution
prompt: |
Please summarize in 2-4 sentences the strengths of the
proposed solution. Is the problem compelling? Is the market
addressable? Does the solution make sense? What is the 3-5
year impact goal? Is the goal specific and ambitious?
What is the enduring impact, beyond 5 years? Please use
evidence and name why this matters, is unique or uncommon.
blocks:
- the_solution
- panel_comments
- title: Process
prompt: |
Please summarize in 2-4 sentences the strengths of the
proposed process. Does the organization have a credible path
to achieve its goals? What is the organization’s approach to
scale? How does this solution solve a specific problem while
changing systems? Does the budget support the
implementation plan? How does the solution use data to measure,
evaluate, learn, and adapt? Please use evidence
and name why this matters, is unique or uncommon.
blocks:
- the_solution
- panel_comments
- title: Potential Challenges
prompt: |
Please summarize in 3 bullet points the
potential challenges of the proposal. Each bullet point should address
a specific area that can include: Impact, Basis in Evidence,
Feasibility, Durability and Justice.
prompts:
- title: Impact
prompt: |
Please summarize in 2-4 sentences any potential challenges with
the impact of the proposed solution. Please use evidence and
name why this is an important consideration.
blocks:
- projected_impact
- panel_comments
- title: Basis in Evidence
prompt: |
Please summarize in 2-4 sentences any potential challenges with
the evidence based nature of the proposed solution. Please use
evidence and name why this is an important consideration.
blocks:
- the_solution
- panel_comments
- title: Feasibility
prompt: |
Please summarize in 2-4 sentences any potential challenges with
the feasibility of the proposed solution. Please use evidence
and name why this is an important consideration.
blocks:
- the_solution
- panel_comments
- title: Durability
prompt: |
Please summarize in 2-4 sentences any potential challenges with
the durability of the proposed solution. Please use evidence
and name why this is an important consideration.
blocks:
- the_solution
- panel_comments
- title: Justice
prompt: |
Please summarize in 2-4 sentences any potential challenges with
the justice of the proposed solution. Please use evidence and
name why this is an important consideration.
blocks:
- the_solution
- panel_comments
- title: Diversity, Equity, Inclusion, and Accessibility
prompt: |
Please summarize in 3 bullet points
the key details of the proposal as they relate to Diversity,
Equity, Inclusion, and Accessibility in the following areas:
Leadership, Community Engagement and Accessibility.
prompts:
- title: Leardership
prompt: |
Please summarize in 1-3 sentences key details of the
leadership of the proposed solution through the lens of
diversity, equity, and inclusion. Please use
facts and provide no analysis.
- title: Community Engagement
prompt: |
Please summarize in 1-3 sentences key details about the
of the community engagement of the proposed solution through
the lens diversity, equity, and inclusion. Please use facts
and provide no analysis.
- title: Accessibility
prompt: |
If the proposal include plans or funds
for accessibility, please summarize the proposed
solution or accomodation, including the budget if there is
one.
- title: Reputational Risks
prompt: |
Please summarize in less than 3 bullet points
any potential reputational risks contained in the provided search
results. If no reputational risks are surfaced, please state that. Please don't
suggest reputational risks if not directly stated.
prompts:
- title: Reputational Risks
prompt: |
Please summarize in 3 bullet points with 2-4 sentences each any
potential reputational risks associated surfaced in the provided search
results. Please use evidence and name why this is an important consideration.
If no reputational risks are surfaced, please state that. Please don't
suggest reputational risks if not directly stated.
blocks:
- quick_pitch
- title: Other Considerations
prompt: |
Please summarize the proposal in 4-6 bullet points
highlighting review and Peer and Expert Review comments that pose
questions that remain about the proposal and are important
considerations.
prompts:
- title: Other Considerations
prompt: |
Please summarize the proposal in 4-6 reflections highlighting
review and Peer and Expert Review comments that pose questions
that remain about the proposal and are important
considerations.
blocks:
- panel_comments
title: LLM LFC Analysis
prompts:
- title: The Challenge
prompt: |
Please summarize in 2-3 sentences the challenge the proposal
tackles. This should only include facts and no analysis.
blocks:
- the_problem
- title: The Solution
prompt: |
Please provide 2-3 sentence summary describing the solution and impact, including what,
how, and with whom. This should only include facts from the application and no analysis.
blocks:
- the_solution
- title: Implementation Plan
prompt: |
Please provide a two bullet point summary of the implementation plan and
specific targets, outcomes and results.
prompts:
- title: Implementation Plan
prompt: |
Please provide a 5 sentence summary of the implementation plan.
- title: Targets, Outcomes, and Results
prompt: |
Please provide a 5 sentence summary of specific targets, outcomes or results mentioned in the proposal.
- title: Partnerships
prompt: |
Please list any partners involved in the proposed project, separated by commas.
If the proposal does not involve any partners, or if no text from the proposal
is provided, please write “Not Applicable”.
blocks:
- partners
- title: The Three Futures
prompt: |
Summarize in bullet point form the Futures the team identifies in its application.
In each bullet point, describe how the project aims to address the specific Future in 1-3 sentences.
prompts:
- title: The Future of Energy Transition
prompt: |
Does this project align with the The Future of Energy Transition? If so, please describe how. How
does the team plan to address it? If not, please write “Does not align with The Future of Energy
Transition.”
- title: The Future of Environmental Change along the Coast
prompt: |
Does this project align with the The Future of Environmental Change along the Coast? If so, please describe how.
How does the team plan to address it? If not, please write “Does not align with The Future of
Environmental Change along the Coast.”
- title: The Future of Healthy and Resilient Communities
prompt: |
Does this project align with the The Future of Healthy and Resilient Communities? If so, please describe how.
How does the team plan to address it? If not, please write “Does not align with The Future of
Healthy and Resilient Communities.”
- title: Strength of Approach
prompt: |
Please summarize the following proposal, highlighting in bullet point form
3-5 key strengths of the application, and taking into consideration the following:
prompts:
- title: Impactful
prompt: |
Does the proposal address a critical issue affecting the Gulf Coast
region? Will the proposal have a transformative and long-lasting impact that
supports a safe, resilient, and sustainable future for those who call the region
home?
- title: Bridging Knowledge to Action
prompt: |
Does the proposal effectively bridge knowledge to
action? Does the proposal apply, translate, or communicate sciences, engineering,
or medical information in a way that will result in a safe, resilient, sustainable
future for the Gulf and those who call the Gulf Region home?
- title: Innovative
prompt: |
Does the proposal offer a new strategy, approach, process, or
partnership that will more effectively or efficiently support people in the Gulf
Coast region to address, understand, anticipate, and/or adapt to current or future
challenges?
- title: Inclusive
prompt: |
Does the proposal authentically represent, engage, and increase the
participation of people, communities, sectors, and demographic groups in which it
will work? Does the proposal demonstrate an understanding of historical context
or the challenges it seeks to address? Will the proposal support meaningful,
diverse, and mutually beneficial partnerships and collaborations?
- title: Three Futures
prompt: |
Does the proposal align with the three Futures? They are:
The Future of Energy Transition
The Future of Environmental Change along the Coast
The Future of Healthy and Resilient Communities
- title: Scientific Rigor
prompt: |
Does the proposal demonstrate scientific rigor?
Does the proposal use sound scientific methods and data to support its claims?
Does the proposal demonstrate a clear understanding of the scientific literature
and context in which it is working?
- title: Panel Strengths
prompt: |
What are some pecific strengths that have been brought-up by reviewers
(both Participatory and Evaluation Panel reviewers)?
blocks:
- panel_comments
- title: Potential Challenges
prompt: |
Please summarize the following proposal, highlighting in bullet point form
3-5 key weaknesses/areas of improvement, taking into consideration the following:
Please follow the format:
2-5-word phrase: 2-4 sentences explaining the potential challenge, citing evidence, and
naming why it is an important consideration.
prompts:
- title: Impactful
prompt: |
Does the proposal address a critical issue affecting the Gulf Coast
region? Will the proposal have a transformative and long-lasting impact that
supports a safe, resilient, and sustainable future for those who call the region
home?
- title: Bridging Knowledge to Action
prompt: |
Does the proposal effectively bridge knowledge to
action? Does the proposal apply, translate, or communicate sciences, engineering,
or medical information in a way that will result in a safe, resilient, sustainable
future for the Gulf and those who call the Gulf Region home?
- title: Innovative
prompt: |
Does the proposal offer a new strategy, approach, process, or
partnership that will more effectively or efficiently support people in the Gulf
Coast region to address, understand, anticipate, and/or adapt to current or future
challenges?
- title: Inclusive
prompt: |
Does the proposal authentically represent, engage, and increase the
participation of people, communities, sectors, and demographic groups in which it
will work? Does the proposal demonstrate an understanding of historical context
or the challenges it seeks to address? Will the proposal support meaningful,
diverse, and mutually beneficial partnerships and collaborations?
- title: Three Futures
prompt: |
Does the proposal align with the three Futures? They are:
The Future of Energy Transition
The Future of Environmental Change along the Coast
The Future of Healthy and Resilient Communities
- title: Scientific Rigor
prompt: |
Does the proposal demonstrate scientific rigor?
Does the proposal use sound scientific methods and data to support its claims?
Does the proposal demonstrate a clear understanding of the scientific literature
and context in which it is working?
- title: Panel Weaknesses
prompt: |
What are some pecific weaknesses that have been brought-up by reviewers
(both Participatory and Evaluation Panel reviewers)?
blocks:
- panel_comments
- title: Reputational Risks
prompt: |
Please summarize in less than 3 bullet points any potential reputational risks contained
in the provided search results. Please don't invent reputational risks if not directly
stated.
If {Organization Name} is a university, only report information about the
specific center, lab, etc. that is most directly responsible for the application.
If multiple credible sources report a specific issue about {Organization Name}
respond with 2-5 word heading for each issue found, followed by "Multiple articles and publications
have raised this concern about {Organization Name}." Then explain the issue in 2-4 sentences,
and cite sources.
If nothing concerning surfaced respond with "No concerning news on this organizations was uncovered."
blocks:
- quick_pitch
......@@ -68,12 +68,18 @@
## Team Collaboration: Partnership Status
{{ convert_md_to_mwiki(proposal['Team Collaboration']) }}
{% endif -%}
{% block partners %}
{% if 'Key Partners' in proposal and proposal['Key Partners'] -%}
## Partners
{% for key_partner in proposal['Key Partners'] %}
* {{ key_partner['Name'] }}
{% endfor %}
{% endif -%}
{% endblock partners %}
{% if 'Why Your Team' in proposal and proposal['Why Your Team'] -%}
## Why Your Team
{{ convert_md_to_mwiki(proposal['Why Your Team']) }}
......@@ -202,7 +208,7 @@ ${{ commaize_number(proposal['Total Projected Costs']) }}
## Budget
{% for line in proposal['Budget Data'] -%}
* {{ line['description'] }}: ${{ commaize_number(line['amount']) }}
* {{ line['description'] }}
{% endfor %}
{% endif -%}
......@@ -448,10 +454,7 @@ ${{ commaize_number(proposal['Total Projected Costs']) }}
{% endif -%}
{% endfor -%}
{% endif -%}
{% if 'Source' in proposal and proposal['Source'] -%}
## Source
{{ convert_md_to_mwiki(proposal['Source']) }}
{% endif -%}
{% if 'Bibliography' in proposal and proposal['Bibliography'] %}
## Bibliography
......
This diff is collapsed.
TORQUE_PASSWORD = "__PASSWORD__"
TORQUE_USER = "__USERNAME__"
TORQUE_URL = "https://torque.leverforchange.org/GlobalView"
TORQUE_URL = "https://torque.leverforchange.org/"
LLM_API_KEY = "__LLM_API_KEY__"
LLM_ENDPOINT = "__LLM_ENDPOINT__"
......
from dataclasses import asdict
import subprocess
from unittest import mock
from analysis_support import (
LLMProposal,
MarkdownRenderer,
LLM,
AnalysisRequest,
AnalysisResponse,
LLM,
MarkdownRenderer,
Proposal,
clean_text,
)
# Test convert_md_to_mwiki #
......@@ -68,16 +67,7 @@ def test_without_intro_with_colon():
def test_without_intro_without_colon():
assert (
AnalysisResponse(id="1", value="Intro.\n\nSome content").without_intro().value
== "Some content"
)
def test_without_intro_not_bullets():
assert (
AnalysisResponse(id="1", value="• Not an intro.\n\n• Some content")
.without_intro()
.value
== "• Not an intro.\n\n• Some content"
== "Intro.\n\nSome content"
)
......@@ -85,7 +75,7 @@ def test_without_intro_not_bullets():
def test_render_proposal_markdown():
output = LLMProposal(
output = Proposal(
{"Organization Name": "Name", "Project Title": "Title"}
).render_markdown()
assert output.startswith("# Name\n\n## Title\n")
......@@ -117,7 +107,7 @@ def test_make_llm_request_success(mocked_requests):
llm = LLM(endpoint="http://example.com", api_key="key")
response = llm.make_request(path, data, **params)
response = llm.make_request(path, data=data, **params)
assert response == {"result": "success"}
assert mocked_requests.called
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment