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

feat: adding deep research example #110

Merged
merged 26 commits into from
Jan 24, 2025
Merged

feat: adding deep research example #110

merged 26 commits into from
Jan 24, 2025

Conversation

dereklegenzoff
Copy link
Contributor

Adds an example showing a "deep research" pattern.

The workflow starts with a prompt and then goes through the following steps to generate a research report:

  1. Converts the prompt into a series of queries
  2. Uses the Arxiv API to retrieve relevant research papers
  3. Determines if the papers are relevant to the prompt
  4. Scrapes the full text of the relevant papers using the Firecrawl API
  5. Summarizes the relevant parts of the papers
  6. Uses the summaries to generate a research report

summary: (
<Firecrawl url={url}>
{(markdown: string | null) =>
markdown && <SummarizePaper markdown={markdown} prompt={prompt} />
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I love that this works

Copy link
Contributor

@jmoseley jmoseley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great. Nice work. Sample output?

"@types/node": "^20.17.11",
"@types/xml2js": "^0.4.14",
"nodemon": "^3.1.9",
"prettier": "^3.0.0",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I notice it is in the other examples as well, but I don't think this is necessary, as we have it in the root package.json.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ahh makes sense. I've just been copying example folders and updating them so that explains the proliferation. I'll remove it in this one and go clean up the others at some point.

Copy link

cloudflare-workers-and-pages bot commented Jan 23, 2025

Deploying gensx with  Cloudflare Pages  Cloudflare Pages

Latest commit: 126445d
Status: ✅  Deploy successful!
Preview URL: https://314397e9.gensx.pages.dev
Branch Preview URL: https://derek-deepresearch.gensx.pages.dev

View logs

@github-actions github-actions bot added the core label Jan 23, 2025
Copy link
Member

@EvanBoyle EvanBoyle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Should probably use docs: instead of feat: as features will trigger a new release.

}>({});

// Create the provider
export const FirecrawlProvider = gsx.Component<FirecrawlAppConfig, never>(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should consider turning this into a package at some point.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agreed, i already actually had to duplicate this code from the providers example so even more reason to turn it into a package.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should have a group discussion (that we should have had earlier probably) about the tradeoffs/ergonomics of individual packages (@gensx/firecrawl) vs an umbrella package (eg @gensx/services). There are maintenance burden tradeoffs I think.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I definitely lean towards individual packages even considering the tooling burden, but happy to have that discussion sooner rather than later.

@dereklegenzoff
Copy link
Contributor Author

Should probably use docs: instead of feat: as features will trigger a new release.

Fair, but now this branch has some updates to gsx.array in it, although i could push that to a separate branch if you prefer.

Copy link
Member

@EvanBoyle EvanBoyle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New array impl looks good!

@EvanBoyle
Copy link
Member

Should probably use docs: instead of feat: as features will trigger a new release.

Fair, but now this branch has some updates to gsx.array in it, although i could push that to a separate branch if you prefer.

Makes sense, I left this comment before you made these changes so keeping feat now makes sense.

@dereklegenzoff dereklegenzoff merged commit d7c33f2 into main Jan 24, 2025
7 checks passed
@dereklegenzoff dereklegenzoff deleted the derek/deepresearch branch January 24, 2025 22:17
EvanBoyle pushed a commit that referenced this pull request Jan 28, 2025
🤖 I have created a release *beep* *boop*
---


##
[0.2.6](gensx-v0.2.5...gensx-v0.2.6)
(2025-01-28)


### ✨ New Features

* Add secrets masking
([#182](#182))
([17826a7](17826a7))
* adding deep research example
([#110](#110))
([d7c33f2](d7c33f2))
* adding support for generic arrays in gsx.array
([#173](#173))
([3d8795a](3d8795a))


### 📚 Documentation

* add discord links and update github links
([#179](#179))
([a919345](a919345))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants