Skip to content

Commit

Permalink
Merge pull request #245 from polywrap/dev
Browse files Browse the repository at this point in the history
Dev Release March 25th
  • Loading branch information
dOrgJelli authored Mar 25, 2024
2 parents c8d64fd + 648b23b commit ebc9d7b
Show file tree
Hide file tree
Showing 9 changed files with 74 additions and 19 deletions.
17 changes: 8 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# evo.sage
![](./content/evo-sage-banner.png)
# fundpublicgoods.ai

![](./content/fundpublicgoods.jpg)

---

Expand All @@ -9,21 +10,19 @@

## Welcome!

evo.sage is an agent that specializes in streamlining resource allocation. Try it now at [fundpublicgoods.ai](https://fundpublicgoods.ai)

![](./content/fundpublicgoods-ss.jpg)
fundpublicgoods.ai is an AI agent that specializes in streamlining resource allocation. Try it now at [fundpublicgoods.ai](https://fundpublicgoods.ai)

## Need Help?

Join our [Discord community](https://discord.gg/k7UCsH3ps9) for support and discussions.

[![Join us on Discord](https://invidget.switchblade.xyz/k7UCsH3ps9)](https://discord.com/invite/k7UCsH3ps9)

If you have questions or encounter issues, please don't hesitate to [create a new issue](https://github.com/polywrap/evo.sage/issues/new) to get support.
If you have questions or encounter issues, please don't hesitate to [create a new issue](https://github.com/polywrap/fundpublicgoods/issues/new) to get support.

## How it works

evo.sage is designed to generate funding allocation strategies based on the user's preferences and publicly available data. In its first implementation, it focuses on how to best allocate funds to Public Good Projects (PGPs) that were apart of past [GitCoin](https://www.gitcoin.co/) rounds.
fundpublicgoods.ai is designed to generate funding allocation strategies based on the user's preferences and publicly available data. It focuses on how to best allocate funds to Public Good Projects (PGPs) that were apart of past [GitCoin](https://www.gitcoin.co/) rounds.

Digging a bit deeper, here are the steps the agent takes when creating an allocation strategy:

Expand All @@ -33,11 +32,11 @@ Digging a bit deeper, here are the steps the agent takes when creating an alloca

3. **Compute Evaluation Scores.** Analyze each report and assign a numerical evaluation score from 0-10 for each of the three criteria. Combine these scores through a weighted average to arrive at the project’s overall score. Weight the allocation percentages in proportion to scores of the projects with addresses on the selected chain. *Techniques used: [RAG](https://www.promptingguide.ai/techniques/rag), Numerical Evaluations, Algorithmic Composition*

![](./content/strategy-ss.png)
![](./content/strategy.png)

The allocation strategy includes a report for each project summarizing the agent’s findings.

![](./content/report-ss.png)
![](./content/report.png)

One critical aspect of the report is the impact section. The agent uses information from the project’s Gitcoin round applications to arrive at an intelligent estimate of the impact that a project has had.

Expand Down
Binary file removed content/evo-sage-banner.png
Binary file not shown.
File renamed without changes
File renamed without changes
File renamed without changes
6 changes: 1 addition & 5 deletions web/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,5 @@ function generateUniqueIndexes(arrayLength: number, count: number): number[] {
export default function HomePage() {
const promptIdxs = generateUniqueIndexes(EXAMPLE_PROMPTS.length, 6);

return (
<div className='flex h-full items-center justify-center'>
<Prompt promptIdxs={promptIdxs} />
</div>
);
return <Prompt promptIdxs={promptIdxs} />;
}
10 changes: 7 additions & 3 deletions web/components/Disclaimer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,20 @@ const Disclaimer = () => {
<div className='fixed bottom-16 left-1/2 transform -translate-x-1/2 max-w-screen-sm w-[calc(100%-48px)] z-10'>
<X
onClick={() => setShowDisclaimer(false)}
className='absolute top-4 right-4 text-indigo-800 hover:text-indigo-500 cursor-pointer'
className='absolute top-3 right-3 text-indigo-800 hover:text-indigo-500 cursor-pointer'
size={20}
weight='bold'
/>
<div className='p-6 bg-indigo-25 rounded-2xl border-2 border-indigo-200 space-y-1 shadow-md shadow-primary-shadow/20'>
<div className='font-bold text-sm'>
This AI agent is experimental.
</div>
<div className="text-[10px]">
The agent is evaluating projects based on self-reported data through past Gitcoin applications and therefore cannot guarantee their accuracy at this time. The agent also cannot guarantee that each project is still in control of its address, so please double check before sending large amounts.
<div className='text-[10px]'>
The agent is evaluating projects based on self-reported data through
past Gitcoin applications and therefore cannot guarantee their
accuracy at this time. The agent also cannot guarantee that each
project is still in control of its address, so please double check
before sending large amounts.
</div>
</div>
</div>
Expand Down
42 changes: 42 additions & 0 deletions web/components/IntroPopUp.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
"use client";

import { X } from "@phosphor-icons/react/dist/ssr";
import { SparkleIcon } from "./Icons";
import { Dispatch, SetStateAction } from "react";

interface IntroPopupProps {
setShowIntro: Dispatch<SetStateAction<boolean>>;
}

const IntroPopUp = ({ setShowIntro }: IntroPopupProps) => {
const handleClose = () => {
setShowIntro(false);
localStorage.setItem("introClosed", "true");
};

return (
<div className='fixed bottom-16 left-1/2 transform -translate-x-1/2 max-w-screen-md w-[calc(100%-48px)] z-10'>
<X
onClick={handleClose}
className='absolute top-3 right-3 text-indigo-800 hover:text-indigo-500 cursor-pointer'
size={20}
weight='bold'
/>
<div className='p-6 bg-indigo-25 rounded-2xl border-2 border-indigo-200 space-y-1 shadow-md shadow-primary-shadow/20'>
<div className='flex items-center'>
<SparkleIcon size={24} className='transform -translate-x-1' />
<div className='text-lg font-bold'>
Welcome to fundpublicgoods.ai!
</div>
</div>
<div className='text-[14px] leading-relaxed'>
This is a proof-of-concept to showcase the potential of AI agents to
assist users with complex transactions. Give it a try and let us know
what you think!
</div>
</div>
</div>
);
};

export default IntroPopUp;
18 changes: 16 additions & 2 deletions web/components/Prompt.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,11 @@ import { startRun } from "@/app/actions";
import clsx from "clsx";
import { EXAMPLE_PROMPTS } from "@/utils/examplePrompts";
import { toast } from "react-toastify";
import IntroPopUp from "./IntroPopUp";

export default function Prompt({ promptIdxs }: { promptIdxs: number[] }) {
const [prompt, setPrompt] = useState<string>("");
const [showIntro, setShowIntro] = useState<boolean>(false);
const [isWaiting, setIsWaiting] = useState(false);
const { data: session } = useSession();
const searchParams = useSearchParams();
Expand Down Expand Up @@ -42,8 +44,19 @@ export default function Prompt({ promptIdxs }: { promptIdxs: number[] }) {
}
}, [searchParams, router]);

useEffect(() => {
const introClosed = localStorage.getItem("introClosed");
if (!introClosed) {
setShowIntro(true);
}
}, []);

return (
<>
<div
className={clsx(
"flex h-full justify-center md:items-center md:pt-0",
showIntro ? "items-start pt-8" : "items-center"
)}>
<div className='mx-auto max-w-screen-lg'>
<div className='w-full space-y-8 px-6 flex flex-col items-center'>
<div className='space-y-4 flex flex-col items-center w-full'>
Expand Down Expand Up @@ -88,6 +101,7 @@ export default function Prompt({ promptIdxs }: { promptIdxs: number[] }) {
</div>
</div>
</div>
</>
{showIntro && <IntroPopUp setShowIntro={setShowIntro} />}
</div>
);
}

0 comments on commit ebc9d7b

Please sign in to comment.